Compiling MTASA: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Added PT-BR page)
No edit summary
Line 5: Line 5:


Before you can build Multi Theft Auto, make sure you have the following software and SDKs installed:
Before you can build Multi Theft Auto, make sure you have the following software and SDKs installed:
* Microsoft Visual Studio 2008 ([http://www.microsoft.com/downloads/en/details.aspx?FamilyId=FBEE1648-7106-44A7-9649-6D9F6D58056E&displaylang=en SP1 required])
* Microsoft Visual Studio 2013
* [http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=6812 Microsoft DirectX SDK] (only the Direct3D related components are required)
* [http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=6812 Microsoft DirectX SDK] (only the Direct3D related components are required)
* [http://www.microsoft.com/en-us/download/details.aspx?id=6510 Microsoft Platform SDK] (not required on Windows 7, only the DirectShow components are required)
* [http://www.microsoft.com/en-us/download/details.aspx?id=6510 Microsoft Platform SDK] (not required on Windows 7, only the DirectShow components are required)
Line 17: Line 17:
=== Before building the software ===
=== Before building the software ===


To ensure the target directories have the correct permissions it is '''vital''' to install [http://nightly.mtasa.com/ the latest unstable nightly] into this '''exact''' directory:
To ensure the target directories have the correct permissions it is '''vital''' to install [http://nightly.mtasa.com/?mtasa-1.6-full_unstable-latest the latest unstable nightly Windows full installer] into this '''exact''' directory:
     C:\Program Files\MTA San Andreas x.x\
     C:\Program Files\MTA San Andreas 1.6\
Where x.x is the version you are compiling for. If you have 64 bit windows, be sure to remove (x86) from the path.
If you have 64 bit windows, be sure to remove (x86) from the path.


=== Building the software ===
=== Building the software ===


In order to build the source, you will need Microsoft Visual Studio. Open the project file in '''Shared/Core 2008.sln''' and build using one of the project configurations ''Debug'' or ''Release''. Note that everything will run significantly slower in ''Debug'' mode.
In order to build the source, you will need Microsoft Visual Studio. Open the project file in '''Shared/Core 2013.sln''' and build using one of the project configurations ''Debug'' or ''Release''. Note that everything will run significantly slower in ''Debug'' mode.


=== Target directory and permissions ===
=== Target directory and permissions ===


By default, the current version compiles the binaries into 'C:\Program Files\MTA San Andreas 1.5\'. To ensure the correct permissions, registry entries and support files are present, you should install [http://nightly.mtasa.com/ the latest unstable nightly] and [http://mirror.mtasa.com/mtasa/data/ the latest data files] into that directory. Also make sure to add write permissions for your user to that directory.
By default, the current version compiles the binaries into 'C:\Program Files\MTA San Andreas 1.6\'. To ensure the correct permissions, registry entries and support files are present, you should install [http://nightly.mtasa.com/?mtasa-1.6-full_unstable-latest the latest unstable nightly Windows full installer] into that directory. Also make sure to add write permissions for your user to that directory.


=== Getting the latest network module ===
=== Getting the latest network module ===
Line 39: Line 39:
=== Running the game client ===
=== Running the game client ===


Double check you have installed [http://nightly.mtasa.com/ the latest unstable nightly] and [http://mirror.mtasa.com/mtasa/data/ the latest data files].
Double check you have installed [http://nightly.mtasa.com/?mtasa-1.6-full_unstable-latest the latest unstable nightly Windows full installer].


=== Running the dedicated server ===
=== Running the dedicated server ===
Line 47: Line 47:
Our official resources repository is hosted on GitHub: [https://github.com/multitheftauto/mtasa-resources]. It's recommended that you check out the latest resources from here or download a zipped revision from the [http://mirror.mtasa.com/mtasa/resources/ Downloads] tab on the resources project. Make sure that you are not using any of our resources from any previous versions of Multi Theft Auto, as this '''will''' cause issues.
Our official resources repository is hosted on GitHub: [https://github.com/multitheftauto/mtasa-resources]. It's recommended that you check out the latest resources from here or download a zipped revision from the [http://mirror.mtasa.com/mtasa/resources/ Downloads] tab on the resources project. Make sure that you are not using any of our resources from any previous versions of Multi Theft Auto, as this '''will''' cause issues.


If you have any problems with missing DLL files (e.g. libcurl.dll), simply copy these over from the client's data archive described above.
If you have any problems with missing DLL files (e.g. libcurl.dll), then you didn't install the Windows full installer properly.


= Getting involved =
= Getting involved =

Revision as of 22:56, 8 December 2015

In order to successfully build Multi Theft Auto from source, it is necessary to perform a number of steps, which we will explain below.

Prerequisites

Before you can build Multi Theft Auto, make sure you have the following software and SDKs installed:

If you haven't already done so, install a client such as SourceTree or GitHub for Windows, which can be used to download and manage the code.

Getting the latest source code

To get the latest code, you will have to download the latest copy of our Git repository - you can get it here (zip|tar.gz)

Before building the software

To ensure the target directories have the correct permissions it is vital to install the latest unstable nightly Windows full installer into this exact directory:

   C:\Program Files\MTA San Andreas 1.6\

If you have 64 bit windows, be sure to remove (x86) from the path.

Building the software

In order to build the source, you will need Microsoft Visual Studio. Open the project file in Shared/Core 2013.sln and build using one of the project configurations Debug or Release. Note that everything will run significantly slower in Debug mode.

Target directory and permissions

By default, the current version compiles the binaries into 'C:\Program Files\MTA San Andreas 1.6\'. To ensure the correct permissions, registry entries and support files are present, you should install the latest unstable nightly Windows full installer into that directory. Also make sure to add write permissions for your user to that directory.

Getting the latest network module

Since the netc.dll/net.dll network modules for the client are covered by a different license, you will have to use the binary files that get installed with the latest nightly. If you want to run a debug version of MTA, MTA expects a debug version of the net dll. As we don't provide this, you can append '_d' to the filename of a release dll.

Running the software

You are almost ready to run your build of the Multi Theft Auto software.

Running the game client

Double check you have installed the latest unstable nightly Windows full installer.

Running the dedicated server

If you want to run the Multi Theft Auto dedicated server, you will have to install the required resources. These are required because they implement the most basic functionality (e.g. spawning players) in order to play.

Our official resources repository is hosted on GitHub: [1]. It's recommended that you check out the latest resources from here or download a zipped revision from the Downloads tab on the resources project. Make sure that you are not using any of our resources from any previous versions of Multi Theft Auto, as this will cause issues.

If you have any problems with missing DLL files (e.g. libcurl.dll), then you didn't install the Windows full installer properly.

Getting involved

Please see our Coding guidelines for information on coding practice.

Additional information

If you need more information, try our bug tracker, IRC channel.