Skip to content

Commit

Permalink
Fix binary location and name and add web support
Browse files Browse the repository at this point in the history
  • Loading branch information
paddy-exe committed May 19, 2024
1 parent 03a3cb3 commit 7c8c21a
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 22 deletions.
4 changes: 2 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ file = "{}{}{}".format(libname, env["suffix"], env["SHLIBSUFFIX"])

if env["platform"] == "macos" or env["platform"] == "ios":
platlibname = "{}.{}.{}".format(libname, env["platform"], env["target"])
file = "{}.framework/{}".format(env["platform"], platlibname, platlibname)
file = "{}.framework/{}".format(platlibname, platlibname)

libraryfile = "bin/{}/{}".format(env["platform"], file)
library = env.SharedLibrary(
libraryfile,
source=sources,
)

copy = env.InstallAs("{}/bin/{}/lib{}".format(projectdir, env["platform"], file), library)
copy = env.InstallAs("{}/bin/{}/{}".format(projectdir, env["platform"], file), library)

default_args = [library, copy]
if localEnv.get("compiledb", False):
Expand Down
46 changes: 28 additions & 18 deletions demo/bin/example.gdextension
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,34 @@

entry_symbol = "example_library_init"
compatibility_minimum = "4.1"
reloadable = true

[libraries]

macos.debug = "res://bin/libgdexample.macos.template_debug.framework"
macos.release = "res://bin/libgdexample.macos.template_release.framework"
ios.debug = "res://bin/libgdexample.ios.template_debug.framework"
ios.release = "res://bin/libgdexample.ios.template_release.framework"
windows.debug.x86_32 = "res://bin/libgdexample.windows.template_debug.x86_32.dll"
windows.release.x86_32 = "res://bin/libgdexample.windows.template_release.x86_32.dll"
windows.debug.x86_64 = "res://bin/libgdexample.windows.template_debug.x86_64.dll"
windows.release.x86_64 = "res://bin/libgdexample.windows.template_release.x86_64.dll"
linux.debug.x86_64 = "res://bin/libgdexample.linux.template_debug.x86_64.so"
linux.release.x86_64 = "res://bin/libgdexample.linux.template_release.x86_64.so"
linux.debug.arm64 = "res://bin/libgdexample.linux.template_debug.arm64.so"
linux.release.arm64 = "res://bin/libgdexample.linux.template_release.arm64.so"
linux.debug.rv64 = "res://bin/libgdexample.linux.template_debug.rv64.so"
linux.release.rv64 = "res://bin/libgdexample.linux.template_release.rv64.so"
android.debug.x86_64 = "res://bin/libgdexample.android.template_debug.x86_64.so"
android.release.x86_64 = "res://bin/libgdexample.android.template_release.x86_64.so"
android.debug.arm64 = "res://bin/libgdexample.android.template_debug.arm64.so"
android.release.arm64 = "res://bin/libgdexample.android.template_release.arm64.so"
macos.debug = "res://bin/macos/EXTENSION-NAME.macos.template_debug.framework"
macos.release = "res://bin/macos/EXTENSION-NAME.macos.template_release.framework"

windows.debug.x86_32 = "res://bin/windows/EXTENSION-NAME.windows.template_debug.x86_32.dll"
windows.release.x86_32 = "res://bin/windows/EXTENSION-NAME.windows.template_release.x86_32.dll"
windows.debug.x86_64 = "res://bin/windows/EXTENSION-NAME.windows.template_debug.x86_64.dll"
windows.release.x86_64 = "res://bin/windows/EXTENSION-NAME.windows.template_release.x86_64.dll"

linux.debug.x86_64 = "res://bin/linux/EXTENSION-NAME.linux.template_debug.x86_64.so"
linux.release.x86_64 = "res://bin/linux/EXTENSION-NAME.linux.template_release.x86_64.so"
linux.debug.arm64 = "res://bin/linux/EXTENSION-NAME.linux.template_debug.arm64.so"
linux.release.arm64 = "res://bin/linux/EXTENSION-NAME.linux.template_release.arm64.so"
linux.debug.rv64 = "res://bin/linux/EXTENSION-NAME.linux.template_debug.rv64.so"
linux.release.rv64 = "res://bin/linux/EXTENSION-NAME.linux.template_release.rv64.so"

android.debug.x86_64 = "res://bin/android/EXTENSION-NAME.android.template_debug.x86_64.so"
android.release.x86_64 = "res://bin/android/EXTENSION-NAME.android.template_release.x86_64.so"
android.debug.arm64 = "res://bin/android/EXTENSION-NAME.android.template_debug.arm64.so"
android.release.arm64 = "res://bin/android/EXTENSION-NAME.android.template_release.arm64.so"

