Final redo of Android building
|
@ -65,7 +65,7 @@ doc/doxygen_*
|
|||
## Build files
|
||||
CMakeFiles
|
||||
Makefile
|
||||
!build/android/Makefile
|
||||
!build/android/deprecated/Makefile
|
||||
cmake_install.cmake
|
||||
CMakeCache.txt
|
||||
CPackConfig.cmake
|
||||
|
@ -76,7 +76,6 @@ src/cmake_config.h
|
|||
src/cmake_config_githash.h
|
||||
src/lua/build/
|
||||
locale/
|
||||
!games/*/*/*/locale
|
||||
.directory
|
||||
.gradle/
|
||||
*.cbp
|
||||
|
@ -92,16 +91,12 @@ cmake-build-debug/
|
|||
cmake-build-release/
|
||||
|
||||
## Android build files
|
||||
build/android/src/main/assets
|
||||
build/android/build
|
||||
build/android/deps
|
||||
build/android/libs
|
||||
build/android/jni/lib
|
||||
build/android/jni/src
|
||||
build/android/src/main/jniLibs
|
||||
build/android/obj
|
||||
build/android/release
|
||||
build/android/local.properties
|
||||
build/android/.gradle
|
||||
build/android/app/src/main/assets
|
||||
build/android/app/build
|
||||
build/android/native/build
|
||||
build/android/native/deps
|
||||
timestamp
|
||||
|
@ -111,15 +106,13 @@ timestamp
|
|||
## iOS build files
|
||||
build/iOS/MultiCraft/MultiCraft.xcodeproj/xcuserdata
|
||||
build/iOS/MultiCraft/MultiCraft.xcodeproj/project.xcworkspace
|
||||
# build/iOS/MultiCraft/MultiCraft/Assets.xcassets/AppIcon.appiconset/*.png
|
||||
build/iOS/MultiCraft.xcworkspace
|
||||
build/iOS/Pods
|
||||
build/iOS/Podfile.lock
|
||||
build/iOS/deps/*
|
||||
!build/iOS/deps/*.sh
|
||||
build/iOS/assets.zip
|
||||
build/iOS/worlds.zip
|
||||
build/iOS/*.zip
|
||||
build/iOS/Ads
|
||||
|
||||
## WindowsApp files
|
||||
build/WindowsApp/multicraft-windows.zip
|
||||
build/WindowsApp/*.zip
|
||||
|
|
|
@ -5,7 +5,7 @@ if [ ! -d gradle ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
FOLDER=$(pwd)/src/main/assets
|
||||
FOLDER=$(pwd)/app/src/main/assets
|
||||
DEST=$(mktemp -d)
|
||||
|
||||
echo
|
||||
|
@ -16,7 +16,7 @@ echo "=> Getting precompiled dependencies:"
|
|||
if [ ! -d native/deps ]
|
||||
then
|
||||
echo
|
||||
git clone https://github.com/MultiCraft/deps native/deps
|
||||
git clone --depth 1 https://github.com/MultiCraft/deps native/deps
|
||||
echo
|
||||
echo "* Done!"
|
||||
else
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
apply plugin: 'com.android.application'
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion "29.0.1"
|
||||
|
||||
defaultConfig {
|
||||
applicationId 'com.multicraft.game'
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 29
|
||||
versionCode 1
|
||||
}
|
||||
Properties props = new Properties()
|
||||
props.load(new FileInputStream(file('../local.properties')))
|
||||
|
||||
if (props.getProperty('keystore') != null) {
|
||||
signingConfigs {
|
||||
release {
|
||||
storeFile file(props['keystore'])
|
||||
storePassword props['keystore.password']
|
||||
keyAlias props['key']
|
||||
keyPassword props['key.password']
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// for multiple APKs
|
||||
splits {
|
||||
abi {
|
||||
enable true
|
||||
reset()
|
||||
include 'armeabi-v7a', 'arm64-v8a'//, 'x86'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Map for the version code that gives each ABI a value.
|
||||
/*import com.android.build.OutputFile
|
||||
|
||||
def abiCodes = ['armeabi-v7a': 0, 'arm64-v8a': 1] //['armeabi-v7a': 0, 'arm64-v8a': 1, 'x86': 2*]
|
||||
android.applicationVariants.all { variant ->
|
||||
variant.outputs.each {
|
||||
output ->
|
||||
def abiName = output.getFilter(OutputFile.ABI)
|
||||
output.versionCodeOverride = abiCodes.get(abiName, 0) + variant.versionCode
|
||||
}
|
||||
}*/
|
||||
|
||||
dependencies {
|
||||
// MultiCraft Native
|
||||
implementation project(':native')
|
||||
// Analytics libraries
|
||||
implementation 'androidx.appcompat:appcompat:1.0.2'
|
||||
implementation 'com.google.firebase:firebase-core:17.0.1'
|
||||
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
|
||||
// Third-party libraries
|
||||
implementation 'com.itlgl:iosdialog:1.0.0'
|
||||
implementation 'gun0912.ted:tedpermission:2.2.2'
|
||||
implementation group: 'commons-io', name: 'commons-io', version: '2.4'
|
||||
}
|
|
@ -8,8 +8,8 @@
|
|||
<uses-permission
|
||||
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||
tools:node="replace" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
|
@ -41,7 +41,9 @@ public class DeleteTask extends AsyncTask<String, Void, Void> {
|
|||
File file = new File(path);
|
||||
if (file.exists()) {
|
||||
try {
|
||||
if (file.isDirectory())
|
||||
FileUtils.deleteDirectory(file);
|
||||
else FileUtils.deleteQuietly(file);
|
||||
} catch (IOException e) {
|
||||
Crashlytics.logException(e);
|
||||
}
|
|
@ -21,7 +21,6 @@ import android.os.Bundle;
|
|||
import android.os.Environment;
|
||||
import android.os.Handler;
|
||||
import android.provider.Settings;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.view.ContextThemeWrapper;
|
||||
import android.view.Display;
|
||||
|
@ -34,6 +33,8 @@ import android.widget.RelativeLayout;
|
|||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.crashlytics.android.Crashlytics;
|
||||
import com.gun0912.tedpermission.PermissionListener;
|
||||
import com.gun0912.tedpermission.TedPermission;
|
||||
|
@ -61,7 +62,7 @@ public class MainActivity extends Activity implements WVersionManager.ActivityLi
|
|||
private final static String WORLDS = EXTERNAL_STORAGE + "/worlds.zip";
|
||||
private final static String GAMES = EXTERNAL_STORAGE + "/games.zip";
|
||||
private final static String NOMEDIA = ".nomedia";
|
||||
private static final String UPDATE_LINK = "https://raw.githubusercontent.com/ubulem/coronahtml5/master/ver.txt";
|
||||
private static final String UPDATE_LINK = "https://raw.githubusercontent.com/MoNTE48/MultiCraft-links/master/Android.json";
|
||||
private static final String[] EU_COUNTRIES = new String[]{
|
||||
"AT", "BE", "BG", "HR", "CY", "CZ",
|
||||
"DK", "EE", "FI", "FR", "DE", "GR",
|
||||
|
@ -485,7 +486,7 @@ public class MainActivity extends Activity implements WVersionManager.ActivityLi
|
|||
if (isAll) {
|
||||
dt.execute(unzipLocation);
|
||||
} else {
|
||||
dt.execute(unzipLocation + "builtin", unzipLocation + "games", unzipLocation + "textures"/*, unzipLocation + "debug.txt"*/);
|
||||
dt.execute(unzipLocation + "builtin", unzipLocation + "games", unzipLocation + "debug.txt");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -562,7 +563,7 @@ public class MainActivity extends Activity implements WVersionManager.ActivityLi
|
|||
tv.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
}
|
||||
|
||||
void showConnectionDialog() {
|
||||
private void showConnectionDialog() {
|
||||
AlertDialogHelper dialogHelper = new AlertDialogHelper(this);
|
||||
dialogHelper.setListener(this);
|
||||
dialogHelper.setMessage(getString(R.string.conn_message));
|
|
@ -56,7 +56,7 @@ class Transliteration {
|
|||
* Не русские символы останутся прежними.
|
||||
*/
|
||||
static String toLatin(String text) {
|
||||
char[] charBuffer = text.toCharArray();
|
||||
char[] charBuffer = text.toCharArray();
|
||||
StringBuilder sb = new StringBuilder(text.length());
|
||||
for (char symbol : charBuffer) {
|
||||
int i = symbol - START_CHAR;
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
|
@ -0,0 +1,74 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector
|
||||
android:height="108dp"
|
||||
android:width="108dp"
|
||||
android:viewportHeight="108"
|
||||
android:viewportWidth="108"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#008577"
|
||||
android:pathData="M0,0h108v108h-108z"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
|
||||
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
|
||||
</vector>
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 134 B After Width: | Height: | Size: 134 B |
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background" />
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
|
||||
<background android:drawable="@drawable/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 124 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 32 KiB |
|
@ -13,7 +13,7 @@
|
|||
<string name="location">Доступ к местоположению обеспечивает Вам лучшее взаимодействие с игрой</string>
|
||||
<string name="close_game">Закрыть игру</string>
|
||||
<string name="settings">Настройки</string>
|
||||
<string name="denied">Вы не можете использовать MultiCraft без разрешения на запись. \nПожалуйста, включите его в [Настройки] -> [Разрешения]></string>
|
||||
<string name="denied">Вы не можете играть в MultiCraft без разрешения на запись. \nПожалуйста, включите его в [Настройки] -> [Разрешения]></string>
|
||||
<!-- диалог оценки -->
|
||||
<string name="rta_dialog_title">Оцените MultiCraft!</string>
|
||||
<string name="rate_title">Название</string>
|
||||
|
@ -25,8 +25,6 @@
|
|||
<string name="later">Позже</string>
|
||||
<string name="update">Обновить</string>
|
||||
|
||||
<!-- reminder -->
|
||||
|
||||
<!-- no connection dialog -->
|
||||
<string name="conn_message">Для полноценной игры, MultiCraft требует подключение к интернету.\nВ противном случае невозможно обновление игры, а так же не доступен мультиплеер!</string>
|
||||
<string name="conn_wifi">Wi-Fi</string>
|
|
@ -17,7 +17,7 @@
|
|||
<string name="location">Location permission provide you better interaction with game</string>
|
||||
<string name="close_game">Close game</string>
|
||||
<string name="settings">App settings</string>
|
||||
<string name="denied">You cannot use MultiCraft without storage permission. \nPlease turn on it at [Settings] -> [Permissions]></string>
|
||||
<string name="denied">You cannot play MultiCraft without storage permission. \nPlease turn on it at [Settings] -> [Permissions]></string>
|
||||
<!-- rate input_dialog -->
|
||||
<string name="rta_dialog_title">Please, rate MultiCraft!</string>
|
||||
<string name="rate_title">Title</string>
|
||||
|
@ -30,8 +30,6 @@
|
|||
<string name="later">Later</string>
|
||||
<string name="ignore">Ignore</string>
|
||||
|
||||
<!-- reminder -->
|
||||
|
||||
<!-- no connection dialog -->
|
||||
<string name="conn_message">MultiCraft requires an internet connection to use all game features.\nOtherwise, you will not get updates and multiplayer will be not available!</string>
|
||||
<string name="conn_wifi">Wi-Fi</string>
|
|
@ -1,3 +1,5 @@
|
|||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
|
@ -8,6 +10,8 @@ buildscript {
|
|||
classpath 'com.android.tools.build:gradle:3.4.2'
|
||||
classpath 'com.google.gms:google-services:4.3.0'
|
||||
classpath 'io.fabric.tools:gradle:1.29.0'
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,76 +19,10 @@ allprojects {
|
|||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
flatDir { dirs 'libs-aar' }
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion "29.0.1"
|
||||
|
||||
defaultConfig {
|
||||
applicationId 'com.multicraft.game'
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 29
|
||||
versionCode 1
|
||||
}
|
||||
Properties props = new Properties()
|
||||
props.load(new FileInputStream(file("local.properties")))
|
||||
|
||||
if (props.getProperty("keystore") != null) {
|
||||
signingConfigs {
|
||||
release {
|
||||
storeFile file(props["keystore"])
|
||||
storePassword props["keystore.password"]
|
||||
keyAlias props["key"]
|
||||
keyPassword props["key.password"]
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
}
|
||||
}
|
||||
// for multiple APKs
|
||||
splits {
|
||||
abi {
|
||||
enable true
|
||||
reset()
|
||||
include "armeabi-v7a", "arm64-v8a" /*, "x86"*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// build multiple APKs for all ABI
|
||||
ext.abiCodes = ['armeabi-v7a': 0, 'arm64-v8a': 1, 'x86': 2]
|
||||
import com.android.build.OutputFile
|
||||
|
||||
android.applicationVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
def baseAbiVersionCode =
|
||||
project.ext.abiCodes.get(output.getFilter(OutputFile.ABI))
|
||||
if (baseAbiVersionCode != null) {
|
||||
output.versionCodeOverride =
|
||||
baseAbiVersionCode + variant.versionCode
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(":native")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'androidx.appcompat:appcompat:1.0.2'
|
||||
implementation 'com.google.firebase:firebase-core:17.0.0'
|
||||
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
|
||||
// Third-party libraries
|
||||
implementation 'com.itlgl:iosdialog:1.0.0'
|
||||
implementation 'gun0912.ted:tedpermission:2.2.2'
|
||||
implementation group: 'commons-io', name: 'commons-io', version: '2.4'
|
||||
}
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
|
@ -1,20 +1,20 @@
|
|||
--- irrlicht/source/Irrlicht/Android/CIrrDeviceAndroid.cpp.orig 2015-08-29 15:43:09.000000000 +0300
|
||||
+++ irrlicht/source/Irrlicht/Android/CIrrDeviceAndroid.cpp 2016-05-13 21:36:22.880388505 +0300
|
||||
@@ -486,7 +486,7 @@
|
||||
event.KeyInput.Char = 0;
|
||||
}
|
||||
|
||||
- device->postEventFromUser(event);
|
||||
+ status = device->postEventFromUser(event);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
event.KeyInput.Char = 0;
|
||||
}
|
||||
|
||||
- device->postEventFromUser(event);
|
||||
+ status = device->postEventFromUser(event);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -543,7 +543,7 @@
|
||||
KeyMap[1] = KEY_LBUTTON; // AKEYCODE_SOFT_LEFT
|
||||
KeyMap[2] = KEY_RBUTTON; // AKEYCODE_SOFT_RIGHT
|
||||
KeyMap[3] = KEY_HOME; // AKEYCODE_HOME
|
||||
- KeyMap[4] = KEY_BACK; // AKEYCODE_BACK
|
||||
+ KeyMap[4] = KEY_CANCEL; // AKEYCODE_BACK
|
||||
KeyMap[5] = KEY_UNKNOWN; // AKEYCODE_CALL
|
||||
KeyMap[6] = KEY_UNKNOWN; // AKEYCODE_ENDCALL
|
||||
KeyMap[7] = KEY_KEY_0; // AKEYCODE_0
|
||||
KeyMap[1] = KEY_LBUTTON; // AKEYCODE_SOFT_LEFT
|
||||
KeyMap[2] = KEY_RBUTTON; // AKEYCODE_SOFT_RIGHT
|
||||
KeyMap[3] = KEY_HOME; // AKEYCODE_HOME
|
||||
- KeyMap[4] = KEY_BACK; // AKEYCODE_BACK
|
||||
+ KeyMap[4] = KEY_CANCEL; // AKEYCODE_BACK
|
||||
KeyMap[5] = KEY_UNKNOWN; // AKEYCODE_CALL
|
||||
KeyMap[6] = KEY_UNKNOWN; // AKEYCODE_ENDCALL
|
||||
KeyMap[7] = KEY_KEY_0; // AKEYCODE_0
|
|
@ -1,12 +1,12 @@
|
|||
--- irrlicht/source/Irrlicht/CEGLManager.cpp.orig 2018-04-24 19:27:51.034727946 +0200
|
||||
+++ irrlicht/source/Irrlicht/CEGLManager.cpp 2018-04-24 19:27:55.084614618 +0200
|
||||
@@ -8,6 +8,9 @@
|
||||
|
||||
#include "irrString.h"
|
||||
#include "os.h"
|
||||
+#if defined(_IRR_COMPILE_WITH_ANDROID_DEVICE_)
|
||||
+#include <android/native_activity.h>
|
||||
+#endif
|
||||
|
||||
namespace irr
|
||||
{
|
||||
|
||||
#include "irrString.h"
|
||||
#include "os.h"
|
||||
+#if defined(_IRR_COMPILE_WITH_ANDROID_DEVICE_)
|
||||
+#include <android/native_activity.h>
|
||||
+#endif
|
||||
|
||||
namespace irr
|
||||
{
|
|
@ -1,15 +1,15 @@
|
|||
--- irrlicht/include/irrMath.h.orig 2019-04-01 22:16:52.000000000 +0200
|
||||
+++ irrlicht/include/irrMath.h 2019-04-01 22:22:52.000000000 +0200
|
||||
@@ -198,6 +198,12 @@
|
||||
}
|
||||
|
||||
template <>
|
||||
+ inline s16 roundingError()
|
||||
+ {
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ template <>
|
||||
inline s32 roundingError()
|
||||
{
|
||||
return ROUNDING_ERROR_S32;
|
||||
}
|
||||
|
||||
template <>
|
||||
+ inline s16 roundingError()
|
||||
+ {
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ template <>
|
||||
inline s32 roundingError()
|
||||
{
|
||||
return ROUNDING_ERROR_S32;
|
|
@ -1,30 +1,30 @@
|
|||
--- irrlicht.orig/include/IEventReceiver.h 2014-06-03 19:43:50.433713133 +0200
|
||||
+++ irrlicht/include/IEventReceiver.h 2014-06-03 19:44:36.993711489 +0200
|
||||
@@ -375,6 +375,9 @@
|
||||
// Y position of simple touch.
|
||||
s32 Y;
|
||||
|
||||
+ // number of current touches
|
||||
+ s32 touchedCount;
|
||||
+
|
||||
//! Type of touch event.
|
||||
ETOUCH_INPUT_EVENT Event;
|
||||
};
|
||||
// Y position of simple touch.
|
||||
s32 Y;
|
||||
|
||||
+ // number of current touches
|
||||
+ s32 touchedCount;
|
||||
+
|
||||
//! Type of touch event.
|
||||
ETOUCH_INPUT_EVENT Event;
|
||||
};
|
||||
--- irrlicht.orig/source/Irrlicht/Android/CIrrDeviceAndroid.cpp 2014-06-03 19:43:50.505713130 +0200
|
||||
+++ irrlicht/source/Irrlicht/Android/CIrrDeviceAndroid.cpp 2014-06-03 19:45:37.265709359 +0200
|
||||
@@ -315,6 +315,7 @@
|
||||
event.TouchInput.ID = AMotionEvent_getPointerId(androidEvent, i);
|
||||
event.TouchInput.X = AMotionEvent_getX(androidEvent, i);
|
||||
event.TouchInput.Y = AMotionEvent_getY(androidEvent, i);
|
||||
+ event.TouchInput.touchedCount = AMotionEvent_getPointerCount(androidEvent);
|
||||
|
||||
device->postEventFromUser(event);
|
||||
}
|
||||
event.TouchInput.ID = AMotionEvent_getPointerId(androidEvent, i);
|
||||
event.TouchInput.X = AMotionEvent_getX(androidEvent, i);
|
||||
event.TouchInput.Y = AMotionEvent_getY(androidEvent, i);
|
||||
+ event.TouchInput.touchedCount = AMotionEvent_getPointerCount(androidEvent);
|
||||
|
||||
device->postEventFromUser(event);
|
||||
}
|
||||
@@ -326,6 +327,7 @@
|
||||
event.TouchInput.ID = AMotionEvent_getPointerId(androidEvent, pointerIndex);
|
||||
event.TouchInput.X = AMotionEvent_getX(androidEvent, pointerIndex);
|
||||
event.TouchInput.Y = AMotionEvent_getY(androidEvent, pointerIndex);
|
||||
+ event.TouchInput.touchedCount = AMotionEvent_getPointerCount(androidEvent);
|
||||
|
||||
device->postEventFromUser(event);
|
||||
}
|
||||
event.TouchInput.ID = AMotionEvent_getPointerId(androidEvent, pointerIndex);
|
||||
event.TouchInput.X = AMotionEvent_getX(androidEvent, pointerIndex);
|
||||
event.TouchInput.Y = AMotionEvent_getY(androidEvent, pointerIndex);
|
||||
+ event.TouchInput.touchedCount = AMotionEvent_getPointerCount(androidEvent);
|
||||
|
||||
device->postEventFromUser(event);
|
||||
}
|
|
@ -7,17 +7,17 @@ android {
|
|||
targetSdkVersion 29
|
||||
externalNativeBuild {
|
||||
ndkBuild {
|
||||
arguments "-j12",
|
||||
"APP_STL=c++_shared",
|
||||
"COMPILER_VERSION=clang",
|
||||
"APP_SHORT_COMMANDS=true"
|
||||
arguments '-j12',
|
||||
'APP_STL=c++_shared',
|
||||
'COMPILER_VERSION=clang',
|
||||
'APP_SHORT_COMMANDS=true'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
externalNativeBuild {
|
||||
ndkBuild {
|
||||
path file("jni/Android.mk")
|
||||
path file('jni/Android.mk')
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,12 +26,16 @@ android {
|
|||
abi {
|
||||
enable true
|
||||
reset()
|
||||
include "armeabi-v7a", "arm64-v8a" /*, "x86"*/
|
||||
include 'armeabi-v7a', 'arm64-v8a'//, 'x86'*/
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
debug {
|
||||
debuggable = false
|
||||
release {
|
||||
externalNativeBuild {
|
||||
ndkBuild {
|
||||
arguments 'NDEBUG=1'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -306,14 +306,14 @@ LOCAL_SRC_FILES += \
|
|||
deps/Android/libiconv/libcharset/lib/localcharset.c
|
||||
|
||||
# GMP
|
||||
ifneq ($(APP_ABI),arm64-v8a)
|
||||
#ifneq ($(APP_ABI),arm64-v8a)
|
||||
LOCAL_C_INCLUDES += ../../../lib/gmp
|
||||
LOCAL_SRC_FILES += ../../../lib/gmp/mini-gmp.c
|
||||
else
|
||||
LOCAL_CFLAGS += -DUSE_SYSTEM_GMP=1
|
||||
LOCAL_C_INCLUDES += deps/Android/gmp/include
|
||||
LOCAL_STATIC_LIBRARIES := gmp
|
||||
endif
|
||||
#else
|
||||
# LOCAL_CFLAGS += -DUSE_SYSTEM_GMP=1
|
||||
# LOCAL_C_INCLUDES += deps/Android/gmp/include
|
||||
# LOCAL_STATIC_LIBRARIES := gmp
|
||||
#endif
|
||||
|
||||
LOCAL_STATIC_LIBRARIES += Irrlicht LevelDB Curl Freetype OpenAL Vorbis LuaJIT android_native_app_glue $(PROFILER_LIBS)
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
include ':native'
|
||||
include ':app', ':native'
|
||||
|
|
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 57 KiB |