Skip to content

Commit

Permalink
Fix build, fix some random warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzybinary committed Feb 7, 2025
1 parent 1d52a53 commit 17765d7
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 13 deletions.
4 changes: 2 additions & 2 deletions example/2d_tutorial/src/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,14 @@ packages:
path: "../../../src/dart/godot_dart"
relative: true
source: path
version: "0.8.0"
version: "0.9.0"
godot_dart_build:
dependency: "direct dev"
description:
path: "../../../src/dart/godot_dart_build"
relative: true
source: path
version: "0.6.0"
version: "0.7.0"
graphs:
dependency: transitive
description:
Expand Down
4 changes: 2 additions & 2 deletions example/networking-demo/src/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,14 @@ packages:
path: "../../../src/dart/godot_dart"
relative: true
source: path
version: "0.8.0"
version: "0.9.0"
godot_dart_build:
dependency: "direct dev"
description:
path: "../../../src/dart/godot_dart_build"
relative: true
source: path
version: "0.6.0"
version: "0.7.0"
graphs:
dependency: transitive
description:
Expand Down
Empty file modified prepare.sh
100755 → 100644
Empty file.
8 changes: 7 additions & 1 deletion src/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,16 @@ elseif(LINUX)
set(THREADS_PREFER_PTHREAD_FLAG ON)

find_package(Threads REQUIRED)
set(RPATH_ARG "-rpath=./")
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set(RPATH_ARG "-Wl,-rpath,./")
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(RPATH_ARG "-rpath ./")
endif()
# Find shared libraries next to the executable
set_target_properties(godot_dart PROPERTIES
BUILD_WITH_INSTALL_RPATH FALSE
LINK_FLAGS "-rpath,./")
LINK_FLAGS ${RPATH_ARG})

target_link_libraries(godot_dart
Threads::Threads
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/gde_c_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ void gde_variant_set_indexed(GDExtensionVariantPtr p_self, GDExtensionInt p_inde
static GDExtensionInterfaceVariantGetPtrUtilityFunction _variant_get_ptr_utility_function_func = nullptr;
GDExtensionPtrUtilityFunction gde_variant_get_ptr_utility_function(GDExtensionConstStringNamePtr p_function,
GDExtensionInt p_hash) {
if (gde_variant_get_ptr_utility_function) {
if (_variant_get_ptr_utility_function_func) {
return _variant_get_ptr_utility_function_func(p_function, p_hash);
}
return nullptr;
Expand Down
8 changes: 4 additions & 4 deletions src/cpp/ref_counted_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ int RefCountedWrapper::get_reference_count() {
}

void RefCountedWrapper::init() {
const int class_hash = 2240911060;
const GDExtensionInt class_hash = 2240911060;
godot::StringName class_name("RefCounted");
init_ref_ptr_call =
gde_classdb_get_method_bind(class_name._native_ptr(), godot::StringName("init_ref")._native_ptr(), 2240911060);
gde_classdb_get_method_bind(class_name._native_ptr(), godot::StringName("init_ref")._native_ptr(), class_hash);
reference_ptr_call =
gde_classdb_get_method_bind(class_name._native_ptr(), godot::StringName("reference")._native_ptr(), 2240911060);
gde_classdb_get_method_bind(class_name._native_ptr(), godot::StringName("reference")._native_ptr(), class_hash);
unreference_ptr_call =
gde_classdb_get_method_bind(class_name._native_ptr(), godot::StringName("unreference")._native_ptr(), 2240911060);
gde_classdb_get_method_bind(class_name._native_ptr(), godot::StringName("unreference")._native_ptr(), class_hash);
get_reference_count_ptr_call = gde_classdb_get_method_bind(
class_name._native_ptr(), godot::StringName("get_reference_count")._native_ptr(), 3905245786);
}
Original file line number Diff line number Diff line change
Expand Up @@ -2313,6 +2313,8 @@ const int __GLIBC_USE_DEPRECATED_GETS = 0;

const int __GLIBC_USE_DEPRECATED_SCANF = 0;

const int __GLIBC_USE_C2X_STRTOL = 1;

const int _STDC_PREDEF_H = 1;

const int __STDC_IEC_559__ = 1;
Expand All @@ -2329,7 +2331,7 @@ const int __GNU_LIBRARY__ = 6;

const int __GLIBC__ = 2;

const int __GLIBC_MINOR__ = 35;
const int __GLIBC_MINOR__ = 39;

const int _SYS_CDEFS_H = 1;

Expand Down Expand Up @@ -2385,6 +2387,8 @@ const int _BITS_STDINT_INTN_H = 1;

const int _BITS_STDINT_UINTN_H = 1;

const int _BITS_STDINT_LEAST_H = 1;

const int INT8_MIN = -128;

const int INT16_MIN = -32768;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@ void _writeSignals(CodeSink o, GodotExtensionApiJsonClass classInfo) {
// call instead.
final signalVarName = signal.name.toLowerCamelCase();
if (numArgs == 0) {
o.p('final late $signalVarName = Signal0(this, \'${signal.name}\');;');
o.p('late final $signalVarName = Signal0(this, \'${signal.name}\');');
} else {
final arguments = signal.arguments!;
final argTypeList =
arguments.map((e) => godotTypeToDartType(e.type)).join(', ');
o.p('final late $signalVarName = Signal$numArgs<$argTypeList>(this, \'${signal.name}\');');
o.p('late final $signalVarName = Signal$numArgs<$argTypeList>(this, \'${signal.name}\');');
}
}
o.nl();
Expand Down

0 comments on commit 17765d7

Please sign in to comment.