ANDROIDSDL: Remove deprecated port

This commit is contained in:
Le Philousophe 2022-02-05 21:10:20 +01:00 committed by Paweł Kołodziejski
parent 101ed5efc3
commit 9f84198643
22 changed files with 8 additions and 1152 deletions

View File

@ -1,76 +0,0 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "common/scummsys.h"
#if defined(ANDROIDSDL)
#include "backends/events/androidsdl/androidsdl-events.h"
#include "backends/platform/androidsdl/androidsdl-sdl.h"
bool AndroidSdlEventSource::handleMouseButtonDown(SDL_Event &ev, Common::Event &event) {
#if defined(SDL_BUTTON_MIDDLE)
if (ev.button.button == SDL_BUTTON_MIDDLE) {
const bool show_onscreen = g_system->getFeatureState(OSystem::kFeatureOnScreenControl);
g_system->setFeatureState(OSystem::kFeatureOnScreenControl, !show_onscreen);
}
#endif
return SdlEventSource::handleMouseButtonDown(ev, event);
}
bool AndroidSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
if (false) {}
if (ev.key.keysym.sym == SDLK_F13) {
event.type = Common::EVENT_MAINMENU;
return true;
} else {
// Let the events fall through if we didn't change them, this may not be the best way to
// set it up, but i'm not sure how sdl would like it if we let if fall through then redid it though.
// and yes i have an huge terminal size so i dont wrap soon enough.
event.type = Common::EVENT_KEYDOWN;
event.kbd.keycode = (Common::KeyCode)ev.key.keysym.sym;
event.kbd.ascii = mapKey(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode);
}
return false;
}
int AndroidSdlEventSource::mapKey(SDL_Keycode sdlKey, SDL_Keymod mod, Uint16 unicode) {
Common::KeyCode key = SDLToOSystemKeycode(sdlKey);
if (key >= Common::KEYCODE_F1 && key <= Common::KEYCODE_F9) {
return key - Common::KEYCODE_F1 + Common::ASCII_F1;
} else if (key >= Common::KEYCODE_KP0 && key <= Common::KEYCODE_KP9) {
return key - Common::KEYCODE_KP0 + '0';
} else if (key >= Common::KEYCODE_UP && key <= Common::KEYCODE_PAGEDOWN) {
return key;
} else if (key >= 'a' && key <= 'z' && (mod & KMOD_SHIFT)) {
return key & ~0x20;
} else if (key >= Common::KEYCODE_NUMLOCK && key < Common::KEYCODE_LAST) {
return 0;
} else {
return key;
}
}
#endif

View File

@ -1,37 +0,0 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#if !defined(BACKEND_EVENTS_SDL_ANDROIDSDL_H) && !defined(DISABLE_DEFAULT_EVENTMANAGER)
#define BACKEND_EVENTS_SDL_ANDROIDSDL_H
#include "backends/events/sdl/sdl-events.h"
/**
* SDL events manager for ANDROIDSDL
*/
class AndroidSdlEventSource : public SdlEventSource {
protected:
virtual bool handleMouseButtonDown(SDL_Event &ev, Common::Event &event);
virtual bool remapKey(SDL_Event &ev, Common::Event &event);
virtual int mapKey(SDL_Keycode key, SDL_Keymod mod, Uint16 unicode);
};
#endif

View File

@ -246,11 +246,6 @@ MODULE_OBJS += \
mutex/pthread/pthread-mutex.o
endif
ifeq ($(BACKEND),androidsdl)
MODULE_OBJS += \
events/androidsdl/androidsdl-events.o
endif
ifdef AMIGAOS
MODULE_OBJS += \
dialogs/amigaos/amigaos-dialogs.o \

View File

@ -1,46 +0,0 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#define FORBIDDEN_SYMBOL_EXCEPTION_system
#include "backends/platform/androidsdl/androidsdl-sdl.h"
#include "base/main.h"
int main(int argc, char *argv[]) {
// Copy over config file from previous version of ScummVM if applicable
system("ls $DATADIR/.config/scummvm/scummvm.ini || (mkdir -p $DATADIR/.config/scummvm && cp $APPDIR/scummvmrc $DATADIR/.config/scummvm/scummvm.ini )");
// Create our OSystem instance
g_system = new OSystem_ANDROIDSDL();
assert(g_system);
// Pre initialize the backend
g_system->init();
// Invoke the actual ScummVM main entry point:
int res = scummvm_main(argc, argv);
// Free OSystem
g_system->destroy();
return res;
}

View File

@ -1,142 +0,0 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#define FORBIDDEN_SYMBOL_EXCEPTION_getenv(a)
#include "common/config-manager.h"
#include "backends/platform/androidsdl/androidsdl-sdl.h"
#include "backends/events/androidsdl/androidsdl-events.h"
#include <SDL_android.h>
#include <SDL_screenkeyboard.h>
void OSystem_ANDROIDSDL::initBackend() {
// Create the backend custom managers
if (_eventSource == 0)
_eventSource = new AndroidSdlEventSource();
if (!ConfMan.hasKey("browser_lastpath") || (ConfMan.hasKey("browser_lastpath") && (ConfMan.get("browser_lastpath") == "/storage")))
ConfMan.set("browser_lastpath", getenv("SDCARD"));
if (!ConfMan.hasKey("gfx_mode"))
ConfMan.set("gfx_mode", "2x");
if (!ConfMan.hasKey("swap_menu_and_back_buttons"))
ConfMan.setBool("swap_menu_and_back_buttons", true);
else
swapMenuAndBackButtons(ConfMan.getBool("swap_menu_and_back_buttons"));
if (!ConfMan.hasKey("touchpad_mouse_mode")) {
const bool enable = SDL_ANDROID_GetMouseEmulationMode();
ConfMan.setBool("touchpad_mouse_mode", enable);
} else
touchpadMode(ConfMan.getBool("touchpad_mouse_mode"));
if (!ConfMan.hasKey("onscreen_control")) {
const bool enable = SDL_ANDROID_GetScreenKeyboardShown();
ConfMan.setBool("onscreen_control", enable);
} else
showOnScreenControl(ConfMan.getBool("onscreen_control"));
// Call parent implementation of this method
OSystem_POSIX::initBackend();
}
void OSystem_ANDROIDSDL::showOnScreenControl(bool enable) {
if (enable)
SDL_ANDROID_SetScreenKeyboardShown(1);
else
SDL_ANDROID_SetScreenKeyboardShown(0);
}
void OSystem_ANDROIDSDL::touchpadMode(bool enable) {
if (enable)
switchToRelativeMouseMode();
else
switchToDirectMouseMode();
}
void OSystem_ANDROIDSDL::swapMenuAndBackButtons(bool enable) {
static int KEYCODE_MENU = 82;
static int KEYCODE_BACK = 4;
if (enable) {
SDL_ANDROID_SetAndroidKeycode(KEYCODE_BACK, SDLK_F13);
SDL_ANDROID_SetAndroidKeycode(KEYCODE_MENU, SDLK_ESCAPE);
} else {
SDL_ANDROID_SetAndroidKeycode(KEYCODE_BACK, SDLK_ESCAPE);
SDL_ANDROID_SetAndroidKeycode(KEYCODE_MENU, SDLK_F13);
}
}
void OSystem_ANDROIDSDL::switchToDirectMouseMode() {
SDL_ANDROID_SetMouseEmulationMode(0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1);
}
void OSystem_ANDROIDSDL::switchToRelativeMouseMode() {
SDL_ANDROID_SetMouseEmulationMode(1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1);
}
void OSystem_ANDROIDSDL::setFeatureState(Feature f, bool enable) {
switch (f) {
case kFeatureTouchpadMode:
ConfMan.setBool("touchpad_mouse_mode", enable);
touchpadMode(enable);
break;
case kFeatureOnScreenControl:
ConfMan.setBool("onscreen_control", enable);
showOnScreenControl(enable);
break;
case kFeatureSwapMenuAndBackButtons:
ConfMan.setBool("swap_menu_and_back_buttons", enable);
swapMenuAndBackButtons(enable);
break;
default:
OSystem_POSIX::setFeatureState(f, enable);
break;
}
}
bool OSystem_ANDROIDSDL::getFeatureState(Feature f) {
switch (f) {
case kFeatureTouchpadMode:
return ConfMan.getBool("touchpad_mouse_mode");
break;
case kFeatureOnScreenControl:
return ConfMan.getBool("onscreen_control");
break;
case kFeatureSwapMenuAndBackButtons:
return ConfMan.getBool("swap_menu_and_back_buttons");
break;
default:
return OSystem_POSIX::getFeatureState(f);
break;
}
}
bool OSystem_ANDROIDSDL::hasFeature(Feature f) {
if (f == kFeatureFullscreenMode)
return false;
return (f == kFeatureTouchpadMode ||
f == kFeatureOnScreenControl ||
f == kFeatureSwapMenuAndBackButtons ||
f == OSystem_POSIX::getFeatureState(f));
}

View File

@ -1,40 +0,0 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef PLATFORM_SDL_ANDROIDSDL_H
#define PLATFORM_SDL_ANDROIDSDL_H
#include "backends/platform/sdl/posix/posix.h"
class OSystem_ANDROIDSDL : public OSystem_POSIX {
public:
virtual void initBackend();
virtual void setFeatureState(Feature f, bool enable);
virtual bool getFeatureState(Feature f);
virtual bool hasFeature(Feature f);
void touchpadMode(bool enable);
void swapMenuAndBackButtons(bool enable);
void switchToDirectMouseMode();
void switchToRelativeMouseMode();
void showOnScreenControl(bool enable);
};
#endif

View File

@ -1,10 +0,0 @@
# Special target to create an AndroidSDL snapshot
androidsdl:
$(MKDIR) release
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(DIST_FILES_NETWORKING) $(DIST_FILES_VKEYBD) $(DIST_FILES_ENGINEDATA) release
$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) release
zip -j scummvm_2_1_0-git-appdata.zip release/*
split -d -b 1000000 scummvm_2_1_0-git-appdata.zip scummvm_2_1_0-git-appdata.zip0
$(RM) -r scummvm_2_1_0-git-appdata.zip
.PHONY: androidsdl

View File

@ -1,13 +0,0 @@
MODULE := backends/platform/androidsdl
MODULE_OBJS := \
androidsdl-main.o \
androidsdl-sdl.o
# We don't use rules.mk but rather manually update OBJS and MODULE_DIRS.
MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS))
OBJS := $(MODULE_OBJS) $(OBJS)
MODULE_DIRS += $(sort $(dir $(MODULE_OBJS)))
# Hack to ensure the SDL backend is built so we can use OSystem_SDL.
-include $(srcdir)/backends/platform/sdl/module.mk

View File

@ -21,7 +21,7 @@
#include "common/scummsys.h"
#if defined(POSIX) && !defined(MACOSX) && !defined(SAMSUNGTV) && !defined(MAEMO) && !defined(GPH_DEVICE) && !defined(GP2X) && !defined(DINGUX) && !defined(OPENPANDORA) && !defined(PLAYSTATION3) && !defined(PSP2) && !defined(ANDROIDSDL) && !defined(NINTENDO_SWITCH)
#if defined(POSIX) && !defined(MACOSX) && !defined(SAMSUNGTV) && !defined(MAEMO) && !defined(GPH_DEVICE) && !defined(GP2X) && !defined(DINGUX) && !defined(OPENPANDORA) && !defined(PLAYSTATION3) && !defined(PSP2) && !defined(NINTENDO_SWITCH)
#include "backends/platform/sdl/posix/posix.h"
#include "backends/plugins/sdl/sdl-provider.h"

46
configure vendored
View File

@ -812,7 +812,6 @@ Special configuration feature:
android-arm64-v8a for Android ARMv8-A (arm64-v8a)
android-x86 for Android x86
android-x86_64 for Android x86_64
androidsdl for Android with SDL backend
caanoo for Caanoo
dingux for Dingux
raspberrypi for Raspberry Pi
@ -1531,31 +1530,6 @@ android-x86_64)
_host_cpu=x86_64
_host_alias=x86_64-linux-android
;;
androidsdl-armeabi | androidsdl-armeabi-v7a)
_host_os=androidsdl
_host_cpu=arm
_host_alias=arm-linux-androideabi
;;
androidsdl-arm64-v8a)
_host_os=androidsdl
_host_cpu=aarch64
_host_alias=aarch64-linux-android
;;
androidsdl-mips)
_host_os=androidsdl
_host_cpu=mipsel
_host_alias=mipsel-linux-android
;;
androidsdl-x86)
_host_os=androidsdl
_host_cpu=i686
_host_alias=i686-linux-android
;;
androidsdl-x86_64)
_host_os=androidsdl
_host_cpu=x86_64
_host_alias=x86_64-linux-android
;;
arm-vfp-riscos)
_host_os=riscos
_host_cpu=arm
@ -2185,7 +2159,7 @@ if test "$have_gcc" = yes ; then
case $_host_os in
# newlib-based system include files suppress non-C89 function
# declarations under __STRICT_ANSI__, undefine it
3ds | android | androidsdl | gamecube | psp | switch | wii)
3ds | android | gamecube | psp | switch | wii)
std_variant=gnu++
pedantic=no
;;
@ -2538,7 +2512,7 @@ case $_host_cpu in
openpandora)
define_in_config_if_yes yes 'USE_ARM_NEON_ASPECT_CORRECTOR'
;;
androidsdl-armeabi | arm-*riscos | caanoo | gp2x | gp2xwiz | maemo )
arm-*riscos | caanoo | gp2x | gp2xwiz | maemo )
define_in_config_if_yes yes 'USE_ARM_SCALER_ASM'
define_in_config_if_yes yes 'USE_ARM_SMUSH_ASM'
define_in_config_if_yes yes 'USE_ARM_GFX_ASM'
@ -3172,15 +3146,6 @@ if test -n "$_host"; then
_seq_midi=no
_timidity=no
;;
androidsdl | androidsdl-armeabi | androidsdl-armeabi-v7a | androidsdl-mips | androidsdl-x86 | androidsdl-arm64-v8a | androidsdl-x86_64)
DEFINES="$DEFINES -DANDROIDSDL"
_unix=yes
_build_aspect=no
_seq_midi=no
_timidity=no
_backend="androidsdl"
_port_mk="backends/platform/androidsdl/androidsdl.mk"
;;
arm-linux|arm*-linux-gnueabi|arm-*-linux)
;;
arm-vfp-riscos)
@ -3643,9 +3608,6 @@ case $_backend in
_sdlnet=no
fi
;;
androidsdl)
_sdl=auto
;;
dc)
append_var INCLUDES '-I$(srcdir)/backends/platform/dc'
append_var INCLUDES "-isystem $RONINDIR/include"
@ -3917,7 +3879,7 @@ fi
# Enable 16bit support only for backends which support it
#
case $_backend in
3ds | android | androidsdl | dingux | dc | ds | gph | iphone | ios7 | maemo | null | opendingux | openpandora | psp | psp2 | samsungtv | sdl | switch | wii)
3ds | android | dingux | dc | ds | gph | iphone | ios7 | maemo | null | opendingux | openpandora | psp | psp2 | samsungtv | sdl | switch | wii)
if test "$_16bit" = auto ; then
_16bit=yes
else
@ -3993,7 +3955,7 @@ case $_host_os in
amigaos* | cygwin* | dreamcast | ds | gamecube | mingw* | morphos | n64 | ps3 | psp2 | psp | riscos | wii)
_posix=no
;;
3ds | android | androidsdl | beos* | bsd* | darwin* | freebsd* | gnu* | gph-linux | haiku* | hpux* | iphone | ios7 | irix*| k*bsd*-gnu* | linux* | maemo | mint* | netbsd* | openbsd* | serenity* | solaris* | sunos* | switch | uclinux*)
3ds | android | beos* | bsd* | darwin* | freebsd* | gnu* | gph-linux | haiku* | hpux* | iphone | ios7 | irix*| k*bsd*-gnu* | linux* | maemo | mint* | netbsd* | openbsd* | serenity* | solaris* | sunos* | switch | uclinux*)
_posix=yes
;;
os2-emx*)

View File

@ -1,138 +0,0 @@
1a) In order to build the androidsdl port you will need a 64-bit Linux OS installation with an Internet connection.
The following has been tested in lubuntu 64-bit 16.04.6 LTS (xenial), kernel 4.15.0-47-generic.
1b) Make sure you have the latest updates for your OS by running from a shell terminal:
sudo apt-get update
sudo apt-get upgrade
After installing any updates, reboot your PC if required.
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.
1c) Install the Linux packages that are required for the build:
Commands:
sudo apt-get install build-essential
sudo apt-get install git
1d) Install the JDK. You can do this using the apt-get tool or by downloading the JDK from Oracle's official site (in the latter case you must set environment variables for JDK; see guides "How install JDK and set environment variables for JDK").
Recommended command:
sudo apt-get install openjdk-8-jdk
2a) This guide assumes that you create an "~/Android" folder inside your home directory to put the Android SDK and NDK.
2b) Install the Android SDK.
a) Navigate to url: https://developer.android.com/studio/index.html
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.
To do this using a shell terminal issue:
mkdir ~/.android
mkdir ~/Android
mkdir ~/Android/android-sdk
Unpack the command line tools zip packet inside the "~/Android/android-sdk" folder.
This should create a "tools" subfolder.
Install the required android SDK tools.
Using a shell terminal issue:
touch ~/.android/repositories.cfg
cd ~/Android/android-sdk/tools/bin
./sdkmanager --install "platforms;android-26"
./sdkmanager --install "build-tools;26.0.0"
./sdkmanager --install "extras;android;m2repository"
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:
./sdkmanager --licenses
Then, using the following command verify that you've installed the correct tools:
./sdkmanager --list
You should see a printout that begins like the following:
Path | Version | Description | Location
------- | ------- | ------- | -------
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/
platforms;android-26 | 2 | Android SDK Platform 26 | platforms/android-26/
tools | 26.1.1 | Android SDK Tools 26.1.1 | tools/
b) Alternatively, you could download and install the Android Studio for Linux 64-bit. You can then use 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.
3) Install the r15c (July 2017) version for Android NDK ("android-ndk-r15c-linux-x86_64.zip").
Newer versions are currently not supported. The r15c NDK can be found in the following url:
https://developer.android.com/ndk/downloads/older_releases.html
Extract the zip file you downloaded into the "~/Android" folder.
This should create a "android-ndk-r15c" subfolder.
4) Set the environment variables for Android SDK and NDK tools.
For this purpose you can create and use a simple "setenv-android.sh" script.
In this script define variables for the paths to your SDK tools and NDK.
Sample (suggested) script:
#!/bin/sh
export ANDROID_HOME=~/Android/android-sdk
export ANDROID_SDK_ROOT=~/Android/android-sdk
export ANDROID_NDK_HOME=~/Android/android-ndk-r15c
export ANDROID_SDK_TOOLS=$ANDROID_HOME/tools
export ANDROID_SDK_BTOOLS=$ANDROID_HOME/build-tools/26.0.0
export PATH=$ANDROID_NDK_HOME:$ANDROID_SDK_TOOLS:$ANDROID_SDK_BTOOLS:$PATH
Save the "setenv-android.sh" script in your "~/Android" folder.
In order to apply the script run from a shell terminal:
source ~/Android/setenv-android.sh
Verify that your environmental variables have been set correctly by running:
echo $PATH
You should see your NDK and SDK paths at the start of the $PATH variable.
WARNING: These environmental variables will be set only for that particular command-line session;
You will need to re-run this script if you start another shell terminal session.
You should not re-run this script within the same shell terminal session.
5) Create and put a keystore (you can use the debug version) in "~/.android/debug.keystore".
To create a debug key store run from the shell terminal:
keytool -genkey -v -keystore ~/.android/debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000
keytool -importkeystore -srckeystore ~/.android/debug.keystore -destkeystore ~/.android/debug.keystore -deststoretype pkcs12
Enter "android" without the quotes when asked for the keystore password.
6) Clone the ScummVM repository. This guide assumes that you run the clone command from your home directory:
cd ~
git clone https://github.com/scummvm/scummvm.git
The above command will create a "scummvm" folder in your home directory.
7) You can now start building the androidsdl port project by issuing the following commands from the terminal session where you have already set the Android NDK and SDK environmental variables:
cd ~/scummvm/dists/androidsdl
./build.sh
7b) The above build command will create a release build. In order to make a debug build, you will need to add the "debug" argument when running the build command like so:
./build.sh debug
8) If the process completes successfully, a "scummvm-debug.apk" file will be stored in that folder (~/scummvm/dists/androidsdl).
Since this apk is self-signed you will need to enable installation by third-party sources on your Android device in order to install it.
NOTE: You can significantly reduce the build time if you target a specific Android architecture and/or building scummvm for specific game engines only.
A) In order to target specific architectures edit the following line from the "~/scummvm/dists/androidsdl/scummvm/AndroidAppSettings.cfg" file:
From:
MultiABI="armeabi-v7a arm64-v8a x86 x86_64"
To:
MultiABI="arm64-v8a"
The above line is only an example; you might have to specify another architecture for your specific use case.
B) In order to build the scummvm androidsdl port for specific engines only:
- Depending on whether you are building a release or a debug build, open one of the "AndroidBuildRelease.sh" or "AndroidBuildDebug.sh" files in the "~/scummvm/dists/androidsdl/scummvm/" folder
- Find the following line which contains the configure command.
- Edit the line and after "../configure" add "--disable-all-engines --enable-engine=YYYY", where in place of "YYYY" you should specify game engine for which you want to build scummvm.
For example (building only for the bladerunner engine):
$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-mt32emu --disable-readline --disable-nasm --disable-timidity --disable-fluidsynth --datadir=. "
References:
https://wiki.scummvm.org/index.php/Compiling_ScummVM/Android-SDL
https://forums.scummvm.org/viewtopic.php?t=14811
https://forums.scummvm.org/viewtopic.php?t=14516
http://developer.android.com/tools/publishing/app-signing.html#debugmode

View File

@ -1,74 +0,0 @@
#!/bin/sh
LOCAL_PATH=`dirname $0`
LOCAL_PATH=`cd $LOCAL_PATH && pwd`
# default build mode is release
build_release=true
if [ "$#" -eq "1" ]; then
if [ "$1" = "debug" ]; then
build_release=false
echo "Preparing for a debug build..."
elif [ "$1" = "release" ]; then
echo "Preparing for a release build..."
else
echo "Usage: $0 [debug|release]"
echo " debug: build debug package"
echo " release: build release package (default)"
exit 0
fi
else
echo "Preparing for a release (default) build..."
fi
sleep 1
if $build_release ; then
if [ -x scummvm/AndroidBuildRelease.sh ] && \
{ cp scummvm/AndroidBuildRelease.sh scummvm/AndroidBuild.sh ; } ; then
echo "AndroidBuild.sh created successfully"
else
echo "Error: Required script AndroidBuildRelease.sh could not be copied to AndroidBuild.sh"
exit 0
fi
else
if [ -x scummvm/AndroidBuildDebug.sh ] && \
{ cp scummvm/AndroidBuildDebug.sh scummvm/AndroidBuild.sh ; } ; then
echo "AndroidBuild.sh created successfully"
else
echo "Error: Required script AndroidBuildDebug.sh could not be copied to AndroidBuild.sh"
exit 0
fi
fi
if [ \! -d ../../../androidsdl ] ; then
cd ../../..
git clone git://github.com/pelya/commandergenius androidsdl
cd androidsdl
git submodule update --init project/jni/iconv/src
git checkout d378ee692f2e380a0ab0635c1df2eb6941b5bf58
cd project/jni/iconv/src
# checkout a specific version of iconv that allows building with the specific version (d378ee692f2e380a0ab0635c1df2eb6941b5bf58) of androidsdl
git checkout 07bead221ed4fa61cc8d880db3d9a5e704866097
cd ../../../../../scummvm/dists/androidsdl
fi
if [ \! -d scummvm/scummvm ] ; then
ln -s ../../../../scummvm scummvm
fi
if [ \! -d ../../../androidsdl/project/jni/application/scummvm ] ; then
ln -s ../../../../scummvm/dists/androidsdl/scummvm ../../../androidsdl/project/jni/application
fi
cd ../../../androidsdl
if $build_release ; then
./build.sh release scummvm
else
./build.sh debug scummvm
fi
# the androidsdl build.sh script ensures that the output file is named "app-release" even if we are in debug mode
mv project/app/build/outputs/apk/app-release.apk ../scummvm/dists/androidsdl/scummvm-debug.apk
cd ../scummvm/dists/androidsdl
rm scummvm/AndroidBuild.sh

View File

@ -1,236 +0,0 @@
# The application settings for Android libSDL port
AppSettingVersion=19
# libSDL version to use (1.2 or 1.3, specify 1.3 for SDL2)
LibSdlVersion=1.2
# Specify application name (e.x. My Application)
AppName="ScummVM"
# Specify reversed site name of application (e.x. com.mysite.myapp)
AppFullName=org.scummvm.scummvm
# Specify screen orientation: (v)ertical/(p)ortrait or (h)orizontal/(l)andscape
ScreenOrientation=h
# Do not allow device to sleep when the application is in foreground, set this for video players or apps which use accelerometer
InhibitSuspend=y
# Specify path to download application data in zip archive in the form 'Description|URL|MirrorURL^Description2|URL2|MirrorURL2^...'
# If you'll start Description with '!' symbol it will be enabled by default, other downloads should be selected by user from startup config menu
# If the URL in in the form ':dir/file.dat:http://URL/' it will be downloaded as binary BLOB to the application dir and not unzipped
# If the URL does not contain 'http://' it is treated as file from 'project/jni/application/src/AndroidData' dir -
# these files are put inside .apk package by build system
# Also please avoid 'https://' URLs, many Android devices do not have trust certificates and will fail to connect to SF.net over HTTPS
AppDataDownloadUrl="!!App data|scummvm_2_1_0-git-appdata.zip"
# Video color depth - 16 BPP is the fastest and supported for all modes, 24 bpp is supported only
# with SwVideoMode=y, SDL_OPENGL mode supports everything. (16)/(24)/(32)
VideoDepthBpp=32
# Enable OpenGL depth buffer (needed only for 3-d applications, small speed decrease) (y) or (n)
NeedDepthBuffer=y
# Enable OpenGL stencil buffer (needed only for 3-d applications, small speed decrease) (y) or (n)
NeedStencilBuffer=y
# Try to use GLES 2.x context - will revert to GLES 1.X if unsupported by device
# you need this option only if you're developing 3-d app (y) or (n)
NeedGles2=n
# Application uses software video buffer - you're calling SDL_SetVideoMode() without SDL_HWSURFACE and without SDL_OPENGL,
# this will allow small speed optimization. Enable this even when you're using SDL_HWSURFACE. (y) or (n)
SwVideoMode=y
# Application video output will be resized to fit into native device screen (y)/(n)
SdlVideoResize=y
# Application resizing will keep 4:3 aspect ratio, with black bars at sides (y)/(n)
SdlVideoResizeKeepAspect=n
# Application does not call SDL_Flip() or SDL_UpdateRects() appropriately, or draws from non-main thread -
# enabling the compatibility mode will force screen update every 100 milliseconds, which is laggy and inefficient (y) or (n)
CompatibilityHacks=n
# Application initializes SDL audio/video inside static constructors (which is bad, you won't be able to run ndk-gdb) (y)/(n)
CompatibilityHacksStaticInit=n
# On-screen Android soft text input emulates hardware keyboard, this will only work with Hackers Keyboard app (y)/(n)
CompatibilityHacksTextInputEmulatesHwKeyboard=y
TextInputKeyboard=1
# Hack for broken devices: prevent audio chopping, by sleeping a bit after pushing each audio chunk (y)/(n)
CompatibilityHacksPreventAudioChopping=n
# Hack for broken apps: application ignores audio buffer size returned by SDL (y)/(n)
CompatibilityHacksAppIgnoresAudioBufferSize=n
# Hack for VCMI: preload additional shared libraries before aplication start
CompatibilityHacksAdditionalPreloadedSharedLibraries=""
# Hack for Free Heroes 2, which redraws the screen inside SDL_PumpEvents(): slow and compatible SDL event queue -
# do not use it with accelerometer/gyroscope, or your app may freeze at random (y)/(n)
CompatibilityHacksSlowCompatibleEventQueue=n
# Save and restore OpenGL state when drawing on-screen keyboard for apps that use SDL_OPENGL
CompatibilityHacksTouchscreenKeyboardSaveRestoreOpenGLState=y
# Application uses mouse (y) or (n), this will show mouse emulation dialog to the user
AppUsesMouse=y
# Application needs two-button mouse, will also enable advanced point-and-click features (y) or (n)
AppNeedsTwoButtonMouse=y
# Show SDL mouse cursor, for applications that do not draw cursor at all (y) or (n)
ShowMouseCursor=n
# Force relative (laptop) mouse movement mode, useful when both on-screen keyboard and mouse are needed (y) or (n)
ForceRelativeMouseMode=n
# Application needs arrow keys (y) or (n), will show on-screen dpad/joystick (y) or (n)
AppNeedsArrowKeys=n
# Application needs text input (y) or (n), enables button for text input on screen
AppNeedsTextInput=y
# Application uses joystick (y) or (n), the on-screen DPAD will be used as joystick 0 axes 0-1
AppUsesJoystick=n
# Application uses second on-screen joystick, as SDL joystick 0 axes 2-3 (y)/(n)
AppUsesSecondJoystick=n
# Application uses accelerometer (y) or (n), the accelerometer will be used as joystick 1 axes 0-1 and 5-7
AppUsesAccelerometer=n
# Application uses gyroscope (y) or (n), the gyroscope will be used as joystick 1 axes 2-4
AppUsesGyroscope=n
# Application uses multitouch (y) or (n), multitouch events are passed as SDL_JOYBALLMOTION events for the joystick 0
AppUsesMultitouch=y
# Application records audio (it will use any available source, such a s microphone)
# API is defined in file SDL_android.h: int SDL_ANDROID_OpenAudioRecording(SDL_AudioSpec *spec); void SDL_ANDROID_CloseAudioRecording(void);
# This option will add additional permission to Android manifest (y)/(n)
AppRecordsAudio=n
# Application implements Android-specific routines to put to background, and will not draw anything to screen
# between SDL_ACTIVEEVENT lost / gained notifications - you should check for them
# rigth after SDL_Flip(), if (n) then SDL_Flip() will block till app in background (y) or (n)
# This option is reported to be buggy, sometimes failing to restore video state
NonBlockingSwapBuffers=n
# Redefine common hardware keys to SDL keysyms
# BACK hardware key is available on all devices, MENU is available on pre-ICS devices, other keys may be absent
# SEARCH and CALL by default return same keycode as DPAD_CENTER - one of those keys is available on most devices
# Use word NO_REMAP if you want to preserve native functionality for certain key (volume keys are 3-rd and 4-th)
# Keys: TOUCHSCREEN (works only when AppUsesMouse=n), DPAD_CENTER/SEARCH, VOLUMEUP, VOLUMEDOWN, MENU, BACK, CAMERA
RedefinedKeys="SPACE RETURN NO_REMAP NO_REMAP ESCAPE F13 F7 F4 F2 MOUSE_LEFT"
# Number of virtual keyboard keys (currently 6 is maximum)
AppTouchscreenKeyboardKeysAmount=0
# Number of virtual keyboard keys that support autofire (currently 2 is maximum)
AppTouchscreenKeyboardKeysAmountAutoFire=0
# Redefine on-screen keyboard keys to SDL keysyms - 6 keyboard keys + 4 multitouch gestures (zoom in/out and rotate left/right)
RedefinedKeysScreenKb="MOUSE_RIGHT F7 F13"
# Names for on-screen keyboard keys, such as Fire, Jump, Run etc, separated by spaces, they are used in SDL config menu
RedefinedKeysScreenKbNames="MOUSE_RIGHT F7 F13"
# On-screen keys theme
# 0 = Ultimate Droid by Sean Stieber (green, with gamepad joystick)
# 1 = Simple Theme by Beholder (white, with gamepad joystick)
# 2 = Sun by Sirea (yellow, with round joystick)
# 3 = Keen by Gerstrong (multicolor, with round joystick)
TouchscreenKeysTheme=1
# Redefine gamepad keys to SDL keysyms, button order is:
# A B X Y L1 R1 L2 R2 LThumb RThumb
RedefinedKeysGamepad="MOUSE_RIGHT F7 F13 ESCAPE F5 SPACE RETURN MOUSE_LEFT"
# How long to show startup menu button, in msec, 0 to disable startup menu
StartupMenuButtonTimeout=3000
# Menu items to hide from startup menu, available menu items:
# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout
HiddenMenuOptions='SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMouse.DisplaySizeConfig'
# Menu items to show at startup - this is Java code snippet, leave empty for default
# new SettingsMenuMisc.ShowReadme(), (AppUsesMouse \&\& \! ForceRelativeMouseMode \? new SettingsMenuMouse.DisplaySizeConfig(true) : new SettingsMenu.DummyMenu()), new SettingsMenuMisc.OptionalDownloadConfig(true), new SettingsMenuMisc.GyroscopeCalibration()
# Available menu items:
# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout
FirstStartMenuOptions=''
# Enable multi-ABI binary, with hardware FPU support - it will also work on old devices,
# but .apk size is 2x bigger (y) / (n) / (x86) / (all)
MultiABI="armeabi-v7a arm64-v8a x86 x86_64"
# Minimum amount of RAM application requires, in Mb, SDL will print warning to user if it's lower
AppMinimumRAM=256
# Application version code (integer)
AppVersionCode=20
# Application user-visible version name (string)
AppVersionName="2.1.0git"
# Reset SDL config when updating application to the new version (y) / (n)
ResetSdlConfigForThisVersion=y
# Delete application data files when upgrading (specify file/dir paths separated by spaces)
DeleteFilesOnUpgrade="%"
# Optional shared libraries to compile - removing some of them will save space
# MP3 support by libMAD is encumbered by patents and libMAD is GPL-ed
# Available libraries: mad (GPL-ed!) sdl_mixer sdl_image sdl_ttf sdl_net sdl_blitpool sdl_gfx sdl_sound intl xml2 lua jpeg png ogg flac tremor vorbis freetype xerces curl theora fluidsynth lzma lzo2 mikmod openal timidity zzip bzip2 yaml-cpp python boost_date_time boost_filesystem boost_iostreams boost_program_options boost_regex boost_signals boost_system boost_thread glu avcodec avdevice avfilter avformat avresample avutil swscale swresample bzip2
#CompiledLibraries="mad vorbis flac ogg jpeg png theora freetype faad curl sdl_net"
CompiledLibraries="mad vorbis flac ogg jpeg png theora freetype faad"
# Application uses custom build script AndroidBuild.sh instead of Android.mk (y) or (n)
CustomBuildScript=y
# Aditional CFLAGS for application
AppCflags=''
# Additional LDFLAGS for application
AppLdflags=''
# If application has headers with the same name as system headers, this option tries to fix compiler flags to make it compilable
AppOverlapsSystemHeaders=
# Build only following subdirs (empty will build all dirs, ignored with custom script)
AppSubdirsBuild=''
# Exclude these files from build
AppBuildExclude=''
# Application command line parameters, including app name as 0-th param
AppCmdline=''
# Here you may type readme text, which will be shown during startup. Format is:
# Text in English, use \\\\n to separate lines^de:Text in Deutsch^ru:Text in Russian, and so on (that's four backslashes, nice isn't it?)
ReadmeText='^You may press "Home" now - the data will be downloaded in background'
# Screen size is used by Google Play to prevent an app to be installed on devices with smaller screens
# Minimum screen size that application supports: (s)mall / (m)edium / (l)arge
MinimumScreenSize=s
# Your AdMob Publisher ID, (n) if you don't want advertisements
AdmobPublisherId=n
# Your AdMob test device ID, to receive a test ad
AdmobTestDeviceId=
# Your AdMob banner size (BANNER/IAB_BANNER/IAB_LEADERBOARD/IAB_MRECT/IAB_WIDE_SKYSCRAPER/SMART_BANNER)
AdmobBannerSize=
# Use gl4es library for provide OpenGL 1.x functionality to OpenGL ES accelerated cards (y) or (n)
UseGl4es=n
# Application needs to access SD card. If your data files are bigger than 5 Mb, enable it. (y) / (n)
AccessSdCard=y
# Hide Android system mouse cursor image when USB mouse is attached (y) or (n) - the app must draw it's own mouse cursor
HideSystemMousePointer=y

View File

@ -1,236 +0,0 @@
# The application settings for Android libSDL port
AppSettingVersion=19
# libSDL version to use (1.2 or 1.3, specify 1.3 for SDL2)
LibSdlVersion=1.2
# Specify application name (e.x. My Application)
AppName="ScummVM"
# Specify reversed site name of application (e.x. com.mysite.myapp)
AppFullName=org.scummvm.scummvm
# Specify screen orientation: (v)ertical/(p)ortrait or (h)orizontal/(l)andscape
ScreenOrientation=h
# Do not allow device to sleep when the application is in foreground, set this for video players or apps which use accelerometer
InhibitSuspend=y
# Specify path to download application data in zip archive in the form 'Description|URL|MirrorURL^Description2|URL2|MirrorURL2^...'
# If you'll start Description with '!' symbol it will be enabled by default, other downloads should be selected by user from startup config menu
# If the URL in in the form ':dir/file.dat:http://URL/' it will be downloaded as binary BLOB to the application dir and not unzipped
# If the URL does not contain 'http://' it is treated as file from 'project/jni/application/src/AndroidData' dir -
# these files are put inside .apk package by build system
# Also please avoid 'https://' URLs, many Android devices do not have trust certificates and will fail to connect to SF.net over HTTPS
AppDataDownloadUrl="!!App data|scummvm_2_1_0-git-appdata.zip"
# Video color depth - 16 BPP is the fastest and supported for all modes, 24 bpp is supported only
# with SwVideoMode=y, SDL_OPENGL mode supports everything. (16)/(24)/(32)
VideoDepthBpp=32
# Enable OpenGL depth buffer (needed only for 3-d applications, small speed decrease) (y) or (n)
NeedDepthBuffer=y
# Enable OpenGL stencil buffer (needed only for 3-d applications, small speed decrease) (y) or (n)
NeedStencilBuffer=y
# Try to use GLES 2.x context - will revert to GLES 1.X if unsupported by device
# you need this option only if you're developing 3-d app (y) or (n)
NeedGles2=n
# Application uses software video buffer - you're calling SDL_SetVideoMode() without SDL_HWSURFACE and without SDL_OPENGL,
# this will allow small speed optimization. Enable this even when you're using SDL_HWSURFACE. (y) or (n)
SwVideoMode=n
# Application video output will be resized to fit into native device screen (y)/(n)
SdlVideoResize=y
# Application resizing will keep 4:3 aspect ratio, with black bars at sides (y)/(n)
SdlVideoResizeKeepAspect=n
# Application does not call SDL_Flip() or SDL_UpdateRects() appropriately, or draws from non-main thread -
# enabling the compatibility mode will force screen update every 100 milliseconds, which is laggy and inefficient (y) or (n)
CompatibilityHacks=n
# Application initializes SDL audio/video inside static constructors (which is bad, you won't be able to run ndk-gdb) (y)/(n)
CompatibilityHacksStaticInit=n
# On-screen Android soft text input emulates hardware keyboard, this will only work with Hackers Keyboard app (y)/(n)
CompatibilityHacksTextInputEmulatesHwKeyboard=y
TextInputKeyboard=1
# Hack for broken devices: prevent audio chopping, by sleeping a bit after pushing each audio chunk (y)/(n)
CompatibilityHacksPreventAudioChopping=n
# Hack for broken apps: application ignores audio buffer size returned by SDL (y)/(n)
CompatibilityHacksAppIgnoresAudioBufferSize=n
# Hack for VCMI: preload additional shared libraries before aplication start
CompatibilityHacksAdditionalPreloadedSharedLibraries=""
# Hack for Free Heroes 2, which redraws the screen inside SDL_PumpEvents(): slow and compatible SDL event queue -
# do not use it with accelerometer/gyroscope, or your app may freeze at random (y)/(n)
CompatibilityHacksSlowCompatibleEventQueue=n
# Save and restore OpenGL state when drawing on-screen keyboard for apps that use SDL_OPENGL
CompatibilityHacksTouchscreenKeyboardSaveRestoreOpenGLState=y
# Application uses mouse (y) or (n), this will show mouse emulation dialog to the user
AppUsesMouse=y
# Application needs two-button mouse, will also enable advanced point-and-click features (y) or (n)
AppNeedsTwoButtonMouse=y
# Show SDL mouse cursor, for applications that do not draw cursor at all (y) or (n)
ShowMouseCursor=n
# Force relative (laptop) mouse movement mode, useful when both on-screen keyboard and mouse are needed (y) or (n)
ForceRelativeMouseMode=n
# Application needs arrow keys (y) or (n), will show on-screen dpad/joystick (y) or (n)
AppNeedsArrowKeys=n
# Application needs text input (y) or (n), enables button for text input on screen
AppNeedsTextInput=y
# Application uses joystick (y) or (n), the on-screen DPAD will be used as joystick 0 axes 0-1
AppUsesJoystick=n
# Application uses second on-screen joystick, as SDL joystick 0 axes 2-3 (y)/(n)
AppUsesSecondJoystick=n
# Application uses accelerometer (y) or (n), the accelerometer will be used as joystick 1 axes 0-1 and 5-7
AppUsesAccelerometer=n
# Application uses gyroscope (y) or (n), the gyroscope will be used as joystick 1 axes 2-4
AppUsesGyroscope=n
# Application uses multitouch (y) or (n), multitouch events are passed as SDL_JOYBALLMOTION events for the joystick 0
AppUsesMultitouch=y
# Application records audio (it will use any available source, such a s microphone)
# API is defined in file SDL_android.h: int SDL_ANDROID_OpenAudioRecording(SDL_AudioSpec *spec); void SDL_ANDROID_CloseAudioRecording(void);
# This option will add additional permission to Android manifest (y)/(n)
AppRecordsAudio=n
# Application implements Android-specific routines to put to background, and will not draw anything to screen
# between SDL_ACTIVEEVENT lost / gained notifications - you should check for them
# right after SDL_Flip(), if (n) then SDL_Flip() will block till app in background (y) or (n)
# This option is reported to be buggy, sometimes failing to restore video state
NonBlockingSwapBuffers=n
# Redefine common hardware keys to SDL keysyms
# BACK hardware key is available on all devices, MENU is available on pre-ICS devices, other keys may be absent
# SEARCH and CALL by default return same keycode as DPAD_CENTER - one of those keys is available on most devices
# Use word NO_REMAP if you want to preserve native functionality for certain key (volume keys are 3-rd and 4-th)
# Keys: TOUCHSCREEN (works only when AppUsesMouse=n), DPAD_CENTER/SEARCH, VOLUMEUP, VOLUMEDOWN, MENU, BACK, CAMERA
RedefinedKeys="SPACE RETURN NO_REMAP NO_REMAP ESCAPE F13 F7 F4 F2 MOUSE_LEFT"
# Number of virtual keyboard keys (currently 6 is maximum)
AppTouchscreenKeyboardKeysAmount=0
# Number of virtual keyboard keys that support autofire (currently 2 is maximum)
AppTouchscreenKeyboardKeysAmountAutoFire=0
# Redefine on-screen keyboard keys to SDL keysyms - 6 keyboard keys + 4 multitouch gestures (zoom in/out and rotate left/right)
RedefinedKeysScreenKb="MOUSE_RIGHT F7 F13"
# Names for on-screen keyboard keys, such as Fire, Jump, Run etc, separated by spaces, they are used in SDL config menu
RedefinedKeysScreenKbNames="MOUSE_RIGHT F7 F13"
# On-screen keys theme
# 0 = Ultimate Droid by Sean Stieber (green, with gamepad joystick)
# 1 = Simple Theme by Beholder (white, with gamepad joystick)
# 2 = Sun by Sirea (yellow, with round joystick)
# 3 = Keen by Gerstrong (multicolor, with round joystick)
TouchscreenKeysTheme=1
# Redefine gamepad keys to SDL keysyms, button order is:
# A B X Y L1 R1 L2 R2 LThumb RThumb
RedefinedKeysGamepad="MOUSE_RIGHT F7 F13 ESCAPE F5 SPACE RETURN MOUSE_LEFT"
# How long to show startup menu button, in msec, 0 to disable startup menu
StartupMenuButtonTimeout=3000
# Menu items to hide from startup menu, available menu items:
# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout
HiddenMenuOptions='SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMouse.DisplaySizeConfig'
# Menu items to show at startup - this is Java code snippet, leave empty for default
# new SettingsMenuMisc.ShowReadme(), (AppUsesMouse \&\& \! ForceRelativeMouseMode \? new SettingsMenuMouse.DisplaySizeConfig(true) : new SettingsMenu.DummyMenu()), new SettingsMenuMisc.OptionalDownloadConfig(true), new SettingsMenuMisc.GyroscopeCalibration()
# Available menu items:
# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout
FirstStartMenuOptions=''
# Enable multi-ABI binary, with hardware FPU support - it will also work on old devices,
# but .apk size is 2x bigger (y) / (n) / (x86) / (all)
MultiABI="armeabi-v7a arm64-v8a x86 x86_64"
# Minimum amount of RAM application requires, in Mb, SDL will print warning to user if it's lower
AppMinimumRAM=256
# Application version code (integer)
AppVersionCode=@ANDROID_VERSIONCODE@
# Application user-visible version name (string)
AppVersionName="@VERSION@"
# Reset SDL config when updating application to the new version (y) / (n)
ResetSdlConfigForThisVersion=y
# Delete application data files when upgrading (specify file/dir paths separated by spaces)
DeleteFilesOnUpgrade="%"
# Optional shared libraries to compile - removing some of them will save space
# MP3 support by libMAD is encumbered by patents and libMAD is GPL-ed
# Available libraries: mad (GPL-ed!) sdl_mixer sdl_image sdl_ttf sdl_net sdl_blitpool sdl_gfx sdl_sound intl xml2 lua jpeg png ogg flac tremor vorbis freetype xerces curl theora fluidsynth lzma lzo2 mikmod openal timidity zzip bzip2 yaml-cpp python boost_date_time boost_filesystem boost_iostreams boost_program_options boost_regex boost_signals boost_system boost_thread glu avcodec avdevice avfilter avformat avresample avutil swscale swresample bzip2
#CompiledLibraries="mad vorbis flac ogg jpeg png theora freetype faad curl sdl_net"
CompiledLibraries="mad vorbis flac ogg jpeg png theora freetype faad"
# Application uses custom build script AndroidBuild.sh instead of Android.mk (y) or (n)
CustomBuildScript=y
# Aditional CFLAGS for application
AppCflags=''
# Additional LDFLAGS for application
AppLdflags=''
# If application has headers with the same name as system headers, this option tries to fix compiler flags to make it compilable
AppOverlapsSystemHeaders=
# Build only following subdirs (empty will build all dirs, ignored with custom script)
AppSubdirsBuild=''
# Exclude these files from build
AppBuildExclude=''
# Application command line parameters, including app name as 0-th param
AppCmdline=''
# Here you may type readme text, which will be shown during startup. Format is:
# Text in English, use \\\\n to separate lines^de:Text in Deutsch^ru:Text in Russian, and so on (that's four backslashes, nice isn't it?)
ReadmeText='^You may press "Home" now - the data will be downloaded in background'
# Screen size is used by Google Play to prevent an app to be installed on devices with smaller screens
# Minimum screen size that application supports: (s)mall / (m)edium / (l)arge
MinimumScreenSize=s
# Your AdMob Publisher ID, (n) if you don't want advertisements
AdmobPublisherId=n
# Your AdMob test device ID, to receive a test ad
AdmobTestDeviceId=
# Your AdMob banner size (BANNER/IAB_BANNER/IAB_LEADERBOARD/IAB_MRECT/IAB_WIDE_SKYSCRAPER/SMART_BANNER)
AdmobBannerSize=
# Use gl4es library for provide OpenGL 1.x functionality to OpenGL ES accelerated cards (y) or (n)
UseGl4es=n
# Application needs to access SD card. If your data files are bigger than 5 Mb, enable it. (y) / (n)
AccessSdCard=y
# Hide Android system mouse cursor image when USB mouse is attached (y) or (n) - the app must draw it's own mouse cursor
HideSystemMousePointer=y

View File

@ -1,22 +0,0 @@
#!/bin/sh
LOCAL_PATH=`dirname $0`
LOCAL_PATH=`cd $LOCAL_PATH && pwd`
ANDROIDSDL=../../../../androidsdl
#ln -sf libtremor.a $ANDROIDSDL/project/obj/local/$1/libvorbisidec.a
ln -sf libflac.a $ANDROIDSDL/project/obj/local/$1/libFLAC.a
ln -sf libvorbis.a $ANDROIDSDL/project/obj/local/$1/libvorbisfile.a
ln -sf libtheora.so $ANDROIDSDL/project/obj/local/$1/libtheoradec.so
ln -sf libsdl_net.so $ANDROIDSDL/project/obj/local/$1/libSDL_net.so
ln -sf libglshim.a $ANDROIDSDL/project/obj/local/$1/libGL.a
mkdir -p scummvm/bin-$1
if [ \! -f scummvm/bin-$1/config.mk ] ; then
$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-mt32emu --disable-readline --disable-nasm --disable-timidity --disable-fluidsynth --datadir=. "
fi
$ANDROIDSDL/project/jni/application/setEnvironment-$1.sh make -j4 -C scummvm/bin-$1
make -C scummvm/bin-$1 androidsdl
mv -f scummvm/bin-$1/scummvm*.z* AndroidData
cp -f scummvm/bin-$1/scummvm libapplication-$1.so

View File

@ -1,22 +0,0 @@
#!/bin/sh
LOCAL_PATH=`dirname $0`
LOCAL_PATH=`cd $LOCAL_PATH && pwd`
ANDROIDSDL=../../../../androidsdl
#ln -sf libtremor.a $ANDROIDSDL/project/obj/local/$1/libvorbisidec.a
ln -sf libflac.a $ANDROIDSDL/project/obj/local/$1/libFLAC.a
ln -sf libvorbis.a $ANDROIDSDL/project/obj/local/$1/libvorbisfile.a
ln -sf libtheora.so $ANDROIDSDL/project/obj/local/$1/libtheoradec.so
ln -sf libsdl_net.so $ANDROIDSDL/project/obj/local/$1/libSDL_net.so
ln -sf libglshim.a $ANDROIDSDL/project/obj/local/$1/libGL.a
mkdir -p scummvm/bin-$1
if [ \! -f scummvm/bin-$1/config.mk ] ; then
$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-optimizations --enable-release --enable-zlib --enable-vorbis --enable-mad --enable-flac --enable-png --enable-theoradec --disable-sdlnet --disable-libcurl --disable-cloud --enable-vkeybd --enable-mt32emu --disable-readline --disable-nasm --disable-timidity --disable-fluidsynth --datadir=. "
fi
$ANDROIDSDL/project/jni/application/setEnvironment-$1.sh make -j4 -C scummvm/bin-$1
make -C scummvm/bin-$1 androidsdl
mv -f scummvm/bin-$1/scummvm*.z* AndroidData
cp -f scummvm/bin-$1/scummvm libapplication-$1.so

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

View File

@ -1,8 +0,0 @@
--- a/project/AndroidManifest.xml 2018-01-01 17:35:08.893995813 +0200
+++ a/project/AndroidManifest.xml 2018-01-01 17:35:41.888969151 +0200
@@ -6,4 +6,5 @@
android:installLocation="auto"
+ android:sharedUserId="org.scummvm.scummvm"
>
<application android:label="@string/app_name"
android:icon="@drawable/icon"

View File

@ -339,11 +339,10 @@ Common::Error BladeRunnerEngine::run() {
if (!tmpSupportedFormatsList.empty()) {
_screenPixelFormat = tmpSupportedFormatsList.front();
} else {
// Workaround for reported issue whereby in the AndroidSDL port
// some devices would crash with a segmentation fault due to an empty supported formats list.
// Workaround for some devices which return an empty supported formats list.
// TODO: A better fix for getSupportedFormats() - maybe figure why in only some device it might return an empty list
//
// Use this as a fallback format - Should be a format supported by Android port
// Use this as a fallback format - Should be a format supported
_screenPixelFormat = Graphics::PixelFormat(2, 5, 5, 5, 1, 11, 6, 1, 0);
}
debug("Using pixel format: %s", _screenPixelFormat.toString().c_str());

View File

@ -1997,7 +1997,7 @@ void GlobalOptionsDialog::build() {
}
//
// The control tab (currently visible only for AndroidSDL, SDL, and Vita platform, visibility checking by features
// The control tab (currently visible only for SDL and Vita platform, visibility checking by features
//
if (g_system->hasFeature(OSystem::kFeatureTouchpadMode) ||
g_system->hasFeature(OSystem::kFeatureOnScreenControl) ||