From 8976deb9b381c4222c1a051912c62d113de02760 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Fri, 2 Sep 2022 18:09:07 -0500 Subject: [PATCH] Fixes for building on macOS --- .gitignore | 5 +---- SConstruct | 4 ++-- project/addons/example/bin/.gitignore | 2 ++ project/addons/example/bin/.gitkeep | 0 project/addons/example/example.gdextension | 4 ++-- 5 files changed, 7 insertions(+), 8 deletions(-) create mode 100644 project/addons/example/bin/.gitignore delete mode 100644 project/addons/example/bin/.gitkeep diff --git a/.gitignore b/.gitignore index f8bda60..416ea9f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,3 @@ -# Binaries. -*.so - # Objects. .scons-cache/ *.os @@ -11,7 +8,7 @@ *.pyc # MacOS -.DS_Store/ +.DS_Store # Editors .vscode/ diff --git a/SConstruct b/SConstruct index 1f80121..f579130 100644 --- a/SConstruct +++ b/SConstruct @@ -27,9 +27,9 @@ extension_name = Path(extension_path).stem # print("Scons cache enabled... (path: '" + scons_cache_path + "')") # Create the library target (e.g. libexample.linux.debug.x86_64.so). -if env["platform"] == "osx": +if env["platform"] == "macos": library = env.SharedLibrary( - "{}/bin/lib{}.{}.{}.framework/{1}.{2}.{3}".format( + "{0}/bin/lib{1}.{2}.{3}.framework/{1}.{2}.{3}".format( addon_path, extension_name, env["platform"], diff --git a/project/addons/example/bin/.gitignore b/project/addons/example/bin/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/project/addons/example/bin/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/project/addons/example/bin/.gitkeep b/project/addons/example/bin/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/project/addons/example/example.gdextension b/project/addons/example/example.gdextension index 38039f3..da16626 100644 --- a/project/addons/example/example.gdextension +++ b/project/addons/example/example.gdextension @@ -4,8 +4,8 @@ entry_symbol = "gdextension_init" [libraries] -macos.debug = "bin/libexample.osx.debug.framework" -macos.release = "bin/libexample.osx.release.framework" +macos.debug = "bin/libexample.macos.debug.framework" +macos.release = "bin/libexample.macos.release.framework" windows.debug.x86_64 = "bin/libexample.windows.debug.x86_64.dll" windows.release.x86_64 = "bin/libexample.windows.release.x86_64.dll" linux.debug.x86_64 = "bin/libexample.linux.debug.x86_64.so"