mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 05:39:58 +00:00
Merge pull request #110926 from syntaxerror247/version-bump-and-page-size-update
[4.4] Android version bumps and page size update
This commit is contained in:
commit
d94252cf98
16 changed files with 66 additions and 33 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -89,6 +89,7 @@ local.properties
|
|||
*.iml
|
||||
.gradletasknamecache
|
||||
project.properties
|
||||
platform/android/java/build/
|
||||
platform/android/java/*/.cxx/
|
||||
platform/android/java/*/build/
|
||||
platform/android/java/*/libs/
|
||||
|
|
|
|||
|
|
@ -26,6 +26,10 @@ namespace GodotTools.ProjectEditor
|
|||
var mainGroup = root.AddPropertyGroup();
|
||||
mainGroup.AddProperty("TargetFramework", GodotMinimumRequiredTfm);
|
||||
|
||||
// Non-gradle builds require .NET 9 to match the jar libraries included in the export template.
|
||||
var net9 = mainGroup.AddProperty("TargetFramework", "net9.0");
|
||||
net9.Condition = " '$(GodotTargetPlatform)' == 'android' ";
|
||||
|
||||
mainGroup.AddProperty("EnableDynamicLoading", "true");
|
||||
|
||||
string sanitizedName = IdentifierUtils.SanitizeQualifiedIdentifier(name, allowEmptyIdentifiers: true);
|
||||
|
|
|
|||
Binary file not shown.
1
modules/mono/thirdparty/libSystem.Security.Cryptography.Native.Android.jar.source.txt
vendored
Normal file
1
modules/mono/thirdparty/libSystem.Security.Cryptography.Native.Android.jar.source.txt
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
https://www.nuget.org/packages/Microsoft.NETCore.App.Runtime.Mono.android-arm64/9.0.4
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
from misc.utility.scons_hints import *
|
||||
|
||||
import platform
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
|
@ -50,18 +51,34 @@ lib = env_android.add_shared_library("#bin/libgodot", [android_objects], SHLIBSU
|
|||
env.Depends(lib, thirdparty_obj)
|
||||
|
||||
lib_arch_dir = ""
|
||||
triple_target_dir = ""
|
||||
if env["arch"] == "arm32":
|
||||
lib_arch_dir = "armeabi-v7a"
|
||||
triple_target_dir = "arm-linux-androideabi"
|
||||
elif env["arch"] == "arm64":
|
||||
lib_arch_dir = "arm64-v8a"
|
||||
triple_target_dir = "aarch64-linux-android"
|
||||
elif env["arch"] == "x86_32":
|
||||
lib_arch_dir = "x86"
|
||||
triple_target_dir = "i686-linux-android"
|
||||
elif env["arch"] == "x86_64":
|
||||
lib_arch_dir = "x86_64"
|
||||
triple_target_dir = "x86_64-linux-android"
|
||||
else:
|
||||
print_warning("Architecture not suitable for embedding into APK; keeping .so at \\bin")
|
||||
|
||||
if lib_arch_dir != "":
|
||||
host_subpath = ""
|
||||
if sys.platform.startswith("linux"):
|
||||
host_subpath = "linux-x86_64"
|
||||
elif sys.platform.startswith("darwin"):
|
||||
host_subpath = "darwin-x86_64"
|
||||
elif sys.platform.startswith("win"):
|
||||
if platform.machine().endswith("64"):
|
||||
host_subpath = "windows-x86_64"
|
||||
else:
|
||||
host_subpath = "windows"
|
||||
|
||||
if lib_arch_dir != "" and host_subpath != "":
|
||||
if env.dev_build:
|
||||
lib_type_dir = "dev"
|
||||
elif env.debug_features:
|
||||
|
|
@ -82,9 +99,7 @@ if lib_arch_dir != "":
|
|||
out_dir + "/libgodot_android.so", "#bin/libgodot" + env["SHLIBSUFFIX"], Move("$TARGET", "$SOURCE")
|
||||
)
|
||||
|
||||
stl_lib_path = (
|
||||
str(env["ANDROID_NDK_ROOT"]) + "/sources/cxx-stl/llvm-libc++/libs/" + lib_arch_dir + "/libc++_shared.so"
|
||||
)
|
||||
stl_lib_path = f"{env['ANDROID_NDK_ROOT']}/toolchains/llvm/prebuilt/{host_subpath}/sysroot/usr/lib/{triple_target_dir}/libc++_shared.so"
|
||||
env_android.Command(out_dir + "/libc++_shared.so", stl_lib_path, Copy("$TARGET", "$SOURCE"))
|
||||
|
||||
def generate_apk(target, source, env):
|
||||
|
|
@ -99,10 +114,11 @@ if lib_arch_dir != "":
|
|||
else:
|
||||
gradle_process = ["./gradlew"]
|
||||
|
||||
gradle_process += [
|
||||
"generateGodotEditor" if env["target"] == "editor" else "generateGodotTemplates",
|
||||
"--quiet",
|
||||
]
|
||||
if env["target"] == "editor":
|
||||
gradle_process += ["generateGodotEditor", "generateGodotHorizonOSEditor", "generateGodotPicoOSEditor"]
|
||||
else:
|
||||
gradle_process += ["generateGodotTemplates"]
|
||||
gradle_process += ["--quiet"]
|
||||
|
||||
if env["debug_symbols"]:
|
||||
gradle_process += ["-PdoNotStrip=true"]
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ def get_android_ndk_root(env: "SConsEnvironment"):
|
|||
|
||||
# This is kept in sync with the value in 'platform/android/java/app/config.gradle'.
|
||||
def get_ndk_version():
|
||||
return "23.2.8568313"
|
||||
return "28.1.13356709"
|
||||
|
||||
|
||||
# This is kept in sync with the value in 'platform/android/java/app/config.gradle'.
|
||||
|
|
|
|||
|
|
@ -283,11 +283,11 @@ static const int EXPORT_FORMAT_APK = 0;
|
|||
static const int EXPORT_FORMAT_AAB = 1;
|
||||
|
||||
static const char *APK_ASSETS_DIRECTORY = "assets";
|
||||
static const char *AAB_ASSETS_DIRECTORY = "assetPacks/installTime/src/main/assets";
|
||||
static const char *AAB_ASSETS_DIRECTORY = "assetPackInstallTime/src/main/assets";
|
||||
|
||||
static const int OPENGL_MIN_SDK_VERSION = 21; // Should match the value in 'platform/android/java/app/config.gradle#minSdk'
|
||||
static const int VULKAN_MIN_SDK_VERSION = 24;
|
||||
static const int DEFAULT_TARGET_SDK_VERSION = 34; // Should match the value in 'platform/android/java/app/config.gradle#targetSdk'
|
||||
static const int DEFAULT_TARGET_SDK_VERSION = 35; // Should match the value in 'platform/android/java/app/config.gradle#targetSdk'
|
||||
|
||||
#ifndef ANDROID_ENABLED
|
||||
void EditorExportPlatformAndroid::_check_for_changes_poll_thread(void *ud) {
|
||||
|
|
@ -791,7 +791,7 @@ Error EditorExportPlatformAndroid::save_apk_so(void *p_userdata, const SharedObj
|
|||
String abi = abis[abi_index].abi;
|
||||
String dst_path = String("lib").path_join(abi).path_join(p_so.path.get_file());
|
||||
Vector<uint8_t> array = FileAccess::get_file_as_bytes(p_so.path);
|
||||
Error store_err = store_in_apk(ed, dst_path, array);
|
||||
Error store_err = store_in_apk(ed, dst_path, array, Z_NO_COMPRESSION);
|
||||
ERR_FAIL_COND_V_MSG(store_err, store_err, "Cannot store in apk file '" + dst_path + "'.");
|
||||
}
|
||||
}
|
||||
|
|
@ -2542,6 +2542,7 @@ bool _validate_dotnet_tfm(const String &required_tfm, String &r_error) {
|
|||
List<String> args;
|
||||
args.push_back("build");
|
||||
args.push_back(project_path);
|
||||
args.push_back("/p:GodotTargetPlatform=android");
|
||||
args.push_back("--getProperty:TargetFramework");
|
||||
|
||||
int exitcode;
|
||||
|
|
@ -2576,9 +2577,9 @@ bool EditorExportPlatformAndroid::has_valid_export_configuration(const Ref<Edito
|
|||
err += TTR("Exporting to Android when using C#/.NET is experimental.") + "\n";
|
||||
|
||||
if (!gradle_build_enabled) {
|
||||
// For template exports we only support .NET 8 because the template
|
||||
// includes .jar dependencies that may only be compatible with .NET 8.
|
||||
if (!_validate_dotnet_tfm("net8.0", err)) {
|
||||
// For template exports we only support .NET 9 because the template
|
||||
// includes .jar dependencies that may only be compatible with .NET 9.
|
||||
if (!_validate_dotnet_tfm("net9.0", err)) {
|
||||
r_error = err;
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ plugins {
|
|||
}
|
||||
|
||||
assetPack {
|
||||
packName = "installTime" // Directory name for the asset pack
|
||||
packName = "assetPackInstallTime" // Directory name for the asset pack
|
||||
dynamicDelivery {
|
||||
deliveryType = "install-time" // Delivery mode
|
||||
}
|
||||
|
|
@ -90,7 +90,7 @@ android {
|
|||
jvmTarget = versions.javaVersion
|
||||
}
|
||||
|
||||
assetPacks = [":assetPacks:installTime"]
|
||||
assetPacks = [":assetPackInstallTime"]
|
||||
|
||||
namespace = 'com.godot.game'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
ext.versions = [
|
||||
androidGradlePlugin: '8.2.0',
|
||||
compileSdk : 34,
|
||||
androidGradlePlugin: '8.6.1',
|
||||
compileSdk : 35,
|
||||
// Also update 'platform/android/export/export_plugin.cpp#OPENGL_MIN_SDK_VERSION'
|
||||
minSdk : 21,
|
||||
// Also update 'platform/android/export/export_plugin.cpp#DEFAULT_TARGET_SDK_VERSION'
|
||||
targetSdk : 34,
|
||||
buildTools : '34.0.0',
|
||||
kotlinVersion : '1.9.20',
|
||||
fragmentVersion : '1.7.1',
|
||||
targetSdk : 35,
|
||||
buildTools : '35.0.0',
|
||||
kotlinVersion : '2.1.20',
|
||||
fragmentVersion : '1.8.6',
|
||||
nexusPublishVersion: '1.3.0',
|
||||
javaVersion : JavaVersion.VERSION_17,
|
||||
// Also update 'platform/android/detect.py#get_ndk_version()' when this is updated.
|
||||
ndkVersion : '23.2.8568313',
|
||||
ndkVersion : '28.1.13356709',
|
||||
splashscreenVersion: '1.0.1',
|
||||
openxrVendorsVersion: '3.1.2-stable'
|
||||
openxrVendorsVersion: '4.0.0-stable'
|
||||
|
||||
]
|
||||
|
||||
|
|
@ -411,7 +411,13 @@ ext.shouldUseLegacyPackaging = { ->
|
|||
return Boolean.parseBoolean(legacyPackagingFlag)
|
||||
}
|
||||
|
||||
// Default behavior for minSdk >= 23
|
||||
if (getExportMinSdkVersion() <= 29) {
|
||||
// Use legacy packaging for compatibility with device running api <= 29.
|
||||
// See https://github.com/godotengine/godot/issues/108842 for reference.
|
||||
return true
|
||||
}
|
||||
|
||||
// Default behavior for minSdk > 29.
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,4 +15,4 @@ pluginManagement {
|
|||
}
|
||||
}
|
||||
|
||||
include ':assetPacks:installTime'
|
||||
include ':assetPackInstallTime'
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ dependencies {
|
|||
|
||||
implementation "androidx.window:window:1.3.0"
|
||||
implementation "androidx.core:core-splashscreen:$versions.splashscreenVersion"
|
||||
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
|
||||
implementation "androidx.constraintlayout:constraintlayout:2.2.1"
|
||||
implementation "org.bouncycastle:bcprov-jdk15to18:1.78"
|
||||
|
||||
// Meta dependencies
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#Wed Jan 17 12:08:26 PST 2024
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# Non functional cmake build file used to provide Android Studio editor support to the project.
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(godot)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
|
|
|
|||
|
|
@ -43,7 +43,11 @@ afterEvaluate {
|
|||
name = 'Rémi Verschelde'
|
||||
email = 'rverschelde@gmail.com'
|
||||
}
|
||||
// Add all other devs here...
|
||||
developer {
|
||||
id = 'godotengine'
|
||||
name = 'Godot Engine contributors'
|
||||
email = 'contact@godotengine.org'
|
||||
}
|
||||
}
|
||||
|
||||
// Version control info - if you're using GitHub, follow the
|
||||
|
|
|
|||
|
|
@ -25,5 +25,5 @@ include ':lib'
|
|||
include ':nativeSrcsConfigs'
|
||||
include ':editor'
|
||||
|
||||
include ':assetPacks:installTime'
|
||||
project(':assetPacks:installTime').projectDir = file("app/assetPacks/installTime")
|
||||
include ':assetPackInstallTime'
|
||||
project(':assetPackInstallTime').projectDir = file("app/assetPackInstallTime")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue