From a2633446536cb3ec9e9b3cb67bc67fa478557752 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Mon, 10 Jan 2022 18:59:52 +0200 Subject: [PATCH] [Demo Project] Add macOS framework templates, update Scons build script and ".gdextension" file. --- test/SConstruct | 8 ++++-- .../Resources/Info.plist | 26 +++++++++++++++++++ .../Resources/Info.plist | 26 +++++++++++++++++++ test/demo/example.gdextension | 2 ++ test/demo/main.tscn | 2 ++ 5 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 test/demo/bin/libgdexample.debug.framework/Resources/Info.plist create mode 100644 test/demo/bin/libgdexample.release.framework/Resources/Info.plist diff --git a/test/SConstruct b/test/SConstruct index 61a5a86b..0bd80acc 100644 --- a/test/SConstruct +++ b/test/SConstruct @@ -89,7 +89,7 @@ if env["target"] == "debug": # Check our platform specifics if env["platform"] == "osx": - env["target_path"] += "osx/" + env["target_path"] += "{}.{}.framework/".format(env["target_name"], env["target"]) cpp_library += ".osx" if env["bits"] == "32": @@ -154,7 +154,11 @@ env.Append(LIBS=[cpp_library]) env.Append(CPPPATH=["src/"]) sources = Glob("src/*.cpp") -target_name = "{}.{}.{}.{}".format(env["target_name"], env["platform"], env["target"], arch_suffix) +if env["platform"] == "osx": + target_name = "{}.{}".format(env["target_name"], env["target"]) +else: + target_name = "{}.{}.{}.{}".format(env["target_name"], env["platform"], env["target"], arch_suffix) + print(target_name) library = env.SharedLibrary(target=env["target_path"] + target_name, source=sources) diff --git a/test/demo/bin/libgdexample.debug.framework/Resources/Info.plist b/test/demo/bin/libgdexample.debug.framework/Resources/Info.plist new file mode 100644 index 00000000..0395b376 --- /dev/null +++ b/test/demo/bin/libgdexample.debug.framework/Resources/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleExecutable + libgdexample.debug + CFBundleIdentifier + org.godotengine.libgdexample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + libgdexample.debug + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1.0.0 + LSMinimumSystemVersion + 10.12 + + diff --git a/test/demo/bin/libgdexample.release.framework/Resources/Info.plist b/test/demo/bin/libgdexample.release.framework/Resources/Info.plist new file mode 100644 index 00000000..827d8639 --- /dev/null +++ b/test/demo/bin/libgdexample.release.framework/Resources/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleExecutable + libgdexample.release + CFBundleIdentifier + org.godotengine.libgdexample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + libgdexample.release + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1.0.0 + LSMinimumSystemVersion + 10.12 + + diff --git a/test/demo/example.gdextension b/test/demo/example.gdextension index ee96db36..a654bde5 100644 --- a/test/demo/example.gdextension +++ b/test/demo/example.gdextension @@ -8,3 +8,5 @@ linux.64.debug = "bin/libgdexample.linux.debug.64.so" linux.64.release = "bin/libgdexample.linux.release.64.so" windows.64.debug = "bin/libgdexample.windows.debug.64.dll" windows.64.release = "bin/libgdexample.windows.release.64.dll" +macos.debug = "bin/libgdexample.debug.framework" +macos.release = "bin/libgdexample.release.framework" diff --git a/test/demo/main.tscn b/test/demo/main.tscn index c0e57fba..4b6a1a4c 100644 --- a/test/demo/main.tscn +++ b/test/demo/main.tscn @@ -23,3 +23,5 @@ text = "Click me!" __meta__ = { "_edit_use_anchors_": false } + +[connection signal="custom_signal" from="Example" to="." method="_on_Example_custom_signal"]