Compare commits

...

9 Commits

Author SHA1 Message Date
speak 3ca904814d
Merge 2dfe775f7b into 6644f191ca 2024-12-02 10:40:51 +07:00
Serhii Snitsaruk 6644f191ca
Merge pull request #252 from limbonaut/gha-mingw-windows
GHA: Improve Windows builds: MinGW/GCC with LTO, D3D12, ANGLE
2024-12-01 22:35:44 +01:00
Serhii Snitsaruk 8b0b15fce4
GHA: Fix scons cache in test builds 2024-12-01 18:44:31 +01:00
Serhii Snitsaruk 11548c51f0
GHA: Fix build name missing in Windows builds 2024-12-01 18:35:21 +01:00
Serhii Snitsaruk 62a142f188
GHA: Compile with D3D12 support and Mesa libs 2024-12-01 16:46:27 +01:00
Serhii Snitsaruk 7a3d5bc6a2
GHA: Compile Windows builds with statically linked ANGLE 2024-12-01 16:46:21 +01:00
Serhii Snitsaruk 6d79b7474e
GHA: Don't use SCons cache in release builds 2024-12-01 16:28:10 +01:00
Serhii Snitsaruk 44040dda06
GHA: Build Windows binaries using MinGW/GCC in a docker container 2024-12-01 16:28:03 +01:00
Jesse Viikari 2dfe775f7b Fix compatibility with Godot dev 4.4dev4 2024-11-13 14:04:44 +02:00
12 changed files with 197 additions and 80 deletions

View File

@ -8,6 +8,9 @@ inputs:
- linuxbsd - linuxbsd
- windows - windows
- macos - macos
bin:
required: true
type: string
runs: runs:
using: "composite" using: "composite"
@ -22,7 +25,7 @@ runs:
- name: Generate C# glue - name: Generate C# glue
shell: bash shell: bash
run: | run: |
./bin/${BIN} --headless --generate-mono-glue ./modules/mono/glue || true ./bin/${{inputs.bin}} --headless --generate-mono-glue ./modules/mono/glue || true
- name: Build .NET assemblies - name: Build .NET assemblies
shell: bash shell: bash

View File

@ -165,15 +165,16 @@ jobs:
python --version python --version
scons --version scons --version
- name: Set up scons cache # ! Note: we stopped using the scons cache in release builds.
uses: actions/cache@v4 # - name: Set up scons cache
with: # uses: actions/cache@v4
path: ${{github.workspace}}/.scons_cache/ # with:
key: ${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}} # path: ${{github.workspace}}/.scons_cache/
restore-keys: | # key: ${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}}
${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}} # restore-keys: |
${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}} # ${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}}
${{env.BIN}}-${{inputs.godot-ref}} # ${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}
# ${{env.BIN}}-${{inputs.godot-ref}}
- name: Compilation - name: Compilation
env: env:

View File

@ -11,7 +11,7 @@ on:
type: string type: string
default: master default: master
test-build: test-build:
description: Limit the number of test builds description: Limit to pre-defined test builds
type: boolean type: boolean
default: false default: false
debug-symbols: debug-symbols:
@ -30,7 +30,7 @@ on:
type: string type: string
default: master default: master
test-build: test-build:
description: Limit the number of test builds description: Limit to pre-defined test builds
type: boolean type: boolean
default: false default: false
debug-symbols: debug-symbols:
@ -285,6 +285,7 @@ jobs:
uses: ammaraskar/msvc-problem-matcher@master uses: ammaraskar/msvc-problem-matcher@master
- name: Set up scons cache - name: Set up scons cache
if: inputs.test-build # ! Only cache test/PR builds
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: ${{github.workspace}}/.scons_cache/ path: ${{github.workspace}}/.scons_cache/

View File

@ -145,15 +145,16 @@ jobs:
rm -Rf /tmp/InstallVulkan.app rm -Rf /tmp/InstallVulkan.app
rm -f /tmp/vulkan-sdk.zip rm -f /tmp/vulkan-sdk.zip
- name: Set up scons cache # ! Note: we stopped using the scons cache in release builds.
uses: actions/cache@v4 # - name: Set up scons cache
with: # uses: actions/cache@v4
path: ${{github.workspace}}/.scons_cache/ # with:
key: ${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}} # path: ${{github.workspace}}/.scons_cache/
restore-keys: | # key: ${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}}
${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}} # restore-keys: |
${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}} # ${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}}
${{env.BIN}}-${{inputs.godot-ref}} # ${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}
# ${{env.BIN}}-${{inputs.godot-ref}}
- name: Compilation - name: Compilation
env: env:

View File

@ -11,7 +11,7 @@ on:
type: string type: string
default: master default: master
test-build: test-build:
description: Should we perform only a limited number of test builds? description: Limit to pre-defined test builds
type: boolean type: boolean
default: false default: false
@ -26,7 +26,7 @@ on:
type: string type: string
default: master default: master
test-build: test-build:
description: Should we perform only a limited number of test builds? description: Limit to pre-defined test builds
type: boolean type: boolean
default: false default: false
@ -227,6 +227,7 @@ jobs:
sudo apt-get install libwayland-dev sudo apt-get install libwayland-dev
- name: Set up scons cache - name: Set up scons cache
if: inputs.test-build # ! Only cache test/PR builds
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: ${{github.workspace}}/.scons_cache/ path: ${{github.workspace}}/.scons_cache/
@ -248,6 +249,7 @@ jobs:
uses: ./modules/limboai/.github/actions/build-dotnet-assemblies uses: ./modules/limboai/.github/actions/build-dotnet-assemblies
with: with:
platform: linuxbsd platform: linuxbsd
bin: ${{env.BIN}}
- name: Prepare artifact - name: Prepare artifact
env: env:

View File

@ -11,7 +11,7 @@ on:
type: string type: string
default: master default: master
test-build: test-build:
description: Should we perform only a limited number of test builds? description: Limit to pre-defined test builds
type: boolean type: boolean
default: false default: false
@ -26,7 +26,7 @@ on:
type: string type: string
default: master default: master
test-build: test-build:
description: Should we perform only a limited number of test builds? description: Limit to pre-defined test builds
type: boolean type: boolean
default: false default: false
@ -175,6 +175,7 @@ jobs:
rm -f /tmp/vulkan-sdk.zip rm -f /tmp/vulkan-sdk.zip
- name: Set up scons cache - name: Set up scons cache
if: inputs.test-build # ! Only cache test/PR builds
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: ${{github.workspace}}/.scons_cache/ path: ${{github.workspace}}/.scons_cache/
@ -195,6 +196,7 @@ jobs:
uses: ./modules/limboai/.github/actions/build-dotnet-assemblies uses: ./modules/limboai/.github/actions/build-dotnet-assemblies
with: with:
platform: macos platform: macos
bin: ${{env.BIN}}
- name: Prepare artifact - name: Prepare artifact
run: | run: |

View File

@ -120,15 +120,16 @@ jobs:
python --version python --version
scons --version scons --version
- name: Set up scons cache # ! Note: we stopped using the scons cache in release builds.
uses: actions/cache@v4 # - name: Set up scons cache
with: # uses: actions/cache@v4
path: ${{github.workspace}}/.scons_cache/ # with:
key: ${{env.CACHE_NAME}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}} # path: ${{github.workspace}}/.scons_cache/
restore-keys: | # key: ${{env.CACHE_NAME}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}}
${{env.CACHE_NAME}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}} # restore-keys: |
${{env.CACHE_NAME}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}} # ${{env.CACHE_NAME}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}}
${{env.CACHE_NAME}}-${{inputs.godot-ref}} # ${{env.CACHE_NAME}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}
# ${{env.CACHE_NAME}}-${{inputs.godot-ref}}
- name: Compilation - name: Compilation
env: env:

View File

@ -5,13 +5,13 @@ on:
godot-ref: godot-ref:
description: A tag, branch or commit hash in the Godot repository. description: A tag, branch or commit hash in the Godot repository.
type: string type: string
default: master default: 4.3
limboai-ref: limboai-ref:
description: A tag, branch or commit hash in the LimboAI repository. description: A tag, branch or commit hash in the LimboAI repository.
type: string type: string
default: master default: master
test-build: test-build:
description: Should we perform only a limited number of test builds? description: Limit to pre-defined test builds
type: boolean type: boolean
default: false default: false
@ -20,28 +20,29 @@ on:
godot-ref: godot-ref:
description: A tag, branch or commit hash in the Godot repository. description: A tag, branch or commit hash in the Godot repository.
type: string type: string
default: master default: 4.3
limboai-ref: limboai-ref:
description: A tag, branch or commit hash in the LimboAI repository. description: A tag, branch or commit hash in the LimboAI repository.
type: string type: string
default: master default: master
test-build: test-build:
description: Should we perform only a limited number of test builds? description: Limit to pre-defined test builds
type: boolean type: boolean
default: false default: false
# Global Settings # Global Settings
env: env:
SCONS_CACHE_MSVC_CONFIG: true BUILD_IMAGE_VERSION: 4.3-f40
MESA_VERSION: 23.1.9-1
SCONS_CACHE_LIMIT: 4096 SCONS_CACHE_LIMIT: 4096
SCONSFLAGS: production=yes tests=no verbose=yes warnings=extra werror=yes SCONSFLAGS: production=yes use_mingw=yes verbose=yes warnings=no progress=no d3d12=yes
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs: jobs:
windows-builds: windows-builds:
runs-on: "windows-latest" runs-on: "ubuntu-24.04"
name: ${{ matrix.opts.name }} name: ${{ matrix.opts.name }}
outputs:
built-dotnet-editor: ${{ steps.mark-dotnet-editor.outputs.built-dotnet-editor }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@ -51,18 +52,21 @@ jobs:
- name: Editor (x86_64, release) - name: Editor (x86_64, release)
target: editor target: editor
arch: x86_64 arch: x86_64
llvm: false
dotnet: false dotnet: false
should-build: true should-build: true
- name: Template (x86_64, release) - name: Template (x86_64, release)
target: template_release target: template_release
arch: x86_64 arch: x86_64
llvm: false
dotnet: false dotnet: false
should-build: ${{ !inputs.test-build }} should-build: ${{ !inputs.test-build }}
- name: Template (x86_64, debug) - name: Template (x86_64, debug)
target: template_debug target: template_debug
arch: x86_64 arch: x86_64
llvm: false
dotnet: false dotnet: false
should-build: ${{ !inputs.test-build }} should-build: ${{ !inputs.test-build }}
@ -71,18 +75,21 @@ jobs:
# - name: Editor (x86_32, release) # - name: Editor (x86_32, release)
# target: editor # target: editor
# arch: x86_32 # arch: x86_32
# llvm: false
# dotnet: false # dotnet: false
# should-build: ${{ !inputs.test-build }} # should-build: ${{ !inputs.test-build }}
- name: Template (x86_32, release) - name: Template (x86_32, release)
target: template_release target: template_release
arch: x86_32 arch: x86_32
llvm: false
dotnet: false dotnet: false
should-build: ${{ !inputs.test-build }} should-build: ${{ !inputs.test-build }}
- name: Template (x86_32, debug) - name: Template (x86_32, debug)
target: template_debug target: template_debug
arch: x86_32 arch: x86_32
llvm: false
dotnet: false dotnet: false
should-build: ${{ !inputs.test-build }} should-build: ${{ !inputs.test-build }}
@ -91,19 +98,24 @@ jobs:
# - name: Editor (arm64, release) # - name: Editor (arm64, release)
# target: editor # target: editor
# arch: arm64 # arch: arm64
# llvm: true
# dotnet: false # dotnet: false
# should-build: ${{ !inputs.test-build }} # should-build: ${{ !inputs.test-build }}
- name: Template (arm64, release) - name: Template (arm64, release)
target: template_release target: template_release
arch: arm64 arch: arm64
llvm: true
dotnet: false dotnet: false
scons-flags: mingw_prefix=/root/llvm-mingw
should-build: ${{ !inputs.test-build }} should-build: ${{ !inputs.test-build }}
- name: Template (arm64, debug) - name: Template (arm64, debug)
target: template_debug target: template_debug
arch: arm64 arch: arm64
llvm: true
dotnet: false dotnet: false
scons-flags: mingw_prefix=/root/llvm-mingw
should-build: ${{ !inputs.test-build }} should-build: ${{ !inputs.test-build }}
# * .NET x86_64 # * .NET x86_64
@ -111,18 +123,21 @@ jobs:
- name: Editor .NET (x86_64, release) - name: Editor .NET (x86_64, release)
target: editor target: editor
arch: x86_64 arch: x86_64
llvm: false
dotnet: true dotnet: true
should-build: ${{ !inputs.test-build }} should-build: ${{ !inputs.test-build }}
- name: Template .NET (x86_64, release) - name: Template .NET (x86_64, release)
target: template_release target: template_release
arch: x86_64 arch: x86_64
llvm: false
dotnet: true dotnet: true
should-build: ${{ !inputs.test-build }} should-build: ${{ !inputs.test-build }}
- name: Template .NET (x86_64, debug) - name: Template .NET (x86_64, debug)
target: template_debug target: template_debug
arch: x86_64 arch: x86_64
llvm: false
dotnet: true dotnet: true
should-build: ${{ !inputs.test-build }} should-build: ${{ !inputs.test-build }}
@ -131,46 +146,54 @@ jobs:
# - name: Editor .NET (x86_32, release) # - name: Editor .NET (x86_32, release)
# target: editor # target: editor
# arch: x86_32 # arch: x86_32
# llvm: false
# dotnet: true # dotnet: true
# should-build: ${{ !inputs.test-build }} # should-build: ${{ !inputs.test-build }}
- name: Template .NET (x86_32, release) - name: Template .NET (x86_32, release)
target: template_release target: template_release
arch: x86_32 arch: x86_32
llvm: false
dotnet: true dotnet: true
should-build: ${{ !inputs.test-build }} should-build: ${{ !inputs.test-build }}
- name: Template .NET (x86_32, debug) - name: Template .NET (x86_32, debug)
target: template_debug target: template_debug
arch: x86_32 arch: x86_32
llvm: false
dotnet: true dotnet: true
should-build: ${{ !inputs.test-build }} should-build: ${{ !inputs.test-build }}
# * .NET arm64 # * .NET arm64
# - name: Editor (arm64, release) # - name: Editor .NET (arm64, release)
# target: editor # target: editor
# arch: arm64 # arch: arm64
# llvm: true
# dotnet: true # dotnet: true
# should-build: ${{ !inputs.test-build }} # should-build: ${{ !inputs.test-build }}
- name: Template (arm64, release) - name: Template .NET (arm64, release)
target: template_release target: template_release
arch: arm64 arch: arm64
llvm: true
dotnet: true dotnet: true
scons-flags: mingw_prefix=/root/llvm-mingw
should-build: ${{ !inputs.test-build }} should-build: ${{ !inputs.test-build }}
- name: Template (arm64, debug) - name: Template .NET (arm64, debug)
target: template_debug target: template_debug
arch: arm64 arch: arm64
llvm: true
dotnet: true dotnet: true
scons-flags: mingw_prefix=/root/llvm-mingw
should-build: ${{ !inputs.test-build }} should-build: ${{ !inputs.test-build }}
exclude: exclude:
- { opts: { should-build: false } } - { opts: { should-build: false } }
env: env:
BIN: godot.windows.${{matrix.opts.target}}.${{matrix.opts.arch}}${{ matrix.opts.dotnet == true && '.mono' || '' }} BIN: godot.windows.${{matrix.opts.target}}.${{matrix.opts.arch}}${{matrix.opts.llvm && '.llvm' || ''}}${{matrix.opts.dotnet == true && '.mono' || ''}}
steps: steps:
- name: Clone Godot - name: Clone Godot
@ -185,26 +208,11 @@ jobs:
path: modules/limboai path: modules/limboai
ref: ${{ inputs.limboai-ref }} ref: ${{ inputs.limboai-ref }}
# Inits GODOT_VERSION, LIMBOAI_VERSION and NAME_PREFIX environment variables. # Inits GODOT_VERSION, LIMBOAI_VERSION, NAME_PREFIX, GODOT_VERSION_STATUS, BUILD_NAME environment variables.
- uses: ./modules/limboai/.github/actions/init-version - uses: ./modules/limboai/.github/actions/init-version
- name: Set up Python 3.x
uses: actions/setup-python@v5
with:
python-version: "3.x"
architecture: "x64"
- name: Set up scons
run: |
python -c "import sys; print(sys.version)"
python -m pip install scons==4.4.0
python --version
scons --version
- name: Set up MSVC problem matcher
uses: ammaraskar/msvc-problem-matcher@master
- name: Set up scons cache - name: Set up scons cache
if: inputs.test-build # ! Only cache test/PR builds
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: ${{github.workspace}}/.scons_cache/ path: ${{github.workspace}}/.scons_cache/
@ -214,17 +222,54 @@ jobs:
${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}} ${{env.BIN}}-${{inputs.godot-ref}}-${{inputs.limboai-ref}}
${{env.BIN}}-${{inputs.godot-ref}} ${{env.BIN}}-${{inputs.godot-ref}}
- name: Compilation - name: Static ANGLE libs
env:
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
run: | run: |
scons -j2 platform=windows target=${{matrix.opts.target}} arch=${{matrix.opts.arch}} module_mono_enabled=${{matrix.opts.dotnet}} ${{env.SCONSFLAGS}} mkdir -p deps/angle
cd deps/angle
url=https://github.com/godotengine/godot-angle-static/releases/download/chromium%2F6601.2/godot-angle-static
curl -L -o windows_${{matrix.opts.arch}}.zip $url-${{matrix.opts.arch}}-${{matrix.opts.llvm && 'llvm' || 'gcc'}}-release.zip
unzip windows_${{matrix.opts.arch}}.zip
rm windows_${{matrix.opts.arch}}.zip
- name: Build .NET assemblies - name: Mesa libs
if: matrix.opts.dotnet && matrix.opts.target == 'editor' run: |
uses: ./modules/limboai/.github/actions/build-dotnet-assemblies mkdir -p deps/mesa
with: cd deps/mesa
platform: windows curl -L -o mesa_${{matrix.opts.arch}}.zip https://github.com/godotengine/godot-nir-static/releases/download/${{env.MESA_VERSION}}/godot-nir-static-${{matrix.opts.arch}}-${{matrix.opts.llvm && 'llvm' || 'gcc'}}-release.zip
unzip -o mesa_${{matrix.opts.arch}}.zip
rm -f mesa_${{matrix.opts.arch}}.zip
- name: Pull build container
run: |
podman pull ghcr.io/limbonaut/godot-windows:${{env.BUILD_IMAGE_VERSION}}
- name: Build using container
shell: bash
run: |
scons_command="scons \
platform=windows \
target=${{matrix.opts.target}} \
arch=${{matrix.opts.arch}} \
use_llvm=${{matrix.opts.llvm}} \
module_mono_enabled=${{matrix.opts.dotnet}} \
${{env.SCONSFLAGS}} \
${{matrix.opts.scons-flags}} \
angle_libs=/build/deps/angle \
mesa_libs=/build/deps/mesa \
"
podman_run="podman run -it --rm \
--env GODOT_VERSION_STATUS=${GODOT_VERSION_STATUS} \
--env BUILD_NAME=${BUILD_NAME} \
--env NUM_CORES=$(nproc --all) \
--env DOTNET_NOLOGO=true \
--env DOTNET_CLI_TELEMETRY_OPTOUT=true \
--env SCONS_CACHE=/build/.scons_cache/ \
--env SCONS_CACHE_LIMIT=${SCONS_CACHE_LIMIT} \
-v ${GITHUB_WORKSPACE}/:/build/ \
-w /build godot-windows:${{env.BUILD_IMAGE_VERSION}} bash -c \
"
echo "Running ${podman_run} \"${scons_command}\""
${podman_run} "${scons_command}"
- name: Prepare artifact - name: Prepare artifact
shell: bash shell: bash
@ -252,3 +297,62 @@ jobs:
with: with:
name: ${{env.NAME_PREFIX}}${{matrix.opts.dotnet == true && '.dotnet' || ''}}.${{matrix.opts.target}}.windows.${{matrix.opts.arch}} name: ${{env.NAME_PREFIX}}${{matrix.opts.dotnet == true && '.dotnet' || ''}}.${{matrix.opts.target}}.windows.${{matrix.opts.arch}}
path: out/* path: out/*
- name: Mark .NET editor as built
if: matrix.opts.dotnet && matrix.opts.target == 'editor'
id: mark-dotnet-editor
run: echo "built-dotnet-editor=true" >> $GITHUB_OUTPUT
dotnet-assemblies:
name: .NET assembly for ${{matrix.opts.arch}}
needs: windows-builds
if: always() && needs.windows-builds.outputs.built-dotnet-editor == 'true'
runs-on: "windows-latest"
strategy:
fail-fast: false
matrix:
opts:
- arch: x86_64
llvm: false
env:
BIN: godot.windows.editor.${{matrix.opts.arch}}${{matrix.opts.llvm && '.llvm' || ''}}.mono
steps:
- name: Clone Godot
uses: actions/checkout@v4
with:
repository: godotengine/godot
ref: ${{ inputs.godot-ref }}
- name: Clone LimboAI module
uses: actions/checkout@v4
with:
path: modules/limboai
ref: ${{ inputs.limboai-ref }}
# Inits GODOT_VERSION, LIMBOAI_VERSION and NAME_PREFIX environment variables.
- uses: ./modules/limboai/.github/actions/init-version
- name: Reconstruct artifact name
shell: bash
run: |
echo "ARTIFACT=${{env.NAME_PREFIX}}.dotnet.editor.windows.${{matrix.opts.arch}}" >> $GITHUB_ENV
- name: Download editor artifact
uses: actions/download-artifact@v4
with:
name: ${{env.ARTIFACT}}
path: bin/
- name: Build .NET assemblies
uses: ./modules/limboai/.github/actions/build-dotnet-assemblies
with:
platform: windows
bin: ${{env.BIN}}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{env.ARTIFACT}}
overwrite: true
path: bin/*

View File

@ -287,14 +287,14 @@ void EditorPropertyBBParam::update_property() {
variable_editor->update_property(); variable_editor->update_property();
variable_editor->show(); variable_editor->show();
bottom_container->hide(); bottom_container->hide();
type_choice->set_icon(get_editor_theme_icon(SNAME("LimboExtraVariable"))); type_choice->set_button_icon(get_editor_theme_icon(SNAME("LimboExtraVariable")));
} else { } else {
_create_value_editor(param->get_type()); _create_value_editor(param->get_type());
variable_editor->hide(); variable_editor->hide();
value_editor->show(); value_editor->show();
value_editor->set_object_and_property(param.ptr(), SNAME("saved_value")); value_editor->set_object_and_property(param.ptr(), SNAME("saved_value"));
value_editor->update_property(); value_editor->update_property();
type_choice->set_icon(get_editor_theme_icon(Variant::get_type_name(param->get_type()))); type_choice->set_button_icon(get_editor_theme_icon(Variant::get_type_name(param->get_type())));
} }
} }
@ -316,7 +316,7 @@ void EditorPropertyBBParam::_notification(int p_what) {
{ {
String type = Variant::get_type_name(_get_edited_param()->get_type()); String type = Variant::get_type_name(_get_edited_param()->get_type());
type_choice->set_icon(get_editor_theme_icon(type)); type_choice->set_button_icon(get_editor_theme_icon(type));
} }
// Initialize type choice. // Initialize type choice.

View File

@ -27,6 +27,7 @@
#include "core/object/object.h" #include "core/object/object.h"
#include "core/templates/hash_set.h" #include "core/templates/hash_set.h"
#include "editor/editor_node.h" #include "editor/editor_node.h"
#include "editor/editor_main_screen.h"
#include "editor/editor_undo_redo_manager.h" #include "editor/editor_undo_redo_manager.h"
#include "editor/gui/editor_spin_slider.h" #include "editor/gui/editor_spin_slider.h"
#include "editor/plugins/editor_plugin.h" #include "editor/plugins/editor_plugin.h"

View File

@ -17,6 +17,7 @@
#include "core/io/resource.h" #include "core/io/resource.h"
#include "core/variant/variant.h" #include "core/variant/variant.h"
#include "editor/editor_node.h" #include "editor/editor_node.h"
#include "editor/editor_main_screen.h"
#include "editor/plugins/script_editor_plugin.h" #include "editor/plugins/script_editor_plugin.h"
#endif // TOOLS_ENABLED #endif // TOOLS_ENABLED
@ -213,7 +214,7 @@ Variant VARIANT_DEFAULT(Variant::Type p_type) {
void SHOW_BUILTIN_DOC(const String &p_topic) { void SHOW_BUILTIN_DOC(const String &p_topic) {
#ifdef LIMBOAI_MODULE #ifdef LIMBOAI_MODULE
ScriptEditor::get_singleton()->goto_help(p_topic); ScriptEditor::get_singleton()->goto_help(p_topic);
EditorNode::get_singleton()->set_visible_editor(EditorNode::EDITOR_SCRIPT); EditorNode::get_singleton()->get_editor_main_screen()->select(EditorMainScreen::EDITOR_SCRIPT);
#elif LIMBOAI_GDEXTENSION #elif LIMBOAI_GDEXTENSION
TypedArray<ScriptEditorBase> open_editors = EditorInterface::get_singleton()->get_script_editor()->get_open_script_editors(); TypedArray<ScriptEditorBase> open_editors = EditorInterface::get_singleton()->get_script_editor()->get_open_script_editors();
ERR_FAIL_COND_MSG(open_editors.size() == 0, "Can't open help page. Need at least one script open in the script editor."); ERR_FAIL_COND_MSG(open_editors.size() == 0, "Can't open help page. Need at least one script open in the script editor.");

View File

@ -28,7 +28,7 @@
#define EDITOR_FILE_SYSTEM() (EditorFileSystem::get_singleton()) #define EDITOR_FILE_SYSTEM() (EditorFileSystem::get_singleton())
#define EDITOR_SETTINGS() (EditorSettings::get_singleton()) #define EDITOR_SETTINGS() (EditorSettings::get_singleton())
#define BASE_CONTROL() (EditorNode::get_singleton()->get_gui_base()) #define BASE_CONTROL() (EditorNode::get_singleton()->get_gui_base())
#define MAIN_SCREEN_CONTROL() (EditorNode::get_singleton()->get_main_screen_control()) #define MAIN_SCREEN_CONTROL() (EditorNode::get_singleton()->get_editor_main_screen()->get_control())
#define SCENE_TREE() (SceneTree::get_singleton()) #define SCENE_TREE() (SceneTree::get_singleton())
#define IS_DEBUGGER_ACTIVE() (EngineDebugger::is_active()) #define IS_DEBUGGER_ACTIVE() (EngineDebugger::is_active())
#define FS_DOCK_SELECT_FILE(m_path) FileSystemDock::get_singleton()->select_file(m_path) #define FS_DOCK_SELECT_FILE(m_path) FileSystemDock::get_singleton()->select_file(m_path)
@ -37,7 +37,7 @@
#define IS_CLASS(m_obj, m_class) (m_obj->is_class_ptr(m_class::get_class_ptr_static())) #define IS_CLASS(m_obj, m_class) (m_obj->is_class_ptr(m_class::get_class_ptr_static()))
#define RAND_RANGE(m_from, m_to) (Math::random(m_from, m_to)) #define RAND_RANGE(m_from, m_to) (Math::random(m_from, m_to))
#define RANDF() (Math::randf()) #define RANDF() (Math::randf())
#define BUTTON_SET_ICON(m_btn, m_icon) m_btn->set_icon(m_icon) #define BUTTON_SET_ICON(m_btn, m_icon) m_btn->set_button_icon(m_icon)
#define RESOURCE_LOAD(m_path, m_hint) ResourceLoader::load(m_path, m_hint) #define RESOURCE_LOAD(m_path, m_hint) ResourceLoader::load(m_path, m_hint)
#define RESOURCE_LOAD_NO_CACHE(m_path, m_hint) ResourceLoader::load(m_path, m_hint, ResourceFormatLoader::CACHE_MODE_IGNORE) #define RESOURCE_LOAD_NO_CACHE(m_path, m_hint) ResourceLoader::load(m_path, m_hint, ResourceFormatLoader::CACHE_MODE_IGNORE)
#define RESOURCE_SAVE(m_res, m_path, m_flags) ResourceSaver::save(m_res, m_path, m_flags) #define RESOURCE_SAVE(m_res, m_path, m_flags) ResourceSaver::save(m_res, m_path, m_flags)
@ -47,7 +47,7 @@
#define GET_PROJECT_SETTINGS_DIR() EditorPaths::get_singleton()->get_project_settings_dir() #define GET_PROJECT_SETTINGS_DIR() EditorPaths::get_singleton()->get_project_settings_dir()
#define EDIT_RESOURCE(m_res) EditorNode::get_singleton()->edit_resource(m_res) #define EDIT_RESOURCE(m_res) EditorNode::get_singleton()->edit_resource(m_res)
#define INSPECTOR_GET_EDITED_OBJECT() (InspectorDock::get_inspector_singleton()->get_edited_object()) #define INSPECTOR_GET_EDITED_OBJECT() (InspectorDock::get_inspector_singleton()->get_edited_object())
#define SET_MAIN_SCREEN_EDITOR(m_name) (EditorNode::get_singleton()->select_editor_by_name(m_name)) #define SET_MAIN_SCREEN_EDITOR(m_name) (EditorNode::get_singleton()->get_editor_main_screen()->select_by_name(m_name))
#define FILE_EXISTS(m_path) FileAccess::exists(m_path) #define FILE_EXISTS(m_path) FileAccess::exists(m_path)
#define DIR_ACCESS_CREATE() DirAccess::create(DirAccess::ACCESS_RESOURCES) #define DIR_ACCESS_CREATE() DirAccess::create(DirAccess::ACCESS_RESOURCES)
#define PERFORMANCE_ADD_CUSTOM_MONITOR(m_id, m_callable) (Performance::get_singleton()->add_custom_monitor(m_id, m_callable, Variant())) #define PERFORMANCE_ADD_CUSTOM_MONITOR(m_id, m_callable) (Performance::get_singleton()->add_custom_monitor(m_id, m_callable, Variant()))