Difference between revisions of "Compiling ScummVM/Android-SDL"

Jump to navigation Jump to search
(Update of step by step instructions)
 
(5 intermediate revisions by the same user not shown)
Line 2: Line 2:


This page describes how to build the [[Android-SDL]] port of ScummVM (supporting SDL 1.2) from the ScummVM source tree.
This page describes how to build the [[Android-SDL]] port of ScummVM (supporting SDL 1.2) from the ScummVM source tree.
{| border="0" cellpadding="1" cellspacing="2" style="margin-left:5em; background:#FF9999; width:80%"
|- align="center"
| '''NOTE'''
|- style="margin-left:1em; background:#ffffff;"
|- style="background:#ffffff"
| Please note that the Android''-SDL'' port is considered deprecated, which means it is no longer under active development or maintenance. Thus, the information on this page will be outdated and we will no longer be providing official support for this port.
You may find instructions on how to compile our currently active [[Compiling_ScummVM/Android|Android port here]].
|}


= Basic prerequisites =
= Basic prerequisites =


# In order to build the androidsdl port you will need a '''64-bit Linux OS''' installation with an '''Internet connection'''.<br />The following has been tested in '''lubuntu 64-bit 16.04.6 LTS (xenial)''', '''kernel 4.15.0-47-generic'''.
In order to build the androidsdl port you will need a '''64-bit Linux OS''' installation with an '''Internet connection'''.<br />The following has been tested in '''lubuntu 64-bit 16.04.6 LTS (xenial)''', '''kernel 4.15.0-47-generic'''.
# It's recommended that you have ''at least 20 GB of free space'' on your home partition before you begin this process.
# Make sure you have the latest updates for your OS by running from a shell terminal:<br /><syntaxhighlight lang="console">sudo apt-get update
# Make sure you have the latest updates for your OS by running from a shell terminal:<br /><syntaxhighlight lang="console">sudo apt-get update
sudo apt-get upgrade</syntaxhighlight>You can also check the Software Updater GUI utility (or similar) for additional pending updates, such as kernel updates or Ubuntu Base updates (for Ubuntu based distributions). ''Reboot'' your PC, ''if you are prompted to''.
sudo apt-get upgrade</syntaxhighlight>You can also check the Software Updater GUI utility (or similar) for additional pending updates, such as kernel updates or Ubuntu Base updates (for Ubuntu based distributions). ''Reboot'' your PC, ''if you are prompted to''.
Line 15: Line 26:


This guide assumes that you create an "''~/Android''" folder inside your home directory to put the ''Android SDK'' and ''NDK''.
This guide assumes that you create an "''~/Android''" folder inside your home directory to put the ''Android SDK'' and ''NDK''.
== Install the Android SDK ==
=== Install Android SDK with command line tools only ===
Navigate to url: https://developer.android.com/studio/index.html
Navigate to url: https://developer.android.com/studio/index.html<br />
* Download the "''Command line tools only''" packet for Linux ("''sdk-tools-linux-4333796.zip''" at the time of this writing).
Download the "''Command line tools only''" packet for Linux ("''sdk-tools-linux-4333796.zip''" at the time of this writing).
*# Create an "''~/.android''" and an "''~/Android''" folder in your home directory. Then, create a "''~/Android/android-sdk''" subfolder.<br />To do this from a shell terminal, issue:<br /><syntaxhighlight lang="console">mkdir ~/.android
# Create an "''~/.android''" and an "''~/Android''" folder in your home directory. Then, create a "''~/Android/android-sdk''" subfolder.<br />To do this from a shell terminal, issue:<br /><syntaxhighlight lang="console">mkdir ~/.android
mkdir ~/Android
mkdir ~/Android
mkdir ~/Android/android-sdk</syntaxhighlight>Unpack the ''command line tools'' zip file inside the "''~/Android/android-sdk''" folder. This should create a "''tools''" subfolder.<br />
mkdir ~/Android/android-sdk</syntaxhighlight>
*# Install the required Android SDK tools.<br />Using a shell terminal issue:<br /><syntaxhighlight lang="console">touch ~/.android/repositories.cfg
# Unpack the ''command line tools'' zip file inside the "''~/Android/android-sdk''" folder. This should create a "''tools''" subfolder.<br />
# Install the required Android SDK tools.<br />Using a shell terminal issue:<br /><syntaxhighlight lang="console">touch ~/.android/repositories.cfg
cd ~/Android/android-sdk/tools/bin
cd ~/Android/android-sdk/tools/bin
./sdkmanager --install "platforms;android-26"
./sdkmanager --install "platforms;android-26"
./sdkmanager --install "build-tools;26.0.0"
./sdkmanager --install "build-tools;26.0.0"
./sdkmanager --install "extras;android;m2repository"</syntaxhighlight>Accept any license agreement you are prompted with during the above installation process. Also, for good measure, issue the following command, then review and accept any pending license agreements:<br /><syntaxhighlight lang="console">./sdkmanager --licenses</syntaxhighlight>Then, using the following command verify that you've installed the correct tools:<br /><syntaxhighlight lang="console">./sdkmanager --list</syntaxhighlight>You should see a printout that begins like the following:<syntaxhighlight lang="console">
./sdkmanager --install "extras;android;m2repository"</syntaxhighlight>Accept any license agreement you are prompted with during the above installation process. Also, for good measure, issue the following command, then review and accept any pending license agreements:<br /><syntaxhighlight lang="console">./sdkmanager --licenses</syntaxhighlight>Then, using the following command verify that you've installed the correct tools:<br /><syntaxhighlight lang="console">./sdkmanager --list</syntaxhighlight>You should see a printout that begins like the following:<syntaxhighlight lang="console">
Path                         | Version   | Description                     | Location
Path                       | Version | Description                   | Location
-------                       | -------   | -------                         | -------
-------                     | ------- | -------                       | -------
build-tools;26.0.0           | 26.0.0   | Android SDK Build-Tools 26.0.0 | build-tools/26.0.0/
build-tools;26.0.0         | 26.0.0 | Android SDK Build-Tools 26.0.0 | build-tools/26.0.0/
extras;android;m2repository   | 47.0.0   | Android Support Repository     | extras/android/m2repository/
extras;android;m2repository | 47.0.0 | Android Support Repository     | extras/android/m2repository/
platforms;android-26         | 2         | Android SDK Platform 26         | platforms/android-26/
platforms;android-26       | 2       | Android SDK Platform 26       | platforms/android-26/
tools                         | 26.1.1   | Android SDK Tools 26.1.1       | tools/
tools                       | 26.1.1 | Android SDK Tools 26.1.1       | tools/
</syntaxhighlight>
</syntaxhighlight>
* '''Alternatively''', you could download and install the Android Studio for Linux 64-bit. You can then use the ''sdk-manager GUI tool'' to install the required additional tools and SDK resources. Use the above list as a guide to what packages you should download and install.
 
