From b86f510e5439c7254869d389aca5e3983cd2ad07 Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Fri, 7 Nov 2025 14:41:13 +1100 Subject: [PATCH 1/3] feat: Godot 4.6 dev build support. --- .github/workflows/runner.yml | 4 ++-- compat/jsb_engine_version_comparison.h | 1 + internal/jsb_naming_util.cpp | 5 +++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/runner.yml b/.github/workflows/runner.yml index 209a2e01..a7159473 100644 --- a/.github/workflows/runner.yml +++ b/.github/workflows/runner.yml @@ -34,10 +34,10 @@ jobs: fail-fast: false matrix: include: - - version: 4.4 - version_ref: 4.4 - version: 4.5 version_ref: 4.5 + - version: 4.6dev + version_ref: master uses: ./.github/workflows/build_engine_version.yml with: v8: ${{ needs.environment.outputs.v8 }} diff --git a/compat/jsb_engine_version_comparison.h b/compat/jsb_engine_version_comparison.h index 84370972..b4402b8c 100644 --- a/compat/jsb_engine_version_comparison.h +++ b/compat/jsb_engine_version_comparison.h @@ -18,5 +18,6 @@ #define GODOT_4_3_OR_NEWER GODOT_VERSION_NEWER_THAN(4, 3, -1) #define GODOT_4_4_OR_NEWER GODOT_VERSION_NEWER_THAN(4, 4, -1) #define GODOT_4_5_OR_NEWER GODOT_VERSION_NEWER_THAN(4, 5, -1) +#define GODOT_4_6_OR_NEWER GODOT_VERSION_NEWER_THAN(4, 6, -1) #endif diff --git a/internal/jsb_naming_util.cpp b/internal/jsb_naming_util.cpp index 32b98f1c..f71a57bd 100644 --- a/internal/jsb_naming_util.cpp +++ b/internal/jsb_naming_util.cpp @@ -376,8 +376,13 @@ namespace jsb::internal } #endif +#if GODOT_4_6_OR_NEWER + LocalVector all_class_names; + ClassDB::get_class_list(all_class_names); +#else List all_class_names; ClassDB::get_class_list(&all_class_names); +#endif List exposed_class_names; From f5777d48dcb310b40693b61b11c99a82c22ddd00 Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Fri, 7 Nov 2025 15:05:29 +1100 Subject: [PATCH 2/3] ci: Remove 4.4 build --- .github/workflows/build_android.yml | 23 ++----------------- .github/workflows/build_ios.yml | 17 +------------- .github/workflows/build_linux.yml | 23 +++---------------- .github/workflows/build_macos.yml | 35 ++++------------------------- .github/workflows/build_web.yml | 28 ++--------------------- .github/workflows/build_windows.yml | 25 +++------------------ 6 files changed, 15 insertions(+), 136 deletions(-) diff --git a/.github/workflows/build_android.yml b/.github/workflows/build_android.yml index e06c38ad..ab04ae6e 100644 --- a/.github/workflows/build_android.yml +++ b/.github/workflows/build_android.yml @@ -12,14 +12,6 @@ on: # Global Settings env: - # 4.4 - SCONSFLAGS: >- - arch=arm64 - strict_checks=yes - debug_symbols=no - module_text_server_fb_enabled=yes - swappy=yes - # 4.5+ # Ideally we'd use dev_mode=yes. Unfortunately, v8 headers contain warnings. So we manually set some dev_mode options. SCONS_FLAGS: >- arch=arm64 @@ -44,7 +36,7 @@ jobs: cache-name: android-template-${{inputs.version}}-release-v8 target: template_release tests: false - sconsflags: ${{ inputs.version == '4.4' && 'deprecated=no ndk_platform=android-24 generate_apk=yes' || '' }} + sconsflags: '' cache-limit: 1 - name: Template (target=template_release, arch=arm64, qjs_ng) @@ -107,18 +99,7 @@ jobs: - name: Extract pre-built Android Swappy Frame Pacing Library run: 7za x -y swappy/godot-swappy.7z -o${{github.workspace}}/thirdparty/swappy-frame-pacing - - name: Compilation [4.4] - if: inputs.version == '4.4' - uses: ./.github/actions/godot-build - with: - sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} - platform: android - target: ${{ matrix.target }} - tests: ${{ matrix.tests }} - scons-cache-limit: ${{ matrix.cache-limit }} - - - name: Compilation [4.5+] - if: inputs.version != '4.4' + - name: Compilation uses: ./.github/actions/godot-build with: scons-flags: ${{ env.SCONS_FLAGS }} ${{ matrix.sconsflags }} diff --git a/.github/workflows/build_ios.yml b/.github/workflows/build_ios.yml index 89eaac27..941eab03 100644 --- a/.github/workflows/build_ios.yml +++ b/.github/workflows/build_ios.yml @@ -12,11 +12,6 @@ on: # Global Settings env: - # 4.4 - SCONSFLAGS: >- - debug_symbols=no - module_text_server_fb_enabled=yes - # 4.5+ # Ideally we'd use dev_mode=yes. Unfortunately, v8 headers contain warnings. So we manually set some dev_mode options. SCONS_FLAGS: >- verbose=yes @@ -86,17 +81,7 @@ jobs: - name: Setup Python and SCons uses: ./.github/actions/godot-deps - - name: Compilation [4.4] - if: inputs.version == '4.4' - uses: ./.github/actions/godot-build - with: - sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} - platform: ios - target: ${{ matrix.target }} - scons-cache-limit: ${{ matrix.cache-limit }} - - - name: Compilation [4.5+] - if: inputs.version != '4.4' + - name: Compilation uses: ./.github/actions/godot-build with: scons-flags: ${{ env.SCONS_FLAGS }} ${{ matrix.sconsflags }} diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 48a1754f..a1d3b7d1 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -12,11 +12,6 @@ on: # Global Settings env: - # 4.4 - SCONSFLAGS: >- - module_text_server_fb_enabled=yes - strict_checks=yes - # 4.5 # Ideally we'd use dev_mode=yes. Unfortunately, v8 headers contain warnings. So we manually set some dev_mode options. SCONS_FLAGS: >- verbose=yes @@ -122,8 +117,7 @@ jobs: - name: Setup Python and SCons uses: ./.github/actions/godot-deps - - name: Download pre-built AccessKit [4.5+] - if: inputs.version != '4.4' + - name: Download pre-built AccessKit uses: dsaltares/fetch-gh-release-asset@1.1.2 with: repo: AccessKit/accesskit-c @@ -131,21 +125,10 @@ jobs: file: accesskit-c-0.17.0.zip target: accesskit-c-0.17.0/accesskit_c.zip - - name: Extract pre-built AccessKit [4.5+] - if: inputs.version != '4.4' + - name: Extract pre-built AccessKit run: unzip -o accesskit-c-0.17.0/accesskit_c.zip - - name: Compilation [4.4] - if: inputs.version == '4.4' - uses: ./.github/actions/godot-build - with: - sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} - platform: linuxbsd - target: ${{ matrix.target }} - scons-cache-limit: ${{ matrix.cache-limit }} - - - name: Compilation [4.5+] - if: inputs.version != '4.4' + - name: Compilation uses: ./.github/actions/godot-build with: scons-flags: ${{ env.SCONS_FLAGS }} ${{ matrix.sconsflags }} diff --git a/.github/workflows/build_macos.yml b/.github/workflows/build_macos.yml index 556c3676..f729db29 100644 --- a/.github/workflows/build_macos.yml +++ b/.github/workflows/build_macos.yml @@ -12,11 +12,6 @@ on: # Global Settings env: - # 4.4 - SCONSFLAGS: >- - module_text_server_fb_enabled=yes - strict_checks=yes - # 4.5 # Ideally we'd use dev_mode=yes. Unfortunately, v8 headers contain warnings. So we manually set some dev_mode options. SCONS_FLAGS: >- verbose=yes @@ -100,8 +95,7 @@ jobs: - name: Setup Python and SCons uses: ./.github/actions/godot-deps - - name: Download pre-built AccessKit [4.5+] - if: inputs.version != '4.4' + - name: Download pre-built AccessKit uses: dsaltares/fetch-gh-release-asset@1.1.2 with: repo: AccessKit/accesskit-c @@ -109,8 +103,7 @@ jobs: file: accesskit-c-0.17.0.zip target: accesskit-c-0.17.0/accesskit_c.zip - - name: Extract pre-built AccessKit [4.5+] - if: inputs.version != '4.4' + - name: Extract pre-built AccessKit run: unzip -o accesskit-c-0.17.0/accesskit_c.zip - name: Setup Vulkan SDK @@ -136,34 +129,14 @@ jobs: name: scripts-out path: ${{github.workspace}}/modules/GodotJS/scripts/out - - name: Compilation [4.4] (x86_64) - if: inputs.version == '4.4' - uses: ./.github/actions/godot-build - with: - sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} arch=x86_64 vulkan=${{ steps.vulkan-sdk.outputs.VULKAN_ENABLED }} - platform: macos - target: ${{ matrix.target }} - scons-cache-limit: 0 # Only cap on second run to avoid purging unnecessarily - - - name: Compilation [4.5+] (x86_64) - if: inputs.version != '4.4' + - name: Compilation (x86_64) uses: ./.github/actions/godot-build with: scons-flags: ${{ env.SCONS_FLAGS }} ${{ matrix.sconsflags }} arch=x86_64 vulkan=${{ steps.vulkan-sdk.outputs.VULKAN_ENABLED }} platform: macos target: ${{ matrix.target }} - - name: Compilation [4.4] (arm64) - if: inputs.version == '4.4' - uses: ./.github/actions/godot-build - with: - sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} arch=arm64 vulkan=${{ steps.vulkan-sdk.outputs.VULKAN_ENABLED }} - platform: macos - target: ${{ matrix.target }} - scons-cache-limit: ${{ matrix.cache-limit }} - - - name: Compilation [4.5+] (arm64) - if: inputs.version != '4.4' + - name: Compilation (arm64) uses: ./.github/actions/godot-build with: scons-flags: ${{ env.SCONS_FLAGS }} ${{ matrix.sconsflags }} arch=arm64 vulkan=${{ steps.vulkan-sdk.outputs.VULKAN_ENABLED }} diff --git a/.github/workflows/build_web.yml b/.github/workflows/build_web.yml index ddb18190..1591b4dc 100644 --- a/.github/workflows/build_web.yml +++ b/.github/workflows/build_web.yml @@ -12,16 +12,6 @@ on: # Global Settings env: - # 4.4 - SCONSFLAGS: >- - debug_symbols=no - use_closure_compiler=yes - strict_checks=yes - deprecated=no - lto=none - use_assertions=no - use_safe_heap=yes - # 4.5+ # Ideally we'd use dev_mode=yes. Unfortunately, v8 headers contain warnings. So we manually set some dev_mode options. SCONS_FLAGS: >- verbose=yes @@ -97,11 +87,7 @@ jobs: env: GODOT_VERSION: ${{ inputs.version }} run: | - if [[ $GODOT_VERSION == "4.4" ]]; then - echo "emscripten=3.1.64" >> $GITHUB_OUTPUT - else - echo "emscripten=4.0.11" >> $GITHUB_OUTPUT - fi + echo "emscripten=4.0.11" >> $GITHUB_OUTPUT - name: Set up Emscripten uses: mymindstorm/setup-emsdk@v14 @@ -122,17 +108,7 @@ jobs: - name: Setup Python and SCons uses: ./.github/actions/godot-deps - - name: Compilation [4.4] - if: inputs.version == '4.4' - uses: ./.github/actions/godot-build - with: - sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} - platform: web - target: ${{ matrix.target }} - scons-cache-limit: 0.5 - - - name: Compilation [4.5+] - if: inputs.version != '4.4' + - name: Compilation uses: ./.github/actions/godot-build with: scons-flags: ${{ env.SCONS_FLAGS }} ${{ matrix.sconsflags }} diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index 81fcecea..47e5e78c 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -13,13 +13,6 @@ on: # Global Settings # SCONS_CACHE for windows must be set in the build environment env: - # 4.4 - SCONSFLAGS: >- - module_text_server_fb_enabled=yes - d3d12=yes - strict_checks=yes - "angle_libs=${{ github.workspace }}/" - # 4.5+ # Ideally we'd use dev_mode=yes. Unfortunately, v8 headers contain warnings. So we manually set some dev_mode options. SCONS_FLAGS: >- verbose=yes @@ -146,8 +139,7 @@ jobs: - name: Extract pre-built ANGLE static libraries run: Expand-Archive -Force angle/angle.zip ${{ github.workspace }}/ - - name: Download pre-built AccessKit [4.5+] - if: inputs.version != '4.4' + - name: Download pre-built AccessKit uses: dsaltares/fetch-gh-release-asset@1.1.2 with: repo: AccessKit/accesskit-c @@ -155,21 +147,10 @@ jobs: file: accesskit-c-0.17.0.zip target: accesskit-c-0.17.0/accesskit_c.zip - - name: Extract pre-built AccessKit [4.5+] - if: inputs.version != '4.4' + - name: Extract pre-built AccessKit run: unzip -o accesskit-c-0.17.0/accesskit_c.zip - - name: Compilation (4.4) - if: inputs.version == '4.4' - uses: ./.github/actions/godot-build - with: - sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} - platform: windows - target: ${{ matrix.target }} - scons-cache-limit: ${{ matrix.cache-limit }} - - - name: Compilation (4.5+) - if: inputs.version != '4.4' + - name: Compilation uses: ./.github/actions/godot-build with: scons-flags: ${{ env.SCONS_FLAGS }} ${{ matrix.sconsflags }} From d09cab9a88fefb963cfec226b9aac16d4e83d0dc Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Fri, 7 Nov 2025 15:08:45 +1100 Subject: [PATCH 3/3] chore: has_named_classes() was removed in Godot >=4.6. Was already deprecated --- weaver/jsb_script_language.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/weaver/jsb_script_language.h b/weaver/jsb_script_language.h index 0822917f..6601209d 100644 --- a/weaver/jsb_script_language.h +++ b/weaver/jsb_script_language.h @@ -198,9 +198,11 @@ class GodotJSScriptLanguage : public ScriptLanguage #endif virtual bool is_using_templates() override { return true; } +#if !GODOT_4_6_OR_NEWER #ifndef DISABLE_DEPRECATED virtual bool has_named_classes() const override { return false; } #endif // DISABLE_DEPRECATED +#endif // !GODOT_4_6_OR_NEWER virtual bool supports_builtin_mode() const override { return false; } virtual int find_function(const String& p_function, const String& p_code) const override { return -1; }