diff options
Diffstat (limited to 'platform')
-rw-r--r-- | platform/android/java/build.gradle | 12 | ||||
-rw-r--r-- | platform/linuxbsd/display_server_x11.cpp | 19 | ||||
-rw-r--r-- | platform/macos/display_server_macos.mm | 21 | ||||
-rw-r--r-- | platform/macos/os_macos.mm | 4 | ||||
-rw-r--r-- | platform/windows/display_server_windows.cpp | 18 |
5 files changed, 62 insertions, 12 deletions
diff --git a/platform/android/java/build.gradle b/platform/android/java/build.gradle index 05608883d7..5a91e5ce32 100644 --- a/platform/android/java/build.gradle +++ b/platform/android/java/build.gradle @@ -276,6 +276,11 @@ task generateDevTemplate { finalizedBy 'zipCustomBuild' } +task clean(type: Delete) { + dependsOn 'cleanGodotEditor' + dependsOn 'cleanGodotTemplates' +} + /** * Clean the generated editor artifacts. */ @@ -292,8 +297,6 @@ task cleanGodotEditor(type: Delete) { // Delete the Godot editor apks in the Godot bin directory delete("$binDir/android_editor.apk") delete("$binDir/android_editor_dev.apk") - - finalizedBy getTasksByName("clean", true) } /** @@ -321,5 +324,8 @@ task cleanGodotTemplates(type: Delete) { delete("$binDir/godot-lib.template_debug.dev.aar") delete("$binDir/godot-lib.template_release.aar") - finalizedBy getTasksByName("clean", true) + // Cover deletion for the libs using the previous naming scheme + delete("$binDir/godot-lib.debug.aar") + delete("$binDir/godot-lib.dev.aar") + delete("$binDir/godot-lib.release.aar") } diff --git a/platform/linuxbsd/display_server_x11.cpp b/platform/linuxbsd/display_server_x11.cpp index e78467beff..162db675b0 100644 --- a/platform/linuxbsd/display_server_x11.cpp +++ b/platform/linuxbsd/display_server_x11.cpp @@ -4435,10 +4435,21 @@ Vector<String> DisplayServerX11::get_rendering_drivers_func() { DisplayServer *DisplayServerX11::create_func(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) { DisplayServer *ds = memnew(DisplayServerX11(p_rendering_driver, p_mode, p_vsync_mode, p_flags, p_resolution, r_error)); if (r_error != OK) { - OS::get_singleton()->alert("Your video card driver does not support any of the supported Vulkan or OpenGL versions.\n" - "Please update your drivers or if you have a very old or integrated GPU, upgrade it.\n" - "If you have updated your graphics drivers recently, try rebooting.", - "Unable to initialize Video driver"); + if (p_rendering_driver == "vulkan") { + String executable_name = OS::get_singleton()->get_executable_path().get_file(); + OS::get_singleton()->alert("Your video card driver does not support the selected Vulkan version.\n" + "Please try updating your GPU driver or try using the OpenGL 3 driver.\n" + "You can enable the OpenGL 3 driver by starting the engine from the\n" + "command line with the command:\n'./" + + executable_name + " --rendering-driver opengl3'.\n " + "If you have updated your graphics drivers recently, try rebooting.", + "Unable to initialize Video driver"); + } else { + OS::get_singleton()->alert("Your video card driver does not support the selected OpenGL version.\n" + "Please try updating your GPU driver.\n" + "If you have updated your graphics drivers recently, try rebooting.", + "Unable to initialize Video driver"); + } } return ds; } diff --git a/platform/macos/display_server_macos.mm b/platform/macos/display_server_macos.mm index f4692abc92..c7f49870f2 100644 --- a/platform/macos/display_server_macos.mm +++ b/platform/macos/display_server_macos.mm @@ -3408,7 +3408,26 @@ void DisplayServerMacOS::set_icon(const Ref<Image> &p_icon) { DisplayServer *DisplayServerMacOS::create_func(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) { DisplayServer *ds = memnew(DisplayServerMacOS(p_rendering_driver, p_mode, p_vsync_mode, p_flags, p_resolution, r_error)); if (r_error != OK) { - OS::get_singleton()->alert("Your video card driver does not support any of the supported Vulkan or OpenGL versions.", "Unable to initialize Video driver"); + if (p_rendering_driver == "vulkan") { + String executable_command; + if (OS::get_singleton()->get_bundle_resource_dir() == OS::get_singleton()->get_executable_path().get_base_dir()) { + executable_command = vformat("%s --rendering-driver opengl3", OS::get_singleton()->get_executable_path()); + } else { + executable_command = vformat("open %s --args --rendering-driver opengl3", OS::get_singleton()->get_bundle_resource_dir().path_join("../..").simplify_path()); + } + OS::get_singleton()->alert("Your video card driver does not support the selected Vulkan version.\n" + "Please try updating your GPU driver or try using the OpenGL 3 driver.\n" + "You can enable the OpenGL 3 driver by starting the engine from the\n" + "command line with the command: '" + + executable_command + "'.\n" + "If you have updated your graphics drivers recently, try rebooting.", + "Unable to initialize Video driver"); + } else { + OS::get_singleton()->alert("Your video card driver does not support the selected OpenGL version.\n" + "Please try updating your GPU driver.\n" + "If you have updated your graphics drivers recently, try rebooting.", + "Unable to initialize Video driver"); + } } return ds; } diff --git a/platform/macos/os_macos.mm b/platform/macos/os_macos.mm index ae8534f6ab..8ffb0abfdb 100644 --- a/platform/macos/os_macos.mm +++ b/platform/macos/os_macos.mm @@ -148,9 +148,11 @@ void OS_MacOS::alert(const String &p_alert, const String &p_title) { NSString *ns_title = [NSString stringWithUTF8String:p_title.utf8().get_data()]; NSString *ns_alert = [NSString stringWithUTF8String:p_alert.utf8().get_data()]; + NSTextField *text_field = [NSTextField labelWithString:ns_alert]; + [text_field setAlignment:NSTextAlignmentCenter]; [window addButtonWithTitle:@"OK"]; [window setMessageText:ns_title]; - [window setInformativeText:ns_alert]; + [window setAccessoryView:text_field]; [window setAlertStyle:NSAlertStyleWarning]; id key_window = [[NSApplication sharedApplication] keyWindow]; diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index bc767a47e5..43d7208501 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -3922,9 +3922,21 @@ Vector<String> DisplayServerWindows::get_rendering_drivers_func() { DisplayServer *DisplayServerWindows::create_func(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) { DisplayServer *ds = memnew(DisplayServerWindows(p_rendering_driver, p_mode, p_vsync_mode, p_flags, p_resolution, r_error)); if (r_error != OK) { - OS::get_singleton()->alert("Your video card driver does not support any of the supported Vulkan or OpenGL versions.\n" - "Please update your drivers or if you have a very old or integrated GPU upgrade it.", - "Unable to initialize Video driver"); + if (p_rendering_driver == "vulkan") { + String executable_name = OS::get_singleton()->get_executable_path().get_file(); + OS::get_singleton()->alert("Your video card driver does not support the selected Vulkan version.\n" + "Please try updating your GPU driver or try using the OpenGL 3 driver.\n" + "You can enable the OpenGL 3 driver by starting the engine from the\n" + "command line with the command:\n'./" + + executable_name + " --rendering-driver opengl3'.\n " + "If you have updated your graphics drivers recently, try rebooting.", + "Unable to initialize Video driver"); + } else { + OS::get_singleton()->alert("Your video card driver does not support the selected OpenGL version.\n" + "Please try updating your GPU driver.\n" + "If you have updated your graphics drivers recently, try rebooting.", + "Unable to initialize Video driver"); + } } return ds; } |