Open main menu

Difference between revisions of "Compiling ScummVM/MinGW-w64"

Fix syntax highlighting
(Fix syntax highlighting)
Line 19: Line 19:
==== Download and install the mingw-w64 compilation toolchain====
==== Download and install the mingw-w64 compilation toolchain====
In the MSYS2 terminal, type:
In the MSYS2 terminal, type:
<syntax type="bash">
<source lang="bash">
$> pacman -S mingw-w64-<env>-toolchain
$> pacman -S mingw-w64-<env>-toolchain
</syntax>
</source>
where <env> is either x86_64 or i686, depending on your architecture (64-bit and 32-bit, respectively).
where <env> is either x86_64 or i686, depending on your architecture (64-bit and 32-bit, respectively).


Line 31: Line 31:
MSYS2 does not support make out of the box, but it has its own implementation. Install it by typing:
MSYS2 does not support make out of the box, but it has its own implementation. Install it by typing:


<syntax type="bash">
<source lang="bash">
$> pacman -S make
$> pacman -S make
</syntax>
</source>


=== Install the needed libraries ===
=== Install the needed libraries ===
In order to compile properly, ScummVM needs you to have certain libraries installed. All the libraries in the list can be installed with similar commands:
In order to compile properly, ScummVM needs you to have certain libraries installed. All the libraries in the list can be installed with similar commands:
<syntax type="bash">
<source lang="bash">
$> pacman -S mingw-w64-<env>-<library>
$> pacman -S mingw-w64-<env>-<library>
</syntax>
</source>
where <env> is the environment as previously stated, and <library> is the name of the library, as stated in the list (e.g. pacman -S mingw-w64-x86_64-SDL):
where <env> is the environment as previously stated, and <library> is the name of the library, as stated in the list (e.g. pacman -S mingw-w64-x86_64-SDL):


Line 70: Line 70:
Finally, we are ready to compile the project!
Finally, we are ready to compile the project!
To do that, just open a MSYS2 console, [http://gvsigce.sourceforge.net/wiki/index.php/Getting_started_with_MSYS#Navigating_the_file_system navigate] to the source folder where you have cloned scummvm.git, and type the following commands:
To do that, just open a MSYS2 console, [http://gvsigce.sourceforge.net/wiki/index.php/Getting_started_with_MSYS#Navigating_the_file_system navigate] to the source folder where you have cloned scummvm.git, and type the following commands:
<syntax type="bash">
<source lang="bash">
$> ./configure # Executes a bash script that helps you configure.
$> ./configure # Executes a bash script that helps you configure.
$> make # Executes the make program, which triggers the compilation.
$> make # Executes the make program, which triggers the compilation.
</syntax>
</source>


If everything went well, you should have a big executable in the compilation folder, named scummvm.exe. The size of the executable comes from the debug symbols embedded in the file, so you can run the following command to shrink it:
If everything went well, you should have a big executable in the compilation folder, named scummvm.exe. The size of the executable comes from the debug symbols embedded in the file, so you can run the following command to shrink it:
<syntax type="bash">
<source lang="bash">
$> strip scummvm.exe
$> strip scummvm.exe
</syntax>
</source>


== Ready to go! ==
== Ready to go! ==
TrustedUser
2,147

edits