From 040f12cfb14730427524865c8e1f97f892772295 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Fri, 28 Jun 2024 08:00:00 +0800 Subject: Delete android --- android/.gitignore | 11 - android/app/build.gradle | 116 --- android/app/src/main/AndroidManifest.xml | 75 -- .../java/net/minetest/minetest/CustomEditText.java | 45 -- .../java/net/minetest/minetest/GameActivity.java | 207 ----- .../java/net/minetest/minetest/MainActivity.java | 185 ----- .../java/net/minetest/minetest/UnzipService.java | 259 ------ .../src/main/java/net/minetest/minetest/Utils.java | 39 - android/app/src/main/res/drawable/background.png | Bin 83 -> 0 bytes android/app/src/main/res/drawable/bg.xml | 4 - android/app/src/main/res/layout/activity_main.xml | 33 - android/app/src/main/res/mipmap/ic_launcher.png | Bin 5780 -> 0 bytes android/app/src/main/res/values/strings.xml | 13 - android/app/src/main/res/values/styles.xml | 15 - android/app/src/main/res/xml/filepaths.xml | 3 - android/build.gradle | 37 - android/gradle.properties | 11 - android/gradle/wrapper/gradle-wrapper.jar | Bin 55616 -> 0 bytes android/gradle/wrapper/gradle-wrapper.properties | 5 - android/gradlew | 188 ----- android/gradlew.bat | 100 --- android/icons/aux1_btn.svg | 143 ---- android/icons/camera_btn.svg | 108 --- android/icons/chat_btn.svg | 96 --- android/icons/chat_hide_btn.svg | 139 ---- android/icons/chat_show_btn.svg | 133 ---- android/icons/checkbox_tick.svg | 93 --- android/icons/debug_btn.svg | 344 -------- android/icons/down.svg | 542 ------------- android/icons/drop_btn.svg | 173 ---- android/icons/fast_btn.svg | 190 ----- android/icons/fly_btn.svg | 168 ---- android/icons/gear_icon.svg | 194 ----- android/icons/inventory_btn.svg | 509 ------------ android/icons/joystick_bg.svg | 876 -------------------- android/icons/joystick_center.svg | 877 -------------------- android/icons/joystick_off.svg | 882 --------------------- android/icons/jump_btn.svg | 547 ------------- android/icons/minimap_btn.svg | 159 ---- android/icons/noclip_btn.svg | 173 ---- android/icons/rangeview_btn.svg | 456 ----------- android/icons/rare_controls.svg | 521 ------------ android/icons/zoom.svg | 599 -------------- android/keystore-minetest.jks | Bin 2247 -> 0 bytes android/native/build.gradle | 69 -- android/native/jni/Android.mk | 291 ------- android/native/jni/Application.mk | 32 - android/native/src/main/AndroidManifest.xml | 1 - android/settings.gradle | 2 - 49 files changed, 9663 deletions(-) delete mode 100644 android/.gitignore delete mode 100644 android/app/build.gradle delete mode 100644 android/app/src/main/AndroidManifest.xml delete mode 100644 android/app/src/main/java/net/minetest/minetest/CustomEditText.java delete mode 100644 android/app/src/main/java/net/minetest/minetest/GameActivity.java delete mode 100644 android/app/src/main/java/net/minetest/minetest/MainActivity.java delete mode 100644 android/app/src/main/java/net/minetest/minetest/UnzipService.java delete mode 100644 android/app/src/main/java/net/minetest/minetest/Utils.java delete mode 100644 android/app/src/main/res/drawable/background.png delete mode 100644 android/app/src/main/res/drawable/bg.xml delete mode 100644 android/app/src/main/res/layout/activity_main.xml delete mode 100644 android/app/src/main/res/mipmap/ic_launcher.png delete mode 100644 android/app/src/main/res/values/strings.xml delete mode 100644 android/app/src/main/res/values/styles.xml delete mode 100644 android/app/src/main/res/xml/filepaths.xml delete mode 100644 android/build.gradle delete mode 100644 android/gradle.properties delete mode 100644 android/gradle/wrapper/gradle-wrapper.jar delete mode 100644 android/gradle/wrapper/gradle-wrapper.properties delete mode 100644 android/gradlew delete mode 100644 android/gradlew.bat delete mode 100644 android/icons/aux1_btn.svg delete mode 100644 android/icons/camera_btn.svg delete mode 100644 android/icons/chat_btn.svg delete mode 100644 android/icons/chat_hide_btn.svg delete mode 100644 android/icons/chat_show_btn.svg delete mode 100644 android/icons/checkbox_tick.svg delete mode 100644 android/icons/debug_btn.svg delete mode 100644 android/icons/down.svg delete mode 100644 android/icons/drop_btn.svg delete mode 100644 android/icons/fast_btn.svg delete mode 100644 android/icons/fly_btn.svg delete mode 100644 android/icons/gear_icon.svg delete mode 100644 android/icons/inventory_btn.svg delete mode 100644 android/icons/joystick_bg.svg delete mode 100644 android/icons/joystick_center.svg delete mode 100644 android/icons/joystick_off.svg delete mode 100644 android/icons/jump_btn.svg delete mode 100644 android/icons/minimap_btn.svg delete mode 100644 android/icons/noclip_btn.svg delete mode 100644 android/icons/rangeview_btn.svg delete mode 100644 android/icons/rare_controls.svg delete mode 100644 android/icons/zoom.svg delete mode 100644 android/keystore-minetest.jks delete mode 100644 android/native/build.gradle delete mode 100644 android/native/jni/Android.mk delete mode 100644 android/native/jni/Application.mk delete mode 100644 android/native/src/main/AndroidManifest.xml delete mode 100644 android/settings.gradle diff --git a/android/.gitignore b/android/.gitignore deleted file mode 100644 index e0613f8b3..000000000 --- a/android/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -*.iml -.externalNativeBuild -.gradle -app/build -app/release -app/src/main/assets -build -local.properties -native/.* -native/build -native/deps diff --git a/android/app/build.gradle b/android/app/build.gradle deleted file mode 100644 index e8ba95722..000000000 --- a/android/app/build.gradle +++ /dev/null @@ -1,116 +0,0 @@ -apply plugin: 'com.android.application' -android { - compileSdkVersion 30 - buildToolsVersion '30.0.3' - ndkVersion "$ndk_version" - defaultConfig { - applicationId 'net.minetest.minetest' - minSdkVersion 16 - targetSdkVersion 30 - versionName "${versionMajor}.${versionMinor}.${versionPatch}" - versionCode project.versionCode - } - - // load properties - Properties props = new Properties() - def propfile = file('../local.properties') - if (propfile.exists()) - props.load(new FileInputStream(propfile)) - - 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 true - signingConfig signingConfigs.release - } - } - } - - // for multiple APKs - splits { - abi { - enable true - reset() - include 'armeabi-v7a', 'arm64-v8a' - } - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } -} - -task prepareAssets() { - def assetsFolder = "build/assets" - def projRoot = "../.." - def gameToCopy = "minetest_game" - - copy { - from "${projRoot}/minetest.conf.example", "${projRoot}/README.md" into assetsFolder - } - copy { - from "${projRoot}/doc/lgpl-2.1.txt" into "${assetsFolder}" - } - copy { - from "${projRoot}/builtin" into "${assetsFolder}/builtin" - } - copy { - from "${projRoot}/client/shaders" into "${assetsFolder}/client/shaders" - } - copy { - from "../native/deps/armeabi-v7a/Irrlicht/Shaders" into "${assetsFolder}/client/shaders/Irrlicht" - } - copy { - from "${projRoot}/fonts" include "*.ttf" into "${assetsFolder}/fonts" - } - copy { - from "${projRoot}/games/${gameToCopy}" into "${assetsFolder}/games/${gameToCopy}" - } - fileTree("${projRoot}/po").include("**/*.po").forEach { poFile -> - def moPath = "${assetsFolder}/locale/${poFile.parentFile.name}/LC_MESSAGES/" - file(moPath).mkdirs() - exec { - commandLine 'msgfmt', '-o', "${moPath}/minetest.mo", poFile - } - } - copy { - from "${projRoot}/textures" into "${assetsFolder}/textures" - } - - file("${assetsFolder}/.nomedia").text = ""; - - task zipAssets(type: Zip) { - archiveName "Minetest.zip" - from "${assetsFolder}" - destinationDir file("src/main/assets") - } -} - -preBuild.dependsOn zipAssets - -// Map for the version code that gives each ABI a value. -import com.android.build.OutputFile - -def abiCodes = ['armeabi-v7a': 0, 'arm64-v8a': 1] -android.applicationVariants.all { variant -> - variant.outputs.each { - output -> - def abiName = output.getFilter(OutputFile.ABI) - output.versionCodeOverride = abiCodes.get(abiName, 0) + variant.versionCode - } -} - -dependencies { - implementation project(':native') - implementation 'androidx.appcompat:appcompat:1.3.1' -} diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 11c868622..000000000 --- a/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/app/src/main/java/net/minetest/minetest/CustomEditText.java b/android/app/src/main/java/net/minetest/minetest/CustomEditText.java deleted file mode 100644 index 8d0a503d0..000000000 --- a/android/app/src/main/java/net/minetest/minetest/CustomEditText.java +++ /dev/null @@ -1,45 +0,0 @@ -/* -Minetest -Copyright (C) 2014-2020 MoNTE48, Maksim Gamarnik -Copyright (C) 2014-2020 ubulem, Bektur Mambetov - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ - -package net.minetest.minetest; - -import android.content.Context; -import android.view.KeyEvent; -import android.view.inputmethod.InputMethodManager; - -import androidx.appcompat.widget.AppCompatEditText; - -import java.util.Objects; - -public class CustomEditText extends AppCompatEditText { - public CustomEditText(Context context) { - super(context); - } - - @Override - public boolean onKeyPreIme(int keyCode, KeyEvent event) { - if (keyCode == KeyEvent.KEYCODE_BACK) { - InputMethodManager mgr = (InputMethodManager) - getContext().getSystemService(Context.INPUT_METHOD_SERVICE); - Objects.requireNonNull(mgr).hideSoftInputFromWindow(this.getWindowToken(), 0); - } - return false; - } -} diff --git a/android/app/src/main/java/net/minetest/minetest/GameActivity.java b/android/app/src/main/java/net/minetest/minetest/GameActivity.java deleted file mode 100644 index f5e9fd6d0..000000000 --- a/android/app/src/main/java/net/minetest/minetest/GameActivity.java +++ /dev/null @@ -1,207 +0,0 @@ -/* -Minetest -Copyright (C) 2014-2020 MoNTE48, Maksim Gamarnik -Copyright (C) 2014-2020 ubulem, Bektur Mambetov - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ - -package net.minetest.minetest; - -import android.app.NativeActivity; -import android.content.Intent; -import android.net.Uri; -import android.os.Build; -import android.os.Bundle; -import android.text.InputType; -import android.util.Log; -import android.view.KeyEvent; -import android.view.View; -import android.view.WindowManager; -import android.view.inputmethod.InputMethodManager; -import android.widget.Button; -import android.widget.EditText; -import android.widget.LinearLayout; - -import androidx.annotation.Keep; -import androidx.appcompat.app.AlertDialog; -import androidx.core.content.FileProvider; - -import java.io.File; -import java.util.Objects; - -// Native code finds these methods by name (see porting_android.cpp). -// This annotation prevents the minifier/Proguard from mangling them. -@Keep -public class GameActivity extends NativeActivity { - static { - System.loadLibrary("c++_shared"); - System.loadLibrary("Minetest"); - } - - private int messageReturnCode = -1; - private String messageReturnValue = ""; - - public static native void putMessageBoxResult(String text); - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); - } - - private void makeFullScreen() { - if (Build.VERSION.SDK_INT >= 19) - this.getWindow().getDecorView().setSystemUiVisibility( - View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | - View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | - View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY); - } - - @Override - public void onWindowFocusChanged(boolean hasFocus) { - super.onWindowFocusChanged(hasFocus); - if (hasFocus) - makeFullScreen(); - } - - @Override - protected void onResume() { - super.onResume(); - makeFullScreen(); - } - - @Override - public void onBackPressed() { - // Ignore the back press so Minetest can handle it - } - - public void showDialog(String acceptButton, String hint, String current, int editType) { - runOnUiThread(() -> showDialogUI(hint, current, editType)); - } - - private void showDialogUI(String hint, String current, int editType) { - final AlertDialog.Builder builder = new AlertDialog.Builder(this); - LinearLayout container = new LinearLayout(this); - container.setOrientation(LinearLayout.VERTICAL); - builder.setView(container); - AlertDialog alertDialog = builder.create(); - EditText editText; - // For multi-line, do not close the dialog after pressing back button - if (editType == 1) { - editText = new EditText(this); - } else { - editText = new CustomEditText(this); - } - container.addView(editText); - editText.setMaxLines(8); - editText.requestFocus(); - editText.setHint(hint); - editText.setText(current); - final InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE); - Objects.requireNonNull(imm).toggleSoftInput(InputMethodManager.SHOW_FORCED, - InputMethodManager.HIDE_IMPLICIT_ONLY); - if (editType == 1) - editText.setInputType(InputType.TYPE_CLASS_TEXT | - InputType.TYPE_TEXT_FLAG_MULTI_LINE); - else if (editType == 3) - editText.setInputType(InputType.TYPE_CLASS_TEXT | - InputType.TYPE_TEXT_VARIATION_PASSWORD); - else - editText.setInputType(InputType.TYPE_CLASS_TEXT); - editText.setSelection(editText.getText().length()); - editText.setOnKeyListener((view, keyCode, event) -> { - // For multi-line, do not submit the text after pressing Enter key - if (keyCode == KeyEvent.KEYCODE_ENTER && editType != 1) { - imm.hideSoftInputFromWindow(editText.getWindowToken(), 0); - messageReturnCode = 0; - messageReturnValue = editText.getText().toString(); - alertDialog.dismiss(); - return true; - } - return false; - }); - // For multi-line, add Done button since Enter key does not submit text - if (editType == 1) { - Button doneButton = new Button(this); - container.addView(doneButton); - doneButton.setText(R.string.ime_dialog_done); - doneButton.setOnClickListener((view -> { - imm.hideSoftInputFromWindow(editText.getWindowToken(), 0); - messageReturnCode = 0; - messageReturnValue = editText.getText().toString(); - alertDialog.dismiss(); - })); - } - alertDialog.show(); - alertDialog.setOnCancelListener(dialog -> { - getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); - messageReturnValue = current; - messageReturnCode = -1; - }); - } - - public int getDialogState() { - return messageReturnCode; - } - - public String getDialogValue() { - messageReturnCode = -1; - return messageReturnValue; - } - - public float getDensity() { - return getResources().getDisplayMetrics().density; - } - - public int getDisplayHeight() { - return getResources().getDisplayMetrics().heightPixels; - } - - public int getDisplayWidth() { - return getResources().getDisplayMetrics().widthPixels; - } - - public void openURI(String uri) { - Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri)); - startActivity(browserIntent); - } - - public String getUserDataPath() { - return Utils.getUserDataDirectory(this).getAbsolutePath(); - } - - public String getCachePath() { - return Utils.getCacheDirectory(this).getAbsolutePath(); - } - - public void shareFile(String path) { - File file = new File(path); - if (!file.exists()) { - Log.e("GameActivity", "File " + file.getAbsolutePath() + " doesn't exist"); - return; - } - - Uri fileUri = FileProvider.getUriForFile(this, "net.minetest.minetest.fileprovider", file); - - Intent intent = new Intent(Intent.ACTION_SEND, fileUri); - intent.setDataAndType(fileUri, getContentResolver().getType(fileUri)); - intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); - intent.putExtra(Intent.EXTRA_STREAM, fileUri); - - Intent shareIntent = Intent.createChooser(intent, null); - startActivity(shareIntent); - } -} diff --git a/android/app/src/main/java/net/minetest/minetest/MainActivity.java b/android/app/src/main/java/net/minetest/minetest/MainActivity.java deleted file mode 100644 index b6567b4b7..000000000 --- a/android/app/src/main/java/net/minetest/minetest/MainActivity.java +++ /dev/null @@ -1,185 +0,0 @@ -/* -Minetest -Copyright (C) 2014-2020 MoNTE48, Maksim Gamarnik -Copyright (C) 2014-2020 ubulem, Bektur Mambetov - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ - -package net.minetest.minetest; - -import android.Manifest; -import android.content.BroadcastReceiver; -import android.content.Context; -import android.content.Intent; -import android.content.IntentFilter; -import android.content.SharedPreferences; -import android.content.pm.PackageManager; -import android.os.Build; -import android.os.Bundle; -import android.os.Environment; -import android.view.View; -import android.widget.ProgressBar; -import android.widget.TextView; -import android.widget.Toast; - -import androidx.annotation.NonNull; -import androidx.annotation.StringRes; -import androidx.appcompat.app.AppCompatActivity; -import androidx.core.app.ActivityCompat; -import androidx.core.content.ContextCompat; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import static net.minetest.minetest.UnzipService.*; - -public class MainActivity extends AppCompatActivity { - private final static int versionCode = BuildConfig.VERSION_CODE; - private final static int PERMISSIONS = 1; - private static final String[] REQUIRED_SDK_PERMISSIONS = - new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}; - private static final String SETTINGS = "MinetestSettings"; - private static final String TAG_VERSION_CODE = "versionCode"; - - private ProgressBar mProgressBar; - private TextView mTextView; - private SharedPreferences sharedPreferences; - - private final BroadcastReceiver myReceiver = new BroadcastReceiver() { - @Override - public void onReceive(Context context, Intent intent) { - int progress = 0; - @StringRes int message = 0; - if (intent != null) { - progress = intent.getIntExtra(ACTION_PROGRESS, 0); - message = intent.getIntExtra(ACTION_PROGRESS_MESSAGE, 0); - } - - if (progress == FAILURE) { - Toast.makeText(MainActivity.this, intent.getStringExtra(ACTION_FAILURE), Toast.LENGTH_LONG).show(); - finish(); - } else if (progress == SUCCESS) { - startNative(); - } else { - if (mProgressBar != null) { - mProgressBar.setVisibility(View.VISIBLE); - if (progress == INDETERMINATE) { - mProgressBar.setIndeterminate(true); - } else { - mProgressBar.setIndeterminate(false); - mProgressBar.setProgress(progress); - } - } - mTextView.setVisibility(View.VISIBLE); - if (message != 0) - mTextView.setText(message); - } - } - }; - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - IntentFilter filter = new IntentFilter(ACTION_UPDATE); - registerReceiver(myReceiver, filter); - mProgressBar = findViewById(R.id.progressBar); - mTextView = findViewById(R.id.textView); - sharedPreferences = getSharedPreferences(SETTINGS, Context.MODE_PRIVATE); - - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && - Build.VERSION.SDK_INT < Build.VERSION_CODES.R) - checkPermission(); - else - checkAppVersion(); - } - - private void checkPermission() { - final List missingPermissions = new ArrayList<>(); - for (final String permission : REQUIRED_SDK_PERMISSIONS) { - final int result = ContextCompat.checkSelfPermission(this, permission); - if (result != PackageManager.PERMISSION_GRANTED) - missingPermissions.add(permission); - } - if (!missingPermissions.isEmpty()) { - final String[] permissions = missingPermissions - .toArray(new String[0]); - ActivityCompat.requestPermissions(this, permissions, PERMISSIONS); - } else { - final int[] grantResults = new int[REQUIRED_SDK_PERMISSIONS.length]; - Arrays.fill(grantResults, PackageManager.PERMISSION_GRANTED); - onRequestPermissionsResult(PERMISSIONS, REQUIRED_SDK_PERMISSIONS, grantResults); - } - } - - @Override - public void onRequestPermissionsResult(int requestCode, - @NonNull String[] permissions, @NonNull int[] grantResults) { - if (requestCode == PERMISSIONS) { - for (int grantResult : grantResults) { - if (grantResult != PackageManager.PERMISSION_GRANTED) { - Toast.makeText(this, R.string.not_granted, Toast.LENGTH_LONG).show(); - finish(); - return; - } - } - checkAppVersion(); - } - } - - private void checkAppVersion() { - if (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { - Toast.makeText(this, R.string.no_external_storage, Toast.LENGTH_LONG).show(); - finish(); - return; - } - - if (UnzipService.getIsRunning()) { - mProgressBar.setVisibility(View.VISIBLE); - mProgressBar.setIndeterminate(true); - mTextView.setVisibility(View.VISIBLE); - } else if (sharedPreferences.getInt(TAG_VERSION_CODE, 0) == versionCode && - Utils.isInstallValid(this)) { - startNative(); - } else { - mProgressBar.setVisibility(View.VISIBLE); - mProgressBar.setIndeterminate(true); - mTextView.setVisibility(View.VISIBLE); - - Intent intent = new Intent(this, UnzipService.class); - startService(intent); - } - } - - private void startNative() { - sharedPreferences.edit().putInt(TAG_VERSION_CODE, versionCode).apply(); - Intent intent = new Intent(this, GameActivity.class); - intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK); - startActivity(intent); - } - - @Override - public void onBackPressed() { - // Prevent abrupt interruption when copy game files from assets - } - - @Override - protected void onDestroy() { - super.onDestroy(); - unregisterReceiver(myReceiver); - } -} diff --git a/android/app/src/main/java/net/minetest/minetest/UnzipService.java b/android/app/src/main/java/net/minetest/minetest/UnzipService.java deleted file mode 100644 index a61a49139..000000000 --- a/android/app/src/main/java/net/minetest/minetest/UnzipService.java +++ /dev/null @@ -1,259 +0,0 @@ -/* -Minetest -Copyright (C) 2014-2020 MoNTE48, Maksim Gamarnik -Copyright (C) 2014-2020 ubulem, Bektur Mambetov - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ - -package net.minetest.minetest; - -import android.app.IntentService; -import android.app.Notification; -import android.app.NotificationChannel; -import android.app.NotificationManager; -import android.app.PendingIntent; -import android.content.Context; -import android.content.Intent; -import android.os.Build; -import android.os.Environment; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.annotation.RequiresApi; -import androidx.annotation.StringRes; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.zip.ZipEntry; -import java.util.zip.ZipFile; -import java.util.zip.ZipInputStream; - -public class UnzipService extends IntentService { - public static final String ACTION_UPDATE = "net.minetest.minetest.UPDATE"; - public static final String ACTION_PROGRESS = "net.minetest.minetest.PROGRESS"; - public static final String ACTION_PROGRESS_MESSAGE = "net.minetest.minetest.PROGRESS_MESSAGE"; - public static final String ACTION_FAILURE = "net.minetest.minetest.FAILURE"; - public static final int SUCCESS = -1; - public static final int FAILURE = -2; - public static final int INDETERMINATE = -3; - private final int id = 1; - private NotificationManager mNotifyManager; - private boolean isSuccess = true; - private String failureMessage; - - private static boolean isRunning = false; - public static synchronized boolean getIsRunning() { - return isRunning; - } - private static synchronized void setIsRunning(boolean v) { - isRunning = v; - } - - public UnzipService() { - super("net.minetest.minetest.UnzipService"); - } - - @Override - protected void onHandleIntent(Intent intent) { - Notification.Builder notificationBuilder = createNotification(); - final File zipFile = new File(getCacheDir(), "Minetest.zip"); - try { - setIsRunning(true); - File userDataDirectory = Utils.getUserDataDirectory(this); - if (userDataDirectory == null) { - throw new IOException("Unable to find user data directory"); - } - - try (InputStream in = this.getAssets().open(zipFile.getName())) { - try (OutputStream out = new FileOutputStream(zipFile)) { - int readLen; - byte[] readBuffer = new byte[16384]; - while ((readLen = in.read(readBuffer)) != -1) { - out.write(readBuffer, 0, readLen); - } - } - } - - migrate(notificationBuilder, userDataDirectory); - unzip(notificationBuilder, zipFile, userDataDirectory); - } catch (IOException e) { - isSuccess = false; - failureMessage = e.getLocalizedMessage(); - } finally { - setIsRunning(false); - zipFile.delete(); - } - } - - private Notification.Builder createNotification() { - String name = "net.minetest.minetest"; - String channelId = "Minetest channel"; - String description = "notifications from Minetest"; - Notification.Builder builder; - if (mNotifyManager == null) - mNotifyManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - int importance = NotificationManager.IMPORTANCE_LOW; - NotificationChannel mChannel = null; - if (mNotifyManager != null) - mChannel = mNotifyManager.getNotificationChannel(channelId); - if (mChannel == null) { - mChannel = new NotificationChannel(channelId, name, importance); - mChannel.setDescription(description); - // Configure the notification channel, NO SOUND - mChannel.setSound(null, null); - mChannel.enableLights(false); - mChannel.enableVibration(false); - mNotifyManager.createNotificationChannel(mChannel); - } - builder = new Notification.Builder(this, channelId); - } else { - builder = new Notification.Builder(this); - } - - Intent notificationIntent = new Intent(this, MainActivity.class); - notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP - | Intent.FLAG_ACTIVITY_SINGLE_TOP); - PendingIntent intent = PendingIntent.getActivity(this, 0, - notificationIntent, 0); - - builder.setContentTitle(getString(R.string.notification_title)) - .setSmallIcon(R.mipmap.ic_launcher) - .setContentText(getString(R.string.notification_description)) - .setContentIntent(intent) - .setOngoing(true) - .setProgress(0, 0, true); - - mNotifyManager.notify(id, builder.build()); - return builder; - } - - private void unzip(Notification.Builder notificationBuilder, File zipFile, File userDataDirectory) throws IOException { - int per = 0; - - int size; - try (ZipFile zipSize = new ZipFile(zipFile)) { - size = zipSize.size(); - } - - int readLen; - byte[] readBuffer = new byte[16384]; - try (FileInputStream fileInputStream = new FileInputStream(zipFile); - ZipInputStream zipInputStream = new ZipInputStream(fileInputStream)) { - ZipEntry ze; - while ((ze = zipInputStream.getNextEntry()) != null) { - if (ze.isDirectory()) { - ++per; - Utils.createDirs(userDataDirectory, ze.getName()); - continue; - } - publishProgress(notificationBuilder, R.string.loading, 100 * ++per / size); - try (OutputStream outputStream = new FileOutputStream( - new File(userDataDirectory, ze.getName()))) { - while ((readLen = zipInputStream.read(readBuffer)) != -1) { - outputStream.write(readBuffer, 0, readLen); - } - } - } - } - } - - void moveFileOrDir(@NonNull File src, @NonNull File dst) throws IOException { - try { - Process p = new ProcessBuilder("/system/bin/mv", - src.getAbsolutePath(), dst.getAbsolutePath()).start(); - int exitcode = p.waitFor(); - if (exitcode != 0) - throw new IOException("Move failed with exit code " + exitcode); - } catch (InterruptedException e) { - throw new IOException("Move operation interrupted"); - } - } - - boolean recursivelyDeleteDirectory(@NonNull File loc) { - try { - Process p = new ProcessBuilder("/system/bin/rm", "-rf", - loc.getAbsolutePath()).start(); - return p.waitFor() == 0; - } catch (IOException | InterruptedException e) { - return false; - } - } - - /** - * Migrates user data from deprecated external storage to app scoped storage - */ - private void migrate(Notification.Builder notificationBuilder, File newLocation) throws IOException { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { - return; - } - - File oldLocation = new File(Environment.getExternalStorageDirectory(), "Minetest"); - if (!oldLocation.isDirectory()) - return; - - publishProgress(notificationBuilder, R.string.migrating, 0); - newLocation.mkdir(); - - String[] dirs = new String[] { "worlds", "games", "mods", "textures", "client" }; - for (int i = 0; i < dirs.length; i++) { - publishProgress(notificationBuilder, R.string.migrating, 100 * i / dirs.length); - File dir = new File(oldLocation, dirs[i]), dir2 = new File(newLocation, dirs[i]); - if (dir.isDirectory() && !dir2.isDirectory()) { - moveFileOrDir(dir, dir2); - } - } - - for (String filename : new String[] { "minetest.conf" }) { - File file = new File(oldLocation, filename), file2 = new File(newLocation, filename); - if (file.isFile() && !file2.isFile()) { - moveFileOrDir(file, file2); - } - } - - recursivelyDeleteDirectory(oldLocation); - } - - private void publishProgress(@Nullable Notification.Builder notificationBuilder, @StringRes int message, int progress) { - Intent intentUpdate = new Intent(ACTION_UPDATE); - intentUpdate.putExtra(ACTION_PROGRESS, progress); - intentUpdate.putExtra(ACTION_PROGRESS_MESSAGE, message); - if (!isSuccess) - intentUpdate.putExtra(ACTION_FAILURE, failureMessage); - sendBroadcast(intentUpdate); - - if (notificationBuilder != null) { - notificationBuilder.setContentText(getString(message)); - if (progress == INDETERMINATE) { - notificationBuilder.setProgress(100, 50, true); - } else { - notificationBuilder.setProgress(100, progress, false); - } - mNotifyManager.notify(id, notificationBuilder.build()); - } - } - - @Override - public void onDestroy() { - super.onDestroy(); - mNotifyManager.cancel(id); - publishProgress(null, R.string.loading, isSuccess ? SUCCESS : FAILURE); - } -} diff --git a/android/app/src/main/java/net/minetest/minetest/Utils.java b/android/app/src/main/java/net/minetest/minetest/Utils.java deleted file mode 100644 index b2553c844..000000000 --- a/android/app/src/main/java/net/minetest/minetest/Utils.java +++ /dev/null @@ -1,39 +0,0 @@ -package net.minetest.minetest; - -import android.content.Context; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import java.io.File; - -public class Utils { - public static @NonNull File createDirs(File root, String dir) { - File f = new File(root, dir); - if (!f.isDirectory()) - f.mkdirs(); - - return f; - } - - public static @Nullable File getUserDataDirectory(Context context) { - File extDir = context.getExternalFilesDir(null); - if (extDir == null) { - return null; - } - - return createDirs(extDir, "Minetest"); - } - - public static @Nullable File getCacheDirectory(Context context) { - return context.getCacheDir(); - } - - public static boolean isInstallValid(Context context) { - File userDataDirectory = getUserDataDirectory(context); - return userDataDirectory != null && userDataDirectory.isDirectory() && - new File(userDataDirectory, "games").isDirectory() && - new File(userDataDirectory, "builtin").isDirectory() && - new File(userDataDirectory, "client").isDirectory() && - new File(userDataDirectory, "textures").isDirectory(); - } -} diff --git a/android/app/src/main/res/drawable/background.png b/android/app/src/main/res/drawable/background.png deleted file mode 100644 index 43bd6089e..000000000 Binary files a/android/app/src/main/res/drawable/background.png and /dev/null differ diff --git a/android/app/src/main/res/drawable/bg.xml b/android/app/src/main/res/drawable/bg.xml deleted file mode 100644 index 903335ed9..000000000 --- a/android/app/src/main/res/drawable/bg.xml +++ /dev/null @@ -1,4 +0,0 @@ - - diff --git a/android/app/src/main/res/layout/activity_main.xml b/android/app/src/main/res/layout/activity_main.xml deleted file mode 100644 index 93508c3cb..000000000 --- a/android/app/src/main/res/layout/activity_main.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - diff --git a/android/app/src/main/res/mipmap/ic_launcher.png b/android/app/src/main/res/mipmap/ic_launcher.png deleted file mode 100644 index 88a83782c..000000000 Binary files a/android/app/src/main/res/mipmap/ic_launcher.png and /dev/null differ diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml deleted file mode 100644 index 99f948c99..000000000 --- a/android/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - Minetest - Loading… - Migrating save data from old install… (this may take a while) - Required permission wasn\'t granted, Minetest can\'t run without it - Loading Minetest - Less than 1 minute… - Done - External storage isn\'t available. If you use an SDCard, please reinsert it. Otherwise, try restarting your phone or contacting the Minetest developers - - diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 291a4eaf1..000000000 --- a/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - diff --git a/android/app/src/main/res/xml/filepaths.xml b/android/app/src/main/res/xml/filepaths.xml deleted file mode 100644 index 2fff06908..000000000 --- a/android/app/src/main/res/xml/filepaths.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/android/build.gradle b/android/build.gradle deleted file mode 100644 index 7113dc7ad..000000000 --- a/android/build.gradle +++ /dev/null @@ -1,37 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -project.ext.set("versionMajor", 5) // Version Major -project.ext.set("versionMinor", 6) // Version Minor -project.ext.set("versionPatch", 0) // Version Patch -project.ext.set("versionExtra", "") // Version Extra -project.ext.set("versionCode", 40) // Android Version Code -project.ext.set("developmentBuild", 0) // Whether it is a development build, or a release -// NOTE: +2 after each release! -// +1 for ARM and +1 for ARM64 APK's, because -// each APK must have a larger `versionCode` than the previous - -buildscript { - ext.ndk_version = '23.2.8568313' - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:7.0.3' - classpath 'de.undercouch:gradle-download-task:4.1.1' - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - repositories { - google() - jcenter() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir - delete 'native/deps' -} diff --git a/android/gradle.properties b/android/gradle.properties deleted file mode 100644 index 53b475cf9..000000000 --- a/android/gradle.properties +++ /dev/null @@ -1,11 +0,0 @@ -<#if isLowMemory> -org.gradle.jvmargs=-Xmx4G -XX:MaxPermSize=2G -XX:+HeapDumpOnOutOfMemoryError -<#else> -org.gradle.jvmargs=-Xmx16G -XX:MaxPermSize=8G -XX:+HeapDumpOnOutOfMemoryError - -org.gradle.daemon=true -org.gradle.parallel=true -org.gradle.parallel.threads=8 -org.gradle.configureondemand=true -android.enableJetifier=true -android.useAndroidX=true diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 5c2d1cf01..000000000 Binary files a/android/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 8ad73a75c..000000000 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip diff --git a/android/gradlew b/android/gradlew deleted file mode 100644 index 25e0c1148..000000000 --- a/android/gradlew +++ /dev/null @@ -1,188 +0,0 @@ -#!/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 -# -# https://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 -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -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. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn () { - echo "$*" -} - -die () { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - command -v java >/dev/null || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - -exec "$JAVACMD" "$@" diff --git a/android/gradlew.bat b/android/gradlew.bat deleted file mode 100644 index 9618d8d96..000000000 --- a/android/gradlew.bat +++ /dev/null @@ -1,100 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/android/icons/aux1_btn.svg b/android/icons/aux1_btn.svg deleted file mode 100644 index e0ee97c0c..000000000 --- a/android/icons/aux1_btn.svg +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - Aux1 - - - diff --git a/android/icons/camera_btn.svg b/android/icons/camera_btn.svg deleted file mode 100644 index a91a7fcf8..000000000 --- a/android/icons/camera_btn.svg +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - diff --git a/android/icons/chat_btn.svg b/android/icons/chat_btn.svg deleted file mode 100644 index 41dc6f8c7..000000000 --- a/android/icons/chat_btn.svg +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - diff --git a/android/icons/chat_hide_btn.svg b/android/icons/chat_hide_btn.svg deleted file mode 100644 index 6647b3097..000000000 --- a/android/icons/chat_hide_btn.svg +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/icons/chat_show_btn.svg b/android/icons/chat_show_btn.svg deleted file mode 100644 index fce9de996..000000000 --- a/android/icons/chat_show_btn.svg +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/icons/checkbox_tick.svg b/android/icons/checkbox_tick.svg deleted file mode 100644 index 6b727bb52..000000000 --- a/android/icons/checkbox_tick.svg +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - diff --git a/android/icons/debug_btn.svg b/android/icons/debug_btn.svg deleted file mode 100644 index 2c37f142a..000000000 --- a/android/icons/debug_btn.svg +++ /dev/null @@ -1,344 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/icons/down.svg b/android/icons/down.svg deleted file mode 100644 index 190e7e875..000000000 --- a/android/icons/down.svg +++ /dev/null @@ -1,542 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/icons/drop_btn.svg b/android/icons/drop_btn.svg deleted file mode 100644 index 7cb0e8532..000000000 --- a/android/icons/drop_btn.svg +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/icons/fast_btn.svg b/android/icons/fast_btn.svg deleted file mode 100644 index 1436596b7..000000000 --- a/android/icons/fast_btn.svg +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/icons/fly_btn.svg b/android/icons/fly_btn.svg deleted file mode 100644 index d203842d4..000000000 --- a/android/icons/fly_btn.svg +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - diff --git a/android/icons/gear_icon.svg b/android/icons/gear_icon.svg deleted file mode 100644 index b44685ade..000000000 --- a/android/icons/gear_icon.svg +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/icons/inventory_btn.svg b/android/icons/inventory_btn.svg deleted file mode 100644 index ee3dc3c17..000000000 --- a/android/icons/inventory_btn.svg +++ /dev/null @@ -1,509 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/icons/joystick_bg.svg b/android/icons/joystick_bg.svg deleted file mode 100644 index d8836b358..000000000 --- a/android/icons/joystick_bg.svg +++ /dev/null @@ -1,876 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/icons/joystick_center.svg b/android/icons/joystick_center.svg deleted file mode 100644 index 17202290a..000000000 --- a/android/icons/joystick_center.svg +++ /dev/null @@ -1,877 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/icons/joystick_off.svg b/android/icons/joystick_off.svg deleted file mode 100644 index 58e1acf22..000000000 --- a/android/icons/joystick_off.svg +++ /dev/null @@ -1,882 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/icons/jump_btn.svg b/android/icons/jump_btn.svg deleted file mode 100644 index 882c49ed7..000000000 --- a/android/icons/jump_btn.svg +++ /dev/null @@ -1,547 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/icons/minimap_btn.svg b/android/icons/minimap_btn.svg deleted file mode 100644 index deda32717..000000000 --- a/android/icons/minimap_btn.svg +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - diff --git a/android/icons/noclip_btn.svg b/android/icons/noclip_btn.svg deleted file mode 100644 index a816edfc7..000000000 --- a/android/icons/noclip_btn.svg +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/icons/rangeview_btn.svg b/android/icons/rangeview_btn.svg deleted file mode 100644 index f9319e0b5..000000000 --- a/android/icons/rangeview_btn.svg +++ /dev/null @@ -1,456 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/icons/rare_controls.svg b/android/icons/rare_controls.svg deleted file mode 100644 index c9991ec7a..000000000 --- a/android/icons/rare_controls.svg +++ /dev/null @@ -1,521 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/icons/zoom.svg b/android/icons/zoom.svg deleted file mode 100644 index ea8dec3c5..000000000 --- a/android/icons/zoom.svg +++ /dev/null @@ -1,599 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/keystore-minetest.jks b/android/keystore-minetest.jks deleted file mode 100644 index 8fce68bbb..000000000 Binary files a/android/keystore-minetest.jks and /dev/null differ diff --git a/android/native/build.gradle b/android/native/build.gradle deleted file mode 100644 index 2254aab3a..000000000 --- a/android/native/build.gradle +++ /dev/null @@ -1,69 +0,0 @@ -apply plugin: 'com.android.library' -apply plugin: 'de.undercouch.download' - -android { - compileSdkVersion 30 - buildToolsVersion '30.0.3' - ndkVersion "$ndk_version" - defaultConfig { - minSdkVersion 16 - targetSdkVersion 30 - externalNativeBuild { - ndkBuild { - arguments '-j' + Runtime.getRuntime().availableProcessors(), - "versionMajor=${versionMajor}", - "versionMinor=${versionMinor}", - "versionPatch=${versionPatch}", - "versionExtra=${versionExtra}", - "developmentBuild=${developmentBuild}" - } - } - } - - externalNativeBuild { - ndkBuild { - path file('jni/Android.mk') - } - } - - // supported architectures - splits { - abi { - enable true - reset() - include 'armeabi-v7a', 'arm64-v8a'//, 'x86' - } - } - - buildTypes { - release { - externalNativeBuild { - ndkBuild { - arguments 'NDEBUG=1' - } - } - - ndk { - debugSymbolLevel 'SYMBOL_TABLE' - } - } - } -} - -// get precompiled deps -task downloadDeps(type: Download) { - src 'https://github.com/minetest/minetest_android_deps/releases/download/latest/deps.zip' - dest new File(buildDir, 'deps.zip') - overwrite false -} - -task getDeps(dependsOn: downloadDeps, type: Copy) { - def deps = new File(buildDir.parent, 'deps') - if (!deps.exists()) { - deps.mkdir() - from zipTree(downloadDeps.dest) - into deps - } -} - -preBuild.dependsOn getDeps diff --git a/android/native/jni/Android.mk b/android/native/jni/Android.mk deleted file mode 100644 index 50651d5ba..000000000 --- a/android/native/jni/Android.mk +++ /dev/null @@ -1,291 +0,0 @@ -LOCAL_PATH := $(call my-dir)/.. - -#LOCAL_ADDRESS_SANITIZER:=true -#USE_BUILTIN_LUA:=true - -include $(CLEAR_VARS) -LOCAL_MODULE := Curl -LOCAL_SRC_FILES := deps/$(APP_ABI)/Curl/libcurl.a -include $(PREBUILT_STATIC_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_MODULE := libmbedcrypto -LOCAL_SRC_FILES := deps/$(APP_ABI)/Curl/libmbedcrypto.a -include $(PREBUILT_STATIC_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_MODULE := libmbedtls -LOCAL_SRC_FILES := deps/$(APP_ABI)/Curl/libmbedtls.a -include $(PREBUILT_STATIC_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_MODULE := libmbedx509 -LOCAL_SRC_FILES := deps/$(APP_ABI)/Curl/libmbedx509.a -include $(PREBUILT_STATIC_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_MODULE := Freetype -LOCAL_SRC_FILES := deps/$(APP_ABI)/Freetype/libfreetype.a -include $(PREBUILT_STATIC_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_MODULE := Iconv -LOCAL_SRC_FILES := deps/$(APP_ABI)/Iconv/libiconv.a -include $(PREBUILT_STATIC_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_MODULE := libcharset -LOCAL_SRC_FILES := deps/$(APP_ABI)/Iconv/libcharset.a -include $(PREBUILT_STATIC_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_MODULE := Irrlicht -LOCAL_SRC_FILES := deps/$(APP_ABI)/Irrlicht/libIrrlichtMt.a -include $(PREBUILT_STATIC_LIBRARY) - -ifndef USE_BUILTIN_LUA - -include $(CLEAR_VARS) -LOCAL_MODULE := LuaJIT -LOCAL_SRC_FILES := deps/$(APP_ABI)/LuaJIT/libluajit.a -include $(PREBUILT_STATIC_LIBRARY) - -endif - -include $(CLEAR_VARS) -LOCAL_MODULE := OpenAL -LOCAL_SRC_FILES := deps/$(APP_ABI)/OpenAL-Soft/libopenal.a -include $(PREBUILT_STATIC_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_MODULE := Gettext -LOCAL_SRC_FILES := deps/$(APP_ABI)/Gettext/libintl.a -include $(PREBUILT_STATIC_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_MODULE := SQLite3 -LOCAL_SRC_FILES := deps/$(APP_ABI)/SQLite/libsqlite3.a -include $(PREBUILT_STATIC_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_MODULE := Vorbis -LOCAL_SRC_FILES := deps/$(APP_ABI)/Vorbis/libvorbis.a -include $(PREBUILT_STATIC_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_MODULE := libvorbisfile -LOCAL_SRC_FILES := deps/$(APP_ABI)/Vorbis/libvorbisfile.a -include $(PREBUILT_STATIC_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_MODULE := libogg -LOCAL_SRC_FILES := deps/$(APP_ABI)/Vorbis/libogg.a -include $(PREBUILT_STATIC_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_MODULE := Zstd -LOCAL_SRC_FILES := deps/$(APP_ABI)/Zstd/libzstd.a -include $(PREBUILT_STATIC_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_MODULE := Minetest - -LOCAL_CFLAGS += \ - -DJSONCPP_NO_LOCALE_SUPPORT \ - -DHAVE_TOUCHSCREENGUI \ - -DENABLE_GLES=1 \ - -DUSE_CURL=1 \ - -DUSE_SOUND=1 \ - -DUSE_LEVELDB=0 \ - -DUSE_GETTEXT=1 \ - -DVERSION_MAJOR=${versionMajor} \ - -DVERSION_MINOR=${versionMinor} \ - -DVERSION_PATCH=${versionPatch} \ - -DVERSION_EXTRA=${versionExtra} \ - -DDEVELOPMENT_BUILD=${developmentBuild} \ - $(GPROF_DEF) - -ifdef USE_BUILTIN_LUA - LOCAL_CFLAGS += -DUSE_LUAJIT=0 -else - LOCAL_CFLAGS += -DUSE_LUAJIT=1 -endif - -ifdef NDEBUG - LOCAL_CFLAGS += -DNDEBUG=1 -endif - -ifdef GPROF - GPROF_DEF := -DGPROF - PROFILER_LIBS := android-ndk-profiler - LOCAL_CFLAGS += -pg -endif - -LOCAL_C_INCLUDES := \ - ../../src \ - ../../src/script \ - ../../lib/gmp \ - ../../lib/jsoncpp \ - deps/$(APP_ABI)/Curl/include \ - deps/$(APP_ABI)/Freetype/include/freetype2 \ - deps/$(APP_ABI)/Irrlicht/include \ - deps/$(APP_ABI)/Gettext/include \ - deps/$(APP_ABI)/Iconv/include \ - deps/$(APP_ABI)/OpenAL-Soft/include \ - deps/$(APP_ABI)/SQLite/include \ - deps/$(APP_ABI)/Vorbis/include \ - deps/$(APP_ABI)/Zstd/include - -ifdef USE_BUILTIN_LUA - LOCAL_C_INCLUDES += \ - ../../lib/lua/src \ - ../../lib/bitop -else - LOCAL_C_INCLUDES += deps/$(APP_ABI)/LuaJIT/include -endif - -LOCAL_SRC_FILES := \ - $(wildcard ../../src/client/*.cpp) \ - $(wildcard ../../src/client/*/*.cpp) \ - $(wildcard ../../src/content/*.cpp) \ - ../../src/database/database.cpp \ - ../../src/database/database-dummy.cpp \ - ../../src/database/database-files.cpp \ - ../../src/database/database-sqlite3.cpp \ - $(wildcard ../../src/gui/*.cpp) \ - $(wildcard ../../src/irrlicht_changes/*.cpp) \ - $(wildcard ../../src/mapgen/*.cpp) \ - $(wildcard ../../src/network/*.cpp) \ - $(wildcard ../../src/script/*.cpp) \ - $(wildcard ../../src/script/*/*.cpp) \ - $(wildcard ../../src/server/*.cpp) \ - $(wildcard ../../src/threading/*.cpp) \ - $(wildcard ../../src/util/*.c) \ - $(wildcard ../../src/util/*.cpp) \ - ../../src/ban.cpp \ - ../../src/chat.cpp \ - ../../src/clientiface.cpp \ - ../../src/collision.cpp \ - ../../src/content_mapnode.cpp \ - ../../src/content_nodemeta.cpp \ - ../../src/convert_json.cpp \ - ../../src/craftdef.cpp \ - ../../src/debug.cpp \ - ../../src/defaultsettings.cpp \ - ../../src/emerge.cpp \ - ../../src/environment.cpp \ - ../../src/face_position_cache.cpp \ - ../../src/filesys.cpp \ - ../../src/gettext.cpp \ - ../../src/httpfetch.cpp \ - ../../src/hud.cpp \ - ../../src/inventory.cpp \ - ../../src/inventorymanager.cpp \ - ../../src/itemdef.cpp \ - ../../src/itemstackmetadata.cpp \ - ../../src/light.cpp \ - ../../src/log.cpp \ - ../../src/main.cpp \ - ../../src/map.cpp \ - ../../src/map_settings_manager.cpp \ - ../../src/mapblock.cpp \ - ../../src/mapnode.cpp \ - ../../src/mapsector.cpp \ - ../../src/metadata.cpp \ - ../../src/modchannels.cpp \ - ../../src/nameidmapping.cpp \ - ../../src/nodedef.cpp \ - ../../src/nodemetadata.cpp \ - ../../src/nodetimer.cpp \ - ../../src/noise.cpp \ - ../../src/objdef.cpp \ - ../../src/object_properties.cpp \ - ../../src/particles.cpp \ - ../../src/pathfinder.cpp \ - ../../src/player.cpp \ - ../../src/porting.cpp \ - ../../src/porting_android.cpp \ - ../../src/profiler.cpp \ - ../../src/raycast.cpp \ - ../../src/reflowscan.cpp \ - ../../src/remoteplayer.cpp \ - ../../src/rollback.cpp \ - ../../src/rollback_interface.cpp \ - ../../src/serialization.cpp \ - ../../src/server.cpp \ - ../../src/serverenvironment.cpp \ - ../../src/serverlist.cpp \ - ../../src/settings.cpp \ - ../../src/staticobject.cpp \ - ../../src/texture_override.cpp \ - ../../src/tileanimation.cpp \ - ../../src/tool.cpp \ - ../../src/translation.cpp \ - ../../src/version.cpp \ - ../../src/voxel.cpp \ - ../../src/voxelalgorithms.cpp - -# Built-in Lua -ifdef USE_BUILTIN_LUA - LOCAL_SRC_FILES += \ - ../../lib/lua/src/lapi.c \ - ../../lib/lua/src/lauxlib.c \ - ../../lib/lua/src/lbaselib.c \ - ../../lib/lua/src/lcode.c \ - ../../lib/lua/src/ldblib.c \ - ../../lib/lua/src/ldebug.c \ - ../../lib/lua/src/ldo.c \ - ../../lib/lua/src/ldump.c \ - ../../lib/lua/src/lfunc.c \ - ../../lib/lua/src/lgc.c \ - ../../lib/lua/src/linit.c \ - ../../lib/lua/src/liolib.c \ - ../../lib/lua/src/llex.c \ - ../../lib/lua/src/lmathlib.c \ - ../../lib/lua/src/lmem.c \ - ../../lib/lua/src/loadlib.c \ - ../../lib/lua/src/lobject.c \ - ../../lib/lua/src/lopcodes.c \ - ../../lib/lua/src/loslib.c \ - ../../lib/lua/src/lparser.c \ - ../../lib/lua/src/lstate.c \ - ../../lib/lua/src/lstring.c \ - ../../lib/lua/src/lstrlib.c \ - ../../lib/lua/src/ltable.c \ - ../../lib/lua/src/ltablib.c \ - ../../lib/lua/src/ltm.c \ - ../../lib/lua/src/lundump.c \ - ../../lib/lua/src/lvm.c \ - ../../lib/lua/src/lzio.c \ - ../../lib/bitop/bit.c -endif - -# GMP -LOCAL_SRC_FILES += ../../lib/gmp/mini-gmp.c - -# JSONCPP -LOCAL_SRC_FILES += ../../lib/jsoncpp/jsoncpp.cpp - -LOCAL_STATIC_LIBRARIES += \ - Curl libmbedcrypto libmbedtls libmbedx509 \ - Freetype \ - Iconv libcharset \ - Irrlicht \ - OpenAL \ - Gettext \ - SQLite3 \ - Vorbis libvorbisfile libogg \ - Zstd -ifndef USE_BUILTIN_LUA - LOCAL_STATIC_LIBRARIES += LuaJIT -endif -LOCAL_STATIC_LIBRARIES += android_native_app_glue $(PROFILER_LIBS) - -LOCAL_LDLIBS := -lEGL -lGLESv1_CM -lGLESv2 -landroid -lOpenSLES - -include $(BUILD_SHARED_LIBRARY) - -ifdef GPROF -$(call import-module,android-ndk-profiler) -endif -$(call import-module,android/native_app_glue) diff --git a/android/native/jni/Application.mk b/android/native/jni/Application.mk deleted file mode 100644 index 9d9596137..000000000 --- a/android/native/jni/Application.mk +++ /dev/null @@ -1,32 +0,0 @@ -APP_PLATFORM := ${APP_PLATFORM} -APP_ABI := ${TARGET_ABI} -APP_STL := c++_shared -NDK_TOOLCHAIN_VERSION := clang -APP_SHORT_COMMANDS := true -APP_MODULES := Minetest - -APP_CPPFLAGS := -O2 -fvisibility=hidden - -ifeq ($(APP_ABI),armeabi-v7a) -APP_CPPFLAGS += -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -endif - -ifeq ($(APP_ABI),x86) -APP_CPPFLAGS += -mssse3 -mfpmath=sse -funroll-loops -endif - -ifndef NDEBUG -APP_CPPFLAGS := -g -Og -fno-omit-frame-pointer -endif - -APP_CFLAGS := $(APP_CPPFLAGS) -Wno-inconsistent-missing-override -Wno-parentheses-equality -APP_CXXFLAGS := $(APP_CPPFLAGS) -fexceptions -frtti -std=gnu++14 -APP_LDFLAGS := -Wl,--no-warn-mismatch,--gc-sections,--icf=safe - -ifeq ($(APP_ABI),arm64-v8a) -APP_LDFLAGS := -Wl,--no-warn-mismatch,--gc-sections -endif - -ifndef NDEBUG -APP_LDFLAGS := -endif diff --git a/android/native/src/main/AndroidManifest.xml b/android/native/src/main/AndroidManifest.xml deleted file mode 100644 index 19451c7fd..000000000 --- a/android/native/src/main/AndroidManifest.xml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/android/settings.gradle b/android/settings.gradle deleted file mode 100644 index b048fca7c..000000000 --- a/android/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ -rootProject.name = "Minetest" -include ':app', ':native' -- cgit v1.2.3