From 34833ed4d3245ac1934bebbddb137b68158ca0c0 Mon Sep 17 00:00:00 2001 From: Yaroslav Andreev Date: Sat, 15 Jun 2024 19:38:26 +0300 Subject: [PATCH] - use AuroraOS as target OS in port - add default icons paths to export default settings --- .../gles2/rasterizer_canvas_base_gles2.cpp | 14 +-- drivers/gles2/rasterizer_canvas_gles2.cpp | 2 +- drivers/gles2/rasterizer_gles2.cpp | 4 +- drivers/gles2/rasterizer_storage_gles2.cpp | 10 +- drivers/gles2/shader_gles2.cpp | 4 +- drivers/gles2/shaders/stdlib.glsl | 2 +- modules/webm/libvpx/SCsub | 6 +- platform/auroraos/README.md | 98 +++++++++++++++++ platform/{sailfish => auroraos}/SCsub | 0 .../{sailfish => auroraos}/context_gl_sdl.cpp | 28 ++--- .../{sailfish => auroraos}/context_gl_sdl.h | 0 .../crash_handler_sdl.cpp | 0 .../crash_handler_sdl.h | 0 platform/{sailfish => auroraos}/detect.py | 18 ++-- .../{sailfish => auroraos}/export/export.cpp | 102 +++++++++--------- .../{sailfish => auroraos}/export/export.h | 2 +- platform/{sailfish => auroraos}/godot_sdl.cpp | 0 .../{sailfish => auroraos}/helper_macros.h | 4 +- .../{sailfish => auroraos}/joypad_linux.cpp | 0 .../{sailfish => auroraos}/joypad_linux.h | 0 .../key_mapping_sdl.cpp | 0 .../{sailfish => auroraos}/key_mapping_sdl.h | 0 .../{sailfish => auroraos}/libudev-so_wrap.c | 0 .../{sailfish => auroraos}/libudev-so_wrap.h | 0 platform/auroraos/logo.png | Bin 0 -> 2203 bytes platform/{sailfish => auroraos}/os_sdl.cpp | 22 ++-- platform/{sailfish => auroraos}/os_sdl.h | 2 +- .../{sailfish => auroraos}/platform_config.h | 0 platform/{sailfish => auroraos}/power_sdl.cpp | 0 platform/{sailfish => auroraos}/power_sdl.h | 0 platform/sailfish/README.md | 98 ----------------- platform/sailfish/logo.png | Bin 2230 -> 0 bytes scene/main/scene_tree.cpp | 10 +- 33 files changed, 212 insertions(+), 214 deletions(-) create mode 100644 platform/auroraos/README.md rename platform/{sailfish => auroraos}/SCsub (100%) rename platform/{sailfish => auroraos}/context_gl_sdl.cpp (97%) rename platform/{sailfish => auroraos}/context_gl_sdl.h (100%) rename platform/{sailfish => auroraos}/crash_handler_sdl.cpp (100%) rename platform/{sailfish => auroraos}/crash_handler_sdl.h (100%) rename platform/{sailfish => auroraos}/detect.py (94%) rename platform/{sailfish => auroraos}/export/export.cpp (93%) rename platform/{sailfish => auroraos}/export/export.h (98%) rename platform/{sailfish => auroraos}/godot_sdl.cpp (100%) rename platform/{sailfish => auroraos}/helper_macros.h (89%) rename platform/{sailfish => auroraos}/joypad_linux.cpp (100%) rename platform/{sailfish => auroraos}/joypad_linux.h (100%) rename platform/{sailfish => auroraos}/key_mapping_sdl.cpp (100%) rename platform/{sailfish => auroraos}/key_mapping_sdl.h (100%) rename platform/{sailfish => auroraos}/libudev-so_wrap.c (100%) rename platform/{sailfish => auroraos}/libudev-so_wrap.h (100%) create mode 100644 platform/auroraos/logo.png rename platform/{sailfish => auroraos}/os_sdl.cpp (98%) rename platform/{sailfish => auroraos}/os_sdl.h (99%) rename platform/{sailfish => auroraos}/platform_config.h (100%) rename platform/{sailfish => auroraos}/power_sdl.cpp (100%) rename platform/{sailfish => auroraos}/power_sdl.h (100%) delete mode 100644 platform/sailfish/README.md delete mode 100644 platform/sailfish/logo.png diff --git a/drivers/gles2/rasterizer_canvas_base_gles2.cpp b/drivers/gles2/rasterizer_canvas_base_gles2.cpp index 6cbb55225102..b7b0d301a8d3 100644 --- a/drivers/gles2/rasterizer_canvas_base_gles2.cpp +++ b/drivers/gles2/rasterizer_canvas_base_gles2.cpp @@ -61,8 +61,8 @@ void RasterizerCanvasBaseGLES2::canvas_begin() { state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_ATTRIB_LIGHT_ANGLE, false); state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_ATTRIB_MODULATE, false); state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_ATTRIB_LARGE_VERTEX, false); -#if SAILFISH_FORCE_LANDSCAPE && SAILFISH_ENABLED - WARN_PRINT_ONCE("Force Sailfish landscape mode enabled"); +#if AURORAOS_FORCE_LANDSCAPE && AURORAOS_ENABLED + WARN_PRINT_ONCE("Force AuroraOS landscape mode enabled"); state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_FORCE_LANDSCAPE, true); #else state.canvas_shader.set_conditional(CanvasShaderGLES2::USE_FORCE_LANDSCAPE, false); @@ -124,7 +124,7 @@ void RasterizerCanvasBaseGLES2::canvas_begin() { canvas_transform.scale(Vector3(2.0f / storage->frame.current_rt->width, csy * -2.0f / storage->frame.current_rt->height, 1.0f)); } else { Vector2 ssize = OS::get_singleton()->get_window_size(); -#if SAILFISH_FORCE_LANDSCAPE && SAILFISH_ENABLED +#if AURORAOS_FORCE_LANDSCAPE && AURORAOS_ENABLED if (OS::get_singleton()->get_screen_orientation() == OS::SCREEN_LANDSCAPE || OS::get_singleton()->get_screen_orientation() == OS::SCREEN_SENSOR_LANDSCAPE || OS::get_singleton()->get_screen_orientation() == OS::SCREEN_REVERSE_LANDSCAPE) @@ -143,7 +143,7 @@ void RasterizerCanvasBaseGLES2::canvas_begin() { _set_uniforms(); -#if SAILFISH_FORCE_LANDSCAPE && SAILFISH_ENABLED +#if AURORAOS_FORCE_LANDSCAPE && AURORAOS_ENABLED // TODO: move this code to _set_uniforms if (OS::get_singleton()->get_screen_orientation() == OS::SCREEN_LANDSCAPE) state.canvas_shader.set_uniform(CanvasShaderGLES2::FORCE_LANDSCAPE, 1); @@ -169,7 +169,7 @@ void RasterizerCanvasBaseGLES2::canvas_end() { //reset viewport to full window size int viewport_width = OS::get_singleton()->get_window_size().width; int viewport_height = OS::get_singleton()->get_window_size().height; -#if SAILFISH_FORCE_LANDSCAPE && SAILFISH_ENABLED +#if AURORAOS_FORCE_LANDSCAPE && AURORAOS_ENABLED if (OS::get_singleton()->get_screen_orientation() == OS::SCREEN_LANDSCAPE || OS::get_singleton()->get_screen_orientation() == OS::SCREEN_SENSOR_LANDSCAPE || OS::get_singleton()->get_screen_orientation() == OS::SCREEN_REVERSE_LANDSCAPE) { @@ -295,7 +295,7 @@ void RasterizerCanvasBaseGLES2::draw_window_margins(int *black_margin, RID *blac int window_h = window_size.height; int window_w = window_size.width; -#if SAILFISH_FORCE_LANDSCAPE && SAILFISH_ENABLED +#if AURORAOS_FORCE_LANDSCAPE && AURORAOS_ENABLED // force landscape if (OS::get_singleton()->get_screen_orientation() == OS::SCREEN_LANDSCAPE || OS::get_singleton()->get_screen_orientation() == OS::SCREEN_SENSOR_LANDSCAPE || @@ -306,7 +306,7 @@ void RasterizerCanvasBaseGLES2::draw_window_margins(int *black_margin, RID *blac #endif glBindFramebuffer(GL_FRAMEBUFFER, storage->system_fbo); -#if SAILFISH_FORCE_LANDSCAPE && SAILFISH_ENABLED +#if AURORAOS_FORCE_LANDSCAPE && AURORAOS_ENABLED glViewport(0, 0, window_w, window_h); #else glViewport(0, 0, window_size.width, window_size.height); diff --git a/drivers/gles2/rasterizer_canvas_gles2.cpp b/drivers/gles2/rasterizer_canvas_gles2.cpp index b57fb9dbca20..877ccdef8dca 100644 --- a/drivers/gles2/rasterizer_canvas_gles2.cpp +++ b/drivers/gles2/rasterizer_canvas_gles2.cpp @@ -1207,7 +1207,7 @@ void RasterizerCanvasGLES2::canvas_begin() { } void RasterizerCanvasGLES2::canvas_render_items_begin(const Color &p_modulate, Light *p_light, const Transform2D &p_base_transform) { -#if SAILFISH_FORCE_LANDSCAPE && SAILFISH_ENABLED +#if AURORAOS_FORCE_LANDSCAPE && AURORAOS_ENABLED state.canvas_shader.set_uniform(CanvasShaderGLES2::FORCE_LANDSCAPE, 0); #endif batch_canvas_render_items_begin(p_modulate, p_light, p_base_transform); diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp index eeb6336f460d..b51bfa2b0a81 100644 --- a/drivers/gles2/rasterizer_gles2.cpp +++ b/drivers/gles2/rasterizer_gles2.cpp @@ -314,7 +314,7 @@ void RasterizerGLES2::set_current_render_target(RID p_render_target) { } else { storage->frame.current_rt = nullptr; storage->frame.clear_request = false; -#if SAILFISH_FORCE_LANDSCAPE && SAILFISH_ENABLED +#if AURORAOS_FORCE_LANDSCAPE && AURORAOS_ENABLED if (OS::get_singleton()->get_screen_orientation() == OS::SCREEN_LANDSCAPE || OS::get_singleton()->get_screen_orientation() == OS::SCREEN_SENSOR_LANDSCAPE || OS::get_singleton()->get_screen_orientation() == OS::SCREEN_REVERSE_LANDSCAPE) @@ -345,7 +345,7 @@ void RasterizerGLES2::set_boot_image(const Ref &p_image, const Color &p_c return; } -#if SAILFISH_FORCE_LANDSCAPE && SAILFISH_ENABLED +#if AURORAOS_FORCE_LANDSCAPE && AURORAOS_ENABLED int window_w = OS::get_singleton()->get_window_size().width; int window_h = OS::get_singleton()->get_window_size().height; diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp index 293d99d66cc5..9f3218724d1d 100644 --- a/drivers/gles2/rasterizer_storage_gles2.cpp +++ b/drivers/gles2/rasterizer_storage_gles2.cpp @@ -100,7 +100,7 @@ GLuint RasterizerStorageGLES2::system_fbo = 0; //void *glRenderbufferStorageMultisampleAPPLE; //void *glResolveMultisampleFramebufferAPPLE; #define glRenderbufferStorageMultisample glRenderbufferStorageMultisampleAPPLE -#elif defined(ANDROID_ENABLED) || defined(SAILFISH_ENABLED) +#elif defined(ANDROID_ENABLED) || defined(AURORAOS_ENABLED) #include PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC glRenderbufferStorageMultisampleEXT; @@ -5148,7 +5148,7 @@ void RasterizerStorageGLES2::_render_target_allocate(RenderTarget *rt) { glRenderbufferStorageMultisample(GL_RENDERBUFFER, msaa, color_internal_format, rt->width, rt->height); glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, rt->multisample_color); -#elif defined(ANDROID_ENABLED) || defined(SAILFISH_ENABLED) +#elif defined(ANDROID_ENABLED) || defined(AURORAOS_ENABLED) // Render to a texture in android glGenTextures(1, &rt->multisample_color); glBindTexture(GL_TEXTURE_2D, rt->multisample_color); @@ -5176,7 +5176,7 @@ void RasterizerStorageGLES2::_render_target_allocate(RenderTarget *rt) { glDeleteRenderbuffers(1, &rt->multisample_depth); rt->multisample_depth = 0; -#if defined(ANDROID_ENABLED) || defined(SAILFISH_ENABLED) +#if defined(ANDROID_ENABLED) || defined(AURORAOS_ENABLED) glDeleteTextures(1, &rt->multisample_color); #else glDeleteRenderbuffers(1, &rt->multisample_color); @@ -5186,7 +5186,7 @@ void RasterizerStorageGLES2::_render_target_allocate(RenderTarget *rt) { glBindRenderbuffer(GL_RENDERBUFFER, 0); glBindFramebuffer(GL_FRAMEBUFFER, 0); -#if defined(ANDROID_ENABLED) || defined(SAILFISH_ENABLED) +#if defined(ANDROID_ENABLED) || defined(AURORAOS_ENABLED) glBindTexture(GL_TEXTURE_2D, 0); #endif @@ -5423,7 +5423,7 @@ void RasterizerStorageGLES2::_render_target_clear(RenderTarget *rt) { glDeleteRenderbuffers(1, &rt->multisample_depth); rt->multisample_depth = 0; -#if defined(ANDROID_ENABLED) || defined(SAILFISH_ENABLED) +#if defined(ANDROID_ENABLED) || defined(AURORAOS_ENABLED) glDeleteTextures(1, &rt->multisample_color); #else glDeleteRenderbuffers(1, &rt->multisample_color); diff --git a/drivers/gles2/shader_gles2.cpp b/drivers/gles2/shader_gles2.cpp index bdd605ca0f2f..9542d1f84220 100644 --- a/drivers/gles2/shader_gles2.cpp +++ b/drivers/gles2/shader_gles2.cpp @@ -173,8 +173,8 @@ ShaderGLES2::Version *ShaderGLES2::get_current_version() { #else strings.push_back("#version 100\n"); -#ifdef SAILFISH_i486_GLES2 - strings.push_back("#define USE_SAILFISH_i486_GLES2\n"); +#ifdef AURORAOS_i486_GLES2 + strings.push_back("#define USE_AURORAOS_i486_GLES2\n"); #endif //angle does not like diff --git a/drivers/gles2/shaders/stdlib.glsl b/drivers/gles2/shaders/stdlib.glsl index e4183cbf509e..05cd362bf51c 100644 --- a/drivers/gles2/shaders/stdlib.glsl +++ b/drivers/gles2/shaders/stdlib.glsl @@ -378,7 +378,7 @@ highp mat4 inverse(highp mat4 m) { #endif -#if defined(USE_SAILFISH_i486_GLES2) +#if defined(USE_AURORAOS_i486_GLES2) #define TRANSPOSE_FUNC_NAME transpose_custom #else #define TRANSPOSE_FUNC_NAME transpose diff --git a/modules/webm/libvpx/SCsub b/modules/webm/libvpx/SCsub index 2d691f45ab4a..b74e51924920 100644 --- a/modules/webm/libvpx/SCsub +++ b/modules/webm/libvpx/SCsub @@ -227,7 +227,7 @@ if env["platform"] == "uwp": elif env["platform"] != "windows": # Disable for Windows, yasm SIMD optimizations trigger crash (GH-50862). import platform - is_x11_or_server_arm = (env["platform"] == "x11" or env["platform"] == "server" or env["platform"] == 'sailfish') and ( + is_x11_or_server_arm = (env["platform"] == "x11" or env["platform"] == "server" or env["platform"] == 'auroraos') and ( platform.machine().startswith("arm") or platform.machine().startswith("aarch") ) is_macos_x86 = env["platform"] == "osx" and ("arch" in env and (env["arch"] != "arm64")) @@ -242,7 +242,7 @@ elif env["platform"] != "windows": # Disable for Windows, yasm SIMD optimizatio env["platform"] == "windows" or env["platform"] == "x11" or env["platform"] == "haiku" - or env["platform"] == 'sailfish' + or env["platform"] == 'auroraos' or is_macos_x86 or is_android_x86 or is_ios_x86 @@ -312,7 +312,7 @@ if webm_cpu_arm: and env["android_arch"] == "armv7" or env["platform"] == "x11" or env["platform"] == "server" - or env["platform"] == 'sailfish' + or env["platform"] == 'auroraos' ): env_libvpx["ASFLAGS"] = "-mfpu=neon" elif env["platform"] == "uwp": diff --git a/platform/auroraos/README.md b/platform/auroraos/README.md new file mode 100644 index 000000000000..beb326f323d5 --- /dev/null +++ b/platform/auroraos/README.md @@ -0,0 +1,98 @@ +## install AuroraSDK +1. Download and install [AuroraSDK](https://auroraosos.org/wiki/Application_SDK) +2. (optional) Install docker image, use [this instcruction](https://github.com/CODeRUS/docker-auroraosos-sdk-local) from @CODeRUS + +## Add AuroraSDK/bin folder to PATH for using sfdk +```shell +export PATH=$HOME/AuroraSDK/bin:${PATH} +``` +now you can use **sfdk** tool +```shell +sfdk engine exec +``` +or, you can use absolute path to **sfdk** +```shell +~/AuroraOS/bin/sfdk engine exec echo "Hello from AuroraOS SDK build engine" +``` + +### Install dependencies in AuroraSDK targets +check list of targets +```shell +sfdk engine exec sb2-config -l +``` + +should output something like this + +```shell +AuroraOS-4.3.0.12-aarch64.default +AuroraOS-4.3.0.12-aarch64 +AuroraOS-4.3.0.12-armv7hl.default +AuroraOS-4.3.0.12-armv7hl +AuroraOS-4.3.0.12-i486.default +AuroraOS-4.3.0.12-i486 +``` + +**armv7hl** +```sh +sfdk engine exec sb2 -t AuroraOS-4.3.0.12-armv7hl -R zypper in -y SDL2-devel systemd-devel libaudioresource-devel pulseaudio-devel openssl-devel libwebp-devel libvpx-devel wayland-devel libpng-devel scons +``` + +**i486** +```sh +sfdk engine exec sb2 -t AuroraOS-4.3.0.12-i486 -R zypper in -y SDL2-devel systemd-devel libaudioresource-devel pulseaudio-devel openssl-devel libwebp-devel libvpx-devel wayland-devel libpng-devel scons +``` + +**aarch64** +```sh +sfdk engine exec sb2 -t AuroraOS-4.3.0.12-aarch64 -R zypper in -y SDL2-devel systemd-devel libaudioresource-devel pulseaudio-devel openssl-devel libwebp-devel libvpx-devel wayland-devel libpng-devel scons +``` + +or by **one line** script for all targets in same time ;) : +```shell +for each in `sfdk engine exec sb2-config -l|grep -v default`; do sfdk engine exec sb2 -t $each -R zypper in -y SDL2-devel libaudioresource-devel pulseaudio-devel openssl-devel libwebp-devel libvpx-devel wayland-devel libpng-devel systemd-devel scons; done +``` + +## Build Godot export template for AuroraOS OS +Use sfdk from AuroraSDK/bin/sfdk + +```sh +export PATH=$HOME/AuroraSDK/bin:${PATH} +# building for armv7hl platfrom +sfdk engine exec sb2 -t AuroraOS-4.3.0.12-armv7hl scons -j`nproc` arch=arm platform=auroraos tools=no bits=32 target=release +# than do same for aarch64 platfrom +sfdk engine exec sb2 -t AuroraOS-4.3.0.12-aarch64 scons -j`nproc` arch=arm64 platform=auroraos tools=no bits=64 target=release +# than do same for i486 platfrom +sfdk engine exec sb2 -t AuroraOS-4.3.0.12-i486 scons -j`nproc` arch=x86 platform=auroraos tools=no bits=32 target=release +# then make export tempalte smaller +sfdk engine exec sb2 -t AuroraOS-4.3.0.12-arm7hl strip bin/godot.auroraos.opt.arm +sfdk engine exec sb2 -t AuroraOS-4.3.0.12-aarch64 strip bin/godot.auroraos.opt.arm64 +sfdk engine exec sb2 -t AuroraOS-4.3.0.12-i486 strip bin/godot.auroraos.opt.x86 +``` + +## Build Godot Editor with AuroraOS export menu +### build on Linux X11 +```shell +scons -j`nproc` arch=x64 platform=x11 tools=yes bits=64 traget=release_debug +strip bin/godot.x11.tools.x64 +``` +### build for Win64 with cross compile toolkit on Linux +First, install cross compile gcc +#### on ubuntu +``` +sudo apt install -y mingw-w64 +``` +then choose posix compiler, with commands below +``` +sudo update-alternatives --config x86_64-w64-mingw32-gcc +sudo update-alternatives --config x86_64-w64-mingw32-g++ +``` +#### on fedora (centos) +``` +sudo dnf install -y mingw64-gcc-c++ mingw64-gcc +``` +#### build an editor +```shell +#ubuntu +CXX=x86_64-w64-mingw32-g++ CC=x86_64-w64-mingw32-gcc scons -j`nproc` arch=x64 platform=windows tools=yes bits=64 traget=release_debug +x86_64-w64-mingw32-strip bin/godot.windows.tools.x64.exe +``` \ No newline at end of file diff --git a/platform/sailfish/SCsub b/platform/auroraos/SCsub similarity index 100% rename from platform/sailfish/SCsub rename to platform/auroraos/SCsub diff --git a/platform/sailfish/context_gl_sdl.cpp b/platform/auroraos/context_gl_sdl.cpp similarity index 97% rename from platform/sailfish/context_gl_sdl.cpp rename to platform/auroraos/context_gl_sdl.cpp index 9bebc97c7a42..a55fed0e512f 100644 --- a/platform/sailfish/context_gl_sdl.cpp +++ b/platform/auroraos/context_gl_sdl.cpp @@ -40,7 +40,7 @@ #include #include #include -#ifdef SAILFISH_ENABLED +#ifdef AURORAOS_ENABLED #include #include #endif @@ -174,7 +174,7 @@ SDL_Window *ContextGL_SDL::get_window_pointer() { void ContextGL_SDL::set_ext_surface_orientation(int sdl_orientation) { OS::ScreenOrientation screen_orientation = OS::get_singleton()->get_screen_orientation(); -#ifdef SAILFISH_ENABLED +#ifdef AURORAOS_ENABLED int wl_orientation = p->wl_allowed_orientation; /*case SDL_ORIENTATION_LANDSCAPE: WL_OUTPUT_TRANSFORM_270 case SDL_ORIENTATION_LANDSCAPE_FLIPPED: WL_OUTPUT_TRANSFORM_90 @@ -189,7 +189,7 @@ void ContextGL_SDL::set_ext_surface_orientation(int sdl_orientation) { case SDL_ORIENTATION_LANDSCAPE_FLIPPED: // qt_extended_surface_set_content_orientation(p->qt_ext_surface, QT_EXTENDED_SURFACE_ORIENTATION_LANDSCAPEORIENTATION); p->allowed_orientation_str = "landscape"; - #ifdef SAILFISH_ENABLED + #ifdef AURORAOS_ENABLED wl_orientation = WL_OUTPUT_TRANSFORM_270; #endif if (OS::get_singleton()->is_stdout_verbose()) @@ -199,7 +199,7 @@ void ContextGL_SDL::set_ext_surface_orientation(int sdl_orientation) { case SDL_ORIENTATION_LANDSCAPE: // qt_extended_surface_set_content_orientation(p->qt_ext_surface, QT_EXTENDED_SURFACE_ORIENTATION_INVERTEDLANDSCAPEORIENTATION); p->allowed_orientation_str = "inverted-landscape"; - #ifdef SAILFISH_ENABLED + #ifdef AURORAOS_ENABLED wl_orientation = WL_OUTPUT_TRANSFORM_90; #endif if (OS::get_singleton()->is_stdout_verbose()) @@ -213,7 +213,7 @@ void ContextGL_SDL::set_ext_surface_orientation(int sdl_orientation) { case SDL_ORIENTATION_PORTRAIT: // qt_extended_surface_set_content_orientation(p->qt_ext_surface, QT_EXTENDED_SURFACE_ORIENTATION_PORTRAITORIENTATION); p->allowed_orientation_str = "portrait"; - #ifdef SAILFISH_ENABLED + #ifdef AURORAOS_ENABLED wl_orientation = WL_OUTPUT_TRANSFORM_NORMAL; #endif if (OS::get_singleton()->is_stdout_verbose()) @@ -223,7 +223,7 @@ void ContextGL_SDL::set_ext_surface_orientation(int sdl_orientation) { case SDL_ORIENTATION_PORTRAIT_FLIPPED: // qt_extended_surface_set_content_orientation(p->qt_ext_surface, QT_EXTENDED_SURFACE_ORIENTATION_INVERTEDPORTRAITORIENTATION); p->allowed_orientation_str = "inverted-portrait"; - #ifdef SAILFISH_ENABLED + #ifdef AURORAOS_ENABLED wl_orientation = WL_OUTPUT_TRANSFORM_180; #endif if (OS::get_singleton()->is_stdout_verbose()) @@ -237,7 +237,7 @@ void ContextGL_SDL::set_ext_surface_orientation(int sdl_orientation) { case SDL_ORIENTATION_LANDSCAPE_FLIPPED: // qt_extended_surface_set_content_orientation(p->qt_ext_surface, QT_EXTENDED_SURFACE_ORIENTATION_LANDSCAPEORIENTATION); p->allowed_orientation_str = "landscape"; - #ifdef SAILFISH_ENABLED + #ifdef AURORAOS_ENABLED wl_orientation = WL_OUTPUT_TRANSFORM_270; #endif if (OS::get_singleton()->is_stdout_verbose()) @@ -247,7 +247,7 @@ void ContextGL_SDL::set_ext_surface_orientation(int sdl_orientation) { case SDL_ORIENTATION_LANDSCAPE: // qt_extended_surface_set_content_orientation(p->qt_ext_surface, QT_EXTENDED_SURFACE_ORIENTATION_INVERTEDLANDSCAPEORIENTATION); p->allowed_orientation_str = "inverted-landscape"; - #ifdef SAILFISH_ENABLED + #ifdef AURORAOS_ENABLED wl_orientation = WL_OUTPUT_TRANSFORM_90; #endif if (OS::get_singleton()->is_stdout_verbose()) @@ -257,7 +257,7 @@ void ContextGL_SDL::set_ext_surface_orientation(int sdl_orientation) { case SDL_ORIENTATION_PORTRAIT: // qt_extended_surface_set_content_orientation0(p->qt_ext_surface, QT_EXTENDED_SURFACE_ORIENTATION_PORTRAITORIENTATION); p->allowed_orientation_str = "portrait"; - #ifdef SAILFISH_ENABLED + #ifdef AURORAOS_ENABLED wl_orientation = WL_OUTPUT_TRANSFORM_NORMAL; #endif if (OS::get_singleton()->is_stdout_verbose()) @@ -267,7 +267,7 @@ void ContextGL_SDL::set_ext_surface_orientation(int sdl_orientation) { case SDL_ORIENTATION_PORTRAIT_FLIPPED: // qt_extended_surface_set_content_orientation(p->qt_ext_surface, QT_EXTENDED_SURFACE_ORIENTATION_INVERTEDPORTRAITORIENTATION); p->allowed_orientation_str = "inverted-portrait"; - #ifdef SAILFISH_ENABLED + #ifdef AURORAOS_ENABLED wl_orientation = WL_OUTPUT_TRANSFORM_180; #endif if (OS::get_singleton()->is_stdout_verbose()) @@ -280,7 +280,7 @@ void ContextGL_SDL::set_ext_surface_orientation(int sdl_orientation) { // No need other orietations hadle, bacuse other orientations are static, not dynamic break; } -#ifdef SAILFISH_ENABLED +#ifdef AURORAOS_ENABLED struct SDL_SysWMinfo wmInfo; SDL_VERSION(&wmInfo.version); if (!SDL_GetWindowWMInfo(sdl_window, &wmInfo)) { @@ -289,7 +289,7 @@ void ContextGL_SDL::set_ext_surface_orientation(int sdl_orientation) { if (SDL_SetHintWithPriority(SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION, p->allowed_orientation_str.c_str(), SDL_HINT_OVERRIDE) == SDL_FALSE) { mprint_verbose("WARGNING: Cant set hint SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION for orinetation events"); } -#ifdef SAILFISH_ENABLED +#ifdef AURORAOS_ENABLED } else if(p->wl_allowed_orientation != wl_orientation) { p->wl_allowed_orientation = wl_orientation; wl_surface_set_buffer_transform(wmInfo.info.wl.surface, wl_orientation); @@ -299,7 +299,7 @@ void ContextGL_SDL::set_ext_surface_orientation(int sdl_orientation) { } void ContextGL_SDL::set_screen_orientation(OS::ScreenOrientation p_orientation) { -#if SAILFISH_FORCE_LANDSCAPE +#if AURORAOS_FORCE_LANDSCAPE switch (p_orientation) { case OS::SCREEN_LANDSCAPE: p->allowed_orientation_str = "landscape"; @@ -341,7 +341,7 @@ void ContextGL_SDL::set_screen_orientation(OS::ScreenOrientation p_orientation) "portrait" top of device up "inverted-portrait" top of device down */ -#ifndef SAILFISH_ENABLED +#ifndef AURORAOS_ENABLED if (SDL_SetHintWithPriority(SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION, p->allowed_orientation_str.c_str(), SDL_HINT_OVERRIDE) == SDL_FALSE) { mprint_verbose("WARGNING: Cant set hint SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION for orinetation events"); // OS::get_singleton()->print diff --git a/platform/sailfish/context_gl_sdl.h b/platform/auroraos/context_gl_sdl.h similarity index 100% rename from platform/sailfish/context_gl_sdl.h rename to platform/auroraos/context_gl_sdl.h diff --git a/platform/sailfish/crash_handler_sdl.cpp b/platform/auroraos/crash_handler_sdl.cpp similarity index 100% rename from platform/sailfish/crash_handler_sdl.cpp rename to platform/auroraos/crash_handler_sdl.cpp diff --git a/platform/sailfish/crash_handler_sdl.h b/platform/auroraos/crash_handler_sdl.h similarity index 100% rename from platform/sailfish/crash_handler_sdl.h rename to platform/auroraos/crash_handler_sdl.h diff --git a/platform/sailfish/detect.py b/platform/auroraos/detect.py similarity index 94% rename from platform/sailfish/detect.py rename to platform/auroraos/detect.py index 322a3f510908..5f8f787c254d 100644 --- a/platform/sailfish/detect.py +++ b/platform/auroraos/detect.py @@ -8,7 +8,7 @@ def is_active(): def get_name(): - return "SailfishOS" + return "AuroraOS" def can_build(): @@ -25,7 +25,7 @@ def can_build(): sdl_error = os.system("pkg-config sdl2 --modversion > /dev/null ") if (sdl_error): - print("SDL2 not found. Sailfish build disabled. Install SDL2-devel for all your targets in MerSDK ") + print("SDL2 not found. AuroraOS build disabled. Install SDL2-devel for all your targets in MerSDK ") return False else: print("SDL2-devel is found") @@ -162,8 +162,8 @@ def configure(env): else: env.Append(CCFLAGS=["-I" + env["sdl_path"]] ) - env.Append(CPPPATH=['#platform/sailfish/SDL2-2.0.9/src']) - env.Append(CPPFLAGS=['-D__SAILFISH_PLATFORM__']) + env.Append(CPPPATH=['#platform/auroraos/SDL2-2.0.9/src']) + env.Append(CPPFLAGS=['-D__AURORAOS_PLATFORM__']) env.ParseConfig('pkg-config wayland-client --cflags --libs') # ar_error = os.system("pkg-config audioresource --modversion > /dev/null") # if(ar_error): @@ -282,15 +282,15 @@ def configure(env): if not env['builtin_zlib']: env.ParseConfig('pkg-config zlib --cflags --libs') - env.Append(CPPPATH=['#platform/sailfish','#core', '#thirdparty/glad', '#platform/sailfish/outputsdl/include', '#platform/sailfish/SDL_src/src']) + env.Append(CPPPATH=['#platform/auroraos','#core', '#thirdparty/glad', '#platform/auroraos/outputsdl/include', '#platform/auroraos/SDL_src/src']) env.Append(CPPFLAGS=['-DSDL_ENABLED', '-DUNIX_ENABLED', '-DGLES_ENABLED', '-DGLES2_ENABLED', '-Wno-strict-aliasing']) - env.Append(CPPFLAGS=['-DSAILFISH_ENABLED']) - env.Append(CPPFLAGS=['-DSAILFISH_FORCE_LANDSCAPE']) - # include paths for different versions of SailfishSDK width different SDL2 version + env.Append(CPPFLAGS=['-DAURORAOS_ENABLED']) + env.Append(CPPFLAGS=['-DAURORAOS_FORCE_LANDSCAPE']) + # include paths for different versions of AuroraSDK width different SDL2 version env.Append(LIBS=['GLESv2', 'EGL', 'pthread']) if( env['arch'] == "x86" ): - env.Append(CPPFLAGS=['-DSAILFISH_i486_GLES2']) + env.Append(CPPFLAGS=['-DAURORAOS_i486_GLES2']) if (platform.system() == "Linux"): env.Append(LIBS=['dl']) diff --git a/platform/sailfish/export/export.cpp b/platform/auroraos/export/export.cpp similarity index 93% rename from platform/sailfish/export/export.cpp rename to platform/auroraos/export/export.cpp index 8ae70b7ad608..297c48b4a663 100644 --- a/platform/sailfish/export/export.cpp +++ b/platform/auroraos/export/export.cpp @@ -46,15 +46,15 @@ #include "editor/editor_settings.h" #include "main/main.h" #include "modules/regex/regex.h" -#include "platform/sailfish/logo.gen.h" +#include "platform/auroraos/logo.gen.h" #include "scene/resources/texture.h" -#define prop_editor_sdk_path "export/sailfish/sdk_path" -#define prop_editor_tool "export/sailfish/tool" -#define prop_editor_ssh_tool_path "export/sailfish/ssh_tool_path" -#define prop_editor_ssh_port "export/sailfish/ssh_port" +#define prop_editor_sdk_path "export/auroraos/sdk_path" +#define prop_editor_tool "export/auroraos/tool" +#define prop_editor_ssh_tool_path "export/auroraos/ssh_tool_path" +#define prop_editor_ssh_port "export/auroraos/ssh_port" -#define prop_sailfish_sdk_path "sailfish_sdk/sdk_path" +#define prop_auroraos_sdk_path "auroraos_sdk/sdk_path" #define prop_custom_binary_arm "custom_binary/arm" #define prop_custom_binary_arm_debug "custom_binary/arm_debug" #define prop_custom_binary_x86 "custom_binary/x86" @@ -167,7 +167,7 @@ const String spec_file_tempalte = "%files\n" "%defattr(644,root,root,-)\n" "%attr(755,root,root) %{_bindir}/%{name}\n" - // "%attr(644,root,root) %{_datadir}/%{name}/%{name}.png\n" // FIXME: add icons for all resolutions, as SailfishOS specification needed + // "%attr(644,root,root) %{_datadir}/%{name}/%{name}.png\n" // FIXME: add icons for all resolutions, as AuroraOS specification needed "%{_datadir}/icons/hicolor/*\n" "%attr(644,root,root) %{_datadir}/%{name}/%{name}.pck\n" // "%attr(755,root,root) %{_datadir}/%{name}/lib/*\n" // FIXME: add this as optional string, if we use native extensions @@ -183,7 +183,7 @@ const String desktop_file_template = "Type=Application\n" "X-Nemo-Application-Type=silica-qt5\n" "Icon=%{name}\n" - "Exec=%{name} --main-pack %{_datadir}/%{name}/%{name}.pck\n" // FIXME: SAILFISH use invoker! + "Exec=%{name} --main-pack %{_datadir}/%{name}/%{name}.pck\n" // FIXME: AURORAOS use invoker! "Name=%{_gd_launcher_name}\n" "Name[en]=%{_gd_launcher_name}\n"; @@ -205,8 +205,8 @@ static void _execute_thread(void *p_ud) { eta->done.set(); } -class EditorExportPlatformSailfish : public EditorExportPlatform { - GDCLASS(EditorExportPlatformSailfish, EditorExportPlatform) +class EditorExportPlatformAuroraOS : public EditorExportPlatform { + GDCLASS(EditorExportPlatformAuroraOS, EditorExportPlatform) /** On Windows, the sfdk tool works worst * with the @godot implementation of the @@ -236,7 +236,7 @@ class EditorExportPlatformSailfish : public EditorExportPlatform { struct MerTarget { MerTarget() { arch = arch_unkown; - name = "SailfishOS"; + name = "AuroraOS"; target_template = ""; addversion = ""; version[0] = 4; @@ -253,7 +253,7 @@ class EditorExportPlatformSailfish : public EditorExportPlatform { }; struct NativePackage { - MerTarget target; // Sailfish build target + MerTarget target; // AuroraOS build target String name; // package rpm name (lowercase, without special symbols) String launcher_name; // button name in launcher menu String version; // game/application version @@ -299,12 +299,10 @@ class EditorExportPlatformSailfish : public EditorExportPlatform { String get_sdk_config_path(const Ref &p_preset) const { String sdk_configs_path = OS::get_singleton()->get_config_path(); - //sdk_configs_path += String("/SailfishOS-SDK/"); // old SailfishSDK , before 3.0.7 - //mer_sdk_tools = sdk_configs_path + String("/mer-sdk-tools/Sailfish OS Build Engine/"); // old SailfishSDK , before 3.0.7 #ifdef OSX_ENABLED sdk_configs_path = OS::get_singleton()->get_environment("HOME") + String("/.config"); #elif WINDOWS_ENABLED - sdk_configs_path = String(p_preset->get(prop_sailfish_sdk_path)) + separator + String("settings"); + sdk_configs_path = String(p_preset->get(prop_auroraos_sdk_path)) + separator + String("settings"); #endif sdk_configs_path += separator + sdk_config_dir; return sdk_configs_path; @@ -337,7 +335,7 @@ class EditorExportPlatformSailfish : public EditorExportPlatform { } String get_sfdk_path(const Ref &p_preset) const { - String sfdk_path = String(p_preset->get(prop_sailfish_sdk_path)); + String sfdk_path = String(p_preset->get(prop_auroraos_sdk_path)); #ifdef WINDOWS_ENABLED sfdk_path += String("\\bin\\sfdk.exe"); #else @@ -402,7 +400,7 @@ class EditorExportPlatformSailfish : public EditorExportPlatform { if (sdk_tool == SDKConnectType::tool_ssh) { // here we neet to know where is RSA keys for buildengine - String rsa_key_path = p_preset->get(prop_sailfish_sdk_path); + String rsa_key_path = p_preset->get(prop_auroraos_sdk_path); rsa_key_path += String(mersdk_rsa_key); String ssh_port = EDITOR_GET(prop_editor_ssh_port); pre_args.push_back("-o"); @@ -474,7 +472,7 @@ class EditorExportPlatformSailfish : public EditorExportPlatform { Error err; bool is_export_path_exits_in_sdk = false; { - // check avaliable folders in build engine ( from some SailfishSDK version, + // check avaliable folders in build engine ( from some AuroraSDK version, // in buildengine has no /home/metsdk/share folder, just /home/username // folder (in unix systems, with docker) ) // that mean, expart path in build engine should be same as on host system @@ -813,8 +811,8 @@ class EditorExportPlatformSailfish : public EditorExportPlatform { } public: - EditorExportPlatformSailfish() { - // Ref img = memnew(Image(_sailfish_logo)); + EditorExportPlatformAuroraOS() { + // Ref img = memnew(Image(_auroraos_logo)); // logo.instance(); // logo->create_from_image(img); } @@ -839,11 +837,11 @@ class EditorExportPlatformSailfish : public EditorExportPlatform { } String get_os_name() const override { - return "SailfishOS"; + return "AuroraOS"; } String get_name() const override { - return "SailfishOS"; + return "AuroraOS"; } void set_logo(Ref logo) { @@ -858,7 +856,7 @@ class EditorExportPlatformSailfish : public EditorExportPlatform { EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING, prop_editor_sdk_path, PROPERTY_HINT_GLOBAL_DIR)); bool global_valid = false; String global_sdk_path = EditorSettings::get_singleton()->get(prop_editor_sdk_path, &global_valid); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, prop_sailfish_sdk_path, PROPERTY_HINT_GLOBAL_DIR), (global_valid) ? global_sdk_path : "")); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, prop_auroraos_sdk_path, PROPERTY_HINT_GLOBAL_DIR), (global_valid) ? global_sdk_path : "")); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, prop_custom_binary_arm, PROPERTY_HINT_GLOBAL_FILE), "")); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, prop_custom_binary_arm_debug, PROPERTY_HINT_GLOBAL_FILE), "")); @@ -875,11 +873,11 @@ class EditorExportPlatformSailfish : public EditorExportPlatform { r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, prop_package_name, PROPERTY_HINT_PLACEHOLDER_TEXT, "harbour-$genname"), "harbour-$genname")); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, prop_package_launcher_name, PROPERTY_HINT_PLACEHOLDER_TEXT, "Game Name [default if blank]"), "")); - String global_icon_path = ProjectSettings::get_singleton()->get("application/config/icon"); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, prop_launcher_icons_86, PROPERTY_HINT_GLOBAL_FILE), global_icon_path)); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, prop_launcher_icons_108, PROPERTY_HINT_GLOBAL_FILE), global_icon_path)); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, prop_launcher_icons_128, PROPERTY_HINT_GLOBAL_FILE), global_icon_path)); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, prop_launcher_icons_172, PROPERTY_HINT_GLOBAL_FILE), global_icon_path)); + // String global_icon_path = ProjectSettings::get_singleton()->get("application/config/icon"); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, prop_launcher_icons_86, PROPERTY_HINT_GLOBAL_FILE), "res://icons/86.png")); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, prop_launcher_icons_108, PROPERTY_HINT_GLOBAL_FILE), "res://icons/108.png")); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, prop_launcher_icons_128, PROPERTY_HINT_GLOBAL_FILE), "res://icons/128.png")); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, prop_launcher_icons_172, PROPERTY_HINT_GLOBAL_FILE), "res://icons/172.png")); r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, prop_sailjail_enabled), true)); r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, prop_sailjail_organization, PROPERTY_HINT_PLACEHOLDER_TEXT, "org.godot"), "")); @@ -891,8 +889,8 @@ class EditorExportPlatformSailfish : public EditorExportPlatform { r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, prop_validator_enable), false)); r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, prop_aurora_sign_enable), false)); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, prop_aurora_sign_key, PROPERTY_HINT_GLOBAL_FILE), global_icon_path)); - r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, prop_aurora_sign_cert, PROPERTY_HINT_GLOBAL_FILE), global_icon_path)); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, prop_aurora_sign_key, PROPERTY_HINT_GLOBAL_FILE), "")); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, prop_aurora_sign_cert, PROPERTY_HINT_GLOBAL_FILE), "")); } bool can_export(const Ref &p_preset, String &r_error, bool &r_missing_templates) const override { @@ -910,7 +908,7 @@ class EditorExportPlatformSailfish : public EditorExportPlatform { sdk_tool = SDKConnectType::tool_ssh; if (driver == "GLES3") { - print_line(TTR("GLES3 render not finished in SailfihsOS port! Sorry, but it work properly in Portrait orientation only.")); + print_line(TTR("GLES3 render not finished in AuroraOS port! Sorry, but it work properly in Portrait orientation only.")); //return false; } @@ -934,7 +932,7 @@ class EditorExportPlatformSailfish : public EditorExportPlatform { print_verbose(String("aarch64_binary: ") + aarch64_template); if (arm_template.empty() && x86_template.empty() && aarch64_template.empty()) { - r_error = TTR("Cant export without SailfishOS export templates"); + r_error = TTR("Cant export without AuroraOS export templates"); r_missing_templates = true; return false; } else { @@ -972,12 +970,12 @@ class EditorExportPlatformSailfish : public EditorExportPlatform { } // here need check if SDK is exists - // String sfdk_path = String(p_preset->get(prop_sailfish_sdk_path)); + // String sfdk_path = String(p_preset->get(prop_auroraos_sdk_path)); sdk_path = EDITOR_GET(prop_editor_sdk_path); if (!DirAccess::exists(sdk_path)) { - sdk_path = String(p_preset->get(prop_sailfish_sdk_path)); + sdk_path = String(p_preset->get(prop_auroraos_sdk_path)); if (!DirAccess::exists(sdk_path)) { - r_error = TTR("Wrong SailfishSDK path. Setup it in \nEditor->Settings->Export->Sailfish->SDK Path,\nor setup it for current project\n"); + r_error = TTR("Wrong AuroraSDK path. Setup it in \nEditor->Settings->Export->AuroraOS->SDK Path,\nor setup it for current project\n"); return false; } } @@ -997,7 +995,7 @@ class EditorExportPlatformSailfish : public EditorExportPlatform { FileAccessRef sdk_release_file = FileAccess::open(sdk_path + separator + String("sdk-release"), FileAccess::READ, &err); if (err != Error::OK) { - r_error = TTR("Wrong SailfishSDK path: cant find \"sdk-release\" file\n"); + r_error = TTR("Wrong AuroraSDK path: cant find \"sdk-release\" file\n"); return false; } bool wrong_sdk_version = false; @@ -1021,12 +1019,12 @@ class EditorExportPlatformSailfish : public EditorExportPlatform { if (int(names[1]) > 3) { wrong_sdk_version = false; } else if (int(names[1]) < 3) { - r_error = TTR("Minimum SailfishSDK version is 3.0.7, current is ") + current_line.split("=")[1]; + r_error = TTR("Minimum AuroraSDK version is 3.0.7, current is ") + current_line.split("=")[1]; wrong_sdk_version = true; } else if (int(names[2]) > 0) { wrong_sdk_version = false; } else if (int(names[3]) < 7) { - r_error = TTR("Minimum SailfishSDK version is 3.0.7, current is ") + current_line.split("=")[1]; + r_error = TTR("Minimum AuroraSDK version is 3.0.7, current is ") + current_line.split("=")[1]; wrong_sdk_version = true; } sdk_version.set(0, int(names[1])); @@ -1034,7 +1032,7 @@ class EditorExportPlatformSailfish : public EditorExportPlatform { sdk_version.set(2, int(names[3])); } } else { - r_error = TTR("Cant parse \"sdk-release\" file in SailfishSDK directory"); + r_error = TTR("Cant parse \"sdk-release\" file in AuroraSDK directory"); wrong_sdk_version = true; } } else if (splitted[0] == String("SDK_CONFIG_DIR")) { @@ -1043,7 +1041,7 @@ class EditorExportPlatformSailfish : public EditorExportPlatform { } sdk_release_file->close(); if (wrong_sdk_version) { - //r_error = TTR("Wrong SailfishSDK path: cant find \"sdk-release\" file"); + //r_error = TTR("Wrong AuroraSDK path: cant find \"sdk-release\" file"); return false; } @@ -1060,20 +1058,20 @@ class EditorExportPlatformSailfish : public EditorExportPlatform { sfdk_path += String(".exe"); #endif if (err != Error::OK || !da || !da->file_exists(sfdk_path)) { - r_error = TTR("Wrong SailfishSDK path or sfdk tool not exists"); + r_error = TTR("Wrong AuroraSDK path or sfdk tool not exists"); return false; } } else { sfdk_path = EDITOR_GET(prop_editor_ssh_tool_path); if (err != Error::OK || !da || !da->file_exists(sfdk_path)) { - r_error = TTR("Wrong SSH tool path. Setup it in Editor->Settings->Export->Sailfish"); + r_error = TTR("Wrong SSH tool path. Setup it in Editor->Settings->Export->AuroraOS"); return false; } String rsa_key = sdk_path + String(mersdk_rsa_key); if (!da->file_exists(rsa_key)) { - r_error = TTR("Cant find RSA key for acces to build engine. Try use SailfishIDE for generate keys."); + r_error = TTR("Cant find RSA key for acces to build engine. Try use AuroraOSIDE for generate keys."); return false; } } @@ -1118,7 +1116,7 @@ class EditorExportPlatformSailfish : public EditorExportPlatform { bool result = true; String suffix = icon.right(icon.length() - 3).to_lower(); if (suffix != String("png")) { - r_error += TTR("Icon file should be PNG. Set up custom icon for Sailfish, or change icon of project"); + r_error += TTR("Icon file should be PNG. Set up custom icon for AuroraOS, or change icon of project"); result = false; } // --- Package name ------------------------------------------ @@ -1157,7 +1155,7 @@ class EditorExportPlatformSailfish : public EditorExportPlatform { if ( shared_home.empty() || shared_src.empty() || (export_path.find(shared_home) < 0 && export_path.find(shared_src) < 0) ) { result = false; - r_error += TTR("Export path is outside of Shared Home in SailfishSDK (choose export path inside shared home):\nSharedHome: ") + shared_home + String("\nShareedSource: ") + shared_src; + r_error += TTR("Export path is outside of Shared Home in AuroraSDK (choose export path inside shared home):\nSharedHome: ") + shared_home + String("\nShareedSource: ") + shared_src; } if (p_preset->get(prop_aurora_sign_enable)) { @@ -1184,9 +1182,9 @@ class EditorExportPlatformSailfish : public EditorExportPlatform { Error export_project(const Ref &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override { ExportNotifier notifier(*this, p_preset, p_debug, p_path, p_flags); - EditorProgress ep("export", "Exporting for SailfishOS", 100, true); + EditorProgress ep("export", "Exporting for AuroraOS", 100, true); - String sdk_path = p_preset->get(prop_sailfish_sdk_path); + String sdk_path = p_preset->get(prop_auroraos_sdk_path); String sdk_configs_path = OS::get_singleton()->get_config_path(); String sfdk_tool = get_sfdk_path(p_preset); @@ -1287,7 +1285,7 @@ class EditorExportPlatformSailfish : public EditorExportPlatform { result_cmd += String("\n") + e->get(); e = e->next(); } - EditorNode::get_singleton()->show_warning(TTR("Building of Sailfish RPM failed, check output for the error.\nAlternatively visit docs.godotengine.org for Sailfish build documentation.\n Output: ") + result_cmd); + EditorNode::get_singleton()->show_warning(TTR("Building of AuroraOS RPM failed, check output for the error.\nAlternatively visit docs.godotengine.org for AuroraOS build documentation.\n Output: ") + result_cmd); return ERR_CANT_CREATE; } else { // parse export targets, and choose two latest targets @@ -1295,7 +1293,7 @@ class EditorExportPlatformSailfish : public EditorExportPlatform { while (e) { String entry = e->get(); print_verbose(entry); - RegEx regex(".*(SailfishOS|AuroraOS)-([0-9]+)\\.([0-9]+)\\.([0-9]+)\\.([0-9]+)(-base)?-(armv7hl|i486|aarch64).*"); + RegEx regex(".*(AuroraOS|AuroraOS)-([0-9]+)\\.([0-9]+)\\.([0-9]+)\\.([0-9]+)(-base)?-(armv7hl|i486|aarch64).*"); Array matches = regex.search_all(entry); // print_verbose( String("Matches size: ") + Variant(matches.size()) ); for (int mi = 0; mi < matches.size(); mi++) { @@ -1432,18 +1430,18 @@ class EditorExportPlatformSailfish : public EditorExportPlatform { mutable SDKConnectType sdk_connection_type; }; -void register_sailfish_exporter() { +void register_auroraos_exporter() { String exe_ext; if (OS::get_singleton()->get_name() == "Windows") { exe_ext = "*.exe"; } - Ref platform; + Ref platform; // Ref p; platform.instance(); - Ref img = memnew(Image(_sailfish_logo)); + Ref img = memnew(Image(_auroraos_logo)); Ref logo; logo.instance(); logo->create_from_image(img); diff --git a/platform/sailfish/export/export.h b/platform/auroraos/export/export.h similarity index 98% rename from platform/sailfish/export/export.h rename to platform/auroraos/export/export.h index f2536c07beec..53f7a77c4ec3 100644 --- a/platform/sailfish/export/export.h +++ b/platform/auroraos/export/export.h @@ -30,5 +30,5 @@ #include #include -void register_sailfish_exporter(); +void register_auroraos_exporter(); diff --git a/platform/sailfish/godot_sdl.cpp b/platform/auroraos/godot_sdl.cpp similarity index 100% rename from platform/sailfish/godot_sdl.cpp rename to platform/auroraos/godot_sdl.cpp diff --git a/platform/sailfish/helper_macros.h b/platform/auroraos/helper_macros.h similarity index 89% rename from platform/sailfish/helper_macros.h rename to platform/auroraos/helper_macros.h index 651e9a1bd721..056492cc2c1e 100644 --- a/platform/sailfish/helper_macros.h +++ b/platform/auroraos/helper_macros.h @@ -1,5 +1,5 @@ -#ifndef SAILFISH_MACRO -#define SAILFISH_MACRO +#ifndef AURORAOS_MACRO +#define AURORAOS_MACRO // print verbose macros (more usefull than print_verbose funtion, from print_string.h) #define mprint_verbose2(x, ...) \ diff --git a/platform/sailfish/joypad_linux.cpp b/platform/auroraos/joypad_linux.cpp similarity index 100% rename from platform/sailfish/joypad_linux.cpp rename to platform/auroraos/joypad_linux.cpp diff --git a/platform/sailfish/joypad_linux.h b/platform/auroraos/joypad_linux.h similarity index 100% rename from platform/sailfish/joypad_linux.h rename to platform/auroraos/joypad_linux.h diff --git a/platform/sailfish/key_mapping_sdl.cpp b/platform/auroraos/key_mapping_sdl.cpp similarity index 100% rename from platform/sailfish/key_mapping_sdl.cpp rename to platform/auroraos/key_mapping_sdl.cpp diff --git a/platform/sailfish/key_mapping_sdl.h b/platform/auroraos/key_mapping_sdl.h similarity index 100% rename from platform/sailfish/key_mapping_sdl.h rename to platform/auroraos/key_mapping_sdl.h diff --git a/platform/sailfish/libudev-so_wrap.c b/platform/auroraos/libudev-so_wrap.c similarity index 100% rename from platform/sailfish/libudev-so_wrap.c rename to platform/auroraos/libudev-so_wrap.c diff --git a/platform/sailfish/libudev-so_wrap.h b/platform/auroraos/libudev-so_wrap.h similarity index 100% rename from platform/sailfish/libudev-so_wrap.h rename to platform/auroraos/libudev-so_wrap.h diff --git a/platform/auroraos/logo.png b/platform/auroraos/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..9ba8f6629f5ee107f64524e9ea57c5c9b508c796 GIT binary patch literal 2203 zcmV;M2xRw(P)EX>4Tx04R}tkv&MmKpe$iQ?(*39qb_D5U@JgMMcD^R-p(LLaorMgUO{ILX(Ch z#l=x@EjakGSaoo5*44pP5ClI!oE@ALU8KbSC50BT9vt`M-Mz=%J3y$HnPzpx0Zq5f zbTT1kb1P!t6+H+egkj9c%ra&rDTR*X>mEM7-ogW_ z+u*!U9APC{B|aw}GwFiFk6c$ge&bwpS>TxwGn1Ypju4B*Hdfl0l}wFzk~perI^_#l zk5$fFoV9Y5HSft^7|iR-OI)Wpgd`TQ2niw-RI!0FY{Y2QNwJWo{X_@MYA&%l-5@>lA>^e5@H zmKHq%!rQ>bbxTwBfXf|V;K`6p*_He>g+c*%KcjET0sXf?->TPJb04P@~24YJ`L;(K){{a7>y{D4^000SaNLh0L z04^f{04^f|c%?sf00007bV*G`2j~V54g&$VRG8)f000?uMObu0Z*6U5Zgc=ca%Ew3 zWn>_CX>@2HM@dakSAh-}000JZNkls=`dG)DhIF5@DbaLXj}^cRA3VDFfazl1~QV@ zoxlQ`fX{#rfQ`xT0w~v36VXJ(B_gVbC?YaZL~2CDmYX1WDJr4%m^eU0L@GpN@KtqH z5z!D4SMq`)BBdf?I>{)uNad?v%8u7hIiUJq<2bM3l}yPiG5~KO~%HYWk{Op6pjG z^K(9ui_Kw40SOT)P1ba&$q$2p7oGN4Y@uph9cp8YoclB^Gl6Z3!|^}`o)eLYfOHlt z2hyEpI91!k7pnqzd~qHt8_GY|d`|tR0aAb)cmdEfpbs$3X=FSSXU_}AaK|iWy_ZYx z>@J*I-AYFw#=v#GP&KEELLM+l1!e$Vr%}iDo}~Tli=+>*xN|}dt7q&&w=A-AeT3Vi zsholWJgfp!okoOO!+iYg5!_-je%U|(f|Zx?4YQfKa5U?mIzaGZBoz_`Dlp8^ts>NJ zI)oew(yd72o{~J)$9p0bNYYiCv6a3=O4^UB3ffh3v`gA7#QCS?R`tqg(ZrJ}w;39$LTkt9-{mP23 zEW>*N((=2I|C=IqOne?46MuO=pS^R0j*1Hy0}Q7AaWb#Y*i7(jf+6E_$mr?&KTbe| zrcFC=2LkwJcEdlbkOPC~<54>p^vq;VtgAxywc)$hAph|~K3~2M4U19BMo_cmFddcc zD6u$ZG=4<|q)H%Ee}?G#&3L+n$u6Bq{d0du54MsqyBD_=k0(&R8@CeUjz3JI_N84Y zHDNM-W>8QvmgCE6aA7g7Y#3jB^c79@EvXR@%cAX#*YJ4S$e2|?kFoj0H&$YFi;(wb zId$bPVKj&6@vBVyMfo(A@5im0j9hXr|9-Iwjz{P|&C8ev^EkZpIMr)wu`SyLc?1p59z|0u zW^a9r-79uOy-Bz}h!wMb_=O-M*K{Zm4$-=J4obs86jczT2NDirnFf~KmAL68-mamS zOvAr;9{YVy5YxRBwykF0Z`afEw?<6dSlJ$;4K8AqhLxd{UUUn;eEk6opZ>iQu&>sm z;SYAA1@@w+HKV6}i=m!CPiw^RT|n2HF|;=H-hzMeJWf2a2)8#v-)HXP+=oX9y?h#% zShysC@{NhhvT%_=30hp*a+%s)b>9=O8W04!c22%NWCX^FY7`_XUj-2b8;I`Nj=Ad% z)ZT+=uGoljtPXupAMRK%oBdPDaM^LPR*ojCC@&eUU?(#P3X02xh@dFn3FBr(M2-S? zI?~!Lja**vbIeu~v*Q+`As-okT7((3IsfQ(;v;)7rfLb^o?Wlg-v1NtsK6nouP&`u zCi?8Bap^%^?g)CWpUmk~Xj`=jmnY6`W%rZjyg0!7YSJ`_QxTIkX)3Oqd|X-_PwwrU z{mWlb+e3J!_b2P81*vF(7_eOh_5rnyC2d+do<|phn!v2wOmyQm6t{3|=|gBK0^5O_ d>sl-T{{c#mXr+;~Q$zp&002ovPDHLkV1naW4$%Mr literal 0 HcmV?d00001 diff --git a/platform/sailfish/os_sdl.cpp b/platform/auroraos/os_sdl.cpp similarity index 98% rename from platform/sailfish/os_sdl.cpp rename to platform/auroraos/os_sdl.cpp index 8a9ba6ad7ee1..d96b92b11306 100644 --- a/platform/sailfish/os_sdl.cpp +++ b/platform/auroraos/os_sdl.cpp @@ -136,7 +136,7 @@ Error OS_SDL::initialize(const VideoMode &p_desired, int p_video_driver, int p_a OS::get_singleton()->print("Current vide driver is: %s\n", SDL_GetCurrentVideoDriver()); // ** ENABLE DRAG AND DROP SUPPORT ** // - // no drop event in sailfish + // no drop event in auroraos //SDL_EventState(SDL_DROPFILE, SDL_ENABLE); //SDL_EventState(SDL_DROPTEXT, SDL_ENABLE); @@ -161,7 +161,7 @@ Error OS_SDL::initialize(const VideoMode &p_desired, int p_video_driver, int p_a return ERR_UNAVAILABLE; } - // // fix resolution in video mode, becuse SailfishOS has only fullscreen resolution + // // fix resolution in video mode, becuse AuroraOS has only fullscreen resolution // current_videomode.width = context_gl->get_window_width(); // current_videomode.height = context_gl->get_window_height(); @@ -455,7 +455,7 @@ int OS_SDL::get_screen_dpi(int p_screen) const { String(Variant(p_screen)) + String(" from SDL, Error: ") + String(SDL_GetError())); } else { Size2 sz = get_screen_size(p_screen); - // TODO get rigth display size in Wayland sailfish + // TODO get rigth display size in Wayland auroraos diagonal_dpi = sz.width / 4.370079; } @@ -477,7 +477,7 @@ void OS_SDL::set_window_position(const Point2 &p_position) { Size2 OS_SDL::get_window_size() const { int w, h; SDL_GetWindowSize(sdl_window, &w, &h); -#if SAILFISH_FORCE_LANDSCAPE && SAILFISH_ENABLED +#if AURORAOS_FORCE_LANDSCAPE && AURORAOS_ENABLED if (get_screen_orientation() == OS::SCREEN_LANDSCAPE || get_screen_orientation() == OS::SCREEN_SENSOR_LANDSCAPE || get_screen_orientation() == OS::SCREEN_REVERSE_LANDSCAPE) @@ -602,7 +602,7 @@ unsigned int OS_SDL::get_mouse_button_state(uint32_t button_mask, bool refresh) return state; } -#if SAILFISH_FORCE_LANDSCAPE && SAILFISH_ENABLED +#if AURORAOS_FORCE_LANDSCAPE && AURORAOS_ENABLED void OS_SDL::fix_touch_position(Vector2 &pos, bool absolute) { int w, h; SDL_GetWindowSize(sdl_window, &w, &h); @@ -746,7 +746,7 @@ void OS_SDL::process_events() { Vector2 pos(event.button.x, event.button.y); -#if SAILFISH_FORCE_LANDSCAPE && SAILFISH_ENABLED +#if AURORAOS_FORCE_LANDSCAPE && AURORAOS_ENABLED fix_touch_position(pos, true); #endif @@ -779,7 +779,7 @@ void OS_SDL::process_events() { // Point2i pos(event.motion.x, event.motion.y); Vector2 pos(event.motion.x, event.motion.y); -#if SAILFISH_FORCE_LANDSCAPE && SAILFISH_ENABLED +#if AURORAOS_FORCE_LANDSCAPE && AURORAOS_ENABLED fix_touch_position(pos, true); #endif @@ -827,7 +827,7 @@ void OS_SDL::process_events() { long long index = (int)event.tfinger.fingerId; Point2 pos = Point2(event.tfinger.x, event.tfinger.y); -#if SAILFISH_FORCE_LANDSCAPE && SAILFISH_ENABLED +#if AURORAOS_FORCE_LANDSCAPE && AURORAOS_ENABLED fix_touch_position(pos); #endif // end landscape @@ -895,7 +895,7 @@ void OS_SDL::process_events() { int index = (int)event.tfinger.fingerId; Point2 pos = Point2(event.tfinger.x, event.tfinger.y); -#if SAILFISH_FORCE_LANDSCAPE && SAILFISH_ENABLED +#if AURORAOS_FORCE_LANDSCAPE && AURORAOS_ENABLED fix_touch_position(pos); #endif Map::Element *curr_pos_elem = touch.state.find(index); @@ -1024,7 +1024,7 @@ void OS_SDL::process_events() { continue; } - // no drop events in sailfish OS + // no drop events in auroraos OS // if (event.type == SDL_DROPFILE) { // dropped_files.push_back(event.drop.file); @@ -1137,7 +1137,7 @@ String OS_SDL::get_clipboard() const { } String OS_SDL::get_name() { - return "Sailfish"; + return "AuroraOS"; } Error OS_SDL::shell_open(String p_uri) { diff --git a/platform/sailfish/os_sdl.h b/platform/auroraos/os_sdl.h similarity index 99% rename from platform/sailfish/os_sdl.h rename to platform/auroraos/os_sdl.h index 877572a7a8f4..2b45c14e8f37 100644 --- a/platform/sailfish/os_sdl.h +++ b/platform/auroraos/os_sdl.h @@ -174,7 +174,7 @@ class OS_SDL : public OS_Unix { bool is_window_maximize_allowed(); -#if SAILFISH_FORCE_LANDSCAPE && SAILFISH_ENABLED +#if AURORAOS_FORCE_LANDSCAPE && AURORAOS_ENABLED void fix_touch_position(Vector2 &pos, bool absolute = false); #endif diff --git a/platform/sailfish/platform_config.h b/platform/auroraos/platform_config.h similarity index 100% rename from platform/sailfish/platform_config.h rename to platform/auroraos/platform_config.h diff --git a/platform/sailfish/power_sdl.cpp b/platform/auroraos/power_sdl.cpp similarity index 100% rename from platform/sailfish/power_sdl.cpp rename to platform/auroraos/power_sdl.cpp diff --git a/platform/sailfish/power_sdl.h b/platform/auroraos/power_sdl.h similarity index 100% rename from platform/sailfish/power_sdl.h rename to platform/auroraos/power_sdl.h diff --git a/platform/sailfish/README.md b/platform/sailfish/README.md deleted file mode 100644 index 6c3d4eb74c16..000000000000 --- a/platform/sailfish/README.md +++ /dev/null @@ -1,98 +0,0 @@ -## install SailfishSDK -1. Download and install [SailfishSDK](https://sailfishos.org/wiki/Application_SDK) -2. (optional) Install docker image, use [this instcruction](https://github.com/CODeRUS/docker-sailfishos-sdk-local) from @CODeRUS - -## Add SailfishSDK/bin folder to PATH for using sfdk -```shell -export PATH=$HOME/SailfishSDK/bin:${PATH} -``` -now you can use **sfdk** tool -```shell -sfdk engine exec -``` -or, you can use absolute path to **sfdk** -```shell -~/SailfishOS/bin/sfdk engine exec echo "Hello from SailfishOS SDK build engine" -``` - -### Install dependencies in SailfishSDK targets -check list of targets -```shell -sfdk engine exec sb2-config -l -``` - -should output something like this - -```shell -SailfishOS-4.3.0.12-aarch64.default -SailfishOS-4.3.0.12-aarch64 -SailfishOS-4.3.0.12-armv7hl.default -SailfishOS-4.3.0.12-armv7hl -SailfishOS-4.3.0.12-i486.default -SailfishOS-4.3.0.12-i486 -``` - -**armv7hl** -```sh -sfdk engine exec sb2 -t SailfishOS-4.3.0.12-armv7hl -R zypper in -y SDL2-devel systemd-devel libaudioresource-devel pulseaudio-devel openssl-devel libwebp-devel libvpx-devel wayland-devel libpng-devel scons -``` - -**i486** -```sh -sfdk engine exec sb2 -t SailfishOS-4.3.0.12-i486 -R zypper in -y SDL2-devel systemd-devel libaudioresource-devel pulseaudio-devel openssl-devel libwebp-devel libvpx-devel wayland-devel libpng-devel scons -``` - -**aarch64** -```sh -sfdk engine exec sb2 -t SailfishOS-4.3.0.12-aarch64 -R zypper in -y SDL2-devel systemd-devel libaudioresource-devel pulseaudio-devel openssl-devel libwebp-devel libvpx-devel wayland-devel libpng-devel scons -``` - -or by **one line** script for all targets in same time ;) : -```shell -for each in `sfdk engine exec sb2-config -l|grep -v default`; do sfdk engine exec sb2 -t $each -R zypper in -y SDL2-devel libaudioresource-devel pulseaudio-devel openssl-devel libwebp-devel libvpx-devel wayland-devel libpng-devel systemd-devel scons; done -``` - -## Build Godot export template for Sailfish OS -Use sfdk from SailfishSDK/bin/sfdk - -```sh -export PATH=$HOME/SailfishSDK/bin:${PATH} -# building for armv7hl platfrom -sfdk engine exec sb2 -t SailfishOS-4.3.0.12-armv7hl scons -j`nproc` arch=arm platform=sailfish tools=no bits=32 target=release -# than do same for aarch64 platfrom -sfdk engine exec sb2 -t SailfishOS-4.3.0.12-aarch64 scons -j`nproc` arch=arm64 platform=sailfish tools=no bits=64 target=release -# than do same for i486 platfrom -sfdk engine exec sb2 -t SailfishOS-4.3.0.12-i486 scons -j`nproc` arch=x86 platform=sailfish tools=no bits=32 target=release -# then make export tempalte smaller -sfdk engine exec sb2 -t SailfishOS-4.3.0.12-arm7hl strip bin/godot.sailfish.opt.arm -sfdk engine exec sb2 -t SailfishOS-4.3.0.12-aarch64 strip bin/godot.sailfish.opt.arm64 -sfdk engine exec sb2 -t SailfishOS-4.3.0.12-i486 strip bin/godot.sailfish.opt.x86 -``` - -## Build Godot Editor with SailfishOS export menu -### build on Linux X11 -```shell -scons -j`nproc` arch=x64 platform=x11 tools=yes bits=64 traget=release_debug -strip bin/godot.x11.tools.x64 -``` -### build for Win64 with cross compile toolkit on Linux -First, install cross compile gcc -#### on ubuntu -``` -sudo apt install -y mingw-w64 -``` -then choose posix compiler, with commands below -``` -sudo update-alternatives --config x86_64-w64-mingw32-gcc -sudo update-alternatives --config x86_64-w64-mingw32-g++ -``` -#### on fedora (centos) -``` -sudo dnf install -y mingw64-gcc-c++ mingw64-gcc -``` -#### build an editor -```shell -#ubuntu -CXX=x86_64-w64-mingw32-g++ CC=x86_64-w64-mingw32-gcc scons -j`nproc` arch=x64 platform=windows tools=yes bits=64 traget=release_debug -x86_64-w64-mingw32-strip bin/godot.windows.tools.x64.exe -``` \ No newline at end of file diff --git a/platform/sailfish/logo.png b/platform/sailfish/logo.png deleted file mode 100644 index 5229d5fddf5e7cf9804ecde017d85efefc859e7e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2230 zcmV;n2ub&eP)<3{M%WAZw{qW85J4C{0v~8B42Z zv{H-I+WNppwCQSgW6W;aXw}4~t&$iw`v)3pqOEJJn~Iwne2Z1IvTlWdf@nu(nBg@~ zX1McU=6?Ifof#Me*`DMich1~%zMtRscV1WE8y1q1)6=&^qY*zOSO8##5X=Ao2ta`F z`Te4y;c0^TjY+$4^Lno&X#k0_F(jd2=zRbJE!y#f%{1#$J-WTFe%o(^B)(0BYHtCM z0-c?msJ(U_S8M)>CyyHt4lDTL%L|Z%W-0(c5fDO!ASCsf00kh(31b3~6b_f8Qn-0o z5tuFnA{_+;iMF$D=knz!n`?0977|&Z?VAGag;^pgRWM)o9!MuF@`h#5n5fcNW z0g1>%{PSC-udgrL=5RcRj+(XgPPfEJ5| zV-=6=9Y)(eTI1 zm(k|wpeNX+0=T-2A3M4`=;$#s3gP$3B+1g!Qm$FEh9qe)7`SK89=5i&GCx0`Q>IMe zxpU_j4u?sSZnvAeckgCGLIQ;llq4y#9>BuFLLRUBGuu0w*dOSoC(xw=kd&O(*CuC| zkx>Y@y_Y1ZC<>F4lX>>+S(4JKgb5C7+Yg-9b~>%E8HEV=)#x1#2LbTGg9jwZ>gsB0 zwOTG*xR3(_199T@_4Qn|Xc2`FT)A>3Z{51})*J{7%5?jBVi4{?w@K0{;bnq~Iwh$< z0x)4>A^;#13IPCoJ|6&J>(;H9K7BfJa&n;4>0<93IB)>P#l=WYPDWEx6RusmhLVz! zF_yrv4T=Ez&CkDZb-tj>(nhDXonA+GoTZtWnLK>>aIEeA{rgNvNZ`JG`zXsYOG`_c zmX^lz=g*Hh`-dFx(Jl9=)z?F}uiFH-x%q3i`8lHyvfCEd>Bx~I)a&)M*@oILU%t$V z6DM-Xk|j(}PiJFeXFdQNr;n0Qj#YDN*4l#OMG3keHZ=oSYooxN!rA4jqcM7Znwu zt*vbw`-xC^aO6FqQ38iYuRx69001N{s*s){i=;#0dxLhuzrKPTOp=+PsTm6d@cj7B3eGBQwES&8!UaugO8j@mC23PF}-ReLCUJ3`ve z06>dK)B*s7gt1akU0sc7)25-Mqy#lJHLzGLxOC|fQc_ZI=FFK<`wR{a!s8uK^F8c( z2Z2u}>-BB`&HnJD}6)kdl&unwlD!Etrp0t5!j$)8X^Kp2fPdGJrt@ya6am7)m&VP%r=m0uT}eBrtO8jEwyi75*eU zJ6j$eV0;P$5cc*VJYdJO=k565w|~O3W_5$<>FGk*svqIhi9aAAF%f>JMKw@}h{aMQ z5J{ay0uYQrTnY|`Do2V(93X^H5DpWquZ?*4v>E?;(uA7YIuOKi!(wdv#ZOUMvJ{e5 z3kV6I@|K7?i2+1D9V7qSp=dtQXJ(!mZhJfc6gZq-%w4_>u6{3s5LmP@562GdMcK+_ znDVX3k?1f&81I7UfDorJA^6#3{Y>|0!b1RIK1)r~g+8qOS=x;6WQPh1-VfyFycdGd zs2ekt*tc|ibOK@s$R<(Kp@5ANaXan3@BVwNh)0(H0kr3tz>9k`%m4rY07*qoM6N<$ Ef_|GB(*OVf diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index e0d5a66ae283..8e54f9ef2c39 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -1247,7 +1247,7 @@ void SceneTree::_update_root_rect() { if (stretch_mode == STRETCH_MODE_DISABLED) { _update_font_oversampling(stretch_scale); root->set_size(last_screen_size.floor()); -#if SAILFISH_FORCE_LANDSCAPE && SAILFISH_ENABLED +#if AURORAOS_FORCE_LANDSCAPE && AURORAOS_ENABLED // landscape orientation if (OS::get_singleton()->get_screen_orientation() == OS::SCREEN_LANDSCAPE || OS::get_singleton()->get_screen_orientation() == OS::SCREEN_SENSOR_LANDSCAPE) { @@ -1317,7 +1317,7 @@ void SceneTree::_update_root_rect() { //black bars and margin if (stretch_aspect != STRETCH_ASPECT_EXPAND && screen_size.x < video_mode.x) { margin.x = Math::round((video_mode.x - screen_size.x) / 2.0); -#if SAILFISH_FORCE_LANDSCAPE && SAILFISH_ENABLED +#if AURORAOS_FORCE_LANDSCAPE && AURORAOS_ENABLED // landscape orientation if (OS::get_singleton()->get_screen_orientation() == OS::SCREEN_LANDSCAPE || OS::get_singleton()->get_screen_orientation() == OS::SCREEN_SENSOR_LANDSCAPE || @@ -1333,7 +1333,7 @@ void SceneTree::_update_root_rect() { offset.x = Math::round(margin.x * viewport_size.y / screen_size.y); } else if (stretch_aspect != STRETCH_ASPECT_EXPAND && screen_size.y < video_mode.y) { margin.y = Math::round((video_mode.y - screen_size.y) / 2.0); -#if SAILFISH_FORCE_LANDSCAPE && SAILFISH_ENABLED +#if AURORAOS_FORCE_LANDSCAPE && AURORAOS_ENABLED if (OS::get_singleton()->get_screen_orientation() == OS::SCREEN_LANDSCAPE || OS::get_singleton()->get_screen_orientation() == OS::SCREEN_SENSOR_LANDSCAPE || OS::get_singleton()->get_screen_orientation() == OS::SCREEN_REVERSE_LANDSCAPE) { // landscape @@ -1358,7 +1358,7 @@ void SceneTree::_update_root_rect() { case STRETCH_MODE_2D: { _update_font_oversampling((screen_size.x / viewport_size.x) * stretch_scale); //screen / viewport ratio drives oversampling root->set_size(screen_size.floor()); -#if SAILFISH_FORCE_LANDSCAPE && SAILFISH_ENABLED +#if AURORAOS_FORCE_LANDSCAPE && AURORAOS_ENABLED // force landscape if (OS::get_singleton()->get_screen_orientation() == OS::SCREEN_LANDSCAPE || OS::get_singleton()->get_screen_orientation() == OS::SCREEN_SENSOR_LANDSCAPE || @@ -1375,7 +1375,7 @@ void SceneTree::_update_root_rect() { case STRETCH_MODE_VIEWPORT: { _update_font_oversampling(1.0); root->set_size((viewport_size / stretch_scale).floor()); -#if SAILFISH_FORCE_LANDSCAPE && SAILFISH_ENABLED +#if AURORAOS_FORCE_LANDSCAPE && AURORAOS_ENABLED // force landscape if (OS::get_singleton()->get_screen_orientation() == OS::SCREEN_LANDSCAPE || OS::get_singleton()->get_screen_orientation() == OS::SCREEN_SENSOR_LANDSCAPE ||