diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ba9de31..4d976f6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ jobs: - name: Import assets uses: ./.github/actions/import-assets with: - godot-version: v4.0-beta14 + godot-version: v4.2.1-stable - name: Upload imports uses: actions/upload-artifact@v3 with: @@ -237,7 +237,7 @@ jobs: matrix: os: [ ubuntu-22.04 ] #, macos-12, windows-2022 ] Temporarily disabled. bits: [ 64, 32 ] - godot_version: [ 'v4.0-beta14' ] + godot_version: [ 'v4.2.1-stable' ] exclude: - os: macos-12 bits: 32 diff --git a/addons/godot_xterm/godot_xterm.gdextension b/addons/godot_xterm/godot_xterm.gdextension index 8fe6956..fd19c36 100644 --- a/addons/godot_xterm/godot_xterm.gdextension +++ b/addons/godot_xterm/godot_xterm.gdextension @@ -1,8 +1,10 @@ [configuration] entry_symbol = "godot_xterm_library_init" +compatibility_minimum = "4.2.1" [libraries] + linux.debug.x86_64 = "res://addons/godot_xterm/native/bin/libgodot-xterm.linux.template_debug.x86_64.so" linux.release.x86_64 = "res://addons/godot_xterm/native/bin/libgodot-xterm.linux.template_release.x86_64.so" linux.debug.x86_32 = "res://addons/godot_xterm/native/bin/libgodot-xterm.linux.template_debug.x86_32.so" diff --git a/addons/godot_xterm/native/src/node_pty/unix/pty.cc b/addons/godot_xterm/native/src/node_pty/unix/pty.cc index a51a458..d5e2fa5 100644 --- a/addons/godot_xterm/native/src/node_pty/unix/pty.cc +++ b/addons/godot_xterm/native/src/node_pty/unix/pty.cc @@ -120,8 +120,9 @@ static void pty_after_waitpid(uv_async_t *); static void pty_after_close(uv_handle_t *); Array PTYUnix::fork(String p_file, int _ignored, PackedStringArray p_args, - PackedStringArray p_env, String p_cwd, int p_cols, int p_rows, - int p_uid, int p_gid, bool p_utf8, Callable p_on_exit) { + PackedStringArray p_env, String p_cwd, int p_cols, + int p_rows, int p_uid, int p_gid, bool p_utf8, + Callable p_on_exit) { // file char *file = strdup(p_file.utf8().get_data()); @@ -445,9 +446,9 @@ static void pty_after_waitpid(uv_async_t *async) { Array argv = Array::make(baton->exit_code, baton->signal_code); - if (baton->cb != nullptr && baton->cb.is_valid()) { + if (baton->cb.is_valid()) { baton->cb.callv(argv); - baton->cb = (Variant)nullptr; + baton->cb = (Variant) nullptr; } uv_close((uv_handle_t *)async, pty_after_close); diff --git a/addons/godot_xterm/native/src/register_types.cpp b/addons/godot_xterm/native/src/register_types.cpp index 0a45eef..b2de5af 100644 --- a/addons/godot_xterm/native/src/register_types.cpp +++ b/addons/godot_xterm/native/src/register_types.cpp @@ -1,11 +1,5 @@ #include "register_types.h" -#include - -#include -#include -#include - #include "terminal.h" #if !defined(_PTY_DISABLED) @@ -15,10 +9,14 @@ #include "node_pty/unix/pty.h" #endif #if defined(__WIN32) -//#include "node_pty/win/conpty.h" +// #include "node_pty/win/conpty.h" #endif #endif +#include +#include +#include + using namespace godot; void initialize_godot_xterm_module(ModuleInitializationLevel p_level) { @@ -45,13 +43,13 @@ void uninitialize_godot_xterm_module(ModuleInitializationLevel p_level) { } } -extern "C" - // Initialization - GDExtensionBool GDE_EXPORT - godot_xterm_library_init(const GDExtensionInterface *p_interface, - GDExtensionClassLibraryPtr p_library, - GDExtensionInitialization *r_initialization) { - godot::GDExtensionBinding::InitObject init_obj(p_interface, p_library, +extern "C" { +// Initialization +GDExtensionBool GDE_EXPORT +godot_xterm_library_init(GDExtensionInterfaceGetProcAddress p_get_proc_address, + const GDExtensionClassLibraryPtr p_library, + GDExtensionInitialization *r_initialization) { + godot::GDExtensionBinding::InitObject init_obj(p_get_proc_address, p_library, r_initialization); init_obj.register_initializer(initialize_godot_xterm_module); @@ -61,3 +59,4 @@ extern "C" return init_obj.init(); } +} diff --git a/addons/godot_xterm/native/thirdparty/godot-cpp b/addons/godot_xterm/native/thirdparty/godot-cpp index 516fad1..78ffea5 160000 --- a/addons/godot_xterm/native/thirdparty/godot-cpp +++ b/addons/godot_xterm/native/thirdparty/godot-cpp @@ -1 +1 @@ -Subproject commit 516fad14e45d341211121832bb3daa172aebd6e1 +Subproject commit 78ffea5b136f3178c31cddb28f6b963ceaa89420 diff --git a/addons/godot_xterm/native/thirdparty/libtsm b/addons/godot_xterm/native/thirdparty/libtsm index 0102bc2..d7b39db 160000 --- a/addons/godot_xterm/native/thirdparty/libtsm +++ b/addons/godot_xterm/native/thirdparty/libtsm @@ -1 +1 @@ -Subproject commit 0102bc2c5480773bf64c1edbdfb5d1ddb3b63954 +Subproject commit d7b39db8180c6df4b0c9f59a0ce7fbcdb11de60e diff --git a/addons/godot_xterm/nodes/pty/pty_icon.svg.import b/addons/godot_xterm/nodes/pty/pty_icon.svg.import index 7043478..8cbb823 100644 --- a/addons/godot_xterm/nodes/pty/pty_icon.svg.import +++ b/addons/godot_xterm/nodes/pty/pty_icon.svg.import @@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/pty_icon.svg-e9e42570b4744b3370a02d174395c793 [params] compress/mode=0 +compress/high_quality=false compress/lossy_quality=0.7 compress/hdr_compression=1 -compress/bptc_ldr=0 compress/normal_map=0 compress/channel_pack=0 mipmaps/generate=false diff --git a/addons/godot_xterm/nodes/terminal/terminal_icon.svg.import b/addons/godot_xterm/nodes/terminal/terminal_icon.svg.import index 2e18494..0a2346c 100644 --- a/addons/godot_xterm/nodes/terminal/terminal_icon.svg.import +++ b/addons/godot_xterm/nodes/terminal/terminal_icon.svg.import @@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/terminal_icon.svg-a0706fd47bb880823b1242c2241 [params] compress/mode=0 +compress/high_quality=false compress/lossy_quality=0.7 compress/hdr_compression=1 -compress/bptc_ldr=0 compress/normal_map=0 compress/channel_pack=0 mipmaps/generate=false diff --git a/addons/gut/gui/arrow.png.import b/addons/gut/gui/arrow.png.import index e06bc42..6eb8d61 100644 --- a/addons/gut/gui/arrow.png.import +++ b/addons/gut/gui/arrow.png.import @@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/arrow.png-2b5b2d838b5b3467cf300ac2da1630d9.ct [params] compress/mode=0 +compress/high_quality=false compress/lossy_quality=0.7 compress/hdr_compression=1 -compress/bptc_ldr=0 compress/normal_map=0 compress/channel_pack=0 mipmaps/generate=false diff --git a/addons/gut/gui/play.png.import b/addons/gut/gui/play.png.import index 3abeac1..836b080 100644 --- a/addons/gut/gui/play.png.import +++ b/addons/gut/gui/play.png.import @@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/play.png-5c90e88e8136487a183a099d67a7de24.cte [params] compress/mode=0 +compress/high_quality=false compress/lossy_quality=0.7 compress/hdr_compression=1 -compress/bptc_ldr=0 compress/normal_map=0 compress/channel_pack=0 mipmaps/generate=false diff --git a/addons/gut/icon.png.import b/addons/gut/icon.png.import index 1a2f9c7..ea477b5 100644 --- a/addons/gut/icon.png.import +++ b/addons/gut/icon.png.import @@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/icon.png-91b084043b8aaf2f1c906e7b9fa92969.cte [params] compress/mode=0 +compress/high_quality=false compress/lossy_quality=0.7 compress/hdr_compression=1 -compress/bptc_ldr=0 compress/normal_map=0 compress/channel_pack=0 mipmaps/generate=false diff --git a/addons/gut/images/green.png.import b/addons/gut/images/green.png.import index 55b3b00..433f7e1 100644 --- a/addons/gut/images/green.png.import +++ b/addons/gut/images/green.png.import @@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/green.png-e3a17091688e10a7013279b38edc7f8a.ct [params] compress/mode=0 +compress/high_quality=false compress/lossy_quality=0.7 compress/hdr_compression=1 -compress/bptc_ldr=0 compress/normal_map=0 compress/channel_pack=0 mipmaps/generate=false diff --git a/addons/gut/images/red.png.import b/addons/gut/images/red.png.import index 0a7e645..e0a03fb 100644 --- a/addons/gut/images/red.png.import +++ b/addons/gut/images/red.png.import @@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/red.png-47a557c3922e800f76686bc1a4ad0c3c.ctex [params] compress/mode=0 +compress/high_quality=false compress/lossy_quality=0.7 compress/hdr_compression=1 -compress/bptc_ldr=0 compress/normal_map=0 compress/channel_pack=0 mipmaps/generate=false diff --git a/addons/gut/images/yellow.png.import b/addons/gut/images/yellow.png.import index c2941cb..58e0272 100644 --- a/addons/gut/images/yellow.png.import +++ b/addons/gut/images/yellow.png.import @@ -16,9 +16,9 @@ dest_files=["res://.godot/imported/yellow.png-b3cf3d463958a169d909273d3d742052.c [params] compress/mode=0 +compress/high_quality=false compress/lossy_quality=0.7 compress/hdr_compression=1 -compress/bptc_ldr=0 compress/normal_map=0 compress/channel_pack=0 mipmaps/generate=false diff --git a/misc/vscode/launch.json b/misc/vscode/launch.json index afdeabb..e177a29 100644 --- a/misc/vscode/launch.json +++ b/misc/vscode/launch.json @@ -8,7 +8,7 @@ "name": "Main (gdb) Launch", "type": "cppdbg", "request": "launch", - "program": "/run/current-system/sw/bin/godot", + "program": "/run/current-system/sw/bin/godot4", "args": [ "${workspaceFolder}/examples/menu/menu.tscn", ], @@ -24,18 +24,17 @@ "ignoreFailures": true, }, { - "description": "Set Disassembly Flavor to Intel", + "description": "Set Disassembly Flavor to Intel", "text": "-gdb-set disassembly-flavor intel", "ignoreFailures": true, }, ], }, - { "name": "Editor (gdb) Launch", "type": "cppdbg", "request": "launch", - "program": "/run/current-system/sw/bin/godot", + "program": "/run/current-system/sw/bin/godot4", "args": [ "--editor", ], @@ -51,7 +50,7 @@ "ignoreFailures": true, }, { - "description": "Set Disassembly Flavor to Intel", + "description": "Set Disassembly Flavor to Intel", "text": "-gdb-set disassembly-flavor intel", "ignoreFailures": true, }, @@ -65,7 +64,7 @@ "name": "Test (gdb) Launch", "type": "cppdbg", "request": "launch", - "program": "/run/current-system/sw/bin/godot", + "program": "/run/current-system/sw/bin/godot4", "args": [ "--no-window", "-s", @@ -85,4 +84,4 @@ ], }, ], -} +} \ No newline at end of file diff --git a/project.godot b/project.godot index 6fce8ab..914844c 100644 --- a/project.godot +++ b/project.godot @@ -12,17 +12,13 @@ config_version=5 config/name="GodotXterm" run/main_scene="res://examples/menu/menu.tscn" -config/features=PackedStringArray("4.0") +config/features=PackedStringArray("4.2") config/icon="res://docs/media/icon.png" [display] window/vsync/use_vsync=false -[editor] - -export/convert_text_resources_to_binary=true - [editor_plugins] enabled=PackedStringArray("res://addons/godot_xterm/plugin.cfg")