diff options
Diffstat (limited to 'platform')
-rw-r--r-- | platform/android/export/export.cpp | 10 | ||||
-rw-r--r-- | platform/android/java/app/AndroidManifest.xml | 7 | ||||
-rw-r--r-- | platform/javascript/engine.js | 13 | ||||
-rw-r--r-- | platform/javascript/os_javascript.cpp | 2 | ||||
-rw-r--r-- | platform/osx/export/export.cpp | 35 | ||||
-rw-r--r-- | platform/osx/os_osx.mm | 7 | ||||
-rw-r--r-- | platform/windows/os_windows.cpp | 7 | ||||
-rw-r--r-- | platform/x11/os_x11.cpp | 2 |
8 files changed, 47 insertions, 36 deletions
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index 94dffd8a84..b61575e2aa 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -1290,7 +1290,7 @@ public: r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "graphics/xr_mode", PROPERTY_HINT_ENUM, "Regular,Oculus Mobile VR"), 0)); r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "graphics/degrees_of_freedom", PROPERTY_HINT_ENUM, "None,3DOF and 6DOF,6DOF"), 0)); r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "graphics/32_bits_framebuffer"), true)); - r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "one_click_deploy/clear_previous_install"), true)); + r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "one_click_deploy/clear_previous_install"), false)); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_package/debug", PROPERTY_HINT_GLOBAL_FILE, "*.apk"), "")); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_package/release", PROPERTY_HINT_GLOBAL_FILE, "*.apk"), "")); r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "custom_package/use_custom_build"), false)); @@ -1875,7 +1875,7 @@ public: new_file += "<!--CHUNK_" + text + "_BEGIN-->\n"; if (!found) { - ERR_PRINTS("No end marker found in AndroidManifest.conf for chunk: " + text); + ERR_PRINTS("No end marker found in AndroidManifest.xml for chunk: " + text); f->seek(pos); } else { //add chunk lines @@ -1894,7 +1894,7 @@ public: String last_tag = "android:icon=\"@drawable/icon\""; int last_tag_pos = l.find(last_tag); if (last_tag_pos == -1) { - WARN_PRINTS("No adding of application tags because could not find last tag for <application: " + last_tag); + ERR_PRINTS("Not adding application attributes as the expected tag was not found in '<application': " + last_tag); new_file += l + "\n"; } else { String base = l.substr(0, last_tag_pos + last_tag.length()); @@ -1980,9 +1980,9 @@ public: return ERR_CANT_CREATE; } if (p_debug) { - src_apk = build_path.plus_file("build/outputs/apk/debug/build-debug-unsigned.apk"); + src_apk = build_path.plus_file("build/outputs/apk/debug/android_debug.apk"); } else { - src_apk = build_path.plus_file("build/outputs/apk/release/build-release-unsigned.apk"); + src_apk = build_path.plus_file("build/outputs/apk/release/android_release.apk"); } if (!FileAccess::exists(src_apk)) { diff --git a/platform/android/java/app/AndroidManifest.xml b/platform/android/java/app/AndroidManifest.xml index d5f4ba18d6..ba01ec313b 100644 --- a/platform/android/java/app/AndroidManifest.xml +++ b/platform/android/java/app/AndroidManifest.xml @@ -26,11 +26,8 @@ <!-- Any tag in this line after android:icon will be erased when doing custom builds. --> <!-- If you want to add tags manually, do before it. --> - <application - android:label="@string/godot_project_name_string" - android:allowBackup="false" - tools:ignore="GoogleAppIndexingWarning" - android:icon="@drawable/icon" > + <!-- WARNING: This should stay on a single line until the parsing code is improved. See GH-32414. --> + <application android:label="@string/godot_project_name_string" android:allowBackup="false" tools:ignore="GoogleAppIndexingWarning" android:icon="@drawable/icon" > <!-- The following metadata values are replaced when Godot exports, modifying them here has no effect. --> <!-- Do these changes in the export preset. Adding new ones is fine. --> diff --git a/platform/javascript/engine.js b/platform/javascript/engine.js index 860d6707ff..1f78aa672d 100644 --- a/platform/javascript/engine.js +++ b/platform/javascript/engine.js @@ -94,6 +94,7 @@ return new Promise(function(resolve, reject) { rtenvProps.onRuntimeInitialized = resolve; rtenvProps.onAbort = reject; + rtenvProps.thisProgram = executableName; rtenvProps.engine.rtenv = Engine.RuntimeEnvironment(rtenvProps, LIBS); }); } @@ -130,13 +131,11 @@ ); }; - this.startGame = function(mainPack) { + this.startGame = function(execName, mainPack) { + + executableName = execName; + var mainArgs = [ '--main-pack', mainPack ]; - executableName = getBaseName(mainPack); - var mainArgs = []; - if (!getPathLeaf(mainPack).endsWith('.pck')) { - mainArgs = ['--main-pack', getPathLeaf(mainPack)]; - } return Promise.all([ // Load from directory, this.init(getBasePath(mainPack)), @@ -187,8 +186,6 @@ this.rtenv.locale = this.rtenv.locale.split('.')[0]; this.rtenv.resizeCanvasOnStart = resizeCanvasOnStart; - this.rtenv.thisProgram = executableName || getBaseName(basePath); - preloadedFiles.forEach(function(file) { var dir = LIBS.PATH.dirname(file.path); try { diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index 0179bf813d..b0661cb4dd 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -574,6 +574,8 @@ void OS_JavaScript::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_s }, cursors[p_shape].utf8().get_data()); /* clang-format on */ cursors[p_shape] = ""; + + cursors_cache.erase(p_shape); } set_cursor_shape(cursor_shape); diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp index 94090bcdc1..c8ecbd5a2d 100644 --- a/platform/osx/export/export.cpp +++ b/platform/osx/export/export.cpp @@ -133,7 +133,9 @@ void EditorExportPlatformOSX::get_export_options(List<ExportOption> *r_options) #ifdef OSX_ENABLED r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "codesign/identity"), "")); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "codesign/entitlements"), "")); + r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "codesign/timestamp"), true)); + r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "codesign/hardened_runtime"), true)); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "codesign/entitlements", PROPERTY_HINT_GLOBAL_FILE, "*.plist"), "")); #endif r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "texture_format/s3tc"), true)); @@ -360,9 +362,17 @@ void EditorExportPlatformOSX::_fix_plist(const Ref<EditorExportPreset> &p_preset Error EditorExportPlatformOSX::_code_sign(const Ref<EditorExportPreset> &p_preset, const String &p_path) { List<String> args; + if (p_preset->get("codesign/timestamp")) { + args.push_back("--timestamp"); + } + if (p_preset->get("codesign/hardened_runtime")) { + args.push_back("--options"); + args.push_back("runtime"); + } + if (p_preset->get("codesign/entitlements") != "") { /* this should point to our entitlements.plist file that sandboxes our application, I don't know if this should also be placed in our app bundle */ - args.push_back("-entitlements"); + args.push_back("--entitlements"); args.push_back(p_preset->get("codesign/entitlements")); } args.push_back("-s"); @@ -379,6 +389,10 @@ Error EditorExportPlatformOSX::_code_sign(const Ref<EditorExportPreset> &p_prese EditorNode::add_io_error("codesign: no identity found"); return FAILED; } + if ((str.find("unrecognized blob type") != -1) || (str.find("cannot read entitlement data") != -1)) { + EditorNode::add_io_error("codesign: invalid entitlements file"); + return FAILED; + } return OK; } @@ -386,7 +400,9 @@ Error EditorExportPlatformOSX::_code_sign(const Ref<EditorExportPreset> &p_prese Error EditorExportPlatformOSX::_create_dmg(const String &p_dmg_path, const String &p_pkg_name, const String &p_app_path_name) { List<String> args; - OS::get_singleton()->move_to_trash(p_dmg_path); + if (FileAccess::exists(p_dmg_path)) { + OS::get_singleton()->move_to_trash(p_dmg_path); + } args.push_back("create"); args.push_back(p_dmg_path); @@ -673,19 +689,6 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p ///@TODO we should check the contents of /Contents/Frameworks for frameworks to sign } - if (err == OK && identity != "") { - // we should probably loop through all resources and sign them? - err = _code_sign(p_preset, tmp_app_path_name + "/Contents/Resources/icon.icns"); - } - - if (err == OK && identity != "") { - err = _code_sign(p_preset, pack_path); - } - - if (err == OK && identity != "") { - err = _code_sign(p_preset, tmp_app_path_name + "/Contents/Info.plist"); - } - // and finally create a DMG if (err == OK) { if (ep.step("Making DMG", 3)) { diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index f48d4a307d..d30cb1c092 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -1973,11 +1973,16 @@ void OS_OSX::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, c [nsimage release]; } else { // Reset to default system cursor - cursors[p_shape] = NULL; + if (cursors[p_shape] != NULL) { + [cursors[p_shape] release]; + cursors[p_shape] = NULL; + } CursorShape c = cursor_shape; cursor_shape = CURSOR_MAX; set_cursor_shape(c); + + cursors_cache.erase(p_shape); } } diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index facf5b8d91..81b8d08b3d 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -2485,11 +2485,16 @@ void OS_Windows::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shap DeleteObject(bitmap); } else { // Reset to default system cursor - cursors[p_shape] = NULL; + if (cursors[p_shape]) { + DestroyIcon(cursors[p_shape]); + cursors[p_shape] = NULL; + } CursorShape c = cursor_shape; cursor_shape = CURSOR_MAX; set_cursor_shape(c); + + cursors_cache.erase(p_shape); } } diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 687981f32b..39160ee720 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -2996,6 +2996,8 @@ void OS_X11::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, c CursorShape c = current_cursor; current_cursor = CURSOR_MAX; set_cursor_shape(c); + + cursors_cache.erase(p_shape); } } |