ANDROID3D: Get it working again (#2529)
This commit is contained in:
parent
9fb035b10a
commit
3e7948cf6a
11 changed files with 139 additions and 162 deletions
|
@ -229,6 +229,11 @@ MODULE_OBJS += \
|
||||||
mutex/pthread/pthread-mutex.o
|
mutex/pthread/pthread-mutex.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(BACKEND),android3d)
|
||||||
|
MODULE_OBJS += \
|
||||||
|
mutex/pthread/pthread-mutex.o
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(BACKEND),androidsdl)
|
ifeq ($(BACKEND),androidsdl)
|
||||||
MODULE_OBJS += \
|
MODULE_OBJS += \
|
||||||
events/androidsdl/androidsdl-events.o
|
events/androidsdl/androidsdl-events.o
|
||||||
|
|
|
@ -400,7 +400,7 @@ bool OSystem_Android::hasFeature(Feature f) {
|
||||||
f == kFeatureTouchpadMode ||
|
f == kFeatureTouchpadMode ||
|
||||||
f == kFeatureOnScreenControl ||
|
f == kFeatureOnScreenControl ||
|
||||||
f == kFeatureClipboardSupport ||
|
f == kFeatureClipboardSupport ||
|
||||||
f == kFeatureOpenGL ||
|
f == kFeatureOpenGLForGame ||
|
||||||
f == kFeatureOverlaySupportsAlpha ||
|
f == kFeatureOverlaySupportsAlpha ||
|
||||||
f == kFeatureClipboardSupport) {
|
f == kFeatureClipboardSupport) {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -1,88 +1,88 @@
|
||||||
# Android specific build targets
|
# Android specific build targets
|
||||||
|
|
||||||
# These must be incremented for each market upload
|
|
||||||
ANDROID_VERSIONCODE ?= 50000
|
|
||||||
ANDROID_VERSIONNAME ?= 0.4
|
|
||||||
|
|
||||||
PATH_DIST = $(srcdir)/dists/android3d
|
PATH_DIST = $(srcdir)/dists/android3d
|
||||||
|
|
||||||
PORT_DISTFILES = $(PATH_DIST)/README.Android
|
PORT_DISTFILES = $(PATH_DIST)/README.Android
|
||||||
DIST_ANDROID_CONTROLS = $(PATH_DIST)/assets/arrows.tga
|
DIST_ANDROID_CONTROLS = $(PATH_DIST)/assets/arrows.tga
|
||||||
GRADLE = $(PATH_DIST)/gradlew
|
|
||||||
|
|
||||||
|
GRADLE_FILES = $(shell find $(PATH_DIST)/gradle -type f) $(PATH_DIST)/gradlew $(PATH_DIST)/build.gradle
|
||||||
|
|
||||||
PATH_BUILD = ./android3d
|
PATH_BUILD = ./android_project
|
||||||
|
PATH_BUILD_GRADLE = $(PATH_BUILD)/build.gradle
|
||||||
PATH_BUILD_ASSETS = $(PATH_BUILD)/assets
|
PATH_BUILD_ASSETS = $(PATH_BUILD)/assets
|
||||||
PATH_BUILD_JNI = $(PATH_BUILD)/jni/$(ABI)/libresidualvm.so
|
PATH_BUILD_LIB = $(PATH_BUILD)/lib/$(ABI)
|
||||||
PATH_BUILD_GRADLE = $(PATH_BUILD)/settings.gradle
|
PATH_BUILD_LIBSCUMMVM = $(PATH_BUILD)/lib/$(ABI)/libscummvm.so
|
||||||
PATH_BUILD_SETUPAPK = $(PATH_BUILD)/.setupapk
|
|
||||||
|
|
||||||
APK_MAIN = $(PATH_BUILD)/build/outputs/apk/debug/ResidualVM-debug.apk
|
APK_MAIN = ResidualVM-debug.apk
|
||||||
APK_MAIN_RELEASE = $(PATH_BUILD)/build/outputs/apk/release/ResidualVM-release$(if $(KEYSTORE),,-unsigned).apk
|
APK_MAIN_RELEASE = ResidualVM-release-unsigned.apk
|
||||||
|
|
||||||
$(PATH_BUILD_ASSETS): $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) $(DIST_FILES_SHADERS) $(DIST_ANDROID_CONTROLS) | $(PATH_BUILD)
|
$(PATH_BUILD):
|
||||||
|
$(MKDIR) $(PATH_BUILD)
|
||||||
|
|
||||||
|
$(PATH_BUILD_GRADLE): $(GRADLE_FILES) | $(PATH_BUILD)
|
||||||
|
$(CP) -r $(PATH_DIST)/gradle/ $(PATH_BUILD)/gradle/
|
||||||
|
$(INSTALL) -c -m 755 $(PATH_DIST)/gradlew $(PATH_BUILD)
|
||||||
|
$(INSTALL) -c -m 644 $(PATH_DIST)/build.gradle $(PATH_BUILD)
|
||||||
|
$(ECHO) "srcdir=$(realpath $(srcdir))\n" > $(PATH_BUILD)/gradle.properties
|
||||||
|
$(ECHO) "org.gradle.jvmargs=-Xmx4096m\n" >> $(PATH_BUILD)/gradle.properties
|
||||||
|
# $(ECHO) "android.useAndroidX=true\n" >> $(PATH_BUILD)/gradle.properties
|
||||||
|
# $(ECHO) "android.enableJetifier=true\n" >> $(PATH_BUILD)/gradle.properties
|
||||||
|
$(ECHO) "sdk.dir=$(realpath $(ANDROID_SDK_ROOT))\n" > $(PATH_BUILD)/local.properties
|
||||||
|
$(ECHO) "ndk.dir=$(realpath $(ANDROID_NDK_ROOT))\n" >> $(PATH_BUILD)/local.properties
|
||||||
|
|
||||||
|
$(PATH_BUILD_ASSETS): $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) $(DIST_FILES_NETWORKING) $(DIST_FILES_VKEYBD) $(DIST_FILES_DOCS) $(DIST_ANDROID_CONTROLS) $(PORT_DISTFILES) | $(PATH_BUILD)
|
||||||
$(INSTALL) -d $(PATH_BUILD_ASSETS)
|
$(INSTALL) -d $(PATH_BUILD_ASSETS)
|
||||||
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) $(DIST_ANDROID_CONTROLS) $(PATH_BUILD_ASSETS)/
|
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(DIST_FILES_ENGINEDATA) $(DIST_FILES_NETWORKING) $(DIST_FILES_VKEYBD) $(DIST_FILES_DOCS) $(DIST_ANDROID_CONTROLS) $(PORT_DISTFILES) $(PATH_BUILD_ASSETS)/
|
||||||
ifdef USE_OPENGL_SHADERS
|
ifneq ($(DIST_FILES_SHADERS),)
|
||||||
$(INSTALL) -d $(PATH_BUILD_ASSETS)/shaders
|
$(INSTALL) -d $(PATH_BUILD_ASSETS)/shaders
|
||||||
$(INSTALL) -c -m 644 $(DIST_FILES_SHADERS) $(PATH_BUILD_ASSETS)/shaders
|
$(INSTALL) -c -m 644 $(DIST_FILES_SHADERS) $(PATH_BUILD_ASSETS)/shaders
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(PATH_BUILD):
|
$(PATH_BUILD_LIBSCUMMVM): libscummvm.so | $(PATH_BUILD)
|
||||||
$(INSTALL) -d $(PATH_BUILD_ASSETS)
|
$(INSTALL) -d $(PATH_BUILD_LIB)
|
||||||
|
$(INSTALL) -c -m 644 libscummvm.so $(PATH_BUILD_LIBSCUMMVM)
|
||||||
|
|
||||||
$(PATH_BUILD_JNI): libresidualvm.so
|
$(APK_MAIN): $(PATH_BUILD_GRADLE) $(PATH_BUILD_ASSETS) $(PATH_BUILD_LIBSCUMMVM) | $(PATH_BUILD)
|
||||||
$(INSTALL) -d $(dir $(PATH_BUILD_JNI))
|
(cd $(PATH_BUILD); ./gradlew assembleDebug)
|
||||||
$(INSTALL) -C -m 644 libresidualvm.so $(PATH_BUILD_JNI)
|
$(CP) $(PATH_BUILD)/build/outputs/apk/debug/ResidualVM-debug.apk $@
|
||||||
|
|
||||||
$(PATH_BUILD_GRADLE): $(PATH_BUILD_ASSETS) $(PATH_DIST)/build.gradle
|
$(APK_MAIN_RELEASE): $(PATH_BUILD_GRADLE) $(PATH_BUILD_ASSETS) $(PATH_BUILD_LIBSCUMMVM) | $(PATH_BUILD)
|
||||||
$(eval ABIS = $(notdir $(wildcard $(PATH_BUILD)/jni/*)))
|
(cd $(PATH_BUILD); ./gradlew build)
|
||||||
@echo "gradle.ext.versionCode = $(ANDROID_VERSIONCODE)" > $@
|
$(CP) $(PATH_BUILD)/build/outputs/apk/release/ResidualVM-release-unsigned.apk $@
|
||||||
@echo "gradle.ext.versionName = '$(ANDROID_VERSIONNAME)'" >> $@
|
|
||||||
@echo "gradle.ext.sourceDir = '$(abspath $(srcdir))'" >> $@
|
|
||||||
@echo "gradle.ext.buildDir = '$(CURDIR)'" >> $@
|
|
||||||
@echo "gradle.ext.androidAbi = '$(ABIS)'" >> $@
|
|
||||||
@echo "include ':ResidualVM'" >> $@
|
|
||||||
@echo "project(':ResidualVM').projectDir = new File('$(abspath $(PATH_DIST))')" >> $@
|
|
||||||
@echo "ndk.dir=$(ANDROID_NDK)" > $(PATH_BUILD)/local.properties
|
|
||||||
@echo "sdk.dir=$(ANDROID_SDK)" >> $(PATH_BUILD)/local.properties
|
|
||||||
|
|
||||||
|
|
||||||
$(PATH_BUILD_SETUPAPK): $(PATH_BUILD_ASSETS) $(PATH_BUILD_JNI) $(PATH_BUILD_GRADLE) | $(PATH_BUILD)
|
|
||||||
touch $(PATH_BUILD_SETUPAPK)
|
|
||||||
|
|
||||||
$(APK_MAIN): $(PATH_BUILD_SETUPAPK) libresidualvm.so
|
|
||||||
$(GRADLE) assembleDebug -p "$(PATH_BUILD)" && touch $@
|
|
||||||
|
|
||||||
$(APK_MAIN_RELEASE): $(PATH_BUILD_SETUPAPK) libresidualvm.so
|
|
||||||
$(GRADLE) assembleRelease -p "$(PATH_BUILD)" && touch $@
|
|
||||||
|
|
||||||
all: $(APK_MAIN)
|
all: $(APK_MAIN)
|
||||||
|
|
||||||
clean: androidclean
|
clean: androidclean
|
||||||
|
|
||||||
androidclean:
|
androidclean:
|
||||||
@$(RM) -rf $(PATH_BUILD)
|
@$(RM) -rf $(PATH_BUILD) *.apk
|
||||||
|
|
||||||
androiddebug: $(APK_MAIN)
|
|
||||||
androidrelease: $(APK_MAIN_RELEASE)
|
androidrelease: $(APK_MAIN_RELEASE)
|
||||||
|
|
||||||
androidtestmain: $(APK_MAIN)
|
androidtestmain: $(APK_MAIN)
|
||||||
$(GRADLE) installDebug -p "$(PATH_BUILD)"
|
(cd $(PATH_BUILD); ./gradlew installDebug)
|
||||||
$(ADB) shell am start -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -n org.residualvm.residualvm/.Unpacker
|
# $(ADB) install -g -r $(APK_MAIN)
|
||||||
|
# $(ADB) shell am start -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -n org.residualvm.residualvm/.ResidualVMActivity
|
||||||
|
|
||||||
androidtest: $(APK_MAIN) $(APK_PLUGINS)
|
androidtest: $(APK_MAIN)
|
||||||
@set -e; for apk in $^; do \
|
# @set -e; for apk in $^; do \
|
||||||
$(ADB) install -r $$apk; \
|
# $(ADB) install -g -r $$apk; \
|
||||||
done
|
# done
|
||||||
$(ADB) shell am start -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -n org.residualvm.residualvm/.Unpacker
|
# $(ADB) shell am start -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -n org.residualvm.residualvm/.ResidualVMActivity
|
||||||
|
(cd $(PATH_BUILD); ./gradlew installDebug)
|
||||||
|
|
||||||
# used by buildbot!
|
# used by buildbot!
|
||||||
androiddistdebug: all
|
androiddistdebug: all
|
||||||
$(MKDIR) debug
|
$(MKDIR) debug
|
||||||
$(CP) $(APK_MAIN) $(APK_PLUGINS) debug/
|
$(CP) $(APK_MAIN) debug/
|
||||||
for i in $(DIST_FILES_DOCS) $(PORT_DISTFILES); do \
|
for i in $(DIST_FILES_DOCS) $(PORT_DISTFILES); do \
|
||||||
sed 's/$$/\r/' < $$i > debug/`basename $$i`.txt; \
|
sed 's/$$/\r/' < $$i > debug/`basename $$i`.txt; \
|
||||||
done
|
done
|
||||||
|
|
||||||
.PHONY: androidrelease androidtest
|
androiddistrelease: androidrelease
|
||||||
|
$(MKDIR) release
|
||||||
|
$(CP) $(APK_MAIN_RELEASE) release/
|
||||||
|
for i in $(DIST_FILES_DOCS) $(PORT_DISTFILES); do \
|
||||||
|
sed 's/$$/\r/' < $$i > release/`basename $$i`.txt; \
|
||||||
|
done
|
||||||
|
|
||||||
|
.PHONY: androidrelease androidtest $(PATH_BUILD_SRC)
|
||||||
|
|
|
@ -15,6 +15,7 @@ import javax.microedition.khronos.egl.EGLDisplay;
|
||||||
import javax.microedition.khronos.egl.EGLSurface;
|
import javax.microedition.khronos.egl.EGLSurface;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -57,13 +58,14 @@ public abstract class ResidualVM implements SurfaceHolder.Callback, Runnable {
|
||||||
abstract protected void displayMessageOnOSD(String msg);
|
abstract protected void displayMessageOnOSD(String msg);
|
||||||
abstract protected void openUrl(String url);
|
abstract protected void openUrl(String url);
|
||||||
abstract protected boolean hasTextInClipboard();
|
abstract protected boolean hasTextInClipboard();
|
||||||
abstract protected byte[] getTextFromClipboard();
|
abstract protected String getTextFromClipboard();
|
||||||
abstract protected boolean setTextInClipboard(byte[] text);
|
abstract protected boolean setTextInClipboard(String text);
|
||||||
abstract protected boolean isConnectionLimited();
|
abstract protected boolean isConnectionLimited();
|
||||||
abstract protected void setWindowCaption(String caption);
|
abstract protected void setWindowCaption(String caption);
|
||||||
abstract protected void showVirtualKeyboard(boolean enable);
|
abstract protected void showVirtualKeyboard(boolean enable);
|
||||||
abstract protected void showKeyboardControl(boolean enable);
|
abstract protected void showKeyboardControl(boolean enable);
|
||||||
abstract protected String[] getSysArchives();
|
abstract protected String[] getSysArchives();
|
||||||
|
abstract protected byte[] convertEncoding(String to, String from, byte[] string) throws UnsupportedEncodingException;
|
||||||
abstract protected String[] getAllStorageLocations();
|
abstract protected String[] getAllStorageLocations();
|
||||||
|
|
||||||
public ResidualVM(AssetManager asset_manager, SurfaceHolder holder) {
|
public ResidualVM(AssetManager asset_manager, SurfaceHolder holder) {
|
||||||
|
@ -461,6 +463,6 @@ public abstract class ResidualVM implements SurfaceHolder.Callback, Runnable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
System.loadLibrary("residualvm");
|
System.loadLibrary("scummvm");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,7 @@ import android.widget.HorizontalScrollView;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
@ -171,33 +172,17 @@ public class ResidualVMActivity extends Activity {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected byte[] getTextFromClipboard() {
|
protected String getTextFromClipboard() {
|
||||||
CharSequence text = _clipboard.getText();
|
CharSequence text = _clipboard.getText();
|
||||||
if (text != null) {
|
if (text != null) {
|
||||||
String encoding = getCurrentCharset();
|
return text.toString();
|
||||||
byte[] out;
|
|
||||||
Log.d(LOG_TAG, String.format("Converting from UTF-8 to %s", encoding));
|
|
||||||
try {
|
|
||||||
out = text.toString().getBytes(encoding);
|
|
||||||
} catch (java.io.UnsupportedEncodingException e) {
|
|
||||||
out = text.toString().getBytes();
|
|
||||||
}
|
|
||||||
return out;
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean setTextInClipboard(byte[] text) {
|
protected boolean setTextInClipboard(String text) {
|
||||||
String encoding = getCurrentCharset();
|
_clipboard.setText(text);
|
||||||
String out;
|
|
||||||
Log.d(LOG_TAG, String.format("Converting from %s to UTF-8", encoding));
|
|
||||||
try {
|
|
||||||
out = new String(text, encoding);
|
|
||||||
} catch (java.io.UnsupportedEncodingException e) {
|
|
||||||
out = new String(text);
|
|
||||||
}
|
|
||||||
_clipboard.setText(out);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -243,6 +228,12 @@ public class ResidualVMActivity extends Activity {
|
||||||
return new String[0];
|
return new String[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected byte[] convertEncoding(String to, String from, byte[] string) throws UnsupportedEncodingException {
|
||||||
|
String str = new String(string, from);
|
||||||
|
return str.getBytes(to);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String[] getAllStorageLocations() {
|
protected String[] getAllStorageLocations() {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
|
||||||
|
@ -322,7 +313,7 @@ public class ResidualVMActivity extends Activity {
|
||||||
"ResidualVM",
|
"ResidualVM",
|
||||||
"--config=" + getFileStreamPath("residualvmrc").getPath(),
|
"--config=" + getFileStreamPath("residualvmrc").getPath(),
|
||||||
"--path=" + Environment.getExternalStorageDirectory().getPath(),
|
"--path=" + Environment.getExternalStorageDirectory().getPath(),
|
||||||
"--gui-theme=modern",
|
"--gui-theme=residualvm",
|
||||||
"--savepath=" + savePath
|
"--savepath=" + savePath
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
18
configure
vendored
18
configure
vendored
|
@ -3251,8 +3251,10 @@ if test -n "$_host"; then
|
||||||
append_var LDFLAGS "-static-libstdc++"
|
append_var LDFLAGS "-static-libstdc++"
|
||||||
HOSTEXEPRE=lib
|
HOSTEXEPRE=lib
|
||||||
HOSTEXEEXT=.so
|
HOSTEXEEXT=.so
|
||||||
_backend="android"
|
if test "$_backend" != android3d; then
|
||||||
_port_mk="backends/platform/android/android.mk"
|
_backend="android"
|
||||||
|
fi
|
||||||
|
_port_mk="backends/platform/$_backend/android.mk"
|
||||||
_build_scalers=no
|
_build_scalers=no
|
||||||
_seq_midi=no
|
_seq_midi=no
|
||||||
_timidity=no
|
_timidity=no
|
||||||
|
@ -3652,10 +3654,10 @@ fi
|
||||||
case $_backend in
|
case $_backend in
|
||||||
3ds)
|
3ds)
|
||||||
;;
|
;;
|
||||||
android)
|
android | android3d)
|
||||||
append_var DEFINES "-DREDUCE_MEMORY_USAGE"
|
append_var DEFINES "-DREDUCE_MEMORY_USAGE"
|
||||||
append_var DEFINES "-DNONSTANDARD_PORT"
|
append_var DEFINES "-DNONSTANDARD_PORT"
|
||||||
append_var INCLUDES '-I$(srcdir)/backends/platform/android'
|
append_var INCLUDES '-I$(srcdir)/backends/platform/'$_backend
|
||||||
append_var CXXFLAGS "-Wa,--noexecstack"
|
append_var CXXFLAGS "-Wa,--noexecstack"
|
||||||
append_var LDFLAGS "-Wl,-z,noexecstack"
|
append_var LDFLAGS "-Wl,-z,noexecstack"
|
||||||
# removed the following directive - was causing compilation issues when not also explicitly using --disable-mt32emu
|
# removed the following directive - was causing compilation issues when not also explicitly using --disable-mt32emu
|
||||||
|
@ -3924,7 +3926,7 @@ fi
|
||||||
# Enable 16bit support only for backends which support it
|
# Enable 16bit support only for backends which support it
|
||||||
#
|
#
|
||||||
case $_backend in
|
case $_backend in
|
||||||
3ds | android | androidsdl | dingux | dc | gph | iphone | ios7 | maemo | null | openpandora | psp | psp2 | samsungtv | sdl | switch | wii)
|
3ds | android | android3d | androidsdl | dingux | dc | gph | iphone | ios7 | maemo | null | openpandora | psp | psp2 | samsungtv | sdl | switch | wii)
|
||||||
if test "$_16bit" = auto ; then
|
if test "$_16bit" = auto ; then
|
||||||
_16bit=yes
|
_16bit=yes
|
||||||
else
|
else
|
||||||
|
@ -5382,9 +5384,9 @@ define_in_config_if_yes "$_glew" "USE_GLEW"
|
||||||
#
|
#
|
||||||
echocheck "OpenGL for game"
|
echocheck "OpenGL for game"
|
||||||
|
|
||||||
if test "$_opengl_game" = auto && test "$_opengl" = yes ; then
|
if test "$_opengl_game" = auto ; then
|
||||||
_opengl_game=no
|
_opengl_game=no
|
||||||
if test "$_backend" = "sdl" || test "$_backend" = "android"; then
|
if (test "$_backend" = "sdl" && test "$_opengl" = yes) || test "$_backend" = "android3d"; then
|
||||||
# Try different header filenames
|
# Try different header filenames
|
||||||
# 1) GL/gl.h This is usually used on POSIX and Windows systems
|
# 1) GL/gl.h This is usually used on POSIX and Windows systems
|
||||||
# 2) OpenGL/gl.h This is used on Mac OS X
|
# 2) OpenGL/gl.h This is used on Mac OS X
|
||||||
|
@ -5410,7 +5412,7 @@ EOF
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$_opengl_game" = yes && test "$_opengl" = yes ; then
|
if test "$_opengl_game" = yes ; then
|
||||||
# Our simple test case
|
# Our simple test case
|
||||||
cat > $TMPC << EOF
|
cat > $TMPC << EOF
|
||||||
int main(void) { return 0; }
|
int main(void) { return 0; }
|
||||||
|
|
|
@ -1,70 +1,63 @@
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
|
dependencies {
|
||||||
dependencies {
|
classpath 'com.android.tools.build:gradle:4.0.1'
|
||||||
classpath 'com.android.tools.build:gradle:3.3.2'
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
dependencies {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
buildDir = "${gradle.buildDir}/android3d/build"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Enable to see use of depracted API
|
||||||
|
// tasks.withType(JavaCompile) {
|
||||||
|
// options.compilerArgs << "-Xlint:deprecation"
|
||||||
|
// }
|
||||||
|
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 28
|
compileSdkVersion 29
|
||||||
ndkVersion "21.3.6528147"
|
buildToolsVersion "29.0.3"
|
||||||
defaultConfig {
|
ndkVersion "21.3.6528147"
|
||||||
applicationId 'com.residualvm.residualvm'
|
|
||||||
minSdkVersion 16
|
|
||||||
targetSdkVersion 28
|
|
||||||
versionCode gradle.versionCode
|
|
||||||
versionName gradle.versionName
|
|
||||||
ndk {
|
|
||||||
abiFilters gradle.androidAbi.split(" ")
|
|
||||||
}
|
|
||||||
aaptOptions {
|
|
||||||
noCompress "zip", "lab"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
lintOptions {
|
|
||||||
disable 'GoogleAppIndexingWarning'
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets {
|
defaultConfig {
|
||||||
main {
|
applicationId "org.residualvm.residualvm"
|
||||||
assets.srcDirs = ["${gradle.buildDir}/android3d/assets"]
|
|
||||||
java.srcDirs = ["${gradle.sourceDir}/backends/platform/android3d"]
|
setProperty("archivesBaseName", "ResidualVM")
|
||||||
res.srcDirs = ["${gradle.sourceDir}/dists/android3d/res"]
|
|
||||||
manifest.srcFile "${gradle.sourceDir}/dists/android3d/AndroidManifest.xml"
|
minSdkVersion 16
|
||||||
jniLibs.srcDirs = ["${gradle.buildDir}/android3d/jni"]
|
targetSdkVersion 28
|
||||||
}
|
|
||||||
}
|
versionName "0.4"
|
||||||
if ("KEYSTORE" in System.env) {
|
versionCode 50000
|
||||||
signingConfigs {
|
}
|
||||||
release {
|
buildTypes {
|
||||||
storeFile file(System.env["KEYSTORE"])
|
release {
|
||||||
keyAlias "upload_key"
|
minifyEnabled false
|
||||||
storePassword "ResidualVM"
|
}
|
||||||
keyPassword "ResidualVM"
|
}
|
||||||
}
|
sourceSets {
|
||||||
}
|
main {
|
||||||
buildTypes {
|
assets.srcDirs 'assets/'
|
||||||
release {
|
java.srcDirs srcdir + '/backends/platform/android3d/'
|
||||||
signingConfig signingConfigs.release
|
jniLibs.srcDirs 'lib/'
|
||||||
}
|
res.srcDirs srcdir + '/dists/android3d/res/'
|
||||||
}
|
manifest.srcFile srcdir + '/dists/android3d/AndroidManifest.xml'
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
lintOptions {
|
||||||
|
abortOnError false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "com.android.support:appcompat-v7:28.0.0"
|
// implementation "androidx.annotation:annotation:1.1.0"
|
||||||
|
implementation "com.android.support:appcompat-v7:28.0.0"
|
||||||
}
|
}
|
||||||
|
|
BIN
dists/android3d/gradle/wrapper/gradle-wrapper.jar
vendored
BIN
dists/android3d/gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
|
@ -1,5 +1,5 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-bin.zip
|
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
|
||||||
|
|
18
dists/android3d/gradlew
vendored
18
dists/android3d/gradlew
vendored
|
@ -1,21 +1,5 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
#
|
|
||||||
# Copyright 2015 the original author or authors.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
##
|
##
|
||||||
## Gradle start up script for UN*X
|
## Gradle start up script for UN*X
|
||||||
|
@ -44,7 +28,7 @@ APP_NAME="Gradle"
|
||||||
APP_BASE_NAME=`basename "$0"`
|
APP_BASE_NAME=`basename "$0"`
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
DEFAULT_JVM_OPTS=""
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD="maximum"
|
MAX_FD="maximum"
|
||||||
|
|
|
@ -3,7 +3,7 @@ LOCAL_PATH := $(call my-dir)
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
APP_ABI := $(ABI)
|
APP_ABI := $(ABI)
|
||||||
LOCAL_MODULE := residualvm
|
LOCAL_MODULE := scummvm
|
||||||
LOCAL_SRC_FILES := ../../libresidualvm.so
|
LOCAL_SRC_FILES := ../libscummvm.so
|
||||||
|
|
||||||
include $(PREBUILT_SHARED_LIBRARY)
|
include $(PREBUILT_SHARED_LIBRARY)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue