Difference between revisions of "Compiling ScummVM/MinGW"

Jump to navigation Jump to search
→‎SDL: Add note about needing to edit sdl-config / pkg-config outputs for MinGW toolchains
m (Update mingw-runtime links)
(→‎SDL: Add note about needing to edit sdl-config / pkg-config outputs for MinGW toolchains)
(3 intermediate revisions by 2 users not shown)
Line 18: Line 18:
*[http://sourceforge.net/projects/mingw/files/MinGW/Base/gmp/gmp-5.0.1-1/gmp-5.0.1-1-mingw32-dev.tar.lzma/download gmp dev]
*[http://sourceforge.net/projects/mingw/files/MinGW/Base/gmp/gmp-5.0.1-1/gmp-5.0.1-1-mingw32-dev.tar.lzma/download gmp dev]
*[http://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/Version4/gcc-4.6.2-1/libgomp-4.6.2-1-mingw32-dll-1.tar.lzma/download gmp dll]
*[http://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/Version4/gcc-4.6.2-1/libgomp-4.6.2-1-mingw32-dll-1.tar.lzma/download gmp dll]
*[http://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/Version4/gcc-4.6.2-1/libgomp-4.6.2-1-mingw32-dll-1.tar.lzma/download gomp]
*[http://sourceforge.net/projects/mingw/files/MinGW/Base/gettext/gettext-0.17-1/libintl-0.17-1-mingw32-dll-8.tar.lzma/download iconv]
*[http://sourceforge.net/projects/mingw/files/MinGW/Base/gettext/gettext-0.17-1/libintl-0.17-1-mingw32-dll-8.tar.lzma/download iconv]
*[http://sourceforge.net/projects/mingw/files/MinGW/Base/libiconv/libiconv-1.13.1-1/libiconv-1.13.1-1-mingw32-dev.tar.lzma/download intl dev]  
*[http://sourceforge.net/projects/mingw/files/MinGW/Base/libiconv/libiconv-1.13.1-1/libiconv-1.13.1-1-mingw32-dev.tar.lzma/download intl dev]  
Line 149: Line 148:
=== SDL ===
=== SDL ===


SDL is already compiled and needs no further changes, so we can skip the compilation step for it
SDL is already provided in compiled development archives, so we can skip the compilation step for it


After extracting the contents of the SDL archive in a folder, copy all the files in the 'include/SDL' folder to MinGW's include folder, copy all the files in the 'lib' folder to MinGW's lib folder and copy all the files in the 'bin' folder to MinGW's bin folder.
This can be found from [https://www.libsdl.org here], going to the latest stable download and choosing the Development Libraries - MinGW 32/64-bit option.
 
After extracting the contents of this archive in a folder, copy all the files in the 'include/SDL' folder to MinGW's include folder, copy all the files in the 'lib' folder to MinGW's lib folder and copy all the files in the 'bin' folder to MinGW's bin folder.
 
It may be necessary to modify the bin/sdl-config and lib/pkgconfig/sdl2.pc files which are just text. These files provide the compiler option information to ScummmVM and SDL2 is passing the -mwindows compiler option by default which will result in a valid executable, but with broken console / command-line output. These should be removed or replaced by -mconsole (though this will affect all SDL compiled binaries made by the MinGW toolchain). ScummVM's configure script should deal automatically with this issue in future as the upstream SDL project has indicated that removing this "forced" option is a WONTFIX issue.


If you do wish to recompile SDL from source code, please note the following:
If you do wish to recompile SDL from source code, please note the following:
Line 220: Line 223:


Note that if you are compiling x64 i.e. for a 64-bit target, then currently (v0.5.1), the following patch is needed:
Note that if you are compiling x64 i.e. for a 64-bit target, then currently (v0.5.1), the following patch is needed:
<source lang="diff">
<syntaxhighlight lang="diff">
--- libvo/video_out_dx.c.orig  2014-02-17 16:38:24.000000000 +0100
--- libvo/video_out_dx.c.orig  2014-02-17 16:38:24.000000000 +0100
+++ libvo/video_out_dx.c        2014-02-17 16:39:34.000000000 +0100
+++ libvo/video_out_dx.c        2014-02-17 16:39:34.000000000 +0100
Line 240: Line 243:
   
   
     ShowWindow (instance->window, SW_SHOW);
     ShowWindow (instance->window, SW_SHOW);
</source>
</syntaxhighlight>


=== FLAC ===
=== FLAC ===
Line 259: Line 262:
Unzip the fluidsynth archive in a folder, open MSYS, go to the fluidsynth folder and apply the following patch:
Unzip the fluidsynth archive in a folder, open MSYS, go to the fluidsynth folder and apply the following patch:


<source lang="diff">
<syntaxhighlight lang="diff">
--- include/fluidsynth.h
--- include/fluidsynth.h
+++ include/fluidsynth.h
+++ include/fluidsynth.h
Line 277: Line 280:
  #elif defined(MACOS9)
  #elif defined(MACOS9)
  #define FLUIDSYNTH_API __declspec(export)
  #define FLUIDSYNTH_API __declspec(export)
</source>
</syntaxhighlight>


Then issue these commands to compile the library:
Then issue these commands to compile the library:
Line 312: Line 315:
Unzip the libfaad2 archive in a folder, open MSYS, go to the libfaad2 folder and apply the following patch:
Unzip the libfaad2 archive in a folder, open MSYS, go to the libfaad2 folder and apply the following patch:


<source lang="diff">
<syntaxhighlight lang="diff">
--- frontend/main.c
--- frontend/main.c
+++ frontend/main.c
+++ frontend/main.c
Line 325: Line 328:
  #include <time.h>
  #include <time.h>
  #endif
  #endif
</source>
</syntaxhighlight>


Then issue these commands to compile the library:
Then issue these commands to compile the library:
TrustedUser
574

edits

Navigation menu