Difference between revisions of "Compiling ScummVM/Windows CE"

Jump to navigation Jump to search
Early cleanup and some spell corrections
(Early cleanup and some spell corrections)
 
Line 1: Line 1:
So you want to roll your own binary for the ScummVM [[Windows CE]] port?
So you want to roll your own binary for the ScummVM [[Windows CE]] port?
The first thing to ask yourself is do you really need to compile it?
The first thing to ask yourself is do you really need to compile it?
The official ScummVM for Windows CE binaries are "good enough" for more than the average user.
The official ScummVM for Windows CE binaries are "good enough" for more than the average user. Also, bear in mind that the compilation procedure is seldom as simple as unpack-build and that, probably, you'll have to know your way around makefiles and editing appropriately the source files.
Also, bear in mind that the compilation procedure is seldom as simple as
 
unpack-build and that, probably, you'll have to know your way around
Still reading? Good :-)
makefiles and editing appropriately the source files.<br/>
 
Still reading? Good :-)<br/>
Many people are put off by the sheer volume of work which has to take place
Many people are put off by the sheer volume of work which has to take place
in order to get a successful build.
in order to get a successful build. Things are not that bad though as, hopefully, this document tries to describe. More than often you may find that once you set up you build environment right, there's only minimal work to be done to build any version of ScummVM for Windows CE.
Things are not that bad though as, hopefully, this document tries to describe.
 
More than often you may find that once you set up you build environment
right, there's only minimal work to be done to build any version of ScummVM for Windows CE.
Alright, ready? Let's go :-)
Alright, ready? Let's go :-)


Line 26: Line 23:
* Version 1.0 and newer use the [http://cegcc.sf.net/ mingw32ce] GCC cross compiler. This is only compiler being supported now. You may succeed in compiling with VS2005, but this is beyond the scope of these instructions.
* Version 1.0 and newer use the [http://cegcc.sf.net/ mingw32ce] GCC cross compiler. This is only compiler being supported now. You may succeed in compiling with VS2005, but this is beyond the scope of these instructions.


Why all these compiler changes? There are absolutely critical reasons for switching between them.  
Why all these compiler changes? There are absolutely critical reasons for switching between them. For example, the migration from evc to VS is mandatory, as C++ templates introduced through core code evolution in the trunk of ScummVM cause the evc compilers to crash with 'Internal compiler error'.
For example, the migration from evc to VS is mandatory, as C++ templates introduced  
 
through core code evolution in the trunk of ScummVM
Unfortunately the migration is not completely successful as VS2005 (no service packs) introduces incorrect optimization in release builds, leading to workarounds in the source and compilation of specific files with no optimizations at all.
cause the evc compilers to crash with 'Internal compiler error'.
 
Unfortunately the migration is not completely successful as VS2005 (no service packs) introduces
Also, note that [http://msdn.microsoft.com/vstudio/express/ Visual Studio Express] (which is free) does not support Windows CE (at least at the time of writing this).
incorrect optimization in release builds,
 
leading to workarounds in the source and compilation of specific files with
Further, the change from our semi-custom VLC GCC port to cegcc was mandated because building dlls which are required by the plug-ins is broken in the former.  
no optimizations at all.
 
Also, note that [http://msdn.microsoft.com/vstudio/express/ Visual Studio Express] (which is free) does
Finally we have switched to mingw32ce, which does not use the Unix compatibility layer which cegcc brings along as we don't need it.
not support Windows CE (at least at the time of writing this).
Further, the change from our semi-custom VLC GCC port to cegcc was mandated because building dlls which are required by the plugins is broken in the former. Finally we have switched to mingw32ce, which does not use the unix compatibility layer which cegcc brings along as we don't need it.


=== Libraries ===
=== Libraries ===
Line 44: Line 39:


* [http://wss.co.uk/pinknoise/tremolo/ Tremolo] 0.7
* [http://wss.co.uk/pinknoise/tremolo/ Tremolo] 0.7
: Tremolo is an ARM optimized version of the Tremor lib from [http://www.xiph.org/ xiph.org]. For those that don't know, the Tremor lib is an integer only library for doing Ogg Vorbis decompression.
: Tremolo is an ARM optimized version of the Tremor lib from [https://www.xiph.org/]. For those that don't know, the Tremor lib is an integer-only library for doing Ogg Vorbis decompression.
* [http://www.underbit.com/products/mad/ mad] 0.15.1b
* [https://www.underbit.com/products/mad/ mad] 0.15.1b
: MP3 sound files.
: MP3 sound files.
* [http://www.libsdl.org/ SDL] 1.2.6
* [https://www.libsdl.org/ SDL] 1.2.6
: Handles all backend screen drawing.
: Handles all backend screen drawing.
* [http://www.zlib.net/ zlib] 1.2.5
* [https://www.zlib.net/ zlib] 1.2.5
: Compressing/Decompressing files.
: Compressing/Decompressing files.


Line 69: Line 64:
== Compiling using the mingw32ce GCC toolchain ==
== Compiling using the mingw32ce GCC toolchain ==


First, you need to download and install the [http://cegcc.sf.net/ mingw32ce] cross compiler. More specifically, you need the mingw32ce variety (without the posix layer emulation that is). You may optionally also download a working gdb debugger there for debugging the applications. Version 0.59.1 is the recommended version, your milage may vary with other versions. It's also recommended, though not mandatory, to install the toolchain to /opt/mingw32ce (in the following example we use this directory).
First, you need to download and install the [http://cegcc.sf.net/ mingw32ce] cross compiler. More specifically, you need the mingw32ce variety (without the posix layer emulation that is). You may optionally also download a working gdb debugger there for debugging the applications. Version 0.59.1 is the recommended version, your mileage may vary with other versions. It's also recommended, though not mandatory, to install the toolchain to /opt/mingw32ce (in the following example we use this directory).


=== ScummVM ===
=== ScummVM ===
Line 80: Line 75:
Please note that there is no patch available for zlib 1.2.5 as patching it is not needed any more (yay!).
Please note that there is no patch available for zlib 1.2.5 as patching it is not needed any more (yay!).
You need to ''configure'' and ''make'' each library,
You need to ''configure'' and ''make'' each library,
except for the SDL and Tremolo libraries which both sport a customly created (and lame :-) )
except for the SDL and Tremolo libraries which both sport a customly created (and lame :-) ) Makefile.
Makefile.
It should be sufficient to set the PATH to the following to make the toolchain usable:
It should be sufficient to set the PATH to the following to make the toolchain usable:
{| style="padding: 1em; border: 1px dashed #2f6fab; color: black; background-color: #f9f9f9; line-height: 1.1em"
{| style="padding: 1em; border: 1px dashed #2f6fab; color: black; background-color: #f9f9f9; line-height: 1.1em"
Line 102: Line 96:


* Place the library and include files in an appropriate place. In this example, we use /opt/mingw32ce/libraries
* Place the library and include files in an appropriate place. In this example, we use /opt/mingw32ce/libraries
to keep them seperate from the toolchain's libs and headers.
to keep them separate from the toolchain's libs and headers.
Here is an overview of the needed files, where to find them inside the specific library sourcetree, and where to put them:
Here is an overview of the needed files, where to find them inside the specific library sourcetree, and where to put them:
{| style="padding: 1em; border: 1px dashed #2f6fab; color: black; background-color: #f9f9f9; line-height: 1.1em"
{| style="padding: 1em; border: 1px dashed #2f6fab; color: black; background-color: #f9f9f9; line-height: 1.1em"
1,310

edits

Navigation menu