=== Install Android SDK with Android Studio ===
'''Alternatively''', you could download and install the Android Studio for Linux 64-bit. You can then use the ''sdk-manager GUI tool'' to install the required additional tools and SDK resources. Use the above list as a guide to what packages you should download and install.


== Install the Android NDK ==
== Install the Android NDK ==
Line 67: Line 81:
* In order to build the scummvm androidsdl port for specific engines only:
* In order to build the scummvm androidsdl port for specific engines only:
*# Open the "''~/scummvm/dists/androidsdl/scummvm/AndroidBuild.sh''" file
*# Open the "''~/scummvm/dists/androidsdl/scummvm/AndroidBuild.sh''" file
*# Find the following line which contains the configure command:<syntaxhighlight lang="sh">$ANDROIDSDL/project/jni/application/setEnvironment-$1.sh sh -c "cd scummvm/bin-$1 && env LIBS='-lflac -lvorbis -logg -lmad -lz -lgcc -ltheora -lpng -lfreetype -lfaad -lgnustl_static' ../configure --host=androidsdl-$1 --enable-zlib --enable-vorbis --enable-mad --enable-flac --enable-png --enable-theoradec --disable-sdlnet --disable-libcurl --disable-cloud --enable-vkeybd --enable-release --enable-mt32emu --disable-readline --disable-nasm --disable-timidity --disable-fluidsynth --datadir=. "</syntaxhighlight>
*# Find the following line which contains the configure command:<syntaxhighlight lang="sh">$ANDROIDSDL/project/jni/application/setEnvironment-$1.sh sh -c "cd scummvm/bin-$1 && env LIBS='-lflac -lvorbis -logg -lmad -lz -lgcc -ltheora -lpng -lfreetype -lfaad -lgnustl_static' ../configure --host=androidsdl-$1 --enable-zlib --enable-vorbis --enable-mad --enable-flac --enable-png --enable-theoradec --disable-sdlnet --disable-libcurl --disable-cloud --enable-vkeybd --enable-release --enable-optimizations --enable-mt32emu --disable-readline --disable-nasm --disable-timidity --disable-fluidsynth --datadir=. "</syntaxhighlight>
*# Edit the line and, after "<code>../configure</code>",  add "<code>--disable-all-engines --enable-engine=YYYY</code>", where in place of "<code>YYYY</code>" you should specify game engine for which you want to build ScummVM.<br />For example (building only for the ''bladerunner'' engine):<syntaxhighlight lang="sh">$ANDROIDSDL/project/jni/application/setEnvironment-$1.sh sh -c "cd scummvm/bin-$1 && env LIBS='-lflac -lvorbis -logg -lmad -lz -lgcc -ltheora -lpng -lfreetype -lfaad -lgnustl_static' ../configure --host=androidsdl-$1 --disable-all-engines --enable-engine=bladerunner --enable-zlib --enable-vorbis --enable-mad --enable-flac --enable-png --enable-theoradec --disable-sdlnet --disable-libcurl --disable-cloud --enable-vkeybd --enable-release --enable-mt32emu --disable-readline --disable-nasm --disable-timidity --disable-fluidsynth --datadir=. "</syntaxhighlight>
*# Edit the line and, after "<code>../configure</code>",  add "<code>--disable-all-engines --enable-engine=YYYY</code>", where in place of "<code>YYYY</code>" you should specify game engine for which you want to build ScummVM.<br />For example (building only for the ''bladerunner'' engine):<syntaxhighlight lang="sh">$ANDROIDSDL/project/jni/application/setEnvironment-$1.sh sh -c "cd scummvm/bin-$1 && env LIBS='-lflac -lvorbis -logg -lmad -lz -lgcc -ltheora -lpng -lfreetype -lfaad -lgnustl_static' ../configure --host=androidsdl-$1 --disable-all-engines --enable-engine=bladerunner --enable-zlib --enable-vorbis --enable-mad --enable-flac --enable-png --enable-theoradec --disable-sdlnet --disable-libcurl --disable-cloud --enable-vkeybd --enable-release --enable-mt32emu --disable-readline --disable-nasm --disable-timidity --disable-fluidsynth --datadir=. "</syntaxhighlight>


807

edits

Navigation menu