Difference between revisions of "Compiling ScummVM/Maemo"

Jump to navigation Jump to search
1,357 bytes added ,  15:07, 25 October 2018
m
Text replacement - "<source lang=" to "<syntaxhighlight lang="
m (Text replacement - "<source lang=" to "<syntaxhighlight lang=")
Tags: Mobile edit Mobile web edit
 
(28 intermediate revisions by 3 users not shown)
Line 11: Line 11:


== Download and Install Maemo SDK ==
== Download and Install Maemo SDK ==
'''Note: The following instructions are based on an attempt in a fresh Debian 5 (lenny) i386 install'''


Add the following line to /etc/apt/sources.list:
Add the following line to /etc/apt/sources.list:


  <nowiki>deb http://maemo-sdk.garage.maemo.org/download/host debian-squeeze free</nowiki>
  <nowiki>deb http://maemo-sdk.garage.maemo.org/download/host debian-lenny free</nowiki>


Then run the following commands to install the SDK:
Then run the following commands to install the SDK:
apt-get update
<syntaxhighlight lang="bash">
apt-get install maemo-sdk
sudo apt-get update
sudo apt-get install maemo-sdk
</syntaxhighlight>


You'll need to make sure the custom and no longer latest versions are installed the maemo-sdk and its dependencies. I had to downgrade the following packages when using debian 7 (wheezy):
Then run the following commands to build/install the tools and compilers:
[DOWNGRADE] libsb2:i386 2.2.4-1debian1 -> 2.0-lta123
[DOWNGRADE] sbrsh:i386 7.6.1 -> 7.6maemo2
[DOWNGRADE] scratchbox2:i386 2.2.4-1debian1 -> 2.0-lta123


Then run the following commands to build/install the tools and compilers:
<syntaxhighlight lang="bash">
maemo-sdk reload catalogue
sudo maemo-sdk --mirror "http://archive.debian.org/debian/" install tools lenny-2009-1
sudo maemo-sdk install toolchain arm-2007q3
maemo-sdk install rootstrap diablo4.1.2_armel
</syntaxhighlight>
 
== Install dependencies inside the SDK environment ==
 
You'll need to install the maemo extras repo to the rootstrap. Add the following line to ~/.maemo-sdk/rootstraps/armel/diablo4.1.2_armel/etc/apt/sources.list
  <nowiki>deb http://repository.maemo.org/extras/ diablo free non-free</nowiki>
 
and then install the dependencies:
 
<syntaxhighlight lang="bash">
sb2 -eR apt-get update
sb2 -eR apt-get install libflac-dev libmad0-dev libmpeg2-4-dev libvorbisidec-dev
</syntaxhighlight>
 
== Optional: Install git inside SDK environment ==
 
The ScummVM makefile has an optional dependency on git. It uses it as part of populating the version. The git installed on the host operating system is not visible to the SDK environment.
 
Download the armel git deb from [http://nikosapi.org/software/git/git_1.6.2-1_armel.deb here] (thanks [http://talk.maemo.org/showthread.php?t=27352 Nikosapi]) [http://bashasoliman.com/dump/maemo/git/git_1.6.2-1_armel.deb mirror]
 
Install it by running:
 
<syntaxhighlight lang="bash">
sb2 -eR dpkg -i git_1.6.2-1_armel.deb
</syntaxhighlight>
 
== Optional: Install libfaad-dev inside SDK environment ==
 
'''Note: this entire step is very optional as no stable games at the time of this writing (v1.8.0) need AAC decoding. It is included here for posterity.'''
 
Download these deb files into a temporary directory: [http://bashasoliman.com/dump/maemo/faad/libfaad-dev_2.6.1-3.1+maemo0_armel.deb libfaad-dev] [http://bashasoliman.com/dump/maemo/faad/libfaad0_2.6.1-3.1+maemo0_armel.deb libfaad0] [http://bashasoliman.com/dump/maemo/faad/libfaad2-0_2.6.1-3.1+maemo0_all.deb libfaad2]
 
Install them by running:
 
<syntaxhighlight lang="bash">
sb2 -eR dpkg -i libfaad*.deb
</syntaxhighlight>


sudo maemo-sdk --mirror <nowiki>"http://archive.debian.org/debian/"</nowiki> install tools lenny-2009-1
Delete the libfaad.so from the SDK environment so that it statically links to libfaad.a instead of dynamically linking to libfaad.so (This version of libfaad.so isn't available in maemo-extra and is thus unavailable to maemo-users)
sudo maemo-sdk install toolchain arm-2007q3
maemo-sdk install rootstrap diablo4.1.2_armel
maemo-sdk install binaries diablo4.1.2_armel


The last command will fail because it wants to run "maemo-rootstrap path diablo4.1.2_armel" but the command isn't there because it is an obsolete SDK thing. It needs to run "maemo-sdk show path rootstrap diablo4.1.2_armel" instead. You can edit the /tmp/sb2-maemo-sdk-nokia-binaries_diablo_4.1.2.sh and run it manually (with -r diablo4.1.2_armel) or you can make available a fake maemo-rootstrap binary that runs the correct command and then reattempt to install the binaries. Here's an example of a fake maemo-rootstrap that does that:
<syntaxhighlight lang="bash">
if [ "$1" = "path" ]
rm ~/.maemo-sdk/rootstraps/armel/diablo4.1.2_armel/usr/lib/libfaad.so*
  then
</syntaxhighlight>
    maemo-sdk show path rootstrap $2
else
    echo "Error: Only path argument is supported"
    exit 1
fi


== Ensure Packaging Files Are Available In Source Tree Root ==
== Ensure Packaging Files Are Available In Source Tree Root ==


This requires a symlink from backends/platform/maemo/debian to the root of the scummvm checkout:
This requires a symlink from backends/platform/maemo/debian to the root of the scummvm checkout:
ln -s backends/platform/maemo/debian  
<syntaxhighlight lang="bash">
ln -s backends/platform/maemo/debian  
</syntaxhighlight>


== Compile ==
== Compile ==
Line 52: Line 88:
=== Build Package ===
=== Build Package ===


sb2 dpkg-buildpackage -b
<syntaxhighlight lang="bash">
sb2 dpkg-buildpackage -b
</syntaxhighlight>


=== Compile (Without Building Package) ===
=== Compile (Without Building Package) ===


sb2 ./configure --host=maemo
<syntaxhighlight lang="bash">
sb2 make
sb2 ./configure --host=maemo
sb2 make
</syntaxhighlight>
TrustedUser
2,147

edits

Navigation menu