Open main menu

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

m
Text replacement - "</source>" to "</syntaxhighlight>"
(Correct paragraph about Windows XP compatibility.)
m (Text replacement - "</source>" to "</syntaxhighlight>")
Line 38: Line 38:
pacman --noconfirm -Sy
pacman --noconfirm -Sy
pacman --needed --noconfirm -S bash pacman pacman-mirrors msys2-runtime
pacman --needed --noconfirm -S bash pacman pacman-mirrors msys2-runtime
</source>
</syntaxhighlight>


For i686 (32-bit), type the following in the MSYS2 terminal to automatically install all packages/libraries needed to compile ScummVM:
For i686 (32-bit), type the following in the MSYS2 terminal to automatically install all packages/libraries needed to compile ScummVM:
<source lang="bash">
<source lang="bash">
pacman -S --needed --noconfirm base-devel git mingw-w64-i686-{curl,faad2,freetype,flac,fluidsynth,libjpeg-turbo,libogg,libvorbis,libmad,libmpeg2-git,libtheora,libpng,nasm,readline,SDL2,SDL2_net,toolchain,winsparkle,zlib}
pacman -S --needed --noconfirm base-devel git mingw-w64-i686-{curl,faad2,freetype,flac,fluidsynth,libjpeg-turbo,libogg,libvorbis,libmad,libmpeg2-git,libtheora,libpng,nasm,readline,SDL2,SDL2_net,toolchain,winsparkle,zlib}
</source>
</syntaxhighlight>


For x86_64 (64-bit), type the following in the MSYS2 terminal to automatically install all packages/libraries needed to compile ScummVM:
For x86_64 (64-bit), type the following in the MSYS2 terminal to automatically install all packages/libraries needed to compile ScummVM:
<source lang="bash">
<source lang="bash">
pacman -S --needed --noconfirm base-devel git mingw-w64-x86_64-{curl,faad2,freetype,flac,fluidsynth,libjpeg-turbo,libogg,libvorbis,libmad,libmpeg2-git,libtheora,libpng,nasm,readline,SDL2,SDL2_net,toolchain,winsparkle,zlib}
pacman -S --needed --noconfirm base-devel git mingw-w64-x86_64-{curl,faad2,freetype,flac,fluidsynth,libjpeg-turbo,libogg,libvorbis,libmad,libmpeg2-git,libtheora,libpng,nasm,readline,SDL2,SDL2_net,toolchain,winsparkle,zlib}
</source>
</syntaxhighlight>


These commands will fetch and install the packages needed for compiling, including (but not limited to) GCC 6.x, GDB, and libwinpthread-git.
These commands will fetch and install the packages needed for compiling, including (but not limited to) GCC 6.x, GDB, and libwinpthread-git.
Line 60: Line 60:
<source lang="bash">
<source lang="bash">
pacman -S mingw-w64-<env>-<library>
pacman -S mingw-w64-<env>-<library>
</source>
</syntaxhighlight>
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 86: Line 86:
$> ./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.
</source>
</syntaxhighlight>


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:
<source lang="bash">
<source lang="bash">
$> strip scummvm.exe
$> strip scummvm.exe
</source>
</syntaxhighlight>


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

edits