From 424cc616574d835c2d376d0ec878ab7f587e9dba Mon Sep 17 00:00:00 2001 From: Twarit Waikar Date: Wed, 10 Aug 2022 03:43:40 +0530 Subject: [PATCH] Rename osx to macos --- .github/workflows/build.yml | 6 +++--- .gitignore | 2 +- README.md | 2 +- SConstruct | 8 ++++---- ...l_universal_osx.sh => build_openssl_universal_macos.sh | 0 demo/addons/godot-git-plugin/git_plugin.gdextension | 4 ++-- godot-git-plugin/SCsub | 8 ++++---- release.sh | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-) rename build_openssl_universal_osx.sh => build_openssl_universal_macos.sh (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 45bc192..8afc4d0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,11 +50,11 @@ jobs: run: | git submodule update --init --recursive brew install scons - scons platform=osx target=release bits=64 godot_cpp=yes generate_bindings=yes use_custom_api_file=yes custom_api_file=extension_api.ci.json macos_arch=universal use_llvm=yes -j $(sysctl -n hw.logicalcpu) - otool -L demo/addons/godot-git-plugin/osx/*.dylib + scons platform=macos target=release bits=64 godot_cpp=yes generate_bindings=yes use_custom_api_file=yes custom_api_file=extension_api.ci.json macos_arch=universal use_llvm=yes -j $(sysctl -n hw.logicalcpu) + otool -L demo/addons/godot-git-plugin/macos/*.dylib - uses: actions/upload-artifact@v2 with: - name: libgit_plugin.osx.x86_64.release.dylib-${{ github.sha }} + name: libgit_plugin.macos.x86_64.release.dylib-${{ github.sha }} if-no-files-found: error path: | demo/ diff --git a/.gitignore b/.gitignore index b93d1a0..fc31b2e 100644 --- a/.gitignore +++ b/.gitignore @@ -19,7 +19,7 @@ extension_api.json # Binaries build/ bin/ -osx/ +macos/ linux/ win64/ *.lib diff --git a/README.md b/README.md index ad97a9f..e0244cb 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ This section onwards is only meant to be used if you intend to compile the plugi - Windows - No extra steps required other than setting up the compilers. - MacOS - - For making universal builds targeting both Apple Silicon and x86_64, you can optionally run `build_openssl_universal_osx.sh` to build OpenSSL yourself and replace the already prebuilt libraries provided inside `thirdparty/openssl/`, otherwise, just run `brew install openssl@1.1` to use the prebuilt libraries provided in this repository. + - For making universal builds targeting both Apple Silicon and x86_64, you can optionally run `build_openssl_universal_macos.sh` to build OpenSSL yourself and replace the already prebuilt libraries provided inside `thirdparty/openssl/`, otherwise, just run `brew install openssl@1.1` to use the prebuilt libraries provided in this repository. - Linux - Run `sudo apt-get install libssl-dev`, or your local package manager's equivalent. diff --git a/SConstruct b/SConstruct index c0da884..9df66a1 100644 --- a/SConstruct +++ b/SConstruct @@ -13,9 +13,9 @@ env = Environment(ENV=os.environ) opts.Add(EnumVariable("target", "Compilation target", "debug", ["d", "debug", "r", "release"])) opts.Add(EnumVariable("platform", "Compilation platform", - "", ["", "windows", "linux", "osx"])) + "", ["", "windows", "linux", "macos"])) opts.Add(EnumVariable("p", "Compilation target, alias for \"platform\"", - "", ["", "windows", "linux", "osx"])) + "", ["", "windows", "linux", "macos"])) opts.Add(BoolVariable( "godot_cpp", "Build godot-cpp by forwarding arguments to it.", "no")) opts.Add(BoolVariable("use_llvm", @@ -40,8 +40,8 @@ opts.Update(env) if env["p"] != "": env["platform"] = env["p"] -if env["platform"] == "osx": - # Use only clang on osx because we need to do universal builds +if env["platform"] == "macos": + # Use only clang on macos because we need to do universal builds env["CXX"] = "clang++" env["CC"] = "clang" diff --git a/build_openssl_universal_osx.sh b/build_openssl_universal_macos.sh similarity index 100% rename from build_openssl_universal_osx.sh rename to build_openssl_universal_macos.sh diff --git a/demo/addons/godot-git-plugin/git_plugin.gdextension b/demo/addons/godot-git-plugin/git_plugin.gdextension index cee1b42..6e46547 100644 --- a/demo/addons/godot-git-plugin/git_plugin.gdextension +++ b/demo/addons/godot-git-plugin/git_plugin.gdextension @@ -4,8 +4,8 @@ entry_symbol = "git_plugin_init" [libraries] -macos.debug = "osx/libgit_plugin.osx.universal.debug.dylib" -macos.release = "osx/libgit_plugin.osx.universal.release.dylib" +macos.debug = "macos/libgit_plugin.macos.universal.debug.dylib" +macos.release = "macos/libgit_plugin.macos.universal.release.dylib" windows.debug.x86_64 = "win64/libgit_plugin.windows.x86_64.debug.dll" windows.release.x86_64 = "win64/libgit_plugin.windows.x86_64.release.dll" linux.debug.x86_64 = "linux/libgit_plugin.linux.x86_64.debug.so" diff --git a/godot-git-plugin/SCsub b/godot-git-plugin/SCsub index d89fafe..e06858e 100644 --- a/godot-git-plugin/SCsub +++ b/godot-git-plugin/SCsub @@ -29,9 +29,9 @@ if not os.path.isdir(env["target_path"]): os.mkdir(env["target_path"]) # Check our platform specifics -if env["platform"] == "osx": - env["target_path"] += "osx/" - cpp_library += ".osx" +if env["platform"] == "macos": + env["target_path"] += "macos/" + cpp_library += ".macos" dynamic_lib_extension = "dylib" target_arch = env["macos_arch"] @@ -81,7 +81,7 @@ if env["target"] in ("debug", "d"): else: cpp_library += ".release" -if env['platform'] == 'osx' and env['macos_arch'] != 'universal': +if env['platform'] == 'macos' and env['macos_arch'] != 'universal': cpp_library += "." + env['macos_arch'] else: cpp_library += "." + "x86_64" diff --git a/release.sh b/release.sh index 08e0cee..9235887 100644 --- a/release.sh +++ b/release.sh @@ -35,9 +35,9 @@ addonsPath=$releasePath/addons pluginPath=$addonsPath/godot-git-plugin mkdir $pluginPath/linux -mkdir $pluginPath/osx +mkdir $pluginPath/macos cp -r linux/addons/godot-git-plugin/linux/ $pluginPath/ -cp -r mac/addons/godot-git-plugin/osx/ $pluginPath/ +cp -r mac/addons/godot-git-plugin/macos/ $pluginPath/ sed -i "s/version=\"[^\"]*\"/version=\"v${version}\"/g" $pluginPath/plugin.cfg cp LICENSE $pluginPath/LICENSE