Open main menu

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

m
no edit summary
(Clean up support warnings)
m
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:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
pacman -S --needed --noconfirm base-devel git mingw-w64-i686-{a52dec,ccache,curl,cairo,faad2,freetype,flac,fluidsynth,fribidi,glew,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-{a52dec,ccache,curl,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}
</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:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
pacman -S --needed --noconfirm base-devel git mingw-w64-x86_64-{a52dec,ccache,curl,cairo,faad2,freetype,flac,fluidsynth,fribidi,glew,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-{a52dec,ccache,curl,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}
</syntaxhighlight>
</syntaxhighlight>


Line 103: Line 103:
* If the configure script gives an error about using msys mode, please make sure you are running the '''mingw-w64 win32 shell''' or the '''mingw-w64 win64 shell''', and not the '''msys2 shell''' from the MSYS2 package, when building ScummVM.
* If the configure script gives an error about using msys mode, please make sure you are running the '''mingw-w64 win32 shell''' or the '''mingw-w64 win64 shell''', and not the '''msys2 shell''' from the MSYS2 package, when building ScummVM.


== DLLs required for running ScummVM on a "non-MSYS2" machine ==
== Ship required for running ScummVM on a "non-MSYS2" machine ==


If you want to run the ScummVM binary you just compiled on an (other) Windows machine that doesn't have mingw-w64/MSYS2 installed, you need to copy a few .dll files from the folder '''/your-msys2-folder/mingw64/bin''' (for x64 builds) '''or ../mingw32/bin''' (for x86) to the same folder as your scummvm.exe.
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.


The following list assumes that you are building ScummVM with default settings and all engines enabled, so chances that this list will suit your needs are pretty high.
In order to copy all required .dll files to the directory where the ScummVM executable is located, run the following command in your build directory:
 
<code>for i in $(seq 3); do for bin in $(ntldd -R *exe | grep -i mingw | cut -d">" -f2 | cut -d" " -f2); do cp -vu "$bin" . ; done; done</code>
* liba52-0.dll
* libbz2-1.dll
* libfaad-2.dll
* libFLAC-8.dll
* libfluidsynth-1.dll
* libfreetype-6.dll
* libgcc_s_seh-1.dll
* libglib-2.0-0.dll
* libgraphite2.dll
* libharfbuzz-0.dll
* libiconv-2.dll
* libintl-8.dll
* libjpeg-8.dll
* libmad-0.dll
* libmpeg2-0.dll
* libogg-0.dll
* libpcre-1.dll
* libpng16-16.dll
* libportaudio-2.dll
* libsndfile-1.dll
* libspeex-1.dll
* libstdc++-6.dll
* libtheoradec-1.dll
* libvorbis-0.dll
* libvorbisenc-2.dll
* libvorbisfile-3.dll
* libwinpthread-1.dll
* SDL.dll/SDL2.dll ''(depends on the SDL version you used for compilation. Default is SDL2.dll)''
* zlib1.dll
 
Please note that compiling ScummVM with other options (e.g. "--enable-text-console") may require various other .dll files that are currently not in this list. This list will be constantly updated in the future.
 
Usually, ScummVM will name the .dll file that is missing, but in some cases, all you get is a quite unspecific error code "0xc000007b". When you get this error code, please double-check if you copied all necessary .dll files.
329

edits