ios.debug = "res://bin/ios/EXTENSION-NAME.ios.template_debug.xcframework"
ios.release = "res://bin/ios/EXTENSION-NAME.ios.template_release.xcframework"

web.debug.threads.wasm32 = "res://bin/web/EXTENSION-NAME.web.template_debug.wasm32.wasm"
web.release.threads.wasm32 = "res://bin/web/EXTENSION-NAME.web.template_release.wasm32.wasm"
web.debug.wasm32 = "res://bin/web/EXTENSION-NAME.web.template_debug.wasm32.nothreads.wasm"
web.release.wasm32 = "res://bin/web/EXTENSION-NAME.web.template_release.wasm32.nothreads.wasm"
2 changes: 1 addition & 1 deletion demo/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ config_version=5
[application]

config/name="godot cpp template"
config/features=PackedStringArray("4.1", "Forward Plus")
config/features=PackedStringArray("4.2", "Forward Plus")
config/icon="res://icon.svg"
2 changes: 1 addition & 1 deletion godot-cpp
Submodule godot-cpp updated 64 files
+6 −6 .github/workflows/ci.yml
+1 −12 CMakeLists.txt
+6 −3 README.md
+66 −22 binding_generator.py
+109 −4 gdextension/extension_api.json
+2 −2 include/godot_cpp/classes/editor_plugin_registration.hpp
+8 −8 include/godot_cpp/classes/ref.hpp
+10 −32 include/godot_cpp/classes/wrapped.hpp
+63 −63 include/godot_cpp/core/binder_common.hpp
+17 −5 include/godot_cpp/core/builtin_ptrcall.hpp
+47 −20 include/godot_cpp/core/class_db.hpp
+1 −1 include/godot_cpp/core/defs.hpp
+7 −7 include/godot_cpp/core/engine_ptrcall.hpp
+2 −2 include/godot_cpp/core/math.hpp
+41 −19 include/godot_cpp/core/memory.hpp
+21 −21 include/godot_cpp/core/method_bind.hpp
+3 −3 include/godot_cpp/core/method_ptrcall.hpp
+13 −13 include/godot_cpp/core/object.hpp
+2 −2 include/godot_cpp/core/property_info.hpp
+5 −5 include/godot_cpp/core/type_info.hpp
+189 −99 include/godot_cpp/templates/cowdata.hpp
+5 −5 include/godot_cpp/templates/hash_map.hpp
+3 −3 include/godot_cpp/templates/hash_set.hpp
+5 −5 include/godot_cpp/templates/hashfuncs.hpp
+5 −5 include/godot_cpp/templates/list.hpp
+3 −3 include/godot_cpp/templates/local_vector.hpp
+8 −8 include/godot_cpp/templates/pair.hpp
+1 −1 include/godot_cpp/templates/rb_map.hpp
+1 −1 include/godot_cpp/templates/rb_set.hpp
+3 −3 include/godot_cpp/templates/rid_owner.hpp
+11 −2 include/godot_cpp/templates/safe_refcount.hpp
+1 −1 include/godot_cpp/templates/search_array.hpp
+1 −1 include/godot_cpp/templates/self_list.hpp
+2 −2 include/godot_cpp/templates/sort_array.hpp
+3 −3 include/godot_cpp/templates/thread_work_pool.hpp
+59 −44 include/godot_cpp/templates/vector.hpp
+1 −1 include/godot_cpp/templates/vmap.hpp
+1 −1 include/godot_cpp/templates/vset.hpp
+3 −3 include/godot_cpp/variant/aabb.hpp
+10 −10 include/godot_cpp/variant/callable_method_pointer.hpp
+13 −13 include/godot_cpp/variant/char_string.hpp
+1 −1 include/godot_cpp/variant/typed_array.hpp
+10 −4 include/godot_cpp/variant/variant.hpp
+6 −6 src/core/memory.cpp
+5 −0 src/godot.cpp
+22 −22 src/variant/char_string.cpp
+20 −20 src/variant/packed_arrays.cpp
+1 −1 src/variant/projection.cpp
+33 −51 src/variant/variant.cpp
+1 −23 test/CMakeLists.txt
+9 −0 test/project/main.gd
+2 −0 test/project/main.tscn
+28 −0 test/src/example.cpp
+39 −2 test/src/example.h
+8 −5 test/src/register_types.cpp
+9 −0 tools/android.py
+94 −0 tools/common_compiler_flags.py
+180 −40 tools/godotcpp.py
+3 −0 tools/ios.py
+4 −1 tools/linux.py
+3 −0 tools/macos.py
+0 −144 tools/targets.py
+3 −0 tools/web.py
+3 −2 tools/windows.py

0 comments on commit 7c8c21a

Please sign in to comment.