333
edits
(Clarify 32-bit vs 64-bit) |
Rootfather (talk | contribs) m |
||
Line 25: | Line 25: | ||
For i686 (32-bit executable and MinGW), type the following in the MSYS2 terminal to automatically install all packages/libraries needed to compile ScummVM: | For i686 (32-bit executable and MinGW), type the following in the MSYS2 terminal to automatically install all packages/libraries needed to compile ScummVM: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
pacman -S --needed --noconfirm base-devel git mingw-w64-i686-{a52dec,ccache,cairo,faad2,freetype,flac,fluidsynth,fribidi,glew,libjpeg-turbo,libogg,libvorbis,libmad,libmpeg2-git,libtheora,libpng,nasm,readline,SDL2,SDL2_net,toolchain,winsparkle,zlib,ntldd-git} | pacman -S --needed --noconfirm base-devel git mingw-w64-i686-{a52dec,ccache,cairo,curl-winssl,faad2,freetype,flac,fluidsynth,fribidi,glew,libjpeg-turbo,libogg,libvorbis,libmad,libmpeg2-git,libtheora,libpng,nasm,readline,SDL2,SDL2_net,toolchain,winsparkle,zlib,ntldd-git} | ||
</syntaxhighlight> | </syntaxhighlight> | ||
For x86_64 (64-bit executable and MinGW), type the following in the MSYS2 terminal to automatically install all packages/libraries needed to compile ScummVM: | For x86_64 (64-bit executable and MinGW), type the following in the MSYS2 terminal to automatically install all packages/libraries needed to compile ScummVM: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
pacman -S --needed --noconfirm base-devel git mingw-w64-x86_64-{a52dec,ccache,cairo,faad2,freetype,flac,fluidsynth,fribidi,glew,libjpeg-turbo,libogg,libvorbis,libmad,libmpeg2-git,libtheora,libpng,nasm,readline,SDL2,SDL2_net,toolchain,winsparkle,zlib,ntldd-git} | pacman -S --needed --noconfirm base-devel git mingw-w64-x86_64-{a52dec,ccache,cairo,curl-winssl,faad2,freetype,flac,fluidsynth,fribidi,glew,libjpeg-turbo,libogg,libvorbis,libmad,libmpeg2-git,libtheora,libpng,nasm,readline,SDL2,SDL2_net,toolchain,winsparkle,zlib,ntldd-git} | ||
</syntaxhighlight> | </syntaxhighlight> | ||
These commands will fetch and install the packages needed for compiling, including (but not limited to) GCC 10.x, GDB, and libwinpthread-git. | These commands will fetch and install the packages needed for compiling, including (but not limited to) GCC 10.x, GDB, and libwinpthread-git. | ||
== Let's get compiling! == | == Let's get compiling! == | ||
Line 76: | Line 46: | ||
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: | ||
strip scummvm.exe | strip scummvm.exe | ||
Please note that using this step is not necessary if you build a distributable package. | |||
That's it, you successfully compiled ScummVM from the source code. | That's it, you successfully compiled ScummVM from the source code. | ||
Line 83: | Line 55: | ||
In case you want to distribute your builds to machines without a running MSYS2 installation or if you excluded MSYS2/Mingw-w64 from your PATH, you need to bundle the required .dll files with the executable - otherwise, running ScummVM will fail due to missing dependencies. | In case you want to distribute your builds to machines without a running MSYS2 installation or if you excluded MSYS2/Mingw-w64 from your PATH, you need to bundle the required .dll files with the executable - otherwise, running ScummVM will fail due to missing dependencies. | ||
If you intend to build a ScummVM package that includes all the necessary files, you can build such a redistributable package by using | |||
make win32dist-mingw WIN32PATH=<target> | |||
where <code><target></code> specifies the directory that will contain the redistributable packages. | |||
== Common Issues == | == Common Issues == |
edits