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

Jump to navigation Jump to search
m
Text replacement - "<source lang=" to "<syntaxhighlight lang="
m (Text replacement - "</source>" to "</syntaxhighlight>")
m (Text replacement - "<source lang=" to "<syntaxhighlight lang=")
Line 35: Line 35:
To create an i686 or x86_64 build environment, we need to first update the already installed packages and the MSYS2 environment itself.
To create an i686 or x86_64 build environment, we need to first update the already installed packages and the MSYS2 environment itself.
To do that, type the following in the MSYS2 terminal:
To do that, type the following in the MSYS2 terminal:
<source lang="bash">
<syntaxhighlight lang="bash">
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
Line 41: Line 41:


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">
<syntaxhighlight 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}
</syntaxhighlight>
</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">
<syntaxhighlight 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}
</syntaxhighlight>
</syntaxhighlight>
Line 58: Line 58:


In order to compile properly, ScummVM needs you to have certain libraries installed. The command in the above section installs all of the needed packages automatically. 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. The command in the above section installs all of the needed packages automatically. All the libraries in the list can be installed with similar commands:
<source lang="bash">
<syntaxhighlight lang="bash">
pacman -S mingw-w64-<env>-<library>
pacman -S mingw-w64-<env>-<library>
</syntaxhighlight>
</syntaxhighlight>
Line 83: Line 83:
Finally, we are ready to compile the project!
Finally, we are ready to compile the project!
To do that, just open a '''MinGW-w64''' shell (''not'' the MSYS2 shell), [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 '''MinGW-w64''' shell (''not'' the MSYS2 shell), [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:
<source lang="bash">
<syntaxhighlight 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.
Line 89: Line 89:


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">
<syntaxhighlight lang="bash">
$> strip scummvm.exe
$> strip scummvm.exe
</syntaxhighlight>
</syntaxhighlight>
TrustedUser
2,147

edits

Navigation menu