https://wiki.scummvm.org/api.php?action=feedcontributions&user=Dhewg&feedformat=atomScummVM :: Wiki - User contributions [en]2024-03-28T09:04:26ZUser contributionsMediaWiki 1.36.0https://wiki.scummvm.org/index.php?title=Buildbot&diff=17366Buildbot2012-01-20T23:45:16Z<p>Dhewg: </p>
<hr />
<div>{{Infobox Project Service Information|<br />
url=http://buildbot.scummvm.org|<br />
purpose=Provides automated build services for an increasing number of our supported platforms.|<br />
maintainer=Andre Heider ([[User:Dhewg|Dhewg]])<br>John Willis ([[User:DJWillis|DJWillis]])<br />
}}<br />
<br />
== Introduction ==<br />
<br />
From the [http://buildbot.net/ buildbot homepage]:<br />
<br />
:The BuildBot is a system to automate the compile/test cycle required by most software projects to validate code changes. By automatically rebuilding and testing the tree each time something has changed, build problems are pinpointed quickly, before other developers are inconvenienced by the failure. The guilty developer can be identified and harassed without human intervention. By running the builds on a variety of platforms, developers who do not have the facilities to test their changes everywhere before checkin will at least know shortly afterwards whether they have broken the build or not. Warning counts, lint checks, image size, compile time, and other build parameters can be tracked over time, are more visible, and are therefore easier to improve.<br />
<br />
:The overall goal is to reduce tree breakage and provide a platform to run tests or code-quality checks that are too annoying or pedantic for any human to waste their time with. Developers get immediate (and potentially public) feedback about their changes, encouraging them to be more careful about testing before checkin.<br />
<br />
You can find the ScummVM buildbot page [http://buildbot.scummvm.org/ here].<br />
<br />
== Goals ==<br />
<br />
* Compile all ports when a commit is done (both trunk and the active branch) to check if it broke one or more ports.<br />
* Notify developers about breakage (and if a following commit fixes it again).<br />
* Provide useful statistics.<br />
* Provide nightly builds of all ports.<br />
<br />
== Status ==<br />
<br />
What we have so far:<br />
* The bot already polls the [[Git|Git Server]] for changes on trunk and the current branch.<br />
* When a change occurs, all ports are being built incrementally.<br />
* Once every 24h (currently 4am CET), a full and clean rebuild is compiled for all ports.<br />
* Provide the [http://buildbot.scummvm.org/builds.html nightly builds via HTTP].<br />
* Notify developers upon problems through an IRC bot in [[IRC Channel]].<br />
<br />
What's missing:<br />
* Add more toolchains for all missing ports - when possible (see below).<br />
* Notify developers upon problems via mail.<br />
<br />
== Toolchains ==<br />
<br />
A few requirements must be met to add a toolchain to the buildbot server:<br />
* It must be possible to cross-compile the port from Linux (that might change in the future).<br />
* No custom Makefiles from the ''backend/'' folder, the port has to use the ''./configure'' script.<br />
* The compile process must neither modify nor add anything in the source tree. All builds are performed in external build directories, by invoking the ''./configure'' script in these external directories.<br />
* The port must be fully buildable from scratch with only ''./configure'' arguments and environment variables for it.<br />
<br />
The toolchain should be primarily maintained by the port maintainer, but since this requires a little Linux experience, its not a must ;). We will provide assistance with this where possible.<br />
<br />
If your toolchain/port is ready to be added, ask ''sev'', ''joostp'' or ''dhewg'' for an account.<br />
<br />
== Administration ==<br />
<br />
When the buildbot config files are changed, a user with shell access and sudo privileges needs to run the following commands. It's good practice to do this once buildbot is idle:<br />
<br />
sudo -s<br />
/etc/init.d/buildslave stop<br />
/etc/init.d/buildbot stop<br />
cd ~buildbot/buildbot<br />
svn up<br />
/etc/init.d/buildbot start<br />
/etc/init.d/buildslave start<br />
<br />
If problems arise, check if all files in the master (~buildbot/master) and slave (~buildbot/slave) directories are owned by the correct user (buildbot:nogroup). If the daemons were incorrectly started, new files might have been created under another user account. In that case:<br />
<br />
* stop the daemons (see above)<br />
* fix the permissions with<br />
chown -R buildbot:nogroup ~buildbot/master/*<br />
chown -R buildbot:nogroup ~buildbot/slave/*<br />
* start the daemons</div>Dhewghttps://wiki.scummvm.org/index.php?title=Buildbot&diff=16637Buildbot2011-06-23T16:57:49Z<p>Dhewg: buildbot administration</p>
<hr />
<div>{{Infobox Project Service Information|<br />
url=http://buildbot.scummvm.org|<br />
purpose=Provides automated build services for an increasing number of our supported platforms.|<br />
maintainer=Andre Heider ([[User:Dhewg|Dhewg]])<br>John Willis ([[User:DJWillis|DJWillis]])<br />
}}<br />
<br />
== Introduction ==<br />
<br />
From the [http://buildbot.net/ buildbot homepage]:<br />
<br />
:The BuildBot is a system to automate the compile/test cycle required by most software projects to validate code changes. By automatically rebuilding and testing the tree each time something has changed, build problems are pinpointed quickly, before other developers are inconvenienced by the failure. The guilty developer can be identified and harassed without human intervention. By running the builds on a variety of platforms, developers who do not have the facilities to test their changes everywhere before checkin will at least know shortly afterwards whether they have broken the build or not. Warning counts, lint checks, image size, compile time, and other build parameters can be tracked over time, are more visible, and are therefore easier to improve.<br />
<br />
:The overall goal is to reduce tree breakage and provide a platform to run tests or code-quality checks that are too annoying or pedantic for any human to waste their time with. Developers get immediate (and potentially public) feedback about their changes, encouraging them to be more careful about testing before checkin.<br />
<br />
You can find the ScummVM buildbot page [http://buildbot.scummvm.org/ here].<br />
<br />
== Goals ==<br />
<br />
* Compile all ports when a commit is done (both trunk and the active branch) to check if it broke one or more ports.<br />
* Notify developers about breakage (and if a following commit fixes it again).<br />
* Provide useful statistics.<br />
* Provide nightly builds of all ports.<br />
<br />
== Status ==<br />
<br />
What we have so far:<br />
* The bot already polls the [[Git|Git Server]] for changes on trunk and the current branch.<br />
* When a change occurs, all ports are being built incrementally.<br />
* Once every 24h (currently 4am CET), a full and clean rebuild is compiled for all ports.<br />
* Provide the [http://buildbot.scummvm.org/builds.html nightly builds via HTTP].<br />
* Notify developers upon problems through an IRC bot in [[IRC Channel]].<br />
<br />
What's missing:<br />
* Add more toolchains for all missing ports - when possible (see below).<br />
* Notify developers upon problems via mail.<br />
<br />
== Toolchains ==<br />
<br />
A few requirements must be met to add a toolchain to the buildbot server:<br />
* It must be possible to cross-compile the port from Linux (that might change in the future).<br />
* No custom Makefiles from the ''backend/'' folder, the port has to use the ''./configure'' script.<br />
* The compile process must neither modify nor add anything in the source tree. All builds are performed in external build directories, by invoking the ''./configure'' script in these external directories.<br />
* The port must be fully buildable from scratch with only ''./configure'' arguments and environment variables for it.<br />
<br />
The toolchain should be primarily maintained by the port maintainer, but since this requires a little Linux experience, its not a must ;). We will provide assistance with this where possible.<br />
<br />
If your toolchain/port is ready to be added, ask ''sev'', ''joostp'' or ''dhewg'' for an account.<br />
<br />
== Administration ==<br />
<br />
When the buildbot config files are changed, a user with shell access and sudo privileges needs to run the following commands. It's good practice to do this once buildbot is idle:<br />
<br />
sudo -s<br />
/etc/init.d/buildslave stop<br />
/etc/init.d/buildmaster stop<br />
cd ~buildbot/buildbot<br />
svn up<br />
/etc/init.d/buildmaster start<br />
/etc/init.d/buildslave start<br />
<br />
If problems arise, check if all files in the master (~buildbot/master) and slave (~buildbot/slave) directories are owned by the correct user (buildbot:nogroup). If the daemons were incorrectly started, new files might have been created under another user account. In that case:<br />
<br />
* stop the daemons (see above)<br />
* fix the permissions with<br />
chown -R buildbot:nogroup ~buildbot/master/*<br />
chown -R buildbot:nogroup ~buildbot/slave/*<br />
* start the daemons</div>Dhewghttps://wiki.scummvm.org/index.php?title=Compiling_ScummVM/Android&diff=16368Compiling ScummVM/Android2011-05-09T19:00:32Z<p>Dhewg: </p>
<hr />
<div>= Compiling ScummVM for Android =<br />
<br />
This page describes how you build Android packages from the ScummVM source tree. For help compiling this on Windows, see the separate article, [[Compiling ScummVM/Android (on Windows)]].<br />
<br />
= Mandatory tools =<br />
<br />
* [http://developer.android.com/sdk/index.html Android SDK] r09 as of this writing<br />
* [http://developer.android.com/sdk/ndk/index.html Android NDK] r5b as of this writing<br />
<br />
Use the SDK Manager to install:<br />
* Android SDK Tools<br />
* Android SDK Platform-tools<br />
* SDK Platform Android 1.6, API 4<br />
* SDK Platform Android 2.2, API 8<br />
<br />
Set the <tt>ANDROID_SDK</tt> environment variable to the root directory of the SDK, and <tt>ANDROID_NDK</tt> to the root directory of the NDK.<br />
<br />
= Optional libraries =<br />
* [http://svn.xiph.org/branches/lowmem-branch/Tremor/ Tremor] (lowmem branch) to play ''.ogg'' audio files<br />
* [http://www.underbit.com/products/mad/ MAD] to play ''.mp3'' audio files<br />
* [http://flac.sourceforge.net/ FLAC] to play lossless ''.flac'' files<br />
<br />
Again, you have two options:<br />
<br />
== Precompiled binaries ==<br />
<br />
Get [http://static.hackmii.com/dhewg/3rd-android-4-armeabi.tar.bz2 this archive] and extract it to e.g. <tt>/opt/android</tt>.<br />
<br />
== Build the libraries yourself ==<br />
<br />
Here's a a simple script to set up a shell for crosscompiling:<br />
<br />
#!/bin/sh<br />
<br />
PREFIX=${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-<br />
export CC=${PREFIX}gcc<br />
export CXX=${PREFIX}g++<br />
export AS=${PREFIX}gcc<br />
export LD=${PREFIX}gcc<br />
export AR=${PREFIX}ar cru<br />
export RANLIB=${PREFIX}ranlib<br />
export STRIP=${PREFIX}strip<br />
export OBJCOPY=${PREFIX}objcopy<br />
<br />
export MACHDEP="--sysroot=$ANDROID_NDK/platforms/android-4/arch-arm -g -mandroid -mthumb-interwork"<br />
<br />
export CFLAGS="${MACHDEP} -Os -Wall -mandroid -msoft-float -march=armv5te -mtune=xscale"<br />
<br />
export CXXFLAGS="${CFLAGS}"<br />
<br />
export LDFLAGS="${MACHDEP}"<br />
<br />
echo "./configure --host=arm --prefix=/opt/android/3rd-android-4-armeabi"<br />
<br />
Save it to a file (like <tt>android-4-eabi.sh</tt>) and run<br />
<br />
. ./android-4-eabi.sh<br />
<br />
in your shell. Build systems should now use the correct tools.<br />
<br />
=== Tremor ===<br />
<br />
Get a SVN checkout (r17852. as of this writing):<br />
<br />
svn co http://svn.xiph.org/trunk/Tremor<br />
<br />
configure it:<br />
<br />
./autogen.sh --host=arm --prefix=/opt/android/3rd-android-4-armeabi --enable-low-accuracy --enable-64kHz-limit<br />
<br />
and finally build & install it:<br />
<br />
make<br />
make install<br />
<br />
=== MAD ===<br />
<br />
Get a tarball of the latest stable version [http://sourceforge.net/projects/mad/files/libmad/ here] (v0.15.1b as of this writing) and extract it.<br />
<br />
configure it:<br />
<br />
./autogen.sh --host=arm --prefix=/opt/android/3rd-android-4-armeabi --enable-speed --enable-fpm=arm --disable-aso<br />
<br />
and finally build & install it:<br />
<br />
make<br />
make install<br />
<br />
=== FLAC ===<br />
<br />
Get a tarball of the latest stable version [http://flac.sourceforge.net/download.html here] (v1.2.1 as of this writing) and extract it.<br />
<br />
configure it:<br />
<br />
./configure --prefix=/opt/android/3rd-android-4-armeabi --disable-largefile --disable-thorough-tests --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs --disable-ogg --disable-oggtest --disable-rpath<br />
<br />
and build & install the required parts:<br />
<br />
make -C src/libFLAC<br />
make -C src/libFLAC install<br />
make -C include install<br />
<br />
= Compiling =<br />
<br />
The Android port can be compiled with the <tt>configure</tt> script.<br />
<br />
Set the <tt>ANDROID_SDK</tt> environment variable to the root directory of the SDK, and <tt>ANDROID_NDK</tt> to the root directory of the NDK. Add the directory of the toolchain binaries from the NDK to your <tt>PATH</tt>. This directory differs, on Linux its <tt>$ANDROID_NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin</tt>.<br />
<br />
The most basic way to accomplish this is to run:<br />
<br />
./configure --host=android --enable-plugins --default-dynamic<br />
make<br />
<br />
The script supports various arguments, which you can use to en- or disable features, see <tt>./configure --help</tt>.<br />
<br />
If you want support for additional libraries, you need cross-compiled binaries.<br />
If you followed the [[#Optional libraries|above description]] and have those libraries in <tt>/opt/android/3rd-android-4-armeabi</tt>, the <tt>configure</tt> command line would look like this:<br />
<br />
./configure --host=android --enable-plugins --default-dynamic --with-tremor-prefix=/opt/android/3rd-android-4-armeabi --with-mad-prefix=/opt/android/3rd-android-4-armeabi --with-flac-prefix=/opt/android/3rd-android-4-armeabi</div>Dhewghttps://wiki.scummvm.org/index.php?title=GUI_Themes/STX_Syntax&diff=16057GUI Themes/STX Syntax2011-03-07T23:26:54Z<p>Dhewg: adapt to recent theme parser changes</p>
<hr />
<div>This page contains a detailed overview of all the possible XML key values in a STX file. See [[GUI Themes/Specs|wiki page]] for the general information of the new Theme Format.<br />
<br />
=== STX Syntax Keys ===<br />
<br />
==== <tt>&lt;render_info&gt;</tt> ====<br />
<br />
Parent: root<br /><br />
Children: <tt>&lt;palette&gt;</tt>, <tt>&lt;fonts&gt;</tt>, <tt>&lt;bitmaps&gt;</tt>, <tt>&lt;cursor&gt;</tt>, <tt>&lt;defaults&gt;</tt>, <tt>&lt;drawdata&gt;</tt><br /><br />
Properties: <tt>resolution</tt><br />
<br />
===== Example =====<br />
<br />
<syntax type="xml"><br />
<render_info resolution = "y>399"><br />
...<br />
</render_info><br />
</syntax><br />
<br />
===== Description =====<br />
<br />
The <tt>render_info</tt> key specifies that all children keys contain information regarding the looks of the theme, i.e. the actual Drawing Specifications.<br />
<br />
===== Properties =====<br />
<br />
* <tt>resolution [[x|y][<|>]int]</tt>: Load only on a given resolution. See resolution-dependant keys.<br />
<br />
-----<br />
<br />
==== <tt>&lt;palette&gt;</tt> ====<br />
<br />
Parent: <tt>&lt;render_info&gt;</tt><br /><br />
Children: <tt>&lt;color&gt;</tt><br /><br />
Properties: -<br />
<br />
===== Example =====<br />
<br />
<syntax type="xml"><br />
<palette><br />
...<br />
</palette><br />
</syntax><br />
<br />
===== Description =====<br />
<br />
The <tt>palette</tt> key is a simple wrapper; it contains all the <tt>color</tt> definitions for the theme.<br />
<br />
<br />
-----<br />
<br />
==== <tt>&lt;color&gt;</tt> ====<br />
<br />
Parent: <tt>&lt;palette&gt;</tt><br /><br />
Children: - Properties: <tt>name</tt> (''required''), <tt>rgb</tt> (''required'')<br />
<br />
===== Example =====<br />
<br />
<syntax type="xml"><br />
<color name = 'red'<br />
rgb = '255, 0, 0'<br />
/><br />
</syntax><br />
<br />
===== Description =====<br />
<br />
Color keys define aliases for commonly used colors on the theme. Once you define a color name and its RGB equivalent, any key properties which are expecting a RGB color definition will accept such alias.<br />
<br />
Color aliases are exclusive to the parser engine, they are replaced by their actual RGB values when loaded into the Theme Renderer.<br />
<br />
===== Properties =====<br />
<br />
* <tt>name [string]</tt>: Name/alias of the color.<br />
* <tt>rgb [int, int, int]</tt>: RGB (red/green/blue) values for the color, comma separated.<br />
<br />
-----<br />
<br />
==== <tt>&lt;bitmaps&gt;</tt> ====<br />
<br />
Parent: <tt>&lt;render_info&gt;</tt><br /><br />
Children: <tt>&lt;bitmap&gt;</tt><br /><br />
Properties: -<br />
<br />
===== Example =====<br />
<br />
<syntax type="xml"><br />
<bitmaps><br />
...<br />
</bitmaps><br />
</syntax><br />
<br />
===== Description =====<br />
<br />
The <tt>bitmaps</tt> key is a simple wrapper; it contains all the <tt>bitmap</tt> keys for the theme.<br />
<br />
<br />
-----<br />
<br />
==== <tt>&lt;bitmap&gt;</tt> ====<br />
<br />
Parent: <tt>&lt;bitmaps&gt;</tt><br /><br />
Children: -<br /><br />
Properties: <tt>filename</tt> (''required''), <tt>resolution</tt><br />
<br />
===== Example =====<br />
<br />
<syntax type="xml"><br />
<bitmap filename = 'logo.bmp'/><br />
</syntax><br />
<br />
===== Description =====<br />
<br />
A <tt>bitmap</tt> key specifies a bitmap file to be loaded by the theme renderer. You may load as many bitmaps as you desire; they are expected to be 24 bit standard Windows bitmaps, and to packed together with the STX file.<br />
<br />
Once a bitmap file has been loaded, it may be referenced by its filename in the STX file where required:<br />
<br />
===== Properties =====<br />
<br />
* <tt>filename [string]</tt>: Path and filename to the bitmap file.<br />
* <tt>resolution [[x|y][<|>]int]</tt>: Load only on a given resolution. See resolution-dependant keys.<br />
<br />
-----<br />
<br />
==== <tt>&lt;fonts&gt;</tt> ====<br />
<br />
Parent: <tt>&lt;render_info&gt;</tt><br /><br />
Children: <tt>&lt;font&gt;</tt><br /><br />
Properties: -<br />
<br />
===== Example =====<br />
<br />
<syntax type="xml"><br />
<fonts><br />
...<br />
</fonts><br />
</syntax><br />
<br />
===== Description =====<br />
<br />
The <tt>fonts</tt> key is a simple wrapper; it contains all the <tt>font</tt> keys for the theme.<br />
<br />
<br />
-----<br />
<br />
==== <tt>&lt;font&gt;</tt> ====<br />
<br />
Parent: <tt>&lt;fonts&gt;</tt><br /><br />
Children: -<br /><br />
Properties: <tt>id</tt> (''required''), <tt>file</tt> (''required''), <tt>resolution</tt><br />
<br />
===== Example =====<br />
<br />
<syntax type="xml"><br />
<font id = 'text_default'<br />
file = 'default'<br />
/><br />
</syntax><br />
<br />
===== Description =====<br />
<br />
Text drawing on the new GUI is based on Font structures. The renderer expects several font definitions, used internally for text drawing; you can see Font definitions as the text equivalent of a Drawing Step on the Vector Renderer.<br />
<br />
===== Required Font identifiers =====<br />
<br />
This is the list of all the required font identifiers; these identifiers are used internally by the renderer (i.e. when writing static text on the GUI) and may also be referenced on any DrawStep to define the specific font which will be used to draw such widget.<br />
<br />
* <tt>text_default</tt>: Core font for the engine, used to draw all the static text and most of the text in widgets.<br />
* <tt>text_button</tt>: Text for Button widgets.<br />
* <tt>text_normal</tt>: ''Normal'', smaller text (i.e. non bold) used sparsely (editable text widgets, about dialog, etc).<br />
<br />
For performance reasons, these identifiers are unique and limited (i.e. the parser doesn't expect any other custom identifiers). Future versions of the Theme Format may allow for custom Fonts specific to certain widgets.<br />
<br />
===== Properties =====<br />
<br />
* <tt>id [string]</tt>: Unique font identifier.<br />
* <tt>file [string]</tt>: External Font file to load. Use &quot;default&quot; to let the renderer choose the most appropriate default font based on the active resolution (usually an builtin one).<br />
* <tt>resolution [[x|y][<|>]int]</tt>: Load only on a given resolution. See resolution-dependant keys.<br />
<br />
-----<br />
<br />
==== <tt>&lt;text_color&gt;</tt> ====<br />
<br />
Parent: <tt>&lt;fonts&gt;</tt><br /><br />
Children: -<br /><br />
Properties: <tt>id</tt> (''required''), <tt>color</tt> (''required'')<br />
<br />
===== Example =====<br />
<br />
<syntax type="xml"><br />
<text_color id = 'color_normal'<br />
color = 'black'<br />
/><br />
</syntax><br />
<br />
===== Description =====<br />
<br />
The GUI code allows the different draw steps to specify a color to draw the text data in. The user can specify the colors for different (currently predefined) text types via this.<br />
<br />
===== Required text color identifiers =====<br />
<br />
Here is a list of the currently available text color types. All need to be defined by the theme configuration file.<br />
<br />
* <tt>color_normal</tt>: This should be the default color.<br />
* <tt>color_normal_hover</tt>: The default color for hovered widgets.<br />
* <tt>color_normal_disabled</tt>: The default color for disabled widgets.<br />
* <tt>color_normal_inverted</tt>: The default color for inverted text, like used in the ListWidget.<br />
* <tt>color_alternative</tt>: An alternative color, which the widgets might use.<br />
* <tt>color_alternative_hover</tt>: The hovered version of the alternative color.<br />
* <tt>color_alternative_disabled</tt>: The disabled version of the alternative color.<br />
* <tt>color_alternative_inverted</tt>: The inverted version of the alternative color.<br />
* <tt>color_button</tt>: The color to be used in button widgets.<br />
* <tt>color_button_hover</tt>: Hovered version of the button widget text color.<br />
* <tt>color_button_disabled</tt>: Disabled version of the button widget text color.<br />
<br />
For performance reasons, these identifiers are unique and limited (i.e. the parser doesn't expect any other custom identifiers). Future versions of the Theme Format may allow for custom Fonts specific to certain widgets.<br />
<br />
The GUI code itself relies only on "color_normal*" and "color_alternative*" to be present. The button color is there to allow different text colors of the button text's, like used in the modern theme of ScummVM.<br />
<br />
===== Properties =====<br />
<br />
* <tt>id [string]</tt>: Unique color identifier.<br />
* <tt>color [int, int, int|string]</tt>: Color to draw the text with.<br />
<br />
-----<br />
<br />
==== <tt>&lt;defaults&gt;</tt> ====<br />
<br />
Parent: <tt>&lt;render_info&gt;</tt>, <tt>&lt;drawdata&gt;</tt><br /><br />
Children: -<br /><br />
Properties: See DrawStep properties.<br />
<br />
===== Example =====<br />
<br />
<syntax type="xml"><br />
<defaults fill = 'gradient' fg_color = 'white' bevel_color = '237, 169, 72'/><br />
</syntax><br />
<br />
===== Description =====<br />
<br />
The <tt>defaults</tt> key may be used to specify default values to be used on ''all'' DrawSteps in order to avoid code repetition. You may set default values for any drawing properties which is shared by all DrawSteps: Check the DrawStep specification for a detailed list.<br />
<br />
If found on the <tt>&lt;render_info&gt;</tt> scope, these defaults will be applied to all DrawSteps found inside any of the DrawData definitions. Optionally, you may use the defaults key inside a <tt>&lt;drawdata&gt;</tt> key to temporarily override the global defaults for all the DrawSteps inside that DrawData key.<br />
<br />
<br />
-----<br />
<br />
==== <tt>&lt;cursor&gt;</tt> ====<br />
<br />
Parent: <tt>&lt;render_info&gt;</tt><br /><br />
Children: -<br /><br />
Properties: <tt>file</tt> (''required''), <tt>hotspot</tt> (''required''), <tt>scale</tt> (''required''), <tt>resolution</tt><br />
<br />
===== Example =====<br />
<br />
<syntax type="xml"><br />
<cursor file = 'cursor.bmp' hotspot = '0, 0' scale = '3'/><br />
</syntax><br />
<br />
===== Description =====<br />
<br />
If the parser finds a <tt>cursor</tt> key in the <tt>render_info</tt> scope, it will try to load a custom bitmap cursor to use in the Graphical User Interface. If no <tt>cursor</tt> key is found, the GUI will default to the built-in cross cursor.<br />
<br />
Because of bitmap scaling issues, make sure to specify several different cursor definitions, one for each significant resolution.<br />
<br />
===== Properties =====<br />
<br />
* <tt>file [string]</tt>: Filename for the bitmap with the cursor shape (must have been loaded previously).<br />
* <tt>hotspot [int, int]</tt>: Coordinates for the point in the bitmap which will be used for click calculations.<br />
* <tt>scale [int]</tt>: Scale at which this cursor is supposed to be used.<br />
* <tt>resolution [[x|y][<|>]int]</tt>: Load only on a given resolution. See resolution-dependant keys.<br />
<br />
-----<br />
<br />
==== <tt>&lt;drawdata&gt;</tt> ====<br />
<br />
Parent: <tt>&lt;render_info&gt;</tt><br /><br />
Children: <tt>&lt;defaults&gt;</tt>, <tt>&lt;drawstep&gt;</tt>, <tt>&lt;text&gt;</tt><br /><br />
Properties: <tt>id</tt> (''required''), <tt>cache</tt>, <tt>resolution</tt><br />
<br />
===== Example =====<br />
<br />
<syntax type="xml"><br />
<drawdata id = 'mainmenu_bg' cache = false><br />
<drawstep ...<br />
/><br />
</drawdata><br />
</syntax><br />
<br />
===== Description =====<br />
<br />
DrawData keys are the core of the rendering engine. They specifiy via their own DrawStep children the looks of all the UI elements for each possible state.<br />
<br />
The Theme Renderer is expecting a specific set of DrawData items for each possible widget state with unique identifiers. The list of DD identifiers is as follows:<br />
<br />
===== Required DrawData identifiers =====<br />
<br />
* <tt>mainmenu_bg</tt>, <tt>special_bg</tt>, <tt>plain_bg</tt>, <tt>default_bg</tt>: Backgrounds for the different dialogs.<br />
* <tt>text_selection</tt>: Background for selected (inverted) text.<br />
* <tt>widget_default</tt>, <tt>widget_small</tt>: Default backgrounds for widgets.<br />
* <tt>widget_textedit</tt>: Background for the Text Edit widget.<br />
* <tt>widget_slider</tt>: Background for the (empty) slider widget.<br />
* <tt>button_idle</tt>, <tt>button_hover</tt>, <tt>button_disabled</tt>: States for the Button widget.<br />
* <tt>slider_full</tt>, <tt>slider_hover</tt>, <tt>slider_disabled</tt>: States for the Slider widget.<br />
* <tt>checkbox_default</tt>, <tt>checkbox_disabled</tt>, <tt>checkbox_selected</tt>: States for the Checkbox widget.<br />
* <tt>tab_active</tt>, <tt>tab_inactive</tt>: States for the selected/deselected tab.<br />
* <tt>tab_background</tt>: Background behind the tab list.<br />
* <tt>scrollbar_base</tt>: Background for the scrollbar widget.<br />
* <tt>scrollbar_button_idle</tt>, <tt>scrollbar_button_hover</tt>: States for the scrollbar up/down buttons.<br />
* <tt>scrollbar_handle_idle</tt>, <tt>scrollbar_handle_hover</tt>: States for the scrolling handle of the scrollbar.<br />
* <tt>popup_idle</tt>, <tt>popup_hover</tt>: States for the popup selection widget.<br />
* <tt>caret</tt>: Text edition caret.<br />
* <tt>separator</tt>: Basic horizontal separator.<br />
Remember that although all these identifiers don't need to be implemented for the theme parsing to be successful, the parser will complain on any missing assets and the GUI will obviously be lacking widget graphics.<br />
<br />
Also, note that each DrawData key ''must'' contain at least a child DrawStep, since it actually defines the graphic drawing for the widget/state.<br />
<br />
===== Properties =====<br />
<br />
* <tt>id [string]</tt>: Unique identifier for the drawing asset.<br />
* <tt>cache [bool]</tt>: Lets the renderer know that this drawing asset may be cached for performance.<br />
* <tt>resolution [[x|y][<|>]int]</tt>: Load only on a given resolution. See resolution-dependant keys.<br />
<br />
-----<br />
<br />
==== <tt>&lt;drawstep&gt;</tt> ====<br />
<br />
Parent: <tt>&lt;drawdata&gt;</tt><br /><br />
Children: -<br /><br />
Properties: <tt>func</tt> (''required''), ...<br />
<br />
===== Example =====<br />
<br />
<syntax type="xml"><br />
<drawstep func = 'roundedsq'<br />
radius = '6'<br />
stroke = 1<br />
fill = 'gradient'<br />
shadow = 0<br />
fg_color = 'shadowcolor'<br />
gradient_start = 'brightred'<br />
gradient_end = 'darkred'<br />
bevel = 1<br />
/><br />
</syntax><br />
<br />
===== Description =====<br />
<br />
DrawSteps are the core of the GUI drawing engine; in order to draw a Widget state to screen (e.g. a selected button), this drawing process is split into several simpler drawing functions, called DrawSteps.<br />
<br />
Each <tt>drawdata</tt> key must contain one or more DrawSteps. These steps are parsed from top to bottom and their drawing information is stored and later drawn in that same exact order: That means that the last DrawStep inside a DrawData set will appear on top.<br />
<br />
The most important property of a DrawStep is the <tt>func</tt> (or function) of the step, the primitive drawing function that will be used. All other properties are optional parameters to that drawing function, such as the foreground and background colors, the stroke used, and a long etc.<br />
<br />
Take a look at the full list of properties to see which properties are required by each function.<br />
<br />
===== Required properties =====<br />
<br />
* <tt>func [string]</tt>: Specifies the drawing function used on the step from one of the following:<br />
** <tt>circle</tt>: Draws a primitive circle.<br />
** <tt>square</tt>: Draws a primitive square/rectangle.<br />
** <tt>roundedsq</tt>: Draws a rounded square/rectangle (that is, a rectangle with rounded corners).<br />
** <tt>bevelsq</tt>: Draws a square/rectangle with beveled borders. This square ignores the active fill mode, as it is never filled. It's used to reproduce the old Classic GUI Theme.<br />
** <tt>line</tt>: Draws a straight line.<br />
** <tt>triangle</tt>: Draws a triangle. Triangles are always isosceles, meaning they are drawn inside the square defined by the position and size values, with the given width as the base of the triangle and the given height as the height of the triangle.<br />
** <tt>fill</tt>: This drawing function ignores position and size parameters, as it completely fills the active drawing surface taken into account the active fill mode and colors.<br />
** <tt>bitmap</tt>: Ignores all drawing information and blits the given Bitmap into the surface.<br />
===== Common (optional) properties =====<br />
<br />
* <tt>fill [string]</tt>: Specifies the fill mode for the drawn shape. Possible values:<br />
** <tt>none</tt>: Disables filling so only the stroke is shown.<br />
** <tt>foreground</tt> (''default''): Fills the whole shape with the active foreground color.<br />
** <tt>background</tt>: Fills the whole shape with the active background color.<br />
** <tt>gradient</tt>: Fills the whole shape with the active gradient.<br /><br />
<br />
* <tt>gradient_start [int, int, int|string]</tt>: Sets the gradient start color; has no default value.<br /><br />
<br />
* <tt>gradient_end [int, int, int|string]</tt>: Sets the gradient end color; has no default value.<br /><br />
<br />
* <tt>fg_color [int, int, int|string]</tt>: Sets the foreground fill color; has no default value.<br /><br />
<br />
* <tt>bg_color [int, int, int|string]</tt>: Sets the background fill color; has no default value.<br /><br />
<br />
* <tt>stroke [int]</tt> (''default'' = <tt>0</tt>): Sets the active stroke width; strokes may be disabled by setting this value to 0. All shapes are automatically stroked with the given width and the active foreground color.<br /><br />
<br />
* <tt>shadow [int]</tt> (''default'' = <tt>0</tt>): Sets the shadow offset. In the rendering engines that support it, drawn shapes will have a soft shadow offseted the given amount on their bottom-right corner.<br /><br />
<br />
* <tt>factor [int]</tt> (''default'' = <tt>1</tt>): The factor value specifies the displacement of the active gradient, i.e. its zoom level. It is only taken into account if the active fill mode is set to gradient.<br /><br />
<br />
* <tt>bevel [int]</tt> (''default'' = <tt>0</tt>): Amount of fake bevel for all the drawn shapes. Currently only supported in squares and rounded squares; adding bevel to other shapes causes no effect.<br />
* <tt>width [int|string]</tt> (''default'' = <tt>auto</tt>): Width for the shape. Defaults to <tt>auto</tt> (automatically fill the whole drawing surface). Width may be specified as a pixel value or with the <tt>height</tt> keyword, which will give the shape the same width as its height.<br />
* <tt>height [int|string]</tt> (''default'' = <tt>auto</tt>): Height for the shape. Defaults to <tt>auto</tt> (automatically fill the whole drawing surface). Height may be specified as a pixel value or with the <tt>width</tt> keyword, which will give the shape the same height as its width.<br />
* <tt>xpos [int|string]</tt> (''required when <tt>width</tt> is not auto''): Sets the X position of the shape; only taken into account when its width is not set to automatically fill the drawing area. Position may be specified either as a relative pixel value or as an alignment:<br />
** <tt>center</tt><br />
** <tt>left</tt><br />
** <tt>right</tt><br />
* <tt>ypos [int|string]</tt> (''required when <tt>height</tt> is not auto''): Sets the Y position of the shape; only taken into account when its height is not set to automatically fill the drawing area. Position may be specified either as a relative pixel value or as an alignment:<br />
** <tt>center</tt><br />
** <tt>top</tt><br />
** <tt>bottom</tt><br />
===== Function-specific properties =====<br />
<br />
* <tt>radius [int]</tt> (''required for func'' = <tt>circle, roundedsq</tt>): Defines the radius of a drawn circle or of the rounded corners of a square.<br />
* <tt>orientation [string]</tt> (''required for func'' = <tt>triangle</tt>): Defines the orientation of the drawn triangle; possible values are:<br />
** <tt>top</tt>: The triangle has its vertex on the top and its base on the bottom.<br />
** <tt>bottom</tt>: The triangle has its vertex on the bottom and its base on the top.<br />
* <tt>file [string]</tt> (''required for func'' = <tt>bitmap</tt>): Defines the previously loaded bitmap file that must be blit into the screen.<br />
<br />
-----<br />
<br />
==== <tt>&lt;text&gt;</tt> ====<br />
<br />
Parent: <tt>&lt;drawdata&gt;</tt><br /><br />
Children: -<br /><br />
Properties: <tt>font</tt> (''required''), <tt>text_color</tt> (''required''), <tt>vertical_align</tt> (''required''), <tt>horizontal_align</tt> (''required'')<br />
<br />
===== Example =====<br />
<br />
<syntax type="xml"><br />
<text font = 'text_button'<br />
text_color = 'color_button'<br />
vertical_align = 'center'<br />
horizontal_align = 'center'<br />
/><br />
</syntax><br />
<br />
===== Description =====<br />
<br />
The <tt>text</tt> key is required on those widgets which contain a text string; it specifies the way in which the text is drawn on the screen for that single widget. All the widgets which contain text should have a <tt>text</tt> key in their DrawData definition.<br />
<br />
===== List of Widgets which require <tt>text</tt> keys =====<br />
<br />
* <tt>button_idle</tt><br />
* <tt>button_disabled</tt><br />
* <tt>checkbox_disabled</tt><br />
* <tt>checkbox_selected</tt><br />
* <tt>checkbox_default</tt><br />
* <tt>tab_active</tt><br />
* <tt>tab_inactive</tt><br />
* <tt>popup_idle</tt><br />
* <tt>popup_hover</tt><br />
Note that the text key is not really required by the parser, but any widget that wishes to display text must contain one. Adding <tt>text</tt> keys to widgets who don't natively display text (i.e. those not on the previous list) has no effect.<br />
<br />
===== Properties =====<br />
<br />
* <tt>font [string]</tt>: Font identifier from a previously created <tt>font</tt> key. This font will be used to draw the text.<br />
* <tt>text_color [string]</tt>: Color to use. This entry has to match a identifier defined via the <tt>text_color</tt> key.<br />
* <tt>vertical_alignment [string]</tt>: Vertical (Y axis) alignment of the text. Possible values:<br />
** <tt>top</tt><br />
** <tt>bottom</tt><br />
** <tt>center</tt><br />
* <tt>horizontal_alignment [string]</tt>: Horizontal (X axis) alignment of the text. Possible values:<br />
** <tt>left</tt><br />
** <tt>right</tt><br />
** <tt>center</tt><br />
<br />
-----<br />
<br />
==== <tt>&lt;layout_info&gt;</tt> ====<br />
<br />
Parent: root<br /><br />
Children: <tt>&lt;globals&gt;</tt>, <tt>&lt;dialog&gt;</tt><br /><br />
Properties: <tt>resolution</tt><br />
<br />
===== Example =====<br />
<br />
<syntax type="xml"><br />
<layout_info resolution = 'y>399'><br />
...<br />
</layout_info><br />
</syntax><br />
<br />
===== Description =====<br />
<br />
The <tt>layout_info</tt> key is the other root-level key of the renderer; all information contained inside it refers to the actual layout and positioning of the elements on the Graphical User Interface.<br />
<br />
===== Properties =====<br />
<br />
* <tt>resolution [[x|y][<|>]int]</tt>: Load only on a given resolution. See resolution-dependant keys.<br />
<br />
-----<br />
<br />
==== <tt>&lt;globals&gt;</tt> ====<br />
<br />
Parent: <tt>&lt;layout_info&gt;</tt><br /><br />
Children: <tt>&lt;def&gt;</tt>, <tt>&lt;widget&gt;</tt><br /><br />
Properties: -<br />
<br />
===== Example =====<br />
<br />
<syntax type="xml"><br />
<globals><br />
...<br />
</globals><br />
</syntax><br />
<br />
===== Description =====<br />
<br />
The <tt>globals</tt> key is a simple wrapper for all the common variables used in the design of the GUI layout (e.g. the size of a button or the padding of a specific widget.)<br />
<br />
<br />
-----<br />
<br />
==== <tt>&lt;def&gt;</tt> ====<br />
<br />
Parent: <tt>&lt;globals&gt;</tt><br /><br />
Children: -<br /><br />
Properties: <tt>var</tt> (''required''), <tt>value</tt> (''required''), <tt>resolution</tt><br />
<br />
===== Example =====<br />
<br />
<syntax type="xml"><br />
<def var = 'WidgetSize' value = 'kBigWidgetSize' /><br />
<def resolution = 'y>399' var = 'WidgetSize' value = 'kNormalWidgetSize' /><br />
</syntax><br />
<br />
===== Description =====<br />
<br />
A <tt>def</tt> or ''definition'' key defines a global variable to be used on the parser by giving it a name (<tt>var</tt>) and an integer value (<tt>value</tt>). Note that the <tt>value</tt> field may also contain a string representing a builtin constant value. You can find a list of such values on the description of the <tt>value</tt> parameter.<br />
<br />
Variable definitions work as aliases for commonly used values on the layouts, but some reserved variable names are also polled by the GUI system to load internal data.<br />
<br />
===== Reserved variable names =====<br />
<br />
* <tt>WidgetSize</tt>: The global size of all GUI elements.<br />
* <tt>Line.Height</tt>: The height of a line of text.<br />
* <tt>Font.Height</tt>: The height of the default font.<br />
* <tt>TabLabelWidth</tt>: The width of the label in a Tab Popup.<br />
* <tt>About.OuterBorder</tt>: Space between the edges of the screen in the About dialog.<br />
* <tt>ShowLauncherLogo</tt>: Set to <tt>1</tt> if the ScummVM should be shown on the main Launcher screen.<br />
All these values are required; failure to define them will cause the parsing of a theme layout to complain.<br />
<br />
===== Properties =====<br />
<br />
* <tt>var [string]</tt>: Identifier name for the variable.<br />
* <tt>value [int|string]</tt>: Value of the variable, represented by an integer or by a builtin constant from this list:<br />
** kThumbnailWidth<br />
** kThumbnailHeight1<br />
** kThumbnailHeight2<br />
** kButtonWidth<br />
** kButtonHeight<br />
** kSliderWidth<br />
** kSliderHeight<br />
** kBigButtonWidth<br />
** kBigButtonHeight<br />
** kBigSliderWidth<br />
** kBigSliderWidth<br />
** kBigSliderHeight<br />
** kNormalWidgetSize<br />
** kBigWidgetSize<br />
* <tt>resolution [[x|y][<|>]int]</tt>: Load only on a given resolution. See resolution-dependant keys.<br />
<br />
-----<br />
<br />
==== <tt>&lt;widget&gt;</tt> (global widget definition) ====<br />
<br />
Parent: <tt>&lt;globals&gt;</tt><br /><br />
Children: <tt>&lt;child&gt;</tt> Properties: <tt>name</tt> (''required''), <tt>size</tt>, <tt>padding</tt>, <tt>resolution</tt><br />
<br />
===== Example =====<br />
<br />
<syntax type="xml"><br />
<widget name = 'SmallButton'<br />
size = '128, 18'<br />
/><br />
</syntax><br />
<br />
===== Description =====<br />
<br />
A global widget definition is a parser-exclusive alias for the layout properties of a specific widget. For instance, the definition of a global widget named <tt>Slider</tt> with certain size properties will allow you to specify <tt>Slider</tt> as a Widget type when adding widgets to a Dialog, and that widget will inherit the size properties defined in this global definition. For more information, please check the documentation on <tt>&lt;widget&gt;</tt> (''local widget definition'').<br />
<br />
<syntax type="xml"><br />
<dialog name = 'SampleDialog' overlays = 'screen'><br />
<layout type = 'vertical' ...><br />
<br />
/* <br />
Adding a new widget; instead of specifying its size, we set<br />
its type to the previously defined 'SmallButton', hence it<br />
automaticall inherits its size<br />
*/<br />
<widget name = 'A.Sample.Button'<br />
type = 'SmallButton'<br />
/><br />
<br />
...<br />
</layout><br />
</dialog><br />
</syntax><br />
<br />
Because of this, there are no unique identifiers for Widget names. You may give them any alias (since these aliases are only queried by your own layout definition, inside the parser). However, for added customization, the Theme Renderer will also poll a few unique Global Widget names for their layout information:<br />
<br />
* <tt>ListWidget</tt>: Optionally loads its padding information.<br />
* <tt>PopUpWidget</tt>: Optionally loads its padding information.<br />
* <tt>EditTextWidget</tt>: Optionally loads its padding information.<br />
* <tt>Console</tt>: Optionally loads its padding information.<br />
* <tt>TabWidget.Tab</tt>: Loads size and padding information.<br />
* <tt>TabWidget.NavButton</tt>: Loads size and padding information.<br />
These values, as stated, are just for added customization; perfectly working padding defaults are built in the engine, hence they aren't required by the parser. In the case of the <tt>TabWidget</tt> sizes, their builtin default values aren't assured to work on all resolutions: Double check them and define them yourself if required.<br />
<br />
===== Properties =====<br />
<br />
* <tt>name [string]</tt>: Identifier for the widget.<br />
* <tt>size [int, int]</tt>: Width and height of the widget. You may use previously declared <tt>def</tt>s or builtin constants instead of integers.<br />
* <tt>padding [int, int, int, int]</tt>: Pixel padding for Left, Right, Top and Bottom sides, respectively.<br />
* <tt>resolution [[x|y][<|>]int]</tt>: Load only on a given resolution. See resolution-dependant keys.<br />
<br />
-----<br />
<br />
==== <tt>&lt;dialog&gt;</tt> ====<br />
<br />
Parent: <tt>&lt;layout_info&gt;</tt><br /><br />
Children: <tt>&lt;layout&gt;</tt><br /><br />
Properties: <tt>name</tt> (''required''), <tt>overlays</tt> (''required''), <tt>shading</tt>, <tt>enabled</tt>, <tt>inset</tt>, <tt>resolution</tt><br />
<br />
===== Example =====<br />
<br />
<syntax type="xml"><br />
<dialog name = 'Launcher' overlays = 'screen'><br />
...<br />
</dialog><br />
<br />
<dialog name = 'GameOptions_Graphics' overlays = 'Dialog.GlobalOptions.TabWidget'><br />
...<br />
</dialog><br />
</syntax><br />
<br />
===== Description =====<br />
<br />
Dialog keys are the core of layout definitions; a <tt>dialog</tt> key is required for each dialog shown ingame, and they are distinguished by using the <tt>name</tt> property as an unique identifier.<br />
<br />
Inside of a <tt>dialog</tt> key, the actual layout of the dialog is defined by the use of <tt>layout</tt>, <tt>space</tt> and <tt>widget</tt> subkeys; see the sample definition of a GUI layout section.<br />
<br />
Note however that the first key inside a <tt>dialog</tt> must always be a <tt>layout</tt> -you cannot add widgets before defining its positioning layout.<br />
<br />
===== List of GUI Dialogs =====<br />
<br />
These are all the core dialogs of the GUI which must be implemented in order for the parsing to be successful. Remember that in order to properly define the layout of a dialog, one must add its <tt>dialog</tt> key for the given dialog ''and'' inside of it, all the dialog's own widgets must be defined.<br />
<br />
* <tt>Launcher</tt>: Global launcher menu (main dialog of the GUI).<br />
* <tt>Browser</tt>: File browser, used for add game menus, theme selections, etc.<br />
* <tt>GlobalOptions</tt>: Global options dialog.<br />
* <tt>GlobalOptions_Graphics</tt>: Graphics section of the Global Options dialog.<br />
* <tt>GlobalOptions_Audio</tt>: Audio section of the Global Options dialog.<br />
* <tt>GlobalOptions_Volume</tt>: Volume section of the Global Options dialog.<br />
* <tt>GlobalOptions_MIDI</tt>: MIDI section of the Global Options dialog.<br />
* <tt>GlobalOptions_Paths</tt>: Paths section of the Global Options dialog.<br />
* <tt>GlobalOptions_Misc</tt>: Last section of the Global Options dialog (contains theme loading, etc).<br />
* <tt>GameOptions</tt>: Game options menu (edits the options of a game).<br />
* <tt>GameOptions_Graphics</tt>: Graphics section of the Game Options dialog.<br />
* <tt>GameOptions_Audio</tt>: Audio section of the Game Options dialog.<br />
* <tt>GameOptions_Volume</tt>: Volume section of the Game Options dialog.<br />
* <tt>GameOptions_MIDI</tt>: MIDI section of the Game Options dialog.<br />
* <tt>GameOptions_Game</tt>: Actual game settings section of the Game Options dialog.<br />
* <tt>GameOptions_Paths</tt>: Paths section of the Game Options dialog.<br /><br />
<br />
* <tt>ScummMain</tt>: Main ingame menu for SCUMM based games.<br />
* <tt>ScummConfig</tt>: Options menu for SCUMM based games.<br />
* <tt>ScummSaveLoad</tt>: Save/Load menu for SCUMM based games.<br />
* <tt>ScummHelp</tt>: Help menu for SCUMM based games.<br />
<br />
* <tt>KeyMapper</tt>: Dialog for mapping keys.<br />
<br />
===== Properties =====<br />
<br />
* <tt>name [string]</tt>: Unique name identifying the Dialog (from the above list).<br />
* <tt>overlays [string]</tt>: Position of the dialog on screen. Possible values:<br />
** <tt>screen</tt>: Dialog fills the whole screen.<br />
** <tt>screen_center</tt>: Dialog is centered in the middle of the screen.<br />
** ''Local Widget Identifier'': Dialog occupies the same space than the given Widget of another dialog. See example.<br />
* <tt>shading [string]</tt>: Sets whether all other backgrounds dialog should receive special shading when opening this dialog. Possible values:<br />
** <tt>none</tt>: No special shading.<br />
** <tt>luminance</tt>: Background dialogs are drawn in black &amp; white.<br />
** <tt>dim</tt>: Background dialogs are darkened slightly.<br />
* <tt>enabled [bool]</tt>: Sets whether this dialog is enabled. Defaults always to true. May be used to disable dialogs on certain resolutions.<br />
* <tt>inset [int]</tt>: Sets the inset value for Screen and Dialog overlays (the amount by which the new dialog is contracted).<br />
* <tt>resolution [[x|y][<|>]int]</tt>: Load only on a given resolution. See resolution-dependant keys.<br />
<br />
-----<br />
<br />
==== <tt>&lt;layout&gt;</tt> ====<br />
<br />
Parent: <tt>&lt;dialog&gt;</tt>, <tt>&lt;layout&gt;</tt><br /><br />
Children: <tt>&lt;import&gt;</tt>, <tt>&lt;widget&gt;</tt>, <tt>&lt;space&gt;</tt>, <tt>&lt;layout&gt;</tt><br /><br />
Properties: <tt>type</tt> (''required''), <tt>center</tt>, <tt>direction</tt>, <tt>padding</tt>, <tt>spacing</tt><br />
<br />
===== Example =====<br />
<br />
<syntax type="xml"><br />
<layout type = 'vertical' center = 'true' padding = '23, 23, 8, 23'><br />
...<br />
</layout><br />
</syntax><br />
<br />
===== Description =====<br />
<br />
Layout keys are the basic containers for the GUI widgets. All widgets on a dialog must be contained inside a Layout, which can be of 2 types:<br />
<br />
* Vertical Layout: Widgets inside the layout will be placed vertically, from top to bottom.<br />
* Horizontal Layout: Widgets inside the layout will be placed horizontally, from left to right.<br />
Note that you can also nest other <tt>layout</tt> keys inside a <tt>layout</tt> key to design complex GUI dialogs. You can see a detailed system on how does the Layout system work on the Example Theme Layout Definition section.<br />
<br />
===== Properties =====<br />
<br />
* <tt>type [string]</tt>: Sets whether the layout is <tt>vertical</tt> or <tt>horizontal</tt>.<br />
* <tt>center [bool]</tt>: Sets whether children widgets inside this layout will be automatically centered.<br />
* <tt>direction [string]</tt>: Sets the positioning direction of the children widgets:<br />
** <tt>right2left</tt>: Children widgets will be placed starting on the right, as they are parsed.<br />
** <tt>bottom2top</tt>: Children widgets will be placed starting on the bottom, as they are parsed.<br />
* <tt>padding [int, int, int, int]</tt>: Sets the inner padding for the children widgets inside the layout.<br />
* <tt>spacing [int]</tt>: Sets the spacing between two children widgets inside the layout.<br />
<br />
-----<br />
<br />
==== <tt>&lt;import&gt;</tt> ====<br />
<br />
Parent: <tt>&lt;layout&gt;</tt><br /><br />
Children: -<br /><br />
Properties: <tt>layout</tt> (''required'')<br />
<br />
===== Example =====<br />
<br />
<syntax type="xml"><br />
<dialog name = 'GameOptions_Audio' overlays = 'Dialog.GlobalOptions.TabWidget'><br />
<layout type = 'vertical' padding = '16, 16, 16, 16' spacing = '8'><br />
<widget name = 'EnableTabCheckbox' type = 'Checkbox' /><br />
<import layout = 'Dialog.GlobalOptions_Audio' /><br />
</layout><br />
</dialog><br />
</syntax><br />
<br />
===== Description =====<br />
<br />
This powerful key allows to ''import'' (insert) the layout of a previously defined Dialog inside another layout, keeping all its properties. As you can see on the example, this comes specially in handy for the Game Options menus, since they are almost identical to the Global Options menus, except for the global ''Disable'' checkbox on top of the dialog.<br />
<br />
Note that imported Layouts work as any other child Layout or Widget: They are placed accordingly inside the current Layout, taking into account padding and spacing, and can be followed by other child widgets or other layouts, independently of their complexity.<br />
<br />
===== Properties =====<br />
<br />
* <tt>layout [string]</tt>: Identifier of a previously defined Dialog, whose layout will be imported.<br />
<br />
-----<br />
<br />
==== <tt>&lt;space&gt;</tt> ====<br />
<br />
Parent: <tt>&lt;layout&gt;</tt><br /><br />
Children: -<br /><br />
Properties: <tt>size</tt><br />
<br />
===== Example =====<br />
<br />
<syntax type="xml"><br />
<widget name = 'StartButton' type = 'Button'/><br />
<space size = '16' /><br />
<widget name = 'AddGameButton' type = 'Button' /><br />
</syntax><br />
<br />
===== Description =====<br />
<br />
The <tt>space</tt> key works like any other children widget, but appears obviously as a blank space. They are used when designing layouts, to separate groups of widgets.<br />
<br />
Spaces don't have width or height; they have a single <tt>size</tt> property: If the <tt>space</tt> is found inside a vertical layout, it will separate the two widgets that surround it by the given value, and same thing applies for horizontal layouts.<br />
<br />
Space keys may be optionally left without a <tt>size</tt> property: The space will automatically expand itself to fill all the remaining space inside the layout. This may be used to align widgets on the further side of a layout.<br />
<br />
<syntax type="xml"><br />
<layout type = 'horizontal' ...><br />
/** Add a button on the left */<br />
<widget name = 'Button1' type = 'Button'/><br />
<br />
/** The space without size value will expand to fill all the layout */<br />
<space/><br />
<br />
/** Add another button: */<br />
<widget name = 'Button2' type = 'Button'/><br />
/** Since the space had filled the layout, this new button shrinks the<br />
space by the button's width; hence Button2 is now aligned to the right */<br />
</layout><br />
</syntax><br />
<br />
===== Properties =====<br />
<br />
* <tt>size [int]</tt>: Size of the space.<br />
<br />
-----<br />
<br />
==== <tt>&lt;widget&gt;</tt> (local widget definition) ====<br />
<br />
Parent: <tt>&lt;layout&gt;</tt><br /><br />
Children: -<br /><br />
Properties: <tt>name</tt> (''required''), <tt>width</tt>, <tt>height</tt>, <tt>type</tt>, <tt>enabled</tt>, <tt>textalign</tt><br />
<br />
===== Example =====<br />
<br />
<syntax type="xml"><br />
<widget name = 'AddGameButton' <br />
width = '95'<br />
height = 'Globals.Button.Height' <br />
><br />
<widget name = 'AboutButton' <br />
type = 'Button' <br />
/><br />
</syntax><br />
<br />
===== Description =====<br />
<br />
If both the <tt>width</tt> and <tt>height</tt> properties are absent, and if the <tt>type</tt> property is lacking too, or the given type doesn't define size properties, the Layout engine will automatically expand the widget to fill as much space as it has available inside its parent layout.<br />
<br />
If only one of the properties is missing, the Layout engine will expand the widget in that direction. E.g. if a widget has a specific width but no height, the widget will grow vertically to occupy as much space as possible while keeping the fixed width that has been given.<br />
<br />
===== GUI Widget Distribution =====<br />
<br />
For a complete list of all the Widget definitions which are expected by the Theme engine, see <tt>scummmodern_layout.stx</tt> file in <tt>scummmodern</tt> theme.<br />
<br />
===== Properties =====<br />
<br />
* <tt>name [string]</tt>: Unique identifier for this widget (as seen on the GUI Widget distribution list).<br />
* <tt>width [int]</tt>: Width of the widget.<br />
* <tt>height [int]</tt>: Height of the widget.<br />
* <tt>type [string]</tt>: Global Widget Definition from which this widget will inherit its properties.<br />
* <tt>enabled [bool]</tt>: Sets whether this widget is enabled. Defaults always to true. May be used to disable widgets on certain resolutions.<br />
* <tt>textalign [string]</tt>: Sets horizontal alignment of text on this widget. Allowed values are <tt>left</tt>, <tt>right</tt> and <tt>center</tt>. Default value is <tt>left</tt>.</div>Dhewghttps://wiki.scummvm.org/index.php?title=GUI_Themes/Specs&diff=16056GUI Themes/Specs2011-03-07T23:19:44Z<p>Dhewg: adapt to recent theme parser changes</p>
<hr />
<div>Since the merge of the new GUI into the ScummVM trunk, all documentation regarding the legacy GUI is now obsolete. Hence, this page has been updated with the details of the new Theme format.<br />
<br />
=== Theme Packages ===<br />
<br />
A theme file in the new version of the ScummVM GUI is a compressed ZIP file which contains all the required information<br />
<br />
* One or more STX (ScummVM Theme XML) files.<br />
* Any external Bitmap fonts.<br />
* Any external Bitmap images.<br />
* A <tt>THEMERC</tt> file.<br />
===== The STX Files =====<br />
<br />
STX (ScummVM Theme XML) is the new format for theme descriptions on the Graphical User Interface of ScummVM.<br />
<br />
The chosen syntax of this format is a basic subset of XML, the one which the embedded XML parser supports. Please refer to the parser documentation for its technical specifications.<br />
<br />
Throughout the STX files, every single property of the theme's appearance and layout is defined: Although all this information can easily be stored in a single file, the theme engine conveniently allows to split the different sections of the Theme Description in one or more files.<br />
<br />
Any <tt>*.stx</tt> files contained inside the theme package will be automatically loaded and parsed. The content of such files must obviously adhere to the STX syntax which you can find in this document.<br />
<br />
===== The external resources =====<br />
<br />
Together with the STX files, external resources for the theme may be optionally bundled. The most usual resources are bitmaps to use in the Graphical User Interface and Bitmap fonts.<br />
<br />
Packaged resources will then be accessible from the STX syntax (check the <tt>font</tt> and <tt>bitmap</tt> keys in the STX documentation).<br />
<br />
===== The <tt>THEMERC</tt> file =====<br />
<br />
ScummVM themes '''must''' also contain a simple <tt>THEMERC</tt> file stating the theme's version, name and author. The <tt>THEMERC</tt> file is a simple text file with the following syntax:<br />
<br />
<pre>[SCUMMVM_STX0.2:Name of the ScummVM Theme:Name of the Author]</pre><br />
The <tt>SCUMMVM_STX0.2</tt> is just a simple check to make sure that the theme was developed to be used on the proper version of the GUI; 0.2 is the latest version of the ScummVM STX format. Note that the <tt>THEMERC</tt> file is not optional, as it is used by the Theme engine to check that the Theme package is indeed valid and specifies the Name and Author fields that will be shown on the GUI.<br />
<br />
===== Building theme packages =====<br />
<br />
Building a ScummVM Theme Package is as easy as dragging your STX files, bitmaps, resources and <tt>THEMERC</tt> files into your favorite archiver application and creating a zip file. However, to make the development process easier, a Python script called <tt>scummtheme.py</tt> has been included in the <tt>gui/themes/</tt> folder of the SVN repository.<br />
<br />
When ran with the <tt>makeall</tt> argument, the script will automatically parse all the theme folders in the Theme directory and build their ZIP files. It can be also used to build a single theme by passing it the <tt>make [themename]</tt> argument, where <tt>[themename]</tt> is the name of the folder containing the theme to be built.<br />
<br />
This Python script is totally standalone and doesn't require external ZIP utilities, only a standard Python distribution.<br />
<br />
===== Building the built-in theme =====<br />
<br />
The Graphical User Interface must contain a built-in theme to use a fall-back when no other custom themes can be loaded. The built-in theme must be built manually with the <tt>scummtheme.py</tt> script, by passing it the <tt>default [themename]</tt> argument.<br />
<br />
The Python script will then parse the supplied theme's STX files into a single <tt>*.inc</tt> file; this file is automatically built together with the ScummVM executable file when building the ScummVM source code, and will be used as the default built-in theme.<br />
<br />
Note that because only STX files are embedded in the source code, the theme which is converted into a built-in theme '''cannot''' contain Bitmaps or any other external resources.<br />
<br />
By default, the <tt>ScummVM Classic Theme</tt> is the built-in theme.<br />
<br />
=== Drawing specifications ===<br />
<br />
The process of rendering a widget on the screen is discretized into several phases called ''drawing steps''. A set of such steps, which generate a basic widget shape on screen is called a Draw Data set. The GUI Engine loads all the different data sets for a given widget and takes care of rendering it into the screen based on its current state.<br />
<br />
For example, the basic Button widget may be composed of several sets of data: Drawing data for the button's idle state, drawing data for when the button is hovered and drawing data for when the button is pressed.<br />
<br />
The functionality of each set of Drawing Data is hard-coded into the Graphical User Interface; the most up to date version of all the drawing sets may be found extensively commented in the <tt>&quot;gui/ThemeRenderer.h&quot;</tt> file, in the <tt>DrawData</tt> enumeration inside the <tt>ThemeRenderer</tt> class.<br />
<br />
In order to successfully parse and load a custom theme definition, the whole list of Draw Data sets is not required to be defined in a theme description, but failing to declare all of them will make the parser complain and obviously several GUI elements will be missing.<br />
<br />
=== Theme Layout specifications ===<br />
<br />
The actual positioning and layout of widgets and dialogs on the graphical user interface is defined from the <tt>Layout</tt> section of the STX file. This new Graphical User Interface using a Flowing Layouts system which greatly differs from the old coordinate and arithmetic based implementation.<br />
<br />
The best way to learn about the new Layout system is to read the documentation on the <tt>layout</tt> key and its children, and to read the example Layout Design section, which provides a detailed overview into the steps required to design the layout of a dialog.<br />
<br />
=== Syntax overview ===<br />
<br />
A full STX theme description is composed of:<br />
<br />
* A root <tt>&lt;render_info&gt;</tt> key, containing all the information regarding the looks of the theme.<br />
** An optional <tt>&lt;palette&gt;</tt> key, containing color definitions.<br />
** An optional <tt>&lt;bitmaps&gt;</tt> key, containing all the loaded bitmaps which will be used on the GUI.<br />
** A <tt>&lt;fonts&gt;</tt> key, specifying the fonts used to draw text on the GUI.<br />
** A <tt>&lt;drawdata&gt;</tt> key for ''each'' DrawData identifier of the Theme Engine, specifying how is each individual widget drawn.<br />
* A root &lt;layout_info&gt; key, containing all the information regarding the layout of the theme.<br />
** A <tt>&lt;globals&gt;</tt> key, containing the global variables to use on the layout design.<br />
** A <tt>&lt;dialog&gt;</tt> key for ''each'' dialog in the GUI, specifying the layout and position of the dialog and all its children widgets.<br />
Here's a schematic overview of the layout of keys in a STX file:<br />
<br />
<syntax type="xml"><br />
<render_info><br />
<palette><br />
...<br />
</palette><br />
<br />
<bitmaps><br />
...<br />
</bitmaps><br />
<br />
<fonts><br />
...<br />
</fonts><br />
<br />
<drawdata><br />
...<br />
</drawdata><br />
<br />
...<br />
</render_info><br />
<br />
<layout_info><br />
<globals><br />
...<br />
</globals><br />
<br />
<dialog><br />
...<br />
</dialog><br />
<br />
...<br />
</layout_info><br />
</syntax><br />
<br />
The best place to start writing a full theme description is taking a look at the already written themes in the <tt>gui/themes/</tt> directory of the Subversion repository, while consulting the following documentation for each specific key:<br />
<br />
=== Detailed STX documentation ===<br />
<br />
The full documentation of the XML syntax used in the new Graphical User Interface can be found on its own [[GUI Themes/STX_Syntax|wiki page]].<br />
<br />
=== Resolution-dependent keys and layouts ===<br />
<br />
Several keys in the STX syntax support the <tt>resolution</tt> property, which allows to load or skip the key and all its children when loading the theme on a given resolution dimension limit.<br />
<br />
The resolution property must contain one or more resolution dimension limits, comma separated, for which the given key is supposed to be loaded. Resolutions without any modifiers will force the theme to be loaded in all resolutions. Here are a few examples:<br />
<br />
<syntax type="xml"><br />
/* Key will be loaded in all resolutions */<br />
<render_info><br />
<br />
/* Key will ONLY be loaded in resolutions with 400 width or more */<br />
<render_info resolution = 'y>399'><br />
<br />
/* Key will ONLY be loaded in resolutions with less than 400 height */<br />
<render_info resolution = 'y<400'><br />
</syntax><br />
<br />
Note that the Theme Parser does not assert on repeated keys or values, it just replaces them accordingly. For instance, the following variable definition:<br />
<br />
<syntax type="xml"><br />
<def var = 'TestVar' value = '100'/><br />
<def var = 'TestVar' value = '200' resolution = 'y>399'/><br />
</syntax><br />
<br />
won't fail to parse. What will happen when loading the theme using a resolution with 400 height or mire is that <tt>TestVal</tt> first will be assigned the <tt>100</tt> value, and then it will be overwritten with the <tt>200</tt> value. On the other hand, when loading the theme using a resolution ''with less'' than 400 height, the <tt>ThemeVal</tt> will be assigned the <tt>100</tt> value and the second key will be plain ignored.<br />
<br />
The &quot;proper&quot; way to do that multi-resolution assignment would obviously be:<br />
<br />
<syntax type="xml"><br />
<def var = 'TestVar' value = '100' resolution = 'y<400'/><br />
<def var = 'TestVar' value = '200' resolution = 'y>399'/><br />
</syntax><br />
<br />
This way keys are only parsed on the resolution they are used in, but the result will be '''exactly the same''': Most of the time it's just cleaner to avoid using <tt>y<400</tt> resolution tags, and instead write a layout that works on all resolutions and overwrite parts of it with the <tt>y>399<tt> tag.</div>Dhewghttps://wiki.scummvm.org/index.php?title=Compiling_ScummVM/Android&diff=15951Compiling ScummVM/Android2011-02-18T20:10:52Z<p>Dhewg: forgot MAD</p>
<hr />
<div>= Compiling ScummVM for Android =<br />
<br />
This page describes how you build Android packages from the ScummVM source tree.<br />
<br />
= Mandatory tools =<br />
<br />
* [http://developer.android.com/sdk/index.html Android SDK] r09 as of this writing<br />
* [http://developer.android.com/sdk/ndk/index.html Android NDK] r5b as of this writing<br />
<br />
Use the SDK Manager to install:<br />
* Android SDK Tools<br />
* Android SDK Platform-tools<br />
* SDK Platform Android 1.6, API 4<br />
* SDK Platform Android 2.2, API 8<br />
<br />
Set the <tt>ANDROID_SDK</tt> environment variable to the root directory of the SDK, and <tt>ANDROID_NDK</tt> to the root directory of the NDK.<br />
<br />
= Optional libraries =<br />
* [http://svn.xiph.org/branches/lowmem-branch/Tremor/ Tremor] (lowmem branch) to play ''.ogg'' audio files<br />
* [http://www.underbit.com/products/mad/ MAD] to play ''.mp3'' audio files<br />
* [http://flac.sourceforge.net/ FLAC] to play lossless ''.flac'' files<br />
<br />
Again, you have two options:<br />
<br />
== Precompiled binaries ==<br />
<br />
Get [http://static.hackmii.com/dhewg/3rd-android-4-armeabi.tar.bz2 this archive] and extract it to e.g. <tt>/opt/android</tt>.<br />
<br />
== Build the libraries yourself ==<br />
<br />
Here's a a simple script to set up a shell for crosscompiling:<br />
<br />
#!/bin/sh<br />
<br />
PREFIX=${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-<br />
export CC=${PREFIX}gcc<br />
export CXX=${PREFIX}g++<br />
export AS=${PREFIX}gcc<br />
export LD=${PREFIX}gcc<br />
export AR=${PREFIX}ar cru<br />
export RANLIB=${PREFIX}ranlib<br />
export STRIP=${PREFIX}strip<br />
export OBJCOPY=${PREFIX}objcopy<br />
<br />
export MACHDEP="--sysroot=$ANDROID_NDK/platforms/android-4/arch-arm -g -mandroid -mthumb-interwork"<br />
<br />
export CFLAGS="${MACHDEP} -Os -Wall -mandroid -msoft-float -march=armv5te -mtune=xscale"<br />
<br />
export CXXFLAGS="${CFLAGS}"<br />
<br />
export LDFLAGS="${MACHDEP}"<br />
<br />
echo "./configure --host=arm --prefix=/opt/android/3rd-android-4-armeabi"<br />
<br />
Save it to a file (like <tt>android-4-eabi.sh</tt>) and run<br />
<br />
. ./android-4-eabi.sh<br />
<br />
in your shell. Build systems should now use the correct tools.<br />
<br />
=== Tremor ===<br />
<br />
Get a SVN checkout (r17852. as of this writing):<br />
<br />
svn co http://svn.xiph.org/trunk/Tremor<br />
<br />
configure it:<br />
<br />
./autogen.sh --host=arm --prefix=/opt/android/3rd-android-4-armeabi --enable-low-accuracy --enable-64kHz-limit<br />
<br />
and finally build & install it:<br />
<br />
make<br />
make install<br />
<br />
=== MAD ===<br />
<br />
Get a tarball of the latest stable version [http://sourceforge.net/projects/mad/files/libmad/ here] (v0.15.1b as of this writing) and extract it.<br />
<br />
configure it:<br />
<br />
./autogen.sh --host=arm --prefix=/opt/android/3rd-android-4-armeabi --enable-speed --enable-fpm=arm --disable-aso<br />
<br />
and finally build & install it:<br />
<br />
make<br />
make install<br />
<br />
=== FLAC ===<br />
<br />
Get a tarball of the latest stable version [http://flac.sourceforge.net/download.html here] (v1.2.1 as of this writing) and extract it.<br />
<br />
configure it:<br />
<br />
./configure --prefix=/opt/android/3rd-android-4-armeabi --disable-largefile --disable-thorough-tests --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs --disable-ogg --disable-oggtest --disable-rpath<br />
<br />
and build & install the required parts:<br />
<br />
make -C src/libFLAC<br />
make -C src/libFLAC install<br />
make -C include install<br />
<br />
= Compiling =<br />
<br />
The Android port can be compiled with the <tt>configure</tt> script. The most basic way to accomplish this is to run:<br />
<br />
./configure --host=android --enable-plugins --default-dynamic<br />
make<br />
<br />
The script supports various arguments, which you can use to en- or disable features, see <tt>./configure --help</tt>.<br />
<br />
If you want support for additional libraries, you need cross-compiled binaries.<br />
If you followed the [[#Optional libraries|above description]] and have those libraries in <tt>/opt/android/3rd-android-4-armeabi</tt>, the <tt>configure</tt> command line would look like this:<br />
<br />
./configure --host=android --enable-plugins --default-dynamic --with-tremor-prefix=/opt/android/3rd-android-4-armeabi --with-mad-prefix=/opt/android/3rd-android-4-armeabi --with-flac-prefix=/opt/android/3rd-android-4-armeabi</div>Dhewghttps://wiki.scummvm.org/index.php?title=Compiling_ScummVM/Android&diff=15950Compiling ScummVM/Android2011-02-18T20:04:53Z<p>Dhewg: </p>
<hr />
<div>= Compiling ScummVM for Android =<br />
<br />
This page describes how you build Android packages from the ScummVM source tree.<br />
<br />
= Mandatory tools =<br />
<br />
* [http://developer.android.com/sdk/index.html Android SDK] r09 as of this writing<br />
* [http://developer.android.com/sdk/ndk/index.html Android NDK] r5b as of this writing<br />
<br />
Use the SDK Manager to install:<br />
* Android SDK Tools<br />
* Android SDK Platform-tools<br />
* SDK Platform Android 1.6, API 4<br />
* SDK Platform Android 2.2, API 8<br />
<br />
Set the <tt>ANDROID_SDK</tt> environment variable to the root directory of the SDK, and <tt>ANDROID_NDK</tt> to the root directory of the NDK.<br />
<br />
= Optional libraries =<br />
* [http://www.underbit.com/products/mad/ MAD] to play ''.mp3'' audio files<br />
* [http://svn.xiph.org/branches/lowmem-branch/Tremor/ Tremor] (lowmem branch) to play ''.ogg'' audio files<br />
* [http://flac.sourceforge.net/ FLAC] to play lossless ''.flac'' files<br />
<br />
Again, you have two options:<br />
<br />
== Precompiled binaries ==<br />
<br />
Get [http://static.hackmii.com/dhewg/3rd-android-4-armeabi.tar.bz2 this archive] and extract it to e.g. <tt>/opt/android</tt>.<br />
<br />
== Build the libraries yourself ==<br />
<br />
Here's a a simple script to set up a shell for crosscompiling:<br />
<br />
#!/bin/sh<br />
<br />
PREFIX=${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-<br />
export CC=${PREFIX}gcc<br />
export CXX=${PREFIX}g++<br />
export AS=${PREFIX}gcc<br />
export LD=${PREFIX}gcc<br />
export AR=${PREFIX}ar cru<br />
export RANLIB=${PREFIX}ranlib<br />
export STRIP=${PREFIX}strip<br />
export OBJCOPY=${PREFIX}objcopy<br />
<br />
export MACHDEP="--sysroot=$ANDROID_NDK/platforms/android-4/arch-arm -g -mandroid -mthumb-interwork"<br />
<br />
export CFLAGS="${MACHDEP} -Os -Wall -mandroid -msoft-float -march=armv5te -mtune=xscale"<br />
<br />
export CXXFLAGS="${CFLAGS}"<br />
<br />
export LDFLAGS="${MACHDEP}"<br />
<br />
echo "./configure --host=arm --prefix=/opt/android/3rd-android-4-armeabi"<br />
<br />
Save it to a file (like <tt>android-4-eabi.sh</tt>) and run<br />
<br />
. ./android-4-eabi.sh<br />
<br />
in your shell. Build systems should now use the correct tools.<br />
<br />
=== Tremor ===<br />
<br />
Get a SVN checkout (r17852. as of this writing):<br />
<br />
svn co http://svn.xiph.org/trunk/Tremor<br />
<br />
configure it:<br />
<br />
./autogen.sh --host=arm --prefix=/opt/android/3rd-android-4-armeabi --enable-low-accuracy --enable-64kHz-limit<br />
<br />
and finally build & install it:<br />
<br />
make<br />
make install<br />
<br />
=== FLAC ===<br />
<br />
Get a tarball of the latest stable version [http://flac.sourceforge.net/download.html here] (v1.2.1 as of this writing) and extract it.<br />
<br />
configure it:<br />
<br />
./configure --prefix=/opt/android/3rd-android-4-armeabi --disable-largefile --disable-thorough-tests --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs --disable-ogg --disable-oggtest --disable-rpath<br />
<br />
and build & install the required parts:<br />
<br />
make -C src/libFLAC<br />
make -C src/libFLAC install<br />
make -C include install<br />
<br />
= Compiling =<br />
<br />
The Android port can be compiled with the <tt>configure</tt> script. The most basic way to accomplish this is to run:<br />
<br />
./configure --host=android --enable-plugins --default-dynamic<br />
make<br />
<br />
The script supports various arguments, which you can use to en- or disable features, see <tt>./configure --help</tt>.<br />
<br />
If you want support for additional libraries, you need cross-compiled binaries.<br />
If you followed the [[#Optional libraries|above description]] and have those libraries in <tt>/opt/android/3rd-android-4-armeabi</tt>, the <tt>configure</tt> command line would look like this:<br />
<br />
./configure --host=android --enable-plugins --default-dynamic --with-tremor-prefix=/opt/android/3rd-android-4-armeabi --with-mad-prefix=/opt/android/3rd-android-4-armeabi --with-flac-prefix=/opt/android/3rd-android-4-armeabi</div>Dhewghttps://wiki.scummvm.org/index.php?title=Compiling_ScummVM/Android&diff=15949Compiling ScummVM/Android2011-02-18T20:04:41Z<p>Dhewg: </p>
<hr />
<div>= Compiling ScummVM for Android =<br />
<br />
This page describes how you build Android packages from the ScummVM source tree.<br />
<br />
= Mandatory tools =<br />
<br />
* [http://developer.android.com/sdk/index.html Android SDK] r09 as of this writing<br />
* [http://developer.android.com/sdk/ndk/index.html Android NDK] r5b as of this writing]<br />
<br />
Use the SDK Manager to install:<br />
* Android SDK Tools<br />
* Android SDK Platform-tools<br />
* SDK Platform Android 1.6, API 4<br />
* SDK Platform Android 2.2, API 8<br />
<br />
Set the <tt>ANDROID_SDK</tt> environment variable to the root directory of the SDK, and <tt>ANDROID_NDK</tt> to the root directory of the NDK.<br />
<br />
= Optional libraries =<br />
* [http://www.underbit.com/products/mad/ MAD] to play ''.mp3'' audio files<br />
* [http://svn.xiph.org/branches/lowmem-branch/Tremor/ Tremor] (lowmem branch) to play ''.ogg'' audio files<br />
* [http://flac.sourceforge.net/ FLAC] to play lossless ''.flac'' files<br />
<br />
Again, you have two options:<br />
<br />
== Precompiled binaries ==<br />
<br />
Get [http://static.hackmii.com/dhewg/3rd-android-4-armeabi.tar.bz2 this archive] and extract it to e.g. <tt>/opt/android</tt>.<br />
<br />
== Build the libraries yourself ==<br />
<br />
Here's a a simple script to set up a shell for crosscompiling:<br />
<br />
#!/bin/sh<br />
<br />
PREFIX=${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-<br />
export CC=${PREFIX}gcc<br />
export CXX=${PREFIX}g++<br />
export AS=${PREFIX}gcc<br />
export LD=${PREFIX}gcc<br />
export AR=${PREFIX}ar cru<br />
export RANLIB=${PREFIX}ranlib<br />
export STRIP=${PREFIX}strip<br />
export OBJCOPY=${PREFIX}objcopy<br />
<br />
export MACHDEP="--sysroot=$ANDROID_NDK/platforms/android-4/arch-arm -g -mandroid -mthumb-interwork"<br />
<br />
export CFLAGS="${MACHDEP} -Os -Wall -mandroid -msoft-float -march=armv5te -mtune=xscale"<br />
<br />
export CXXFLAGS="${CFLAGS}"<br />
<br />
export LDFLAGS="${MACHDEP}"<br />
<br />
echo "./configure --host=arm --prefix=/opt/android/3rd-android-4-armeabi"<br />
<br />
Save it to a file (like <tt>android-4-eabi.sh</tt>) and run<br />
<br />
. ./android-4-eabi.sh<br />
<br />
in your shell. Build systems should now use the correct tools.<br />
<br />
=== Tremor ===<br />
<br />
Get a SVN checkout (r17852. as of this writing):<br />
<br />
svn co http://svn.xiph.org/trunk/Tremor<br />
<br />
configure it:<br />
<br />
./autogen.sh --host=arm --prefix=/opt/android/3rd-android-4-armeabi --enable-low-accuracy --enable-64kHz-limit<br />
<br />
and finally build & install it:<br />
<br />
make<br />
make install<br />
<br />
=== FLAC ===<br />
<br />
Get a tarball of the latest stable version [http://flac.sourceforge.net/download.html here] (v1.2.1 as of this writing) and extract it.<br />
<br />
configure it:<br />
<br />
./configure --prefix=/opt/android/3rd-android-4-armeabi --disable-largefile --disable-thorough-tests --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs --disable-ogg --disable-oggtest --disable-rpath<br />
<br />
and build & install the required parts:<br />
<br />
make -C src/libFLAC<br />
make -C src/libFLAC install<br />
make -C include install<br />
<br />
= Compiling =<br />
<br />
The Android port can be compiled with the <tt>configure</tt> script. The most basic way to accomplish this is to run:<br />
<br />
./configure --host=android --enable-plugins --default-dynamic<br />
make<br />
<br />
The script supports various arguments, which you can use to en- or disable features, see <tt>./configure --help</tt>.<br />
<br />
If you want support for additional libraries, you need cross-compiled binaries.<br />
If you followed the [[#Optional libraries|above description]] and have those libraries in <tt>/opt/android/3rd-android-4-armeabi</tt>, the <tt>configure</tt> command line would look like this:<br />
<br />
./configure --host=android --enable-plugins --default-dynamic --with-tremor-prefix=/opt/android/3rd-android-4-armeabi --with-mad-prefix=/opt/android/3rd-android-4-armeabi --with-flac-prefix=/opt/android/3rd-android-4-armeabi</div>Dhewghttps://wiki.scummvm.org/index.php?title=Compiling_ScummVM/Android&diff=15948Compiling ScummVM/Android2011-02-18T20:04:25Z<p>Dhewg: split SDK and NDK</p>
<hr />
<div>= Compiling ScummVM for Android =<br />
<br />
This page describes how you build Android packages from the ScummVM source tree.<br />
<br />
= Mandatory tools =<br />
<br />
* [http://developer.android.com/sdk/index.html Android SDK] r09 as of this writing<br />
* [http://developer.android.com/sdk/ndk/index.html Android NDK r5b as of this writing]<br />
<br />
Use the SDK Manager to install:<br />
* Android SDK Tools<br />
* Android SDK Platform-tools<br />
* SDK Platform Android 1.6, API 4<br />
* SDK Platform Android 2.2, API 8<br />
<br />
Set the <tt>ANDROID_SDK</tt> environment variable to the root directory of the SDK, and <tt>ANDROID_NDK</tt> to the root directory of the NDK.<br />
<br />
= Optional libraries =<br />
* [http://www.underbit.com/products/mad/ MAD] to play ''.mp3'' audio files<br />
* [http://svn.xiph.org/branches/lowmem-branch/Tremor/ Tremor] (lowmem branch) to play ''.ogg'' audio files<br />
* [http://flac.sourceforge.net/ FLAC] to play lossless ''.flac'' files<br />
<br />
Again, you have two options:<br />
<br />
== Precompiled binaries ==<br />
<br />
Get [http://static.hackmii.com/dhewg/3rd-android-4-armeabi.tar.bz2 this archive] and extract it to e.g. <tt>/opt/android</tt>.<br />
<br />
== Build the libraries yourself ==<br />
<br />
Here's a a simple script to set up a shell for crosscompiling:<br />
<br />
#!/bin/sh<br />
<br />
PREFIX=${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-<br />
export CC=${PREFIX}gcc<br />
export CXX=${PREFIX}g++<br />
export AS=${PREFIX}gcc<br />
export LD=${PREFIX}gcc<br />
export AR=${PREFIX}ar cru<br />
export RANLIB=${PREFIX}ranlib<br />
export STRIP=${PREFIX}strip<br />
export OBJCOPY=${PREFIX}objcopy<br />
<br />
export MACHDEP="--sysroot=$ANDROID_NDK/platforms/android-4/arch-arm -g -mandroid -mthumb-interwork"<br />
<br />
export CFLAGS="${MACHDEP} -Os -Wall -mandroid -msoft-float -march=armv5te -mtune=xscale"<br />
<br />
export CXXFLAGS="${CFLAGS}"<br />
<br />
export LDFLAGS="${MACHDEP}"<br />
<br />
echo "./configure --host=arm --prefix=/opt/android/3rd-android-4-armeabi"<br />
<br />
Save it to a file (like <tt>android-4-eabi.sh</tt>) and run<br />
<br />
. ./android-4-eabi.sh<br />
<br />
in your shell. Build systems should now use the correct tools.<br />
<br />
=== Tremor ===<br />
<br />
Get a SVN checkout (r17852. as of this writing):<br />
<br />
svn co http://svn.xiph.org/trunk/Tremor<br />
<br />
configure it:<br />
<br />
./autogen.sh --host=arm --prefix=/opt/android/3rd-android-4-armeabi --enable-low-accuracy --enable-64kHz-limit<br />
<br />
and finally build & install it:<br />
<br />
make<br />
make install<br />
<br />
=== FLAC ===<br />
<br />
Get a tarball of the latest stable version [http://flac.sourceforge.net/download.html here] (v1.2.1 as of this writing) and extract it.<br />
<br />
configure it:<br />
<br />
./configure --prefix=/opt/android/3rd-android-4-armeabi --disable-largefile --disable-thorough-tests --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs --disable-ogg --disable-oggtest --disable-rpath<br />
<br />
and build & install the required parts:<br />
<br />
make -C src/libFLAC<br />
make -C src/libFLAC install<br />
make -C include install<br />
<br />
= Compiling =<br />
<br />
The Android port can be compiled with the <tt>configure</tt> script. The most basic way to accomplish this is to run:<br />
<br />
./configure --host=android --enable-plugins --default-dynamic<br />
make<br />
<br />
The script supports various arguments, which you can use to en- or disable features, see <tt>./configure --help</tt>.<br />
<br />
If you want support for additional libraries, you need cross-compiled binaries.<br />
If you followed the [[#Optional libraries|above description]] and have those libraries in <tt>/opt/android/3rd-android-4-armeabi</tt>, the <tt>configure</tt> command line would look like this:<br />
<br />
./configure --host=android --enable-plugins --default-dynamic --with-tremor-prefix=/opt/android/3rd-android-4-armeabi --with-mad-prefix=/opt/android/3rd-android-4-armeabi --with-flac-prefix=/opt/android/3rd-android-4-armeabi</div>Dhewghttps://wiki.scummvm.org/index.php?title=Compiling_ScummVM&diff=15947Compiling ScummVM2011-02-18T19:59:54Z<p>Dhewg: add android to the table</p>
<hr />
<div>=== Compiling ScummVM ===<br />
<br />
ScummVM has been ported to several different [[Platforms]]. Compilation of ScummVM is a bit different for each platform, so instructions have been included for the official platforms that ScummVM can be compiled for<br />
<br />
{| border="1" cellpadding="2"<br />
|- style="background:silver"<br />
|Platform||Compiling instructions<br />
|-<br />
|[http://www.microsoft.com Windows] || [[Compiling ScummVM/Visual Studio|Visual Studio 2010/2008/2005]], [[Compiling_ScummVM/MinGW|MinGW]] and [[Compiling ScummVM/DevCPP|Dev-C++]] instructions<br />
|-<br />
|[http://www.linux.org Linux] || [[Compiling ScummVM/GCC|GCC]]<br />
|-<br />
|[http://os4.hyperion-entertainment.biz/ AmigaOS4] || [[Compiling ScummVM/AmigaOS4|AmigaOS4]]<br />
|-<br />
|[http://www.microsoft.com/windowsmobile/ Windows CE/Mobile] || [[Compiling_ScummVM/Windows_CE|Windows CE]] instructions<br />
|-<br />
|[http://www.sega.jp/dc/ Sega Dreamcast] || [[Compiling ScummVM/Dreamcast|Dreamcast]] instructions<br />
|-<br />
|[http://www.us.playstation.com/PSP Sony PlayStation Portable]||[[Compiling ScummVM/PlayStation Portable|PlayStation Portable]] instructions<br />
|-<br />
|[http://www.us.playstation.com/PS2 Sony PlayStation 2]||[[Compiling ScummVM/PlayStation 2|PlayStation 2]] instructions<br />
|-<br />
|[http://www.apple.com/macosx/ Mac OS X]||[[Compiling ScummVM/Mac OS X|Mac OS X]] instructions (see also [[Compiling ScummVM/Mac OS X Crosscompiling|Mac OS X Crosscompiling]] and [[Compiling ScummVM/Mac OS X 10.2.8|Mac OS X 10.2.8]] instructions)<br />
|-<br />
|[http://www.apple.com/iphone/ Apple iPhone]||[[Compiling ScummVM/iPhone|iPhone]] instructions<br />
|-<br />
|[http://www.nintendo.com/ds Nintendo DS]||[[Compiling ScummVM/Nintendo DS|Nintendo DS]] instructions<br />
|-<br />
|[http://www.symbian.com/ Symbian]||[[Compiling ScummVM/Symbian|Symbian]] instructions<br />
|-<br />
|Atari/FreeMiNT||[[Compiling ScummVM/Atari/FreeMiNT|Atari/FreeMiNT]]<br />
|-<br />
|[http://en.wikipedia.org/wiki/BeOS BeOS]/[http://www.zeta-os.com/ ZETA]/[http://www.haiku-os.org/ Haiku]||[[Compiling ScummVM/BeOS/ZETA/Haiku|BeOS/ZETA/Haiku]] instructions<br />
|-<br />
|[http://www.nintendo.com/wii Nintendo Wii and Gamecube]||[[Compiling ScummVM/Wii|Wii and Gamecube]] instructions<br />
|-<br />
|[http://www.android.com/ Google Android]||[[Compiling ScummVM/Android|Android]] instructions<br />
|}<br />
<br />
If you have instructions for compiling a port of ScummVM that is not mentioned here, feel free to contact us!</div>Dhewghttps://wiki.scummvm.org/index.php?title=Compiling_ScummVM/Android&diff=15943Compiling ScummVM/Android2011-02-18T19:57:08Z<p>Dhewg: android build instructions</p>
<hr />
<div>= Compiling ScummVM for Android =<br />
<br />
This page describes how you build Android packages from the ScummVM source tree.<br />
<br />
= Mandatory tools =<br />
<br />
[http://developer.android.com/sdk/index.html Android SDK and NDK]<br />
<br />
Use the SDK Manager to install:<br />
* Android SDK Tools<br />
* Android SDK Platform-tools<br />
* SDK Platform Android 1.6, API 4<br />
* SDK Platform Android 2.2, API 8<br />
<br />
Set the <tt>ANDROID_SDK</tt> environment variable to the root directory of the SDK, and <tt>ANDROID_NDK</tt> to the root directory of the NDK.<br />
<br />
= Optional libraries =<br />
* [http://www.underbit.com/products/mad/ MAD] to play ''.mp3'' audio files<br />
* [http://svn.xiph.org/branches/lowmem-branch/Tremor/ Tremor] (lowmem branch) to play ''.ogg'' audio files<br />
* [http://flac.sourceforge.net/ FLAC] to play lossless ''.flac'' files<br />
<br />
Again, you have two options:<br />
<br />
== Precompiled binaries ==<br />
<br />
Get [http://static.hackmii.com/dhewg/3rd-android-4-armeabi.tar.bz2 this archive] and extract it to e.g. <tt>/opt/android</tt>.<br />
<br />
== Build the libraries yourself ==<br />
<br />
Here's a a simple script to set up a shell for crosscompiling:<br />
<br />
#!/bin/sh<br />
<br />
PREFIX=${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-<br />
export CC=${PREFIX}gcc<br />
export CXX=${PREFIX}g++<br />
export AS=${PREFIX}gcc<br />
export LD=${PREFIX}gcc<br />
export AR=${PREFIX}ar cru<br />
export RANLIB=${PREFIX}ranlib<br />
export STRIP=${PREFIX}strip<br />
export OBJCOPY=${PREFIX}objcopy<br />
<br />
export MACHDEP="--sysroot=$ANDROID_NDK/platforms/android-4/arch-arm -g -mandroid -mthumb-interwork"<br />
<br />
export CFLAGS="${MACHDEP} -Os -Wall -mandroid -msoft-float -march=armv5te -mtune=xscale"<br />
<br />
export CXXFLAGS="${CFLAGS}"<br />
<br />
export LDFLAGS="${MACHDEP}"<br />
<br />
echo "./configure --host=arm --prefix=/opt/android/3rd-android-4-armeabi"<br />
<br />
Save it to a file (like <tt>android-4-eabi.sh</tt>) and run<br />
<br />
. ./android-4-eabi.sh<br />
<br />
in your shell. Build systems should now use the correct tools.<br />
<br />
=== Tremor ===<br />
<br />
Get a SVN checkout (r17852. as of this writing):<br />
<br />
svn co http://svn.xiph.org/trunk/Tremor<br />
<br />
configure it:<br />
<br />
./autogen.sh --host=arm --prefix=/opt/android/3rd-android-4-armeabi --enable-low-accuracy --enable-64kHz-limit<br />
<br />
and finally build & install it:<br />
<br />
make<br />
make install<br />
<br />
=== FLAC ===<br />
<br />
Get a tarball of the latest stable version [http://flac.sourceforge.net/download.html here] (v1.2.1 as of this writing) and extract it.<br />
<br />
configure it:<br />
<br />
./configure --prefix=/opt/android/3rd-android-4-armeabi --disable-largefile --disable-thorough-tests --disable-doxygen-docs --disable-xmms-plugin --disable-cpplibs --disable-ogg --disable-oggtest --disable-rpath<br />
<br />
and build & install the required parts:<br />
<br />
make -C src/libFLAC<br />
make -C src/libFLAC install<br />
make -C include install<br />
<br />
= Compiling =<br />
<br />
The Android port can be compiled with the <tt>configure</tt> script. The most basic way to accomplish this is to run:<br />
<br />
./configure --host=android --enable-plugins --default-dynamic<br />
make<br />
<br />
The script supports various arguments, which you can use to en- or disable features, see <tt>./configure --help</tt>.<br />
<br />
If you want support for additional libraries, you need cross-compiled binaries.<br />
If you followed the [[#Optional libraries|above description]] and have those libraries in <tt>/opt/android/3rd-android-4-armeabi</tt>, the <tt>configure</tt> command line would look like this:<br />
<br />
./configure --host=android --enable-plugins --default-dynamic --with-tremor-prefix=/opt/android/3rd-android-4-armeabi --with-mad-prefix=/opt/android/3rd-android-4-armeabi --with-flac-prefix=/opt/android/3rd-android-4-armeabi</div>Dhewghttps://wiki.scummvm.org/index.php?title=Compiling_ScummVM/Wii&diff=15930Compiling ScummVM/Wii2011-02-18T19:40:39Z<p>Dhewg: then again, this isn't really required</p>
<hr />
<div>= Compiling ScummVM for Wii or Gamecube =<br />
<br />
This page describes how you build a Wii or Gamecube binary from the ScummVM source tree.<br />
<br />
Required tools and/or libraries might change at times, and differences for various ScummVM versions are pointed out when necessary.<br />
<br />
= Mandatory tools and libraries =<br />
<br />
* [http://devkitpro.org/ devkitPPC] as a build environment, please refer to its documentation how to set it up<br />
* libogc and libfat<br />
<br />
The latter two libraries are part of devkitPPC and are already installed with it. However, official ScummVM Wii and Gamecube binaries use unofficial versions, available via [http://git.or.cz/ git] [http://repo.or.cz/w/libogc.git here] and [http://repo.or.cz/w/libfat.git here].<br />
<br />
== Versions differences ==<br />
<br />
* v0.12.0 (first official version) is built with devkitPPC r15<br />
* starting with v0.13.0, devkitPPC r16 is used<br />
* starting with revision 44189, [http://repo.or.cz/w/libgxflux.git libgxflux] in mandatory<br />
<br />
= Optional libraries =<br />
<br />
* [http://svn.xiph.org/branches/lowmem-branch/Tremor/ Tremor] (lowmem branch) to play ''.ogg'' audio files<br />
* [http://flac.sourceforge.net/ FLAC] to play lossless ''.flac'' files<br />
<br />
Again, you have two options:<br />
<br />
== Precompiled binaries ==<br />
<br />
Get [http://static.hackmii.com/dhewg/devkitPPC_r16_3rd_libs.tar.bz2 this archive] and extract it in <tt>$DEVKITPRO/3rd/</tt> you just created. The directory structure should look like<br />
<tt>$DEVKITPRO/3rd/wii/include</tt><br />
<tt>$DEVKITPRO/3rd/wii/lib</tt><br />
and so on. The binaries will work on Wii and Gamecube.<br />
<br />
== Build the libraries yourself ==<br />
<br />
These steps require some patching and fiddling with the required autotools and problems may arise (depending on your OS). Works for me (tm), good luck :P<br />
<br />
Here's a a simple script to set up a shell for crosscompiling:<br />
<br />
#!/bin/sh<br />
<br />
PREFIX=${DEVKITPPC}/bin/powerpc-gekko-<br />
export CC=${PREFIX}gcc<br />
export CXX=${PREFIX}g++<br />
export AS=${PREFIX}gcc<br />
export LD=${PREFIX}gcc<br />
export AR=${PREFIX}ar cru<br />
export RANLIB=${PREFIX}ranlib<br />
export STRIP=${PREFIX}strip<br />
export OBJCOPY=${PREFIX}objcopy<br />
export MACHDEP="-g -Os -Wall -DGEKKO -mcpu=750 -meabi -mhard-float -ffunction-sections -fdata-sections -fmodulo-sched"<br />
export CFLAGS="${MACHDEP}"<br />
export CXXFLAGS="${CFLAGS}"<br />
export LDFLAGS="${MACHDEP}"<br />
<br />
echo "./configure --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii"<br />
<br />
Save it to a file (like <tt>gekkoenv.sh</tt>) and run<br />
<br />
. ./gekkoenv.sh<br />
<br />
in your shell. Build systems should now use the correct tools.<br />
<br />
=== Tremor ===<br />
<br />
Get a SVN checkout (r16259 as of this writing):<br />
<br />
svn co http://svn.xiph.org/trunk/Tremor<br />
<br />
patch it:<br />
<br />
--- Tremor-vanilla/misc.h 2008-12-20 17:09:56.000000000 +0100<br />
+++ Tremor/misc.h 2008-12-23 22:44:58.000000000 +0100<br />
@@ -48,7 +48,7 @@<br />
<br />
#include <sys/types.h><br />
<br />
-#if BYTE_ORDER==LITTLE_ENDIAN<br />
+#if 0<br />
union magic {<br />
struct {<br />
ogg_int32_t lo;<br />
@@ -58,7 +58,7 @@<br />
};<br />
#endif<br />
<br />
-#if BYTE_ORDER==BIG_ENDIAN<br />
+#if 1<br />
union magic {<br />
struct {<br />
ogg_int32_t hi;<br />
<br />
configure it:<br />
<br />
./autogen.sh --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii --enable-low-accuracy<br />
<br />
and finally build & install it:<br />
<br />
make<br />
make install<br />
<br />
=== FLAC ===<br />
<br />
Get a tarball of the latest stable version [http://flac.sourceforge.net/download.html here] (v1.2.1 as of this writing), extract it, patch it:<br />
<br />
diff -ur flac-1.2.1-vanilla/src/libFLAC/bitreader.c flac-1.2.1/src/libFLAC/bitreader.c<br />
--- flac-1.2.1-vanilla/src/libFLAC/bitreader.c 2007-09-11 06:48:55.000000000 +0200<br />
+++ flac-1.2.1/src/libFLAC/bitreader.c 2008-12-23 23:14:00.000000000 +0100<br />
@@ -42,7 +42,7 @@<br />
#elif defined __MINGW32__<br />
#include <winsock.h> /* for ntohl() */<br />
#else<br />
-#include <netinet/in.h> /* for ntohl() */<br />
+//#include <netinet/in.h> /* for ntohl() */<br />
#endif<br />
#include "private/bitmath.h"<br />
#include "private/bitreader.h"<br />
diff -ur flac-1.2.1-vanilla/src/libFLAC/bitwriter.c flac-1.2.1/src/libFLAC/bitwriter.c<br />
--- flac-1.2.1-vanilla/src/libFLAC/bitwriter.c 2007-09-11 01:08:38.000000000 +0200<br />
+++ flac-1.2.1/src/libFLAC/bitwriter.c 2008-12-23 23:13:59.000000000 +0100<br />
@@ -42,7 +42,7 @@<br />
#elif defined __MINGW32__<br />
#include <winsock.h> /* for ntohl() */<br />
#else<br />
-#include <netinet/in.h> /* for ntohl() */<br />
+//#include <netinet/in.h> /* for ntohl() */<br />
#endif<br />
#if 0 /* UNUSED */<br />
#include "private/bitmath.h"<br />
<br />
configure it:<br />
<br />
./configure --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii --disable-doxygen-docs --disable-xmms-plugin --disable-ogg --disable-oggtest --disable-rpath<br />
<br />
and build & install the required parts:<br />
<br />
make -C src/libFLAC<br />
make -C src/libFLAC install<br />
make -C include install<br />
<br />
= Compiling =<br />
<br />
== 1.0.0 and greater ==<br />
<br />
The Wii and Gamecube port can be compiled with the <tt>configure</tt> script. The most basic way to accomplish this is to run:<br />
<br />
./configure --host=wii<br />
make<br />
<br />
If you want to build a Gamecube binary, just use<br />
<br />
./configure --host=gamecube<br />
make<br />
<br />
instead.<br />
<br />
The script supports various arguments, which you can use to en- or disable features, see <tt>./configure --help</tt>.<br />
<br />
Two of the [[#Optional libraries|optional libraries]] are already part of libogc:<br />
* zlib, used to (de-)compress save games. It gets automatically detected with a recent libogc version.<br />
* libmad, used for MP3 playback. It gets automatically detected with a recent libogc version.<br />
<br />
Others are not, and if you want support for it, you need cross-compiled binaries:<br />
* libFLAC, used for FLAC lossless audio playback. Use the ''--with-flac-prefix=<directory>'' argument.<br />
* Tremor, used for OGG audio playback. Use the ''--with-tremor-prefix=<directory>'' argument.<br />
<br />
If you followed the [[#Optional libraries|above description]] and have those libraries in <tt>$DEVKITPRO/3rd/wii</tt>, the <tt>configure</tt> command line would look like this:<br />
<br />
./configure --host=wii --with-flac-prefix=$DEVKITPRO/3rd/wii --with-tremor-prefix=$DEVKITPRO/3rd/wii<br />
<br />
Additionally, there're a few make targets for your convenience:<br />
<br />
* <tt>make wiiload</tt> - uploads a compiled Wii binary over TCP/IP.<br />
* <tt>make geckoupload</tt> - uploads a compiled binary over a USBGecko device.<br />
* <tt>make wiidist</tt> - copies all required files for the Wii into the ''dist'' subdirectory, read to copy onto your SD card for the Homebrew Channel.<br />
* <tt>make gcdist</tt> - same for Gamecube.<br />
* <tt>make wiigdb</tt> - starts GDB and loads your compiled binary, ready to debug.<br />
* <tt>make wiidebug</tt> - starts GDB with your binary and attaches remotely to the Wii via a USBGecko device.<br />
<br />
== v0.13.x and below ==<br />
<br />
This port doesn't utilize ScummVM's <tt>configure</tt> system for v0.12.0, instead it comes with a simple Makefile. The port code can be found in two directories:<br />
<br />
./backends/fs/wii/<br />
./backends/platform/wii/<br />
<br />
The former is a unified filesystem interface for ScummVM, the more interesting code is in the latter.<br />
<br />
Change your working directory to the latter and open the <tt>Makefile</tt> in a editor. You'll find some variables on top of that file, adjust those to your liking. Everything should be self-explanatory, some are even documented. Here are some random hints:<br />
<br />
* There is no support for dynamic libraries on the Wii or Gamecube, keep an engine toggle at <tt>STATIC_PLUGIN</tt> or disable it by just commenting that line<br />
* Vanilla scalers are not supported by the Wii port<br />
* [http://www.zlib.net/ zlib] and [http://www.underbit.com/products/mad/ MAD] are part of libogc<br />
* MPEG2 support has been dropped from the Wii port, if you want support for it, you have to cross compile [http://libmpeg2.sourceforge.net/ libmpeg2]<br />
<br />
When you're done with the <tt>Makefile</tt>, save it and run <tt>make</tt> (GNU version). That's it, the build system is now building an ''.elf'' and a ''.dol''.<br />
<br />
Test the ''.dol'' by uploading it using ''wiiload'' via:<br />
<br />
make upload<br />
<br />
If you want to copy your compiled binary to SD, use the command<br />
<br />
make dist<br />
<br />
which generates the folder ''dist'' with all the required files to run it.</div>Dhewghttps://wiki.scummvm.org/index.php?title=Compiling_ScummVM/Wii&diff=15929Compiling ScummVM/Wii2011-02-18T19:31:35Z<p>Dhewg: update for git</p>
<hr />
<div>= Compiling ScummVM for Wii or Gamecube =<br />
<br />
This page describes how you build a Wii or Gamecube binary from the ScummVM source tree.<br />
<br />
First, you have to choose how to obtain the sources:<br />
* a downloaded [http://scummvm.org/downloads.php#source sources archive]<br />
* a [https://github.com/scummvm/scummvm GIT] clone<br />
<br />
Required tools and/or libraries might change at times, and differences for various ScummVM versions are pointed out when necessary.<br />
<br />
= Mandatory tools and libraries =<br />
<br />
* [http://devkitpro.org/ devkitPPC] as a build environment, please refer to its documentation how to set it up<br />
* libogc and libfat<br />
<br />
The latter two libraries are part of devkitPPC and are already installed with it. However, official ScummVM Wii and Gamecube binaries use unofficial versions, available via [http://git.or.cz/ git] [http://repo.or.cz/w/libogc.git here] and [http://repo.or.cz/w/libfat.git here].<br />
<br />
== Versions differences ==<br />
<br />
* v0.12.0 (first official version) is built with devkitPPC r15<br />
* starting with v0.13.0, devkitPPC r16 is used<br />
* starting with revision 44189, [http://repo.or.cz/w/libgxflux.git libgxflux] in mandatory<br />
<br />
= Optional libraries =<br />
<br />
* [http://svn.xiph.org/branches/lowmem-branch/Tremor/ Tremor] (lowmem branch) to play ''.ogg'' audio files<br />
* [http://flac.sourceforge.net/ FLAC] to play lossless ''.flac'' files<br />
<br />
Again, you have two options:<br />
<br />
== Precompiled binaries ==<br />
<br />
Get [http://static.hackmii.com/dhewg/devkitPPC_r16_3rd_libs.tar.bz2 this archive] and extract it in <tt>$DEVKITPRO/3rd/</tt> you just created. The directory structure should look like<br />
<tt>$DEVKITPRO/3rd/wii/include</tt><br />
<tt>$DEVKITPRO/3rd/wii/lib</tt><br />
and so on. The binaries will work on Wii and Gamecube.<br />
<br />
== Build the libraries yourself ==<br />
<br />
These steps require some patching and fiddling with the required autotools and problems may arise (depending on your OS). Works for me (tm), good luck :P<br />
<br />
Here's a a simple script to set up a shell for crosscompiling:<br />
<br />
#!/bin/sh<br />
<br />
PREFIX=${DEVKITPPC}/bin/powerpc-gekko-<br />
export CC=${PREFIX}gcc<br />
export CXX=${PREFIX}g++<br />
export AS=${PREFIX}gcc<br />
export LD=${PREFIX}gcc<br />
export AR=${PREFIX}ar cru<br />
export RANLIB=${PREFIX}ranlib<br />
export STRIP=${PREFIX}strip<br />
export OBJCOPY=${PREFIX}objcopy<br />
export MACHDEP="-g -Os -Wall -DGEKKO -mcpu=750 -meabi -mhard-float -ffunction-sections -fdata-sections -fmodulo-sched"<br />
export CFLAGS="${MACHDEP}"<br />
export CXXFLAGS="${CFLAGS}"<br />
export LDFLAGS="${MACHDEP}"<br />
<br />
echo "./configure --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii"<br />
<br />
Save it to a file (like <tt>gekkoenv.sh</tt>) and run<br />
<br />
. ./gekkoenv.sh<br />
<br />
in your shell. Build systems should now use the correct tools.<br />
<br />
=== Tremor ===<br />
<br />
Get a SVN checkout (r16259 as of this writing):<br />
<br />
svn co http://svn.xiph.org/trunk/Tremor<br />
<br />
patch it:<br />
<br />
--- Tremor-vanilla/misc.h 2008-12-20 17:09:56.000000000 +0100<br />
+++ Tremor/misc.h 2008-12-23 22:44:58.000000000 +0100<br />
@@ -48,7 +48,7 @@<br />
<br />
#include <sys/types.h><br />
<br />
-#if BYTE_ORDER==LITTLE_ENDIAN<br />
+#if 0<br />
union magic {<br />
struct {<br />
ogg_int32_t lo;<br />
@@ -58,7 +58,7 @@<br />
};<br />
#endif<br />
<br />
-#if BYTE_ORDER==BIG_ENDIAN<br />
+#if 1<br />
union magic {<br />
struct {<br />
ogg_int32_t hi;<br />
<br />
configure it:<br />
<br />
./autogen.sh --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii --enable-low-accuracy<br />
<br />
and finally build & install it:<br />
<br />
make<br />
make install<br />
<br />
=== FLAC ===<br />
<br />
Get a tarball of the latest stable version [http://flac.sourceforge.net/download.html here] (v1.2.1 as of this writing), extract it, patch it:<br />
<br />
diff -ur flac-1.2.1-vanilla/src/libFLAC/bitreader.c flac-1.2.1/src/libFLAC/bitreader.c<br />
--- flac-1.2.1-vanilla/src/libFLAC/bitreader.c 2007-09-11 06:48:55.000000000 +0200<br />
+++ flac-1.2.1/src/libFLAC/bitreader.c 2008-12-23 23:14:00.000000000 +0100<br />
@@ -42,7 +42,7 @@<br />
#elif defined __MINGW32__<br />
#include <winsock.h> /* for ntohl() */<br />
#else<br />
-#include <netinet/in.h> /* for ntohl() */<br />
+//#include <netinet/in.h> /* for ntohl() */<br />
#endif<br />
#include "private/bitmath.h"<br />
#include "private/bitreader.h"<br />
diff -ur flac-1.2.1-vanilla/src/libFLAC/bitwriter.c flac-1.2.1/src/libFLAC/bitwriter.c<br />
--- flac-1.2.1-vanilla/src/libFLAC/bitwriter.c 2007-09-11 01:08:38.000000000 +0200<br />
+++ flac-1.2.1/src/libFLAC/bitwriter.c 2008-12-23 23:13:59.000000000 +0100<br />
@@ -42,7 +42,7 @@<br />
#elif defined __MINGW32__<br />
#include <winsock.h> /* for ntohl() */<br />
#else<br />
-#include <netinet/in.h> /* for ntohl() */<br />
+//#include <netinet/in.h> /* for ntohl() */<br />
#endif<br />
#if 0 /* UNUSED */<br />
#include "private/bitmath.h"<br />
<br />
configure it:<br />
<br />
./configure --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii --disable-doxygen-docs --disable-xmms-plugin --disable-ogg --disable-oggtest --disable-rpath<br />
<br />
and build & install the required parts:<br />
<br />
make -C src/libFLAC<br />
make -C src/libFLAC install<br />
make -C include install<br />
<br />
= Compiling =<br />
<br />
== 1.0.0 and greater ==<br />
<br />
The Wii and Gamecube port can be compiled with the <tt>configure</tt> script. The most basic way to accomplish this is to run:<br />
<br />
./configure --host=wii<br />
make<br />
<br />
If you want to build a Gamecube binary, just use<br />
<br />
./configure --host=gamecube<br />
make<br />
<br />
instead.<br />
<br />
The script supports various arguments, which you can use to en- or disable features, see <tt>./configure --help</tt>.<br />
<br />
Two of the [[#Optional libraries|optional libraries]] are already part of libogc:<br />
* zlib, used to (de-)compress save games. It gets automatically detected with a recent libogc version.<br />
* libmad, used for MP3 playback. It gets automatically detected with a recent libogc version.<br />
<br />
Others are not, and if you want support for it, you need cross-compiled binaries:<br />
* libFLAC, used for FLAC lossless audio playback. Use the ''--with-flac-prefix=<directory>'' argument.<br />
* Tremor, used for OGG audio playback. Use the ''--with-tremor-prefix=<directory>'' argument.<br />
<br />
If you followed the [[#Optional libraries|above description]] and have those libraries in <tt>$DEVKITPRO/3rd/wii</tt>, the <tt>configure</tt> command line would look like this:<br />
<br />
./configure --host=wii --with-flac-prefix=$DEVKITPRO/3rd/wii --with-tremor-prefix=$DEVKITPRO/3rd/wii<br />
<br />
Additionally, there're a few make targets for your convenience:<br />
<br />
* <tt>make wiiload</tt> - uploads a compiled Wii binary over TCP/IP.<br />
* <tt>make geckoupload</tt> - uploads a compiled binary over a USBGecko device.<br />
* <tt>make wiidist</tt> - copies all required files for the Wii into the ''dist'' subdirectory, read to copy onto your SD card for the Homebrew Channel.<br />
* <tt>make gcdist</tt> - same for Gamecube.<br />
* <tt>make wiigdb</tt> - starts GDB and loads your compiled binary, ready to debug.<br />
* <tt>make wiidebug</tt> - starts GDB with your binary and attaches remotely to the Wii via a USBGecko device.<br />
<br />
== v0.13.x and below ==<br />
<br />
This port doesn't utilize ScummVM's <tt>configure</tt> system for v0.12.0, instead it comes with a simple Makefile. The port code can be found in two directories:<br />
<br />
./backends/fs/wii/<br />
./backends/platform/wii/<br />
<br />
The former is a unified filesystem interface for ScummVM, the more interesting code is in the latter.<br />
<br />
Change your working directory to the latter and open the <tt>Makefile</tt> in a editor. You'll find some variables on top of that file, adjust those to your liking. Everything should be self-explanatory, some are even documented. Here are some random hints:<br />
<br />
* There is no support for dynamic libraries on the Wii or Gamecube, keep an engine toggle at <tt>STATIC_PLUGIN</tt> or disable it by just commenting that line<br />
* Vanilla scalers are not supported by the Wii port<br />
* [http://www.zlib.net/ zlib] and [http://www.underbit.com/products/mad/ MAD] are part of libogc<br />
* MPEG2 support has been dropped from the Wii port, if you want support for it, you have to cross compile [http://libmpeg2.sourceforge.net/ libmpeg2]<br />
<br />
When you're done with the <tt>Makefile</tt>, save it and run <tt>make</tt> (GNU version). That's it, the build system is now building an ''.elf'' and a ''.dol''.<br />
<br />
Test the ''.dol'' by uploading it using ''wiiload'' via:<br />
<br />
make upload<br />
<br />
If you want to copy your compiled binary to SD, use the command<br />
<br />
make dist<br />
<br />
which generates the folder ''dist'' with all the required files to run it.</div>Dhewghttps://wiki.scummvm.org/index.php?title=HOWTO-Release&diff=13562HOWTO-Release2010-04-30T16:21:11Z<p>Dhewg: </p>
<hr />
<div>How to make a ScummVM release.<br />
<br />
''This is work in progress and needs to be completed!''<br />
<br />
<br />
=== Preparations ===<br />
* Making the release plan<br />
* Telling people about it, making sure everybody knows what is going on<br />
* Update the lists of files below, adding new engine data files and such<br />
<br />
=== Testing & Branching ===<br />
* Identify release critical (show stopper) bugs and get people to fix them.<br />
* Identify other important bugs and get people to fix them.<br />
* Get even more people to fix all the other bugs, if possible :-).<br />
* Get people to do lots of testing, possibly by asking for help via a news item.<br />
* Collect all that information (e.g. in the Wiki). See [[Release Testing]]<br />
<br />
=== Preparing the source ===<br />
* You have to update the versions in all relevant files. There is a script, <code>tools/update-version.pl</code> meant to help you with this. It will generate/update the following files:<br />
** base/internal_version.h<br />
** dists/macosx/Info.plist<br />
** dists/redhat/scummvm.spec<br />
** dists/scummvm.rc<br />
* Review the following documentation files for version and copyright year updates:<br />
** README<br />
** NEWS<br />
** COPYRIGHT<br />
* Review the following port specific files for version updates:<br />
** backends/platform/gp2x/build/README-GP2X<br />
** backends/platform/gp2x/build/README-GP2X.html<br />
** backends/platform/ps2/READ_PS2.TXT<br />
** backends/platform/psp/README.PSP<br />
** backends/platform/symbian/README<br />
** backends/platform/wince/README-WinCE.txt<br />
* Make sure package descriptions are up-to-date:<br />
** dists/redhat/scummvm.spec<br />
* Create MSVC project files<br />
** First of all you need to build the create_msvc tool by using "make tools"<br />
** Run create_msvc with "../.. --msvc-version 8" from dists/msvc8<br />
** Run create_msvc with "../.. --msvc-version 9" from dists/msvc9<br />
** Run create_msvc with "../.. --msvc-version 10" from dists/msvc10<br />
** Add all *.vcproj, *.sln, *.vsprops, *.vcxproj, *.vcxproj.filters, *.props files to the release tag in SVN<br />
* Make source tarballs, post them in the SF.net FRS.<br />
** There is a script <code>tools/dist-scummvm.sh</code>, which does this automatically.<br />
** Make sure that porters have write access to the release folder on FRS: <code>chmod 775 <folder></code><br />
=== Binaries ===<br />
* Get porters to make binaries.<br />
** Porter must follow our filename convention, which goes like this: "scummvm-VERSION-PORT.EXTENSION". For example: "scummvm-1.1.0-macosx.dmg". Do '''not''' use special names like "EScummVM" or "ScummVMDS". The only exclusion from this requirement is Debian.<br />
** Here is a list of files porters should include in their release archives:<br />
*** AUTHORS<br />
*** COPYING<br />
*** COPYRIGHT<br />
*** NEWS<br />
*** README (generic ScummVM one)<br />
*** scummmodern.zip (if your port uses new GUI)<br />
*** pred.dic (from dists directory)<br />
*** kyra.dat (from dists/engine-data)<br />
*** queen.tbl (from dists/engine-data)<br />
*** sky.cpt (from dists/engine-data)<br />
*** lure.dat (from dists/engine-data)<br />
*** drascula.dat (from dists/engine-data)<br />
*** teenagent.dat (from dists/engine-data)<br />
*** your build binary<br />
*** your build-specific README (optional)<br />
*** ...<br />
* Update the website internally (i.e. update the version in the repository), but do not yet put these changes online.<br />
** Edit <code>include/config.inc.php</code> to update the global version.<br />
** Create a new XML file for the new version in <code>data/compatibility/</code>.<br />
** Update <code>data/downloads.xml</code>.<br />
** Add a news item.<br />
<br />
=== News & Notification ===<br />
Write a news blurb (or rather multiple to be used in the following). Usually, you want a bit longer one for the website, a list for Versiontracker, something with proper english sentences for Freshmeat, etc....<br />
<br />
* Write a news item for our website (also to be used as template for news items on other sites).<br />
* Update / notify various sites:<br />
** Create a SF.net news item (Fingolfin, Sev, ...)<br />
** [http://freshmeat.net/ Freshmeat] (Fingolfin, Sev ... but anybody can do it)<br />
** [http://www.versiontracker.com Versiontracker.com] (Fingolfin)<br />
** Update [http://www.heise.de/software/ heise software directory] (Fingolfin)<br />
** Post about the release on our forums<br />
** ... more ?<br />
* Put the updated web site online<br />
<br />
=== Updating the wiki ===<br />
* Update [[Template:StableVersion]]. This is used for links to the Compatibility page for the stable version and for the latest stable version info field for each platform.<br />
* Move newly supported engines in the '''Complete engines in the latest stable version''' section on the [[Engines]] page.<br />
* Add the first release field on the info box of the newly supported engines.<br />
* Update [[Platforms]] page if status changed for some of the platforms (e.g. no release for the latest stable version). For these platforms the latest stable version info will also need to be changed if it was using the StableVersion template.<br />
* Update the support field on the info box of the newly supported games. Also remove these games from ''Unsupported Games'' category.</div>Dhewghttps://wiki.scummvm.org/index.php?title=Compiling_ScummVM/Wii&diff=12335Compiling ScummVM/Wii2009-09-19T13:46:19Z<p>Dhewg: </p>
<hr />
<div>= Compiling ScummVM for Wii or Gamecube =<br />
<br />
This page describes how you build a Wii or Gamecube binary from the ScummVM source tree.<br />
<br />
First, you have to choose how to obtain the sources:<br />
* a downloaded [http://scummvm.org/downloads.php#source sources archive]<br />
* a [https://sourceforge.net/svn/?group_id=37116 SVN] checkout (latest is ''trunk'')<br />
<br />
Required tools and/or libraries might change at times, and differences for various ScummVM versions are pointed out when necessary.<br />
<br />
= Mandatory tools and libraries =<br />
<br />
* [http://devkitpro.org/ devkitPPC] as a build environment, please refer to its documentation how to set it up<br />
* libogc and libfat<br />
<br />
The latter two libraries are part of devkitPPC and are already installed with it. However, official ScummVM Wii and Gamecube binaries use unofficial versions, available via [http://git.or.cz/ git] [http://repo.or.cz/w/libogc.git here] and [http://repo.or.cz/w/libfat.git here].<br />
<br />
== Versions differences ==<br />
<br />
* v0.12.0 (first official version) is built with devkitPPC r15<br />
* starting with v0.13.0, devkitPPC r16 is used<br />
* starting with revision 44189, [http://repo.or.cz/w/libgxflux.git libgxflux] in mandatory<br />
<br />
= Optional libraries =<br />
<br />
* [http://svn.xiph.org/branches/lowmem-branch/Tremor/ Tremor] (lowmem branch) to play ''.ogg'' audio files<br />
* [http://flac.sourceforge.net/ FLAC] to play lossless ''.flac'' files<br />
<br />
Again, you have two options:<br />
<br />
== Precompiled binaries ==<br />
<br />
Get [http://static.hackmii.com/dhewg/devkitPPC_r16_3rd_libs.tar.bz2 this archive] and extract it in <tt>$DEVKITPRO/3rd/</tt> you just created. The directory structure should look like<br />
<tt>$DEVKITPRO/3rd/wii/include</tt><br />
<tt>$DEVKITPRO/3rd/wii/lib</tt><br />
and so on. The binaries will work on Wii and Gamecube.<br />
<br />
== Build the libraries yourself ==<br />
<br />
These steps require some patching and fiddling with the required autotools and problems may arise (depending on your OS). Works for me (tm), good luck :P<br />
<br />
Here's a a simple script to set up a shell for crosscompiling:<br />
<br />
#!/bin/sh<br />
<br />
PREFIX=${DEVKITPPC}/bin/powerpc-gekko-<br />
export CC=${PREFIX}gcc<br />
export CXX=${PREFIX}g++<br />
export AS=${PREFIX}gcc<br />
export LD=${PREFIX}gcc<br />
export AR=${PREFIX}ar cru<br />
export RANLIB=${PREFIX}ranlib<br />
export STRIP=${PREFIX}strip<br />
export OBJCOPY=${PREFIX}objcopy<br />
export MACHDEP="-g -Os -Wall -DGEKKO -mcpu=750 -meabi -mhard-float -ffunction-sections -fdata-sections -fmodulo-sched"<br />
export CFLAGS="${MACHDEP}"<br />
export CXXFLAGS="${CFLAGS}"<br />
export LDFLAGS="${MACHDEP}"<br />
<br />
echo "./configure --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii"<br />
<br />
Save it to a file (like <tt>gekkoenv.sh</tt>) and run<br />
<br />
. ./gekkoenv.sh<br />
<br />
in your shell. Build systems should now use the correct tools.<br />
<br />
=== Tremor ===<br />
<br />
Get a SVN checkout (r16259 as of this writing):<br />
<br />
svn co http://svn.xiph.org/trunk/Tremor<br />
<br />
patch it:<br />
<br />
--- Tremor-vanilla/misc.h 2008-12-20 17:09:56.000000000 +0100<br />
+++ Tremor/misc.h 2008-12-23 22:44:58.000000000 +0100<br />
@@ -48,7 +48,7 @@<br />
<br />
#include <sys/types.h><br />
<br />
-#if BYTE_ORDER==LITTLE_ENDIAN<br />
+#if 0<br />
union magic {<br />
struct {<br />
ogg_int32_t lo;<br />
@@ -58,7 +58,7 @@<br />
};<br />
#endif<br />
<br />
-#if BYTE_ORDER==BIG_ENDIAN<br />
+#if 1<br />
union magic {<br />
struct {<br />
ogg_int32_t hi;<br />
<br />
configure it:<br />
<br />
./autogen.sh --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii --enable-low-accuracy<br />
<br />
and finally build & install it:<br />
<br />
make<br />
make install<br />
<br />
=== FLAC ===<br />
<br />
Get a tarball of the latest stable version [http://flac.sourceforge.net/download.html here] (v1.2.1 as of this writing), extract it, patch it:<br />
<br />
diff -ur flac-1.2.1-vanilla/src/libFLAC/bitreader.c flac-1.2.1/src/libFLAC/bitreader.c<br />
--- flac-1.2.1-vanilla/src/libFLAC/bitreader.c 2007-09-11 06:48:55.000000000 +0200<br />
+++ flac-1.2.1/src/libFLAC/bitreader.c 2008-12-23 23:14:00.000000000 +0100<br />
@@ -42,7 +42,7 @@<br />
#elif defined __MINGW32__<br />
#include <winsock.h> /* for ntohl() */<br />
#else<br />
-#include <netinet/in.h> /* for ntohl() */<br />
+//#include <netinet/in.h> /* for ntohl() */<br />
#endif<br />
#include "private/bitmath.h"<br />
#include "private/bitreader.h"<br />
diff -ur flac-1.2.1-vanilla/src/libFLAC/bitwriter.c flac-1.2.1/src/libFLAC/bitwriter.c<br />
--- flac-1.2.1-vanilla/src/libFLAC/bitwriter.c 2007-09-11 01:08:38.000000000 +0200<br />
+++ flac-1.2.1/src/libFLAC/bitwriter.c 2008-12-23 23:13:59.000000000 +0100<br />
@@ -42,7 +42,7 @@<br />
#elif defined __MINGW32__<br />
#include <winsock.h> /* for ntohl() */<br />
#else<br />
-#include <netinet/in.h> /* for ntohl() */<br />
+//#include <netinet/in.h> /* for ntohl() */<br />
#endif<br />
#if 0 /* UNUSED */<br />
#include "private/bitmath.h"<br />
<br />
configure it:<br />
<br />
./configure --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii --disable-doxygen-docs --disable-xmms-plugin --disable-ogg --disable-oggtest --disable-rpath<br />
<br />
and build & install the required parts:<br />
<br />
make -C src/libFLAC<br />
make -C src/libFLAC install<br />
make -C include install<br />
<br />
= Compiling =<br />
<br />
== trunk ==<br />
<br />
The Wii and Gamecube port can be compiled with the <tt>configure</tt> script. The most basic way to accomplish this is to run:<br />
<br />
./configure --host=wii<br />
make<br />
<br />
If you want to build a Gamecube binary, just use<br />
<br />
./configure --host=gamecube<br />
make<br />
<br />
instead.<br />
<br />
The script supports various arguments, which you can use to en- or disable features, see <tt>./configure --help</tt>.<br />
<br />
Two of the [[#Optional libraries|optional libraries]] are already part of libogc:<br />
* zlib, used to (de-)compress save games. It gets automatically detected with a recent libogc version.<br />
* libmad, used for MP3 playback. It gets automatically detected with a recent libogc version.<br />
<br />
Others are not, and if you want support for it, you need cross-compiled binaries:<br />
* libFLAC, used for FLAC lossless audio playback. Use the ''--with-flac-prefix=<directory>'' argument.<br />
* Tremor, used for OGG audio playback. Use the ''--with-tremor-prefix=<directory>'' argument.<br />
<br />
If you followed the [[#Optional libraries|above description]] and have those libraries in <tt>$DEVKITPRO/3rd/wii</tt>, the <tt>configure</tt> command line would look like this:<br />
<br />
./configure --host=wii --with-flac-prefix=$DEVKITPRO/3rd/wii --with-tremor-prefix=$DEVKITPRO/3rd/wii<br />
<br />
Additionally, there're a few make targets for your convenience:<br />
<br />
* <tt>make wiiload</tt> - uploads a compiled Wii binary over TCP/IP.<br />
* <tt>make geckoupload</tt> - uploads a compiled binary over a USBGecko device.<br />
* <tt>make wiidist</tt> - copies all required files for the Wii into the ''dist'' subdirectory, read to copy onto your SD card for the Homebrew Channel.<br />
* <tt>make gcdist</tt> - same for Gamecube.<br />
* <tt>make wiigdb</tt> - starts GDB and loads your compiled binary, ready to debug.<br />
* <tt>make wiidebug</tt> - starts GDB with your binary and attaches remotely to the Wii via a USBGecko device.<br />
<br />
== v0.13.x and below ==<br />
<br />
This port doesn't utilize ScummVM's <tt>configure</tt> system for v0.12.0, instead it comes with a simple Makefile. The port code can be found in two directories:<br />
<br />
./backends/fs/wii/<br />
./backends/platform/wii/<br />
<br />
The former is a unified filesystem interface for ScummVM, the more interesting code is in the latter.<br />
<br />
Change your working directory to the latter and open the <tt>Makefile</tt> in a editor. You'll find some variables on top of that file, adjust those to your liking. Everything should be self-explanatory, some are even documented. Here are some random hints:<br />
<br />
* There is no support for dynamic libraries on the Wii or Gamecube, keep an engine toggle at <tt>STATIC_PLUGIN</tt> or disable it by just commenting that line<br />
* Vanilla scalers are not supported by the Wii port<br />
* [http://www.zlib.net/ zlib] and [http://www.underbit.com/products/mad/ MAD] are part of libogc<br />
* MPEG2 support has been dropped from the Wii port, if you want support for it, you have to cross compile [http://libmpeg2.sourceforge.net/ libmpeg2]<br />
<br />
When you're done with the <tt>Makefile</tt>, save it and run <tt>make</tt> (GNU version). That's it, the build system is now building an ''.elf'' and a ''.dol''.<br />
<br />
Test the ''.dol'' by uploading it using ''wiiload'' via:<br />
<br />
make upload<br />
<br />
If you want to copy your compiled binary to SD, use the command<br />
<br />
make dist<br />
<br />
which generates the folder ''dist'' with all the required files to run it.</div>Dhewghttps://wiki.scummvm.org/index.php?title=Compiling_ScummVM/Wii&diff=12072Compiling ScummVM/Wii2009-09-06T21:22:51Z<p>Dhewg: </p>
<hr />
<div>= Compiling ScummVM for Wii or Gamecube =<br />
<br />
This page describes how you build a Wii or Gamecube binary from the ScummVM source tree.<br />
<br />
First, you have to choose how to obtain the sources:<br />
* a downloaded [http://scummvm.org/downloads.php#source sources archive]<br />
* a [https://sourceforge.net/svn/?group_id=37116 SVN] checkout (latest is ''trunk'')<br />
<br />
Required tools and/or libraries might change at times, and differences for various ScummVM versions are pointed out when necessary.<br />
<br />
= Mandatory tools and libraries =<br />
<br />
* [http://devkitpro.org/ devkitPPC] as a build environment, please refer to its documentation how to set it up<br />
* libogc and libfat<br />
<br />
The latter two libraries are part of devkitPPC and are already installed with it. However, official ScummVM Wii and Gamecube binaries use unofficial versions, available via [http://git.or.cz/ git] [http://repo.or.cz/w/libogc.git here] and [http://repo.or.cz/w/libfat.git here].<br />
<br />
Reasons:<br />
<br />
* libogc's <tt>malloc()</tt> has been [http://repo.or.cz/w/libogc.git?tag=ce9b85c1fa659d39ac26b72b82e31844c50bfdf6&p=libogc.git&a=commitdiff&h=ce9b85c1fa659d39ac26b72b82e31844c50bfdf6&hb=28e632dab2820a98ea3399e3090761581f034df7&tm=1366734 modfied] to utilize [http://wiibrew.org/wiki/Memory_Map MEM2]. Without this patch, a single binary with all game engines won't be able to run all games (like COMI) due to memory limits<br />
* libfat gained a read-ahead cache, without it video sequences will stutter<br />
<br />
Nevertheless, ScummVM should build just fine with either versions.<br />
<br />
== Versions differences ==<br />
<br />
* v0.12.0 (first official version) is built with devkitPPC r15<br />
* starting with v0.13.0, devkitPPC r16 is used<br />
<br />
= Optional libraries =<br />
<br />
* [http://svn.xiph.org/branches/lowmem-branch/Tremor/ Tremor] (lowmem branch) to play ''.ogg'' audio files<br />
* [http://flac.sourceforge.net/ FLAC] to play lossless ''.flac'' files<br />
<br />
Again, you have two options:<br />
<br />
== Precompiled binaries ==<br />
<br />
Get [http://static.hackmii.com/dhewg/devkitPPC_r16_3rd_libs.tar.bz2 this archive] and extract it in <tt>$DEVKITPRO/3rd/</tt> you just created. The directory structure should look like<br />
<tt>$DEVKITPRO/3rd/wii/include</tt><br />
<tt>$DEVKITPRO/3rd/wii/lib</tt><br />
and so on. The binaries will work on Wii and Gamecube.<br />
<br />
== Build the libraries yourself ==<br />
<br />
These steps require some patching and fiddling with the required autotools and problems may arise (depending on your OS). Works for me (tm), good luck :P<br />
<br />
Here's a a simple script to set up a shell for crosscompiling:<br />
<br />
#!/bin/sh<br />
<br />
PREFIX=${DEVKITPPC}/bin/powerpc-gekko-<br />
export CC=${PREFIX}gcc<br />
export CXX=${PREFIX}g++<br />
export AS=${PREFIX}gcc<br />
export LD=${PREFIX}gcc<br />
export AR=${PREFIX}ar cru<br />
export RANLIB=${PREFIX}ranlib<br />
export STRIP=${PREFIX}strip<br />
export OBJCOPY=${PREFIX}objcopy<br />
export MACHDEP="-g -Os -Wall -DGEKKO -mcpu=750 -meabi -mhard-float -ffunction-sections -fdata-sections -fmodulo-sched"<br />
export CFLAGS="${MACHDEP}"<br />
export CXXFLAGS="${CFLAGS}"<br />
export LDFLAGS="${MACHDEP}"<br />
<br />
echo "./configure --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii"<br />
<br />
Save it to a file (like <tt>gekkoenv.sh</tt>) and run<br />
<br />
. ./gekkoenv.sh<br />
<br />
in your shell. Build systems should now use the correct tools.<br />
<br />
=== Tremor ===<br />
<br />
Get a SVN checkout (r16259 as of this writing):<br />
<br />
svn co http://svn.xiph.org/trunk/Tremor<br />
<br />
patch it:<br />
<br />
--- Tremor-vanilla/misc.h 2008-12-20 17:09:56.000000000 +0100<br />
+++ Tremor/misc.h 2008-12-23 22:44:58.000000000 +0100<br />
@@ -48,7 +48,7 @@<br />
<br />
#include <sys/types.h><br />
<br />
-#if BYTE_ORDER==LITTLE_ENDIAN<br />
+#if 0<br />
union magic {<br />
struct {<br />
ogg_int32_t lo;<br />
@@ -58,7 +58,7 @@<br />
};<br />
#endif<br />
<br />
-#if BYTE_ORDER==BIG_ENDIAN<br />
+#if 1<br />
union magic {<br />
struct {<br />
ogg_int32_t hi;<br />
<br />
configure it:<br />
<br />
./autogen.sh --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii --enable-low-accuracy<br />
<br />
and finally build & install it:<br />
<br />
make<br />
make install<br />
<br />
=== FLAC ===<br />
<br />
Get a tarball of the latest stable version [http://flac.sourceforge.net/download.html here] (v1.2.1 as of this writing), extract it, patch it:<br />
<br />
diff -ur flac-1.2.1-vanilla/src/libFLAC/bitreader.c flac-1.2.1/src/libFLAC/bitreader.c<br />
--- flac-1.2.1-vanilla/src/libFLAC/bitreader.c 2007-09-11 06:48:55.000000000 +0200<br />
+++ flac-1.2.1/src/libFLAC/bitreader.c 2008-12-23 23:14:00.000000000 +0100<br />
@@ -42,7 +42,7 @@<br />
#elif defined __MINGW32__<br />
#include <winsock.h> /* for ntohl() */<br />
#else<br />
-#include <netinet/in.h> /* for ntohl() */<br />
+//#include <netinet/in.h> /* for ntohl() */<br />
#endif<br />
#include "private/bitmath.h"<br />
#include "private/bitreader.h"<br />
diff -ur flac-1.2.1-vanilla/src/libFLAC/bitwriter.c flac-1.2.1/src/libFLAC/bitwriter.c<br />
--- flac-1.2.1-vanilla/src/libFLAC/bitwriter.c 2007-09-11 01:08:38.000000000 +0200<br />
+++ flac-1.2.1/src/libFLAC/bitwriter.c 2008-12-23 23:13:59.000000000 +0100<br />
@@ -42,7 +42,7 @@<br />
#elif defined __MINGW32__<br />
#include <winsock.h> /* for ntohl() */<br />
#else<br />
-#include <netinet/in.h> /* for ntohl() */<br />
+//#include <netinet/in.h> /* for ntohl() */<br />
#endif<br />
#if 0 /* UNUSED */<br />
#include "private/bitmath.h"<br />
<br />
configure it:<br />
<br />
./configure --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii --disable-doxygen-docs --disable-xmms-plugin --disable-ogg --disable-oggtest --disable-rpath<br />
<br />
and build & install the required parts:<br />
<br />
make -C src/libFLAC<br />
make -C src/libFLAC install<br />
make -C include install<br />
<br />
= Compiling =<br />
<br />
== trunk ==<br />
<br />
The Wii and Gamecube port can be compiled with the <tt>configure</tt> script. The most basic way to accomplish this is to run:<br />
<br />
./configure --host=wii<br />
make<br />
<br />
If you want to build a Gamecube binary, just use<br />
<br />
./configure --host=gamecube<br />
make<br />
<br />
instead.<br />
<br />
The script supports various arguments, which you can use to toggle various features, see <tt>./configure --help</tt>.<br />
<br />
Two of the [[#Optional libraries|optional libraries]] are already part of libogc:<br />
* zlib, used to (de-)compress save games. It gets automatically detected with a recent libogc version.<br />
* libmad, used for MP3 playback. It gets automatically detected with a recent libogc version.<br />
<br />
Others are not, and if you want support for it, you need cross-compiled binaries:<br />
* libFLAC, used for FLAC lossless audio playback. Use the ''--with-flac-prefix=<directory>'' argument.<br />
* Tremor, used for OGG audio playback. Use the ''--with-tremor-prefix=<directory>'' argument.<br />
<br />
If you followed the [[#Optional libraries|above description]] and have those libraries in <tt>$DEVKITPRO/3rd/wii</tt>, the <tt>configure</tt> command line would look like this:<br />
<br />
./configure --host=wii --with-flac-prefix=$DEVKITPRO/3rd/wii --with-tremor-prefix=$DEVKITPRO/3rd/wii<br />
<br />
Additionally, there're a few make targets for convenience:<br />
<br />
* <tt>make wiiload</tt> - uploads a compiled Wii binary over TCP.<br />
* <tt>make geckoupload</tt> - uploads a compiled binary over a USBGecko device.<br />
* <tt>make wiidist</tt> - copies all required files for the Wii into the ''dist'' subdirectory, read to copy onto your SD card for the Homebrew Channel.<br />
* <tt>make gcdist</tt> - same for Gamecube.<br />
* <tt>make wiigdb</tt> - starts GDB and loads your compiled binary, ready to debug.<br />
* <tt>make wiidebug</tt> - starts GDB with your binary and attaches remotely to the Wii via a USBGecko device.<br />
<br />
== v0.13.x and below ==<br />
<br />
This port doesn't utilize ScummVM's <tt>configure</tt> system for v0.12.0, instead it comes with a simple Makefile. The port code can be found in two directories:<br />
<br />
./backends/fs/wii/<br />
./backends/platform/wii/<br />
<br />
The former is a unified filesystem interface for ScummVM, the more interesting code is in the latter.<br />
<br />
Change your working directory to the latter and open the <tt>Makefile</tt> in a editor. You'll find some variables on top of that file, adjust those to your liking. Everything should be self-explanatory, some are even documented. Here are some random hints:<br />
<br />
* There is no support for dynamic libraries on the Wii or Gamecube, keep an engine toggle at <tt>STATIC_PLUGIN</tt> or disable it by just commenting that line<br />
* Vanilla scalers are not supported by the Wii port<br />
* [http://www.zlib.net/ zlib] and [http://www.underbit.com/products/mad/ MAD] are part of libogc<br />
* MPEG2 support has been dropped from the Wii port, if you want support for it, you have to cross compile [http://libmpeg2.sourceforge.net/ libmpeg2]<br />
<br />
When you're done with the <tt>Makefile</tt>, save it and run <tt>make</tt> (GNU version). That's it, the build system is now building an ''.elf'' and a ''.dol''.<br />
<br />
Test the ''.dol'' by uploading it using ''wiiload'' via:<br />
<br />
make upload<br />
<br />
If you want to copy your compiled binary to SD, use the command<br />
<br />
make dist<br />
<br />
which generates the folder ''dist'' with all the required files to run it.</div>Dhewghttps://wiki.scummvm.org/index.php?title=Compiling_ScummVM/Wii&diff=10863Compiling ScummVM/Wii2009-03-20T18:18:37Z<p>Dhewg: oups ;)</p>
<hr />
<div>= Compiling ScummVM for Wii or Gamecube =<br />
<br />
This page describes how you build a Wii or Gamecube binary from the ScummVM source tree.<br />
<br />
First, you have to choose how to obtain the sources:<br />
* a downloaded [http://scummvm.org/downloads.php#source sources archive]<br />
* a [https://sourceforge.net/svn/?group_id=37116 SVN] checkout (latest is ''trunk'')<br />
<br />
Required tools and/or libraries might change at times, and differences for various ScummVM versions are pointed out when necessary.<br />
<br />
= Mandatory tools and libraries =<br />
<br />
* [http://devkitpro.org/ devkitPPC] as a build environment, please refer to its documentation how to set it up<br />
* libogc and libfat<br />
<br />
The latter two libraries are part of devkitPPC and are already installed with it. However, official ScummVM Wii and Gamecube binaries use unofficial versions, available via [http://git.or.cz/ git] [http://repo.or.cz/w/libogc.git here] and [http://repo.or.cz/w/libfat.git here].<br />
<br />
Reasons:<br />
<br />
* libogc's <tt>malloc()</tt> has been [http://repo.or.cz/w/libogc.git?tag=ce9b85c1fa659d39ac26b72b82e31844c50bfdf6&p=libogc.git&a=commitdiff&h=ce9b85c1fa659d39ac26b72b82e31844c50bfdf6&hb=28e632dab2820a98ea3399e3090761581f034df7&tm=1366734 modfied] to utilize [http://wiibrew.org/wiki/Memory_Map MEM2]. Without this patch, a single binary with all game engines won't be able to run all games (like COMI) due to memory limits<br />
* libfat gained a read-ahead cache, without it video sequences will stutter<br />
<br />
Nevertheless, ScummVM should build just fine with either versions.<br />
<br />
== Versions differences ==<br />
<br />
* v0.12.0 (first official version) is built with devkitPPC r15<br />
* starting with v0.13.0, devkitPPC r16 is used<br />
<br />
= Optional libraries =<br />
<br />
* [http://svn.xiph.org/branches/lowmem-branch/Tremor/ Tremor] (lowmem branch) to play ''.ogg'' audio files<br />
* [http://flac.sourceforge.net/ FLAC] to play lossless ''.flac'' files<br />
<br />
Again, you have two options:<br />
<br />
== Precompiled binaries ==<br />
<br />
Get [http://static.hackmii.com/dhewg/devkitPPC_r16_3rd_libs.tar.bz2 this archive] and extract it in <tt>$DEVKITPRO/3rd/</tt> you just created. The directory structure should look like<br />
<tt>$DEVKITPRO/3rd/wii/include</tt><br />
<tt>$DEVKITPRO/3rd/wii/lib</tt><br />
and so on. The binaries will work on Wii and Gamecube.<br />
<br />
== Build the libraries yourself ==<br />
<br />
These steps require some patching and fiddling with the required autotools and problems may arise (depending on your OS). Works for me (tm), good luck :P<br />
<br />
Here's a a simple script to set up a shell for crosscompiling:<br />
<br />
#!/bin/sh<br />
<br />
PREFIX=${DEVKITPPC}/bin/powerpc-gekko-<br />
export CC=${PREFIX}gcc<br />
export CXX=${PREFIX}g++<br />
export AS=${PREFIX}gcc<br />
export LD=${PREFIX}gcc<br />
export AR=${PREFIX}ar cru<br />
export RANLIB=${PREFIX}ranlib<br />
export STRIP=${PREFIX}strip<br />
export OBJCOPY=${PREFIX}objcopy<br />
export MACHDEP="-g -Os -Wall -DGEKKO -mcpu=750 -meabi -mhard-float -ffunction-sections -fdata-sections -fmodulo-sched"<br />
export CFLAGS="${MACHDEP}"<br />
export CXXFLAGS="${CFLAGS}"<br />
export LDFLAGS="${MACHDEP}"<br />
<br />
echo "./configure --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii"<br />
<br />
Save it to a file (like <tt>gekkoenv.sh</tt>) and run<br />
<br />
. ./gekkoenv.sh<br />
<br />
in your shell. Build systems should now use the correct tools.<br />
<br />
=== Tremor ===<br />
<br />
Get a SVN checkout (rev 15592 as of this writing):<br />
<br />
svn co http://svn.xiph.org/branches/lowmem-branch/Tremor<br />
<br />
patch it:<br />
<br />
--- Tremor-vanilla/misc.h 2008-12-20 17:09:56.000000000 +0100<br />
+++ Tremor/misc.h 2008-12-23 22:44:58.000000000 +0100<br />
@@ -48,7 +48,7 @@<br />
<br />
#include <sys/types.h><br />
<br />
-#if BYTE_ORDER==LITTLE_ENDIAN<br />
+#if 0<br />
union magic {<br />
struct {<br />
ogg_int32_t lo;<br />
@@ -58,7 +58,7 @@<br />
};<br />
#endif<br />
<br />
-#if BYTE_ORDER==BIG_ENDIAN<br />
+#if 1<br />
union magic {<br />
struct {<br />
ogg_int32_t hi;<br />
<br />
configure it:<br />
<br />
./autogen.sh --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii --enable-low-accuracy<br />
<br />
and finally build & install it:<br />
<br />
make<br />
make install<br />
<br />
=== FLAC ===<br />
<br />
Get a tarball of the latest stable version [http://flac.sourceforge.net/download.html here] (v1.2.1 as of this writing), extract it, patch it:<br />
<br />
diff -ur flac-1.2.1-vanilla/src/libFLAC/bitreader.c flac-1.2.1/src/libFLAC/bitreader.c<br />
--- flac-1.2.1-vanilla/src/libFLAC/bitreader.c 2007-09-11 06:48:55.000000000 +0200<br />
+++ flac-1.2.1/src/libFLAC/bitreader.c 2008-12-23 23:14:00.000000000 +0100<br />
@@ -42,7 +42,7 @@<br />
#elif defined __MINGW32__<br />
#include <winsock.h> /* for ntohl() */<br />
#else<br />
-#include <netinet/in.h> /* for ntohl() */<br />
+//#include <netinet/in.h> /* for ntohl() */<br />
#endif<br />
#include "private/bitmath.h"<br />
#include "private/bitreader.h"<br />
diff -ur flac-1.2.1-vanilla/src/libFLAC/bitwriter.c flac-1.2.1/src/libFLAC/bitwriter.c<br />
--- flac-1.2.1-vanilla/src/libFLAC/bitwriter.c 2007-09-11 01:08:38.000000000 +0200<br />
+++ flac-1.2.1/src/libFLAC/bitwriter.c 2008-12-23 23:13:59.000000000 +0100<br />
@@ -42,7 +42,7 @@<br />
#elif defined __MINGW32__<br />
#include <winsock.h> /* for ntohl() */<br />
#else<br />
-#include <netinet/in.h> /* for ntohl() */<br />
+//#include <netinet/in.h> /* for ntohl() */<br />
#endif<br />
#if 0 /* UNUSED */<br />
#include "private/bitmath.h"<br />
<br />
configure it:<br />
<br />
./configure --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii --disable-doxygen-docs --disable-xmms-plugin --disable-ogg --disable-oggtest --disable-rpath<br />
<br />
and build & install the required parts:<br />
<br />
make -C src/libFLAC<br />
make -C src/libFLAC install<br />
make -C include install<br />
<br />
= Compiling =<br />
<br />
== trunk ==<br />
<br />
The Wii and Gamecube port can be compiled with the <tt>configure</tt> script. The most basic way to accomplish this is to run:<br />
<br />
./configure --host=wii<br />
make<br />
<br />
If you want to build a Gamecube binary, just use<br />
<br />
./configure --host=gamecube<br />
make<br />
<br />
instead.<br />
<br />
The script supports various arguments, which you can use to toggle various features, see <tt>./configure --help</tt>.<br />
<br />
Two of the [[#Optional libraries|optional libraries]] are already part of libogc:<br />
* zlib, used to (de-)compress save games. It gets automatically detected with a recent libogc version.<br />
* libmad, used for MP3 playback. It gets automatically detected with a recent libogc version.<br />
<br />
Others are not, and if you want support for it, you need cross-compiled binaries:<br />
* libFLAC, used for FLAC lossless audio playback. Use the ''--with-flac-prefix=<directory>'' argument.<br />
* Tremor, used for OGG audio playback. Use the ''--with-tremor-prefix=<directory>'' argument.<br />
<br />
If you followed the [[#Optional libraries|above description]] and have those libraries in <tt>$DEVKITPRO/3rd/wii</tt>, the <tt>configure</tt> command line would look like this:<br />
<br />
./configure --host=wii --with-flac-prefix=$DEVKITPRO/3rd/wii --with-tremor-prefix=$DEVKITPRO/3rd/wii<br />
<br />
Additionally, there're a few make targets for convenience:<br />
<br />
* <tt>make wiiload</tt> - uploads a compiled Wii binary over TCP.<br />
* <tt>make geckoupload</tt> - uploads a compiled binary over a USBGecko device.<br />
* <tt>make wiidist</tt> - copies all required files for the Wii into the ''dist'' subdirectory, read to copy onto your SD card for the Homebrew Channel.<br />
* <tt>make gcdist</tt> - same for Gamecube.<br />
* <tt>make wiigdb</tt> - starts GDB and loads your compiled binary, ready to debug.<br />
* <tt>make wiidebug</tt> - starts GDB with your binary and attaches remotely to the Wii via a USBGecko device.<br />
<br />
== v0.13.x and below ==<br />
<br />
This port doesn't utilize ScummVM's <tt>configure</tt> system for v0.12.0, instead it comes with a simple Makefile. The port code can be found in two directories:<br />
<br />
./backends/fs/wii/<br />
./backends/platform/wii/<br />
<br />
The former is a unified filesystem interface for ScummVM, the more interesting code is in the latter.<br />
<br />
Change your working directory to the latter and open the <tt>Makefile</tt> in a editor. You'll find some variables on top of that file, adjust those to your liking. Everything should be self-explanatory, some are even documented. Here are some random hints:<br />
<br />
* There is no support for dynamic libraries on the Wii or Gamecube, keep an engine toggle at <tt>STATIC_PLUGIN</tt> or disable it by just commenting that line<br />
* Vanilla scalers are not supported by the Wii port<br />
* [http://www.zlib.net/ zlib] and [http://www.underbit.com/products/mad/ MAD] are part of libogc<br />
* MPEG2 support has been dropped from the Wii port, if you want support for it, you have to cross compile [http://libmpeg2.sourceforge.net/ libmpeg2]<br />
<br />
When you're done with the <tt>Makefile</tt>, save it and run <tt>make</tt> (GNU version). That's it, the build system is now building an ''.elf'' and a ''.dol''.<br />
<br />
Test the ''.dol'' by uploading it using ''wiiload'' via:<br />
<br />
make upload<br />
<br />
If you want to copy your compiled binary to SD, use the command<br />
<br />
make dist<br />
<br />
which generates the folder ''dist'' with all the required files to run it.</div>Dhewghttps://wiki.scummvm.org/index.php?title=Compiling_ScummVM/Wii&diff=10862Compiling ScummVM/Wii2009-03-20T18:10:24Z<p>Dhewg: Documented the new ./configure support.</p>
<hr />
<div>= Compiling ScummVM for Wii or Gamecube =<br />
<br />
This page describes how you build a Wii or Gamecube binary from the ScummVM source tree.<br />
<br />
First, you have to choose how to obtain the sources:<br />
* a downloaded [http://scummvm.org/downloads.php#source sources archive]<br />
* a [https://sourceforge.net/svn/?group_id=37116 SVN] checkout (latest is ''trunk'')<br />
<br />
Required tools and/or libraries might change at times, and differences for various ScummVM versions are pointed out when necessary.<br />
<br />
= Mandatory tools and libraries =<br />
<br />
* [http://devkitpro.org/ devkitPPC] as a build environment, please refer to its documentation how to set it up<br />
* libogc and libfat<br />
<br />
The latter two libraries are part of devkitPPC and are already installed with it. However, official ScummVM Wii and Gamecube binaries use unofficial versions, available via [http://git.or.cz/ git] [http://repo.or.cz/w/libogc.git here] and [http://repo.or.cz/w/libfat.git here].<br />
<br />
Reasons:<br />
<br />
* libogc's <tt>malloc()</tt> has been [http://repo.or.cz/w/libogc.git?tag=ce9b85c1fa659d39ac26b72b82e31844c50bfdf6&p=libogc.git&a=commitdiff&h=ce9b85c1fa659d39ac26b72b82e31844c50bfdf6&hb=28e632dab2820a98ea3399e3090761581f034df7&tm=1366734 modfied] to utilize [http://wiibrew.org/wiki/Memory_Map MEM2]. Without this patch, a single binary with all game engines won't be able to run all games (like COMI) due to memory limits<br />
* libfat gained a read-ahead cache, without it video sequences will stutter<br />
<br />
Nevertheless, ScummVM should build just fine with either versions.<br />
<br />
== Versions differences ==<br />
<br />
* v0.12.0 (first official version) is built with devkitPPC r15<br />
* starting with v0.13.0, devkitPPC r16 is used<br />
<br />
= Optional libraries =<br />
<br />
* [http://svn.xiph.org/branches/lowmem-branch/Tremor/ Tremor] (lowmem branch) to play ''.ogg'' audio files<br />
* [http://flac.sourceforge.net/ FLAC] to play lossless ''.flac'' files<br />
<br />
Again, you have two options:<br />
<br />
== Precompiled binaries ==<br />
<br />
Get [http://static.hackmii.com/dhewg/devkitPPC_r16_3rd_libs.tar.bz2 this archive] and extract it in <tt>$DEVKITPRO/3rd/</tt> you just created. The directory structure should look like<br />
<tt>$DEVKITPRO/3rd/wii/include</tt><br />
<tt>$DEVKITPRO/3rd/wii/lib</tt><br />
and so on. The binaries will work on Wii and Gamecube.<br />
<br />
== Build the libraries yourself ==<br />
<br />
These steps require some patching and fiddling with the required autotools and problems may arise (depending on your OS). Works for me (tm), good luck :P<br />
<br />
Here's a a simple script to set up a shell for crosscompiling:<br />
<br />
#!/bin/sh<br />
<br />
PREFIX=${DEVKITPPC}/bin/powerpc-gekko-<br />
export CC=${PREFIX}gcc<br />
export CXX=${PREFIX}g++<br />
export AS=${PREFIX}gcc<br />
export LD=${PREFIX}gcc<br />
export AR=${PREFIX}ar cru<br />
export RANLIB=${PREFIX}ranlib<br />
export STRIP=${PREFIX}strip<br />
export OBJCOPY=${PREFIX}objcopy<br />
export MACHDEP="-g -Os -Wall -DGEKKO -mcpu=750 -meabi -mhard-float -ffunction-sections -fdata-sections -fmodulo-sched"<br />
export CFLAGS="${MACHDEP}"<br />
export CXXFLAGS="${CFLAGS}"<br />
export LDFLAGS="${MACHDEP}"<br />
<br />
echo "./configure --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii"<br />
<br />
Save it to a file (like <tt>gekkoenv.sh</tt>) and run<br />
<br />
. ./gekkoenv.sh<br />
<br />
in your shell. Build systems should now use the correct tools.<br />
<br />
=== Tremor ===<br />
<br />
Get a SVN checkout (rev 15592 as of this writing):<br />
<br />
svn co http://svn.xiph.org/branches/lowmem-branch/Tremor<br />
<br />
patch it:<br />
<br />
--- Tremor-vanilla/misc.h 2008-12-20 17:09:56.000000000 +0100<br />
+++ Tremor/misc.h 2008-12-23 22:44:58.000000000 +0100<br />
@@ -48,7 +48,7 @@<br />
<br />
#include <sys/types.h><br />
<br />
-#if BYTE_ORDER==LITTLE_ENDIAN<br />
+#if 0<br />
union magic {<br />
struct {<br />
ogg_int32_t lo;<br />
@@ -58,7 +58,7 @@<br />
};<br />
#endif<br />
<br />
-#if BYTE_ORDER==BIG_ENDIAN<br />
+#if 1<br />
union magic {<br />
struct {<br />
ogg_int32_t hi;<br />
<br />
configure it:<br />
<br />
./autogen.sh --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii --enable-low-accuracy<br />
<br />
and finally build & install it:<br />
<br />
make<br />
make install<br />
<br />
=== FLAC ===<br />
<br />
Get a tarball of the latest stable version [http://flac.sourceforge.net/download.html here] (v1.2.1 as of this writing), extract it, patch it:<br />
<br />
diff -ur flac-1.2.1-vanilla/src/libFLAC/bitreader.c flac-1.2.1/src/libFLAC/bitreader.c<br />
--- flac-1.2.1-vanilla/src/libFLAC/bitreader.c 2007-09-11 06:48:55.000000000 +0200<br />
+++ flac-1.2.1/src/libFLAC/bitreader.c 2008-12-23 23:14:00.000000000 +0100<br />
@@ -42,7 +42,7 @@<br />
#elif defined __MINGW32__<br />
#include <winsock.h> /* for ntohl() */<br />
#else<br />
-#include <netinet/in.h> /* for ntohl() */<br />
+//#include <netinet/in.h> /* for ntohl() */<br />
#endif<br />
#include "private/bitmath.h"<br />
#include "private/bitreader.h"<br />
diff -ur flac-1.2.1-vanilla/src/libFLAC/bitwriter.c flac-1.2.1/src/libFLAC/bitwriter.c<br />
--- flac-1.2.1-vanilla/src/libFLAC/bitwriter.c 2007-09-11 01:08:38.000000000 +0200<br />
+++ flac-1.2.1/src/libFLAC/bitwriter.c 2008-12-23 23:13:59.000000000 +0100<br />
@@ -42,7 +42,7 @@<br />
#elif defined __MINGW32__<br />
#include <winsock.h> /* for ntohl() */<br />
#else<br />
-#include <netinet/in.h> /* for ntohl() */<br />
+//#include <netinet/in.h> /* for ntohl() */<br />
#endif<br />
#if 0 /* UNUSED */<br />
#include "private/bitmath.h"<br />
<br />
configure it:<br />
<br />
./configure --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii --disable-doxygen-docs --disable-xmms-plugin --disable-ogg --disable-oggtest --disable-rpath<br />
<br />
and build & install the required parts:<br />
<br />
make -C src/libFLAC<br />
make -C src/libFLAC install<br />
make -C include install<br />
<br />
= Compiling =<br />
<br />
== v0.13.0 and above ==<br />
<br />
Starting with v0.13.0, the Wii and Gamecube port can be compiled with the <tt>configure</tt> script. The most basic way to accomplish this is to run:<br />
<br />
./configure --host=wii<br />
make<br />
<br />
If you want to build a Gamecube binary, just use<br />
<br />
./configure --host=gamecube<br />
make<br />
<br />
instead.<br />
<br />
The script supports various arguments, which you can use to toggle various features, see <tt>./configure --help</tt>.<br />
<br />
Two of the [[#Optional libraries|optional libraries]] are already part of libogc:<br />
* zlib, used to (de-)compress save games. It gets automatically detected with a recent libogc version.<br />
* libmad, used for MP3 playback. It gets automatically detected with a recent libogc version.<br />
<br />
Others are not, and if you want support for it, you need cross-compiled binaries:<br />
* libFLAC, used for FLAC lossless audio playback. Use the ''--with-flac-prefix=<directory>'' argument.<br />
* Tremor, used for OGG audio playback. Use the ''--with-tremor-prefix=<directory>'' argument.<br />
<br />
If you followed the [[#Optional libraries|above description]] and have those libraries in <tt>$DEVKITPRO/3rd/wii</tt>, the <tt>configure</tt> command line would look like this:<br />
<br />
./configure --host=wii --with-flac-prefix=$DEVKITPRO/3rd/wii --with-tremor-prefix=$DEVKITPRO/3rd/wii<br />
<br />
Additionally, there're a few make targets for convenience:<br />
<br />
* <tt>make wiiload</tt> - uploads a compiled Wii binary over TCP.<br />
* <tt>make geckoupload</tt> - uploads a compiled binary over a USBGecko device.<br />
* <tt>make wiidist</tt> - copies all required files for the Wii into the ''dist'' subdirectory, read to copy onto your SD card for the Homebrew Channel.<br />
* <tt>make gcdist</tt> - same for Gamecube.<br />
* <tt>make wiigdb</tt> - starts GDB and loads your compiled binary, ready to debug.<br />
* <tt>make wiidebug</tt> - starts GDB with your binary and attaches remotely to the Wii via a USBGecko device.<br />
<br />
== v0.12.0 ==<br />
<br />
This port doesn't utilize ScummVM's <tt>configure</tt> system for v0.12.0, instead it comes with a simple Makefile. The port code can be found in two directories:<br />
<br />
./backends/fs/wii/<br />
./backends/platform/wii/<br />
<br />
The former is a unified filesystem interface for ScummVM, the more interesting code is in the latter.<br />
<br />
Change your working directory to the latter and open the <tt>Makefile</tt> in a editor. You'll find some variables on top of that file, adjust those to your liking. Everything should be self-explanatory, some are even documented. Here are some random hints:<br />
<br />
* There is no support for dynamic libraries on the Wii or Gamecube, keep an engine toggle at <tt>STATIC_PLUGIN</tt> or disable it by just commenting that line<br />
* Vanilla scalers are not supported by the Wii port<br />
* [http://www.zlib.net/ zlib] and [http://www.underbit.com/products/mad/ MAD] are part of libogc<br />
* MPEG2 support has been dropped from the Wii port, if you want support for it, you have to cross compile [http://libmpeg2.sourceforge.net/ libmpeg2]<br />
<br />
When you're done with the <tt>Makefile</tt>, save it and run <tt>make</tt> (GNU version). That's it, the build system is now building an ''.elf'' and a ''.dol''.<br />
<br />
Test the ''.dol'' by uploading it using ''wiiload'' via:<br />
<br />
make upload<br />
<br />
If you want to copy your compiled binary to SD, use the command<br />
<br />
make dist<br />
<br />
which generates the folder ''dist'' with all the required files to run it.</div>Dhewghttps://wiki.scummvm.org/index.php?title=Buildbot&diff=10824Buildbot2009-03-15T22:59:21Z<p>Dhewg: New page: == Introduction == From the [http://buildbot.net/ buildbot homepage]: :The BuildBot is a system to automate the compile/test cycle required by most software projects to validate code cha...</p>
<hr />
<div>== Introduction ==<br />
<br />
From the [http://buildbot.net/ buildbot homepage]:<br />
<br />
:The BuildBot is a system to automate the compile/test cycle required by most software projects to validate code changes. By automatically rebuilding and testing the tree each time something has changed, build problems are pinpointed quickly, before other developers are inconvenienced by the failure. The guilty developer can be identified and harassed without human intervention. By running the builds on a variety of platforms, developers who do not have the facilities to test their changes everywhere before checkin will at least know shortly afterwards whether they have broken the build or not. Warning counts, lint checks, image size, compile time, and other build parameters can be tracked over time, are more visible, and are therefore easier to improve.<br />
<br />
:The overall goal is to reduce tree breakage and provide a platform to run tests or code-quality checks that are too annoying or pedantic for any human to waste their time with. Developers get immediate (and potentially public) feedback about their changes, encouraging them to be more careful about testing before checkin.<br />
<br />
You can find the ScummVM buildbot page [http://buildbot.scummvm.org/ here].<br />
<br />
== Goals ==<br />
<br />
* Compile all ports when a commit is done (both trunk and the active branch) to check if it broke one or more ports.<br />
* Notify developers about breakage (and if a following commit fixes it again).<br />
* Provide useful statistics.<br />
* Provide nightly builds of all ports.<br />
<br />
== Status ==<br />
<br />
What we got so far:<br />
* The bot already polls the SVN repository for changes on trunk and the current branch.<br />
* When a change occurs, all ports are beeing build incrementally.<br />
* Once every 24h (currently 4am CET), a full and clean rebuild is compiled for all ports.<br />
<br />
Whats missing:<br />
* Add more toolchains for all missing ports - when possible (see below).<br />
* Notify developers upon problems (IRC and/or mail is possible).<br />
* Provide the nightly builds via HTTP.<br />
<br />
== Toolchains ==<br />
<br />
A few requirements must be met to add a toolchain to the buildbot server:<br />
* It's possible to cross-compile the port from Linux (that might change in the future).<br />
* No custom Makefiles from the ''backend/'' folder, the port has to use the ''./configure'' script.<br />
* The compile process doesn't modify nor add anything in the source tree (The ''./configure'' script is called from another directory).<br />
* The port is fully build-able from scratch with only ''./configure'' arguments and environment variables for it.<br />
<br />
The toolchain should be maintained by the port maintainer, but since this requires a little Linux experience, its not a must ;)<br />
<br />
If your toolchain/port is ready to be added, ask ''sev'', ''joostp'' or ''dhewg'' for an account.</div>Dhewghttps://wiki.scummvm.org/index.php?title=Compiling_ScummVM/Wii&diff=10156Compiling ScummVM/Wii2009-02-14T19:15:15Z<p>Dhewg: new git URLs</p>
<hr />
<div>= Compiling ScummVM for Wii or Gamecube =<br />
<br />
This page describes how you build a Wii or Gamecube binary from the ScummVM source tree.<br />
<br />
First, you have to choose how to obtain the sources:<br />
* a downloaded [http://scummvm.org/downloads.php#source sources archive]<br />
* a [https://sourceforge.net/svn/?group_id=37116 SVN] checkout (latest is ''trunk'')<br />
<br />
Required tools and/or libraries might change at times, and differences for various ScummVM versions are pointed out when necessary.<br />
<br />
= Mandatory tools and libraries =<br />
<br />
* [http://devkitpro.org/ devkitPPC] as a build environment, please refer to its documentation how to set it up<br />
* libogc and libfat<br />
<br />
The latter two libraries are part of devkitPPC and are already installed with it. However, official ScummVM Wii and Gamecube binaries use unofficial versions, available via [http://git.or.cz/ git] [http://repo.or.cz/w/libogc.git here] and [http://repo.or.cz/w/libfat.git here].<br />
<br />
Reasons:<br />
<br />
* libogc's <tt>malloc()</tt> has been [http://repo.or.cz/w/libogc.git?tag=ce9b85c1fa659d39ac26b72b82e31844c50bfdf6&p=libogc.git&a=commitdiff&h=ce9b85c1fa659d39ac26b72b82e31844c50bfdf6&hb=28e632dab2820a98ea3399e3090761581f034df7&tm=1366734 modfied] to utilize [http://wiibrew.org/wiki/Memory_Map MEM2]. Without this patch, a single binary with all game engines won't be able to run all games (like COMI) due to memory limits<br />
* libfat gained a read-ahead cache, without it video sequences will stutter<br />
<br />
Nevertheless, ScummVM should build just fine with either versions.<br />
<br />
== Versions differences ==<br />
<br />
* v0.12.0 (first official version) is built with devkitPPC r15<br />
* ''trunk'' (and eventually v0.13.0) changed to devkitPPC r16<br />
<br />
= Optional libraries =<br />
<br />
* [http://svn.xiph.org/branches/lowmem-branch/Tremor/ Tremor] (lowmem branch) to play ''.ogg'' audio files<br />
* [http://flac.sourceforge.net/ FLAC] to play lossless ''.flac'' files<br />
<br />
Again, you have two options:<br />
<br />
== Precompiled binaries ==<br />
<br />
Get [http://static.hackmii.com/dhewg/devkitPPC_r16_3rd_libs.tar.bz2 this archive] and extract it in <tt>$DEVKITPRO/3rd/</tt> you just created. The directory structure should look like<br />
<tt>$DEVKITPRO/3rd/wii/include</tt><br />
<tt>$DEVKITPRO/3rd/wii/lib</tt><br />
and so on. The binaries will work on Wii and Gamecube.<br />
<br />
== Build the libraries yourself ==<br />
<br />
These steps require some patching and fiddling with the required autotools and problems may arise (depending on your OS). Works for me (tm), good luck :P<br />
<br />
Here's a a simple script to set up a shell for crosscompiling:<br />
<br />
#!/bin/sh<br />
<br />
PREFIX=${DEVKITPPC}/bin/powerpc-gekko-<br />
export CC=${PREFIX}gcc<br />
export CXX=${PREFIX}g++<br />
export AS=${PREFIX}gcc<br />
export LD=${PREFIX}gcc<br />
export AR=${PREFIX}ar cru<br />
export RANLIB=${PREFIX}ranlib<br />
export STRIP=${PREFIX}strip<br />
export OBJCOPY=${PREFIX}objcopy<br />
export MACHDEP="-g -Os -Wall -DGEKKO -mcpu=750 -meabi -mhard-float -ffunction-sections -fdata-sections -fmodulo-sched"<br />
export CFLAGS="${MACHDEP}"<br />
export CXXFLAGS="${CFLAGS}"<br />
export LDFLAGS="${MACHDEP}"<br />
<br />
echo "./configure --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii"<br />
<br />
Save it to a file (like <tt>gekkoenv.sh</tt>) and run<br />
<br />
. ./gekkoenv.sh<br />
<br />
in your shell. Build systems should now use the correct tools.<br />
<br />
=== Tremor ===<br />
<br />
Get a SVN checkout (rev 15592 as of this writing):<br />
<br />
svn co http://svn.xiph.org/branches/lowmem-branch/Tremor<br />
<br />
patch it:<br />
<br />
--- Tremor-vanilla/misc.h 2008-12-20 17:09:56.000000000 +0100<br />
+++ Tremor/misc.h 2008-12-23 22:44:58.000000000 +0100<br />
@@ -48,7 +48,7 @@<br />
<br />
#include <sys/types.h><br />
<br />
-#if BYTE_ORDER==LITTLE_ENDIAN<br />
+#if 0<br />
union magic {<br />
struct {<br />
ogg_int32_t lo;<br />
@@ -58,7 +58,7 @@<br />
};<br />
#endif<br />
<br />
-#if BYTE_ORDER==BIG_ENDIAN<br />
+#if 1<br />
union magic {<br />
struct {<br />
ogg_int32_t hi;<br />
<br />
configure it:<br />
<br />
./autogen.sh --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii --enable-low-accuracy<br />
<br />
and finally build & install it:<br />
<br />
make<br />
make install<br />
<br />
=== FLAC ===<br />
<br />
Get a tarball of the latest stable version [http://flac.sourceforge.net/download.html here] (v1.2.1 as of this writing), extract it, patch it:<br />
<br />
diff -ur flac-1.2.1-vanilla/src/libFLAC/bitreader.c flac-1.2.1/src/libFLAC/bitreader.c<br />
--- flac-1.2.1-vanilla/src/libFLAC/bitreader.c 2007-09-11 06:48:55.000000000 +0200<br />
+++ flac-1.2.1/src/libFLAC/bitreader.c 2008-12-23 23:14:00.000000000 +0100<br />
@@ -42,7 +42,7 @@<br />
#elif defined __MINGW32__<br />
#include <winsock.h> /* for ntohl() */<br />
#else<br />
-#include <netinet/in.h> /* for ntohl() */<br />
+//#include <netinet/in.h> /* for ntohl() */<br />
#endif<br />
#include "private/bitmath.h"<br />
#include "private/bitreader.h"<br />
diff -ur flac-1.2.1-vanilla/src/libFLAC/bitwriter.c flac-1.2.1/src/libFLAC/bitwriter.c<br />
--- flac-1.2.1-vanilla/src/libFLAC/bitwriter.c 2007-09-11 01:08:38.000000000 +0200<br />
+++ flac-1.2.1/src/libFLAC/bitwriter.c 2008-12-23 23:13:59.000000000 +0100<br />
@@ -42,7 +42,7 @@<br />
#elif defined __MINGW32__<br />
#include <winsock.h> /* for ntohl() */<br />
#else<br />
-#include <netinet/in.h> /* for ntohl() */<br />
+//#include <netinet/in.h> /* for ntohl() */<br />
#endif<br />
#if 0 /* UNUSED */<br />
#include "private/bitmath.h"<br />
<br />
configure it:<br />
<br />
./configure --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii --disable-doxygen-docs --disable-xmms-plugin --disable-ogg --disable-oggtest --disable-rpath<br />
<br />
and build & install the required parts:<br />
<br />
make -C src/libFLAC<br />
make -C src/libFLAC install<br />
make -C include install<br />
<br />
= Compiling =<br />
<br />
This port doesn't utilize ScummVM's <tt>configure</tt> system, instead it comes with a simple Makefile. The port code can be found in two directories:<br />
<br />
./backends/fs/wii/<br />
./backends/platform/wii/<br />
<br />
The former is a unified filesystem interface for ScummVM, the more interesting code is in the latter.<br />
<br />
Change your working directory to the latter and open the <tt>Makefile</tt> in a editor. You'll find some variables on top of that file, adjust those to your liking. Everything should be self-explanatory, some are even documented. Here are some random hints:<br />
<br />
* There is no support for dynamic libraries on the Wii or Gamecube, keep an engine toggle at <tt>STATIC_PLUGIN</tt> or disable it by just commenting that line<br />
* Vanilla scalers are not supported by the Wii port<br />
* [http://www.zlib.net/ zlib] and [http://www.underbit.com/products/mad/ MAD] are part of libogc<br />
* MPEG2 support has been dropped from the Wii port, if you want support for it, you have to cross compile [http://libmpeg2.sourceforge.net/ libmpeg2]<br />
<br />
When you're done with the <tt>Makefile</tt>, save it and run <tt>make</tt> (GNU version). That's it, the build system is now building an ''.elf'' and a ''.dol''.<br />
<br />
Test the ''.dol'' by uploading it using ''wiiload'' via:<br />
<br />
make upload<br />
<br />
If you want to copy your compiled binary to SD, use the command<br />
<br />
make dist<br />
<br />
which generates the folder ''dist'' with all the required files to run it.</div>Dhewghttps://wiki.scummvm.org/index.php?title=Compiling_ScummVM/Wii&diff=9672Compiling ScummVM/Wii2008-12-24T00:03:01Z<p>Dhewg: still learning how to diff ;)</p>
<hr />
<div>= Compiling ScummVM for Wii or Gamecube =<br />
<br />
This page describes how you build a Wii or Gamecube binary from the ScummVM source tree.<br />
<br />
First, you have to choose how to obtain the sources:<br />
* a downloaded [http://scummvm.org/downloads.php#source sources archive]<br />
* a [https://sourceforge.net/svn/?group_id=37116 SVN] checkout (latest is ''trunk'')<br />
<br />
Required tools and/or libraries might change at times, and differences for various ScummVM versions are pointed out when necessary.<br />
<br />
= Mandatory tools and libraries =<br />
<br />
* [http://devkitpro.org/ devkitPPC] as a build environment, please refer to its documentation how to set it up<br />
* libogc and libfat<br />
<br />
The latter two libraries are part of devkitPPC and are already installed with it. However, official ScummVM Wii and Gamecube binaries use unofficial versions, available via [http://git.or.cz/ git] [http://git.hackmii.com/ here].<br />
<br />
Reasons:<br />
<br />
* libogc's <tt>malloc()</tt> has been [http://git.hackmii.com/git.php?tag=ce9b85c1fa659d39ac26b72b82e31844c50bfdf6&p=libogc.git&a=commitdiff&h=ce9b85c1fa659d39ac26b72b82e31844c50bfdf6&hb=28e632dab2820a98ea3399e3090761581f034df7&tm=1366734 modfied] to utilize [http://wiibrew.org/wiki/Memory_Map MEM2]. Without this patch, a single binary with all game engines won't be able to run all games (like COMI) due to memory limits<br />
* libfat gained a read-ahead cache, without it video sequences will stutter<br />
<br />
If you're going to use the git repository, use my branches (''origin/dhewg'') for now, that's what i'm using.<br />
<br />
Nevertheless, ScummVM should build just fine with either versions.<br />
<br />
== Versions differences ==<br />
<br />
* v0.12.0 (first official version) is built with devkitPPC r15<br />
* ''trunk'' (and eventually v0.13.0) changed to devkitPPC r16<br />
<br />
= Optional libraries =<br />
<br />
* [http://svn.xiph.org/branches/lowmem-branch/Tremor/ Tremor] (lowmem branch) to play ''.ogg'' audio files<br />
* [http://flac.sourceforge.net/ FLAC] to play lossless ''.flac'' files<br />
<br />
Again, you have two options:<br />
<br />
== Precompiled binaries ==<br />
<br />
Get [http://static.hackmii.com/dhewg/devkitPPC_r16_3rd_libs.tar.bz2 this archive] and extract it in <tt>$DEVKITPRO/3rd/</tt> you just created. The directory structure should look like<br />
<tt>$DEVKITPRO/3rd/wii/include</tt><br />
<tt>$DEVKITPRO/3rd/wii/lib</tt><br />
and so on. The binaries will work on Wii and Gamecube.<br />
<br />
== Build the libraries yourself ==<br />
<br />
These steps require some patching and fiddling with the required autotools and problems may arise (depending on your OS). Works for me (tm), good luck :P<br />
<br />
Here's a a simple script to set up a shell for crosscompiling:<br />
<br />
#!/bin/sh<br />
<br />
PREFIX=${DEVKITPPC}/bin/powerpc-gekko-<br />
export CC=${PREFIX}gcc<br />
export CXX=${PREFIX}g++<br />
export AS=${PREFIX}gcc<br />
export LD=${PREFIX}gcc<br />
export AR=${PREFIX}ar cru<br />
export RANLIB=${PREFIX}ranlib<br />
export STRIP=${PREFIX}strip<br />
export OBJCOPY=${PREFIX}objcopy<br />
export MACHDEP="-g -Os -Wall -DGEKKO -mcpu=750 -meabi -mhard-float -ffunction-sections -fdata-sections -fmodulo-sched"<br />
export CFLAGS="${MACHDEP}"<br />
export CXXFLAGS="${CFLAGS}"<br />
export LDFLAGS="${MACHDEP}"<br />
<br />
echo "./configure --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii"<br />
<br />
Save it to a file (like <tt>gekkoenv.sh</tt>) and run<br />
<br />
. ./gekkoenv.sh<br />
<br />
in your shell. Build systems should now use the correct tools.<br />
<br />
=== Tremor ===<br />
<br />
Get a SVN checkout (rev 15592 as of this writing):<br />
<br />
svn co http://svn.xiph.org/branches/lowmem-branch/Tremor<br />
<br />
patch it:<br />
<br />
--- Tremor-vanilla/misc.h 2008-12-20 17:09:56.000000000 +0100<br />
+++ Tremor/misc.h 2008-12-23 22:44:58.000000000 +0100<br />
@@ -48,7 +48,7 @@<br />
<br />
#include <sys/types.h><br />
<br />
-#if BYTE_ORDER==LITTLE_ENDIAN<br />
+#if 0<br />
union magic {<br />
struct {<br />
ogg_int32_t lo;<br />
@@ -58,7 +58,7 @@<br />
};<br />
#endif<br />
<br />
-#if BYTE_ORDER==BIG_ENDIAN<br />
+#if 1<br />
union magic {<br />
struct {<br />
ogg_int32_t hi;<br />
<br />
configure it:<br />
<br />
./autogen.sh --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii --enable-low-accuracy<br />
<br />
and finally build & install it:<br />
<br />
make<br />
make install<br />
<br />
=== FLAC ===<br />
<br />
Get a tarball of the latest stable version [http://flac.sourceforge.net/download.html here] (v1.2.1 as of this writing), extract it, patch it:<br />
<br />
diff -ur flac-1.2.1-vanilla/src/libFLAC/bitreader.c flac-1.2.1/src/libFLAC/bitreader.c<br />
--- flac-1.2.1-vanilla/src/libFLAC/bitreader.c 2007-09-11 06:48:55.000000000 +0200<br />
+++ flac-1.2.1/src/libFLAC/bitreader.c 2008-12-23 23:14:00.000000000 +0100<br />
@@ -42,7 +42,7 @@<br />
#elif defined __MINGW32__<br />
#include <winsock.h> /* for ntohl() */<br />
#else<br />
-#include <netinet/in.h> /* for ntohl() */<br />
+//#include <netinet/in.h> /* for ntohl() */<br />
#endif<br />
#include "private/bitmath.h"<br />
#include "private/bitreader.h"<br />
diff -ur flac-1.2.1-vanilla/src/libFLAC/bitwriter.c flac-1.2.1/src/libFLAC/bitwriter.c<br />
--- flac-1.2.1-vanilla/src/libFLAC/bitwriter.c 2007-09-11 01:08:38.000000000 +0200<br />
+++ flac-1.2.1/src/libFLAC/bitwriter.c 2008-12-23 23:13:59.000000000 +0100<br />
@@ -42,7 +42,7 @@<br />
#elif defined __MINGW32__<br />
#include <winsock.h> /* for ntohl() */<br />
#else<br />
-#include <netinet/in.h> /* for ntohl() */<br />
+//#include <netinet/in.h> /* for ntohl() */<br />
#endif<br />
#if 0 /* UNUSED */<br />
#include "private/bitmath.h"<br />
<br />
configure it:<br />
<br />
./configure --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii --disable-doxygen-docs --disable-xmms-plugin --disable-ogg --disable-oggtest --disable-rpath<br />
<br />
and build & install the required parts:<br />
<br />
make -C src/libFLAC<br />
make -C src/libFLAC install<br />
make -C include install<br />
<br />
= Compiling =<br />
<br />
This port doesn't utilize ScummVM's <tt>configure</tt> system, instead it comes with a simple Makefile. The port code can be found in two directories:<br />
<br />
./backends/fs/wii/<br />
./backends/platform/wii/<br />
<br />
The former is a unified filesystem interface for ScummVM, the more interesting code is in the latter.<br />
<br />
Change your working directory to the latter and open the <tt>Makefile</tt> in a editor. You'll find some variables on top of that file, adjust those to your liking. Everything should be self-explanatory, some are even documented. Here are some random hints:<br />
<br />
* There is no support for dynamic libraries on the Wii or Gamecube, keep an engine toggle at <tt>STATIC_PLUGIN</tt> or disable it by just commenting that line<br />
* Vanilla scalers do not work, the code is i386 only<br />
* [http://www.zlib.net/ zlib] and [http://www.underbit.com/products/mad/ MAD] are part of libogc<br />
* MPEG2 support has been dropped from the Wii port, if you want support for it, you have to cross compile [http://libmpeg2.sourceforge.net/ libmpeg2]<br />
<br />
When you're done with the <tt>Makefile</tt>, save it and run <tt>make</tt> (GNU version). That's it, the build system is now building an ''.elf'' and a ''.dol''.<br />
<br />
Test the ''.dol'' by uploading it using ''wiiload'' via:<br />
<br />
make upload<br />
<br />
If you want to copy your compiled binary to SD, use the command<br />
<br />
make dist<br />
<br />
which generates the folder ''dist'' with all the required files to run it.</div>Dhewghttps://wiki.scummvm.org/index.php?title=Compiling_ScummVM/Wii&diff=9671Compiling ScummVM/Wii2008-12-23T23:50:02Z<p>Dhewg: </p>
<hr />
<div>= Compiling ScummVM for Wii or Gamecube =<br />
<br />
This page describes how you build a Wii or Gamecube binary from the ScummVM source tree.<br />
<br />
First, you have to choose how to obtain the sources:<br />
* a downloaded [http://scummvm.org/downloads.php#source sources archive]<br />
* a [https://sourceforge.net/svn/?group_id=37116 SVN] checkout (latest is ''trunk'')<br />
<br />
Required tools and/or libraries might change at times, and differences for various ScummVM versions are pointed out when necessary.<br />
<br />
= Mandatory tools and libraries =<br />
<br />
* [http://devkitpro.org/ devkitPPC] as a build environment, please refer to its documentation how to set it up<br />
* libogc and libfat<br />
<br />
The latter two libraries are part of devkitPPC and are already installed with it. However, official ScummVM Wii and Gamecube binaries use unofficial versions, available via [http://git.or.cz/ git] [http://git.hackmii.com/ here].<br />
<br />
Reasons:<br />
<br />
* libogc's <tt>malloc()</tt> has been [http://git.hackmii.com/git.php?tag=ce9b85c1fa659d39ac26b72b82e31844c50bfdf6&p=libogc.git&a=commitdiff&h=ce9b85c1fa659d39ac26b72b82e31844c50bfdf6&hb=28e632dab2820a98ea3399e3090761581f034df7&tm=1366734 modfied] to utilize [http://wiibrew.org/wiki/Memory_Map MEM2]. Without this patch, a single binary with all game engines won't be able to run all games (like COMI) due to memory limits<br />
* libfat gained a read-ahead cache, without it video sequences will stutter<br />
<br />
If you're going to use the git repository, use my branches (''origin/dhewg'') for now, that's what i'm using.<br />
<br />
Nevertheless, ScummVM should build just fine with either versions.<br />
<br />
== Versions differences ==<br />
<br />
* v0.12.0 (first official version) is built with devkitPPC r15<br />
* ''trunk'' (and eventually v0.13.0) changed to devkitPPC r16<br />
<br />
= Optional libraries =<br />
<br />
* [http://svn.xiph.org/branches/lowmem-branch/Tremor/ Tremor] (lowmem branch) to play ''.ogg'' audio files<br />
* [http://flac.sourceforge.net/ FLAC] to play lossless ''.flac'' files<br />
<br />
Again, you have two options:<br />
<br />
== Precompiled binaries ==<br />
<br />
Get [http://static.hackmii.com/dhewg/devkitPPC_r16_3rd_libs.tar.bz2 this archive] and extract it in <tt>$DEVKITPRO/3rd/</tt> you just created. The directory structure should look like<br />
<tt>$DEVKITPRO/3rd/wii/include</tt><br />
<tt>$DEVKITPRO/3rd/wii/lib</tt><br />
and so on. The binaries will work on Wii and Gamecube.<br />
<br />
== Build the libraries yourself ==<br />
<br />
These steps require some patching and fiddling with the required autotools and problems may arise (depending on your OS). Works for me (tm), good luck :P<br />
<br />
Here's a a simple script to set up a shell for crosscompiling:<br />
<br />
#!/bin/sh<br />
<br />
PREFIX=${DEVKITPPC}/bin/powerpc-gekko-<br />
export CC=${PREFIX}gcc<br />
export CXX=${PREFIX}g++<br />
export AS=${PREFIX}gcc<br />
export LD=${PREFIX}gcc<br />
export AR=${PREFIX}ar cru<br />
export RANLIB=${PREFIX}ranlib<br />
export STRIP=${PREFIX}strip<br />
export OBJCOPY=${PREFIX}objcopy<br />
export MACHDEP="-g -Os -Wall -DGEKKO -mcpu=750 -meabi -mhard-float -ffunction-sections -fdata-sections -fmodulo-sched"<br />
export CFLAGS="${MACHDEP}"<br />
export CXXFLAGS="${CFLAGS}"<br />
export LDFLAGS="${MACHDEP}"<br />
<br />
echo "./configure --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii"<br />
<br />
Save it to a file (like <tt>gekkoenv.sh</tt>) and run<br />
<br />
. ./gekkoenv.sh<br />
<br />
in your shell. Build systems should now use the correct tools.<br />
<br />
=== Tremor ===<br />
<br />
Get a SVN checkout (rev 15592 as of this writing):<br />
<br />
svn co http://svn.xiph.org/branches/lowmem-branch/Tremor<br />
<br />
patch it:<br />
<br />
--- Tremor-vanilla/misc.h 2008-12-20 17:09:56.000000000 +0100<br />
+++ Tremor/misc.h 2008-12-23 22:44:58.000000000 +0100<br />
@@ -48,7 +48,7 @@<br />
<br />
#include <sys/types.h><br />
<br />
-#if 0<br />
+#if BYTE_ORDER==LITTLE_ENDIAN<br />
union magic {<br />
struct {<br />
ogg_int32_t lo;<br />
@@ -58,7 +58,7 @@<br />
};<br />
#endif<br />
<br />
-#if 1<br />
+#if BYTE_ORDER==BIG_ENDIAN<br />
union magic {<br />
struct {<br />
ogg_int32_t hi;<br />
<br />
configure it:<br />
<br />
./autogen.sh --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii --enable-low-accuracy<br />
<br />
and finally build & install it:<br />
<br />
make<br />
make install<br />
<br />
=== FLAC ===<br />
<br />
Get a tarball of the latest stable version [http://flac.sourceforge.net/download.html here] (v1.2.1 as of this writing), extract it, patch it:<br />
<br />
diff -ur flac-1.2.1-vanilla/src/libFLAC/bitreader.c flac-1.2.1/src/libFLAC/bitreader.c<br />
--- flac-1.2.1-vanilla/src/libFLAC/bitreader.c 2007-09-11 06:48:55.000000000 +0200<br />
+++ flac-1.2.1/src/libFLAC/bitreader.c 2008-12-23 23:14:00.000000000 +0100<br />
@@ -42,7 +42,7 @@<br />
#elif defined __MINGW32__<br />
#include <winsock.h> /* for ntohl() */<br />
#else<br />
-#include <netinet/in.h> /* for ntohl() */<br />
+//#include <netinet/in.h> /* for ntohl() */<br />
#endif<br />
#include "private/bitmath.h"<br />
#include "private/bitreader.h"<br />
diff -ur flac-1.2.1-vanilla/src/libFLAC/bitwriter.c flac-1.2.1/src/libFLAC/bitwriter.c<br />
--- flac-1.2.1-vanilla/src/libFLAC/bitwriter.c 2007-09-11 01:08:38.000000000 +0200<br />
+++ flac-1.2.1/src/libFLAC/bitwriter.c 2008-12-23 23:13:59.000000000 +0100<br />
@@ -42,7 +42,7 @@<br />
#elif defined __MINGW32__<br />
#include <winsock.h> /* for ntohl() */<br />
#else<br />
-#include <netinet/in.h> /* for ntohl() */<br />
+//#include <netinet/in.h> /* for ntohl() */<br />
#endif<br />
#if 0 /* UNUSED */<br />
#include "private/bitmath.h"<br />
<br />
configure it:<br />
<br />
./configure --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii --disable-doxygen-docs --disable-xmms-plugin --disable-ogg --disable-oggtest --disable-rpath<br />
<br />
and build & install the required parts:<br />
<br />
make -C src/libFLAC<br />
make -C src/libFLAC install<br />
make -C include install<br />
<br />
= Compiling =<br />
<br />
This port doesn't utilize ScummVM's <tt>configure</tt> system, instead it comes with a simple Makefile. The port code can be found in two directories:<br />
<br />
./backends/fs/wii/<br />
./backends/platform/wii/<br />
<br />
The former is a unified filesystem interface for ScummVM, the more interesting code is in the latter.<br />
<br />
Change your working directory to the latter and open the <tt>Makefile</tt> in a editor. You'll find some variables on top of that file, adjust those to your liking. Everything should be self-explanatory, some are even documented. Here are some random hints:<br />
<br />
* There is no support for dynamic libraries on the Wii or Gamecube, keep an engine toggle at <tt>STATIC_PLUGIN</tt> or disable it by just commenting that line<br />
* Vanilla scalers do not work, the code is i386 only<br />
* [http://www.zlib.net/ zlib] and [http://www.underbit.com/products/mad/ MAD] are part of libogc<br />
* MPEG2 support has been dropped from the Wii port, if you want support for it, you have to cross compile [http://libmpeg2.sourceforge.net/ libmpeg2]<br />
<br />
When you're done with the <tt>Makefile</tt>, save it and run <tt>make</tt> (GNU version). That's it, the build system is now building an ''.elf'' and a ''.dol''.<br />
<br />
Test the ''.dol'' by uploading it using ''wiiload'' via:<br />
<br />
make upload<br />
<br />
If you want to copy your compiled binary to SD, use the command<br />
<br />
make dist<br />
<br />
which generates the folder ''dist'' with all the required files to run it.</div>Dhewghttps://wiki.scummvm.org/index.php?title=Compiling_ScummVM&diff=9670Compiling ScummVM2008-12-23T23:25:37Z<p>Dhewg: hooked wii build instructions</p>
<hr />
<div>=== Compiling ScummVM ===<br />
<br />
ScummVM has been ported to several different [[Platforms]]. Compilation of ScummVM is a bit different for each platform, so instructions have been included for the official platforms that ScummVM can be compiled for<br />
<br />
=== Current Officially Supported Platforms ===<br />
{| border="1" cellpadding="2"<br />
|- style="background:silver"<br />
|Platform||Compiling instructions<br />
|-<br />
|[http://www.microsoft.com Windows] || [[Compiling ScummVM/Visual Studio|Visual Studio 2008/2005/2003]], [[Compiling_ScummVM/MinGW|MinGW]] and [[Compiling ScummVM/DevCPP|Dev-C++]] instructions<br />
|-<br />
|[http://www.linux.org Linux] || [[Compiling ScummVM/GCC|GCC]]<br />
|-<br />
|[http://os4.hyperion-entertainment.biz/ AmigaOS4] || [[Compiling ScummVM/AmigaOS4|AmigaOS4]]<br />
|-<br />
|[http://www.microsoft.com/windowsmobile/ Windows CE/Mobile] || [[Compiling_ScummVM/Windows_CE|Windows CE]] instructions<br />
|-<br />
|[http://www.sega.jp/dc/ Sega Dreamcast] || [[Compiling ScummVM/Dreamcast|Sega Dreamcast]] instructions<br />
|-<br />
|[http://www.us.playstation.com/PSP Sony Playstation Portable]||[[Compiling ScummVM/PlayStation Portable|PlayStation Portable]] instructions<br />
|-<br />
|[http://www.apple.com/macosx/ Mac OS X]||[[Compiling ScummVM/Mac OS X Crosscompiling|Mac OS X Crosscompiling]] and [[Compiling ScummVM/Mac OS X 10.2.8|Mac OS X 10.2.8]] instructions<br />
|-<br />
|[http://www.apple.com/iphone/ iPhone]||[[Compiling ScummVM/iPhone|iPhone]] instructions<br />
|-<br />
|[http://www.nintendo.com/ds Nintendo DS]||[[Compiling ScummVM/Nintendo DS|Nintendo DS]] instructions<br />
|-<br />
|[http://www.symbian.com/ Symbian]||[[Compiling ScummVM/Symbian|Symbian]] instructions<br />
|-<br />
|Atari/FreeMiNT||[[Compiling ScummVM/Atari/FreeMiNT|Atari/FreeMiNT]]<br />
|-<br />
|[http://en.wikipedia.org/wiki/BeOS BeOS]/[http://www.zeta-os.com/ ZETA]/[http://www.haiku-os.org/ Haiku]||[[Compiling ScummVM/BeOS/ZETA/Haiku|BeOS/ZETA/Haiku]] instructions<br />
|-<br />
|[http://www.nintendo.com/wii Wii and Gamecube]||[[Compiling ScummVM/Wii|Wii and Gamecube]] instructions<br />
|}<br />
<br />
If you have instructions for compiling a port of ScummVM that is not mentioned here, feel free to contact us!</div>Dhewghttps://wiki.scummvm.org/index.php?title=Compiling_ScummVM/Wii&diff=9669Compiling ScummVM/Wii2008-12-23T23:21:50Z<p>Dhewg: wii build instructions</p>
<hr />
<div>= Compiling ScummVM for Wii or Gamecube =<br />
<br />
This page describes how you build a Wii or Gamecube binary from the ScummVM source tree.<br />
<br />
First, you have to choose how to obtain the sources:<br />
* a downloaded [http://scummvm.org/downloads.php#source sources archive]<br />
* a [https://sourceforge.net/svn/?group_id=37116 SVN] checkout (latest is ''trunk'')<br />
<br />
Required tools and/or libraries might change at times, and differences for various ScummVM versions are pointed out when necessary.<br />
<br />
= Mandatory tools and libraries =<br />
<br />
* [http://devkitpro.org/ devkitPPC] as a build environment, please refer to its documentation to set it up<br />
* libogc and libfat<br />
<br />
The latter two libraries are part of devkitPPC and are already installed with it. However, official ScummVM Wii and Gamecube binaries use unofficial versions, available via [http://git.or.cz/ git] [http://git.hackmii.com/ here].<br />
<br />
Reasons:<br />
<br />
* libogc's <tt>malloc()</tt> has been [http://git.hackmii.com/git.php?tag=ce9b85c1fa659d39ac26b72b82e31844c50bfdf6&p=libogc.git&a=commitdiff&h=ce9b85c1fa659d39ac26b72b82e31844c50bfdf6&hb=28e632dab2820a98ea3399e3090761581f034df7&tm=1366734 modfied] to utilize [http://wiibrew.org/wiki/Memory_Map MEM2]. Without this patch, a single binary with all game engines won't be able to run all games (like COMI) due to memory limits<br />
* libfat gained a read-ahead cache, without it video sequences will stutter<br />
<br />
Nevertheless, ScummVM should build just fine with either versions.<br />
<br />
== Versions differences ==<br />
<br />
* v0.12.0 (first official version) is built with devkitPPC r15<br />
* ''trunk'' (and eventually v0.13.0) changed to devkitPPC r16<br />
<br />
= Optional libraries =<br />
<br />
* [http://svn.xiph.org/branches/lowmem-branch/Tremor/ Tremor] (lowmem branch) to play ''.ogg'' audio files<br />
* [http://flac.sourceforge.net/ FLAC] to play lossless ''.flac'' files<br />
<br />
Again, you have two options:<br />
<br />
== Precompiled binaries ==<br />
<br />
Get [http://static.hackmii.com/dhewg/devkitPPC_r16_3rd_libs.tar.bz2 this archive] and extract it in <tt>$DEVKITPRO/3rd/</tt> you just created. The directory structure should look like <tt>$DEVKITPRO/3rd/wii/include</tt>, <tt>$DEVKITPRO/3rd/wii/lib</tt> and so on.<br />
<br />
== Build the libraries yourself ==<br />
<br />
These steps require some patching and fiddling with the required autotools and problems may arise (depending on your OS). Works for me (tm), good luck :P<br />
<br />
Here's a a simple script to set up a shell for crosscompiling:<br />
<br />
#!/bin/sh<br />
<br />
PREFIX=${DEVKITPPC}/bin/powerpc-gekko-<br />
export CC=${PREFIX}gcc<br />
export CXX=${PREFIX}g++<br />
export AS=${PREFIX}gcc<br />
export LD=${PREFIX}gcc<br />
export AR=${PREFIX}ar cru<br />
export RANLIB=${PREFIX}ranlib<br />
export STRIP=${PREFIX}strip<br />
export OBJCOPY=${PREFIX}objcopy<br />
export MACHDEP="-g -Os -Wall -DGEKKO -mcpu=750 -meabi -mhard-float -ffunction-sections -fdata-sections -fmodulo-sched"<br />
export CFLAGS="${MACHDEP}"<br />
export CXXFLAGS="${CFLAGS}"<br />
export LDFLAGS="${MACHDEP}"<br />
<br />
echo "./configure --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii"<br />
<br />
Save it to a file (like <tt>gekkoenv.sh</tt> and run<br />
<br />
. ./gekkoenv.sh<br />
<br />
in your shell. Build systems should now use the correct tools.<br />
<br />
=== Tremor ===<br />
<br />
Get a SVN checkout (rev 15592 as of this writing):<br />
<br />
svn co http://svn.xiph.org/branches/lowmem-branch/Tremor<br />
<br />
patch it:<br />
<br />
--- Tremor-vanilla/misc.h 2008-12-20 17:09:56.000000000 +0100<br />
+++ Tremor/misc.h 2008-12-23 22:44:58.000000000 +0100<br />
@@ -48,7 +48,7 @@<br />
<br />
#include <sys/types.h><br />
<br />
-#if 0<br />
+#if BYTE_ORDER==LITTLE_ENDIAN<br />
union magic {<br />
struct {<br />
ogg_int32_t lo;<br />
@@ -58,7 +58,7 @@<br />
};<br />
#endif<br />
<br />
-#if 1<br />
+#if BYTE_ORDER==BIG_ENDIAN<br />
union magic {<br />
struct {<br />
ogg_int32_t hi;<br />
<br />
configure it:<br />
<br />
./autogen.sh --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii --enable-low-accuracy<br />
<br />
and finally build & install it:<br />
<br />
make<br />
make install<br />
<br />
=== FLAC ===<br />
<br />
Get a tarball of the latest stable version [http://flac.sourceforge.net/download.html here] (v1.2.1 as of this writing), extract it, patch it:<br />
<br />
diff -ur flac-1.2.1-vanilla/src/libFLAC/bitreader.c flac-1.2.1/src/libFLAC/bitreader.c<br />
--- flac-1.2.1-vanilla/src/libFLAC/bitreader.c 2007-09-11 06:48:55.000000000 +0200<br />
+++ flac-1.2.1/src/libFLAC/bitreader.c 2008-12-23 23:14:00.000000000 +0100<br />
@@ -42,7 +42,7 @@<br />
#elif defined __MINGW32__<br />
#include <winsock.h> /* for ntohl() */<br />
#else<br />
-#include <netinet/in.h> /* for ntohl() */<br />
+//#include <netinet/in.h> /* for ntohl() */<br />
#endif<br />
#include "private/bitmath.h"<br />
#include "private/bitreader.h"<br />
diff -ur flac-1.2.1-vanilla/src/libFLAC/bitwriter.c flac-1.2.1/src/libFLAC/bitwriter.c<br />
--- flac-1.2.1-vanilla/src/libFLAC/bitwriter.c 2007-09-11 01:08:38.000000000 +0200<br />
+++ flac-1.2.1/src/libFLAC/bitwriter.c 2008-12-23 23:13:59.000000000 +0100<br />
@@ -42,7 +42,7 @@<br />
#elif defined __MINGW32__<br />
#include <winsock.h> /* for ntohl() */<br />
#else<br />
-#include <netinet/in.h> /* for ntohl() */<br />
+//#include <netinet/in.h> /* for ntohl() */<br />
#endif<br />
#if 0 /* UNUSED */<br />
#include "private/bitmath.h"<br />
<br />
configure it:<br />
<br />
./configure --host=ppc --disable-shared --prefix=${DEVKITPRO}/3rd/wii --disable-doxygen-docs --disable-xmms-plugin --disable-ogg --disable-oggtest --disable-rpath<br />
<br />
and build & install the required parts:<br />
<br />
make -C src/libFLAC<br />
make -C src/libFLAC install<br />
make -C include install<br />
<br />
= Compiling =<br />
<br />
This port doesn't utilize ScummVM's <tt>configure</tt> system, instead it comes with a simple Makefile. The port code can be found in two directories:<br />
<br />
./backends/fs/wii/<br />
./backends/platform/wii/<br />
<br />
The former is a unified filesystem interface for ScummVM, the more interesting code is in the latter.<br />
<br />
Change your working directory to the latter and open the <tt>Makefile</tt> in a editor. You'll find some variables on top of that file, adjust those to your liking. Everything should be self-explanatory, some are even documented. Here are some random hints:<br />
<br />
* There is no support for dynamic libraries on the Wii, keep an engine toggle at <tt>STATIC_PLUGIN</tt> or disable it by just commenting that line<br />
* Vanilla scalers do not work, the code is i386 only<br />
* [http://www.zlib.net/ zlib] and [http://www.underbit.com/products/mad/ MAD] are part of libogc<br />
* MPEG2 support has been dropped from the Wii port, if you want supports for it, you have to cross compile [http://libmpeg2.sourceforge.net/ libmpeg2]<br />
<br />
When you're done with the <tt>Makefile</tt>, save it and run <tt>GNU make</tt>. That's it, the build system is now building an ''.elf'' and a ''.dol''.<br />
<br />
Test the ''.dol'' by uploading it using ''wiiload'' via:<br />
<br />
make upload<br />
<br />
If you want to copy your compiled binary to SD, use the command<br />
<br />
make dist<br />
<br />
which generates the folder ''dist'' with all the required files to run it.</div>Dhewg