diff options
-rw-r--r-- | .github/workflows/ci.yml | 4 | ||||
-rw-r--r-- | Makefile | 13 | ||||
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | SConstruct | 6 | ||||
-rw-r--r-- | godot-headers/extension_api.json | 2 | ||||
-rw-r--r-- | test/CMakeLists.txt | 2 | ||||
-rw-r--r-- | test/SConstruct | 2 | ||||
-rw-r--r-- | test/demo/example.gdextension | 4 | ||||
-rw-r--r-- | tools/ios.py | 18 | ||||
-rw-r--r-- | tools/ios_osxcross.py | 6 | ||||
-rw-r--r-- | tools/macos.py (renamed from tools/osx.py) | 8 | ||||
-rw-r--r-- | tools/macos_osxcross.py (renamed from tools/osxcross.py) | 0 |
12 files changed, 31 insertions, 38 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6baaaac..6b57a37 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,9 +37,9 @@ jobs: - name: 🍎 macOS (universal) os: macos-11 - platform: osx + platform: macos artifact-name: godot-cpp-macos-universal-release - artifact-path: bin/libgodot-cpp.osx.release.universal.a + artifact-path: bin/libgodot-cpp.macos.release.universal.a flags: arch=universal - name: 🤖 Android (arm64) @@ -6,7 +6,7 @@ USE_CLANG = no BASE = scons use_llvm=$(USE_CLANG) generate_bindings=$(GENERATE_BINDINGS) target=$(TARGET) headers=$(HEADERS) LINUX = $(BASE) platform=linux WINDOWS = $(BASE) platform=windows -OSX = $(BASE) platform=osx +MACOS = $(BASE) platform=macos all: @@ -36,12 +36,5 @@ windows64: SConstruct $(WINDOWS) bits=64 -osx: - make osx32 - make osx64 - -osx32: SConstruct - $(OSX) bits=32 - -osx64: SConstruct - $(OSX) bits=64 +macos: SConstruct + $(MACOS) @@ -59,8 +59,8 @@ entry_symbol = "example_library_init" [libraries] -macos.debug = "bin/libgdexample.osx.debug.framework" -macos.release = "bin/libgdexample.osx.release.framework" +macos.debug = "bin/libgdexample.macos.debug.framework" +macos.release = "bin/libgdexample.macos.release.framework" windows.debug.x86_64 = "bin/libgdexample.windows.debug.x86_64.dll" windows.release.x86_64 = "bin/libgdexample.windows.release.x86_64.dll" linux.debug.x86_64 = "bin/libgdexample.linux.debug.x86_64.so" @@ -20,7 +20,7 @@ def add_sources(sources, dir, extension): if sys.platform.startswith("linux"): default_platform = "linux" elif sys.platform == "darwin": - default_platform = "osx" + default_platform = "macos" elif sys.platform == "win32" or sys.platform == "msys": default_platform = "windows" elif ARGUMENTS.get("platform", ""): @@ -48,7 +48,7 @@ if env.GetOption("num_jobs") == altered_num_jobs: ) env.SetOption("num_jobs", safer_cpu_count) -platforms = ("linux", "osx", "windows", "android", "ios", "javascript") +platforms = ("linux", "macos", "windows", "android", "ios", "javascript") opts = Variables([], ARGUMENTS) opts.Add( EnumVariable( @@ -110,7 +110,7 @@ if env["arch"] == "": # No architecture specified. Default to arm64 if building for Android, # universal if building for macOS or iOS, wasm32 if building for web, # otherwise default to the host architecture. - if env["platform"] in ["osx", "ios"]: + if env["platform"] in ["macos", "ios"]: env["arch"] = "universal" elif env["platform"] == "android": env["arch"] = "arm64" diff --git a/godot-headers/extension_api.json b/godot-headers/extension_api.json index 13f5b07..4fdc0ce 100644 --- a/godot-headers/extension_api.json +++ b/godot-headers/extension_api.json @@ -76305,7 +76305,7 @@ ] }, { - "name": "add_osx_plugin_file", + "name": "add_macos_plugin_file", "is_const": false, "is_vararg": false, "is_static": false, diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index b556304..990a0f1 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -9,7 +9,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") set(TARGET_PATH win64) elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") - set(TARGET_PATH osx) + set(TARGET_PATH macos) else() message(FATAL_ERROR "Not implemented support for ${CMAKE_SYSTEM_NAME}") endif() diff --git a/test/SConstruct b/test/SConstruct index 50df324..3a5a9f5 100644 --- a/test/SConstruct +++ b/test/SConstruct @@ -16,7 +16,7 @@ env = SConscript("../SConstruct") env.Append(CPPPATH=["src/"]) sources = Glob("src/*.cpp") -if env["platform"] == "osx": +if env["platform"] == "macos": library = env.SharedLibrary( "demo/bin/libgdexample.{}.{}.framework/libgdexample.{}.{}".format( env["platform"], env["target"], env["platform"], env["target"] diff --git a/test/demo/example.gdextension b/test/demo/example.gdextension index d1b9023..d5868fd 100644 --- a/test/demo/example.gdextension +++ b/test/demo/example.gdextension @@ -4,8 +4,8 @@ entry_symbol = "example_library_init" [libraries] -macos.debug = "bin/libgdexample.osx.debug.framework" -macos.release = "bin/libgdexample.osx.release.framework" +macos.debug = "bin/libgdexample.macos.debug.framework" +macos.release = "bin/libgdexample.macos.release.framework" windows.debug.x86_32 = "bin/libgdexample.windows.debug.x86_32.dll" windows.release.x86_32 = "bin/libgdexample.windows.release.x86_32.dll" windows.debug.x86_64 = "bin/libgdexample.windows.debug.x86_64.dll" diff --git a/tools/ios.py b/tools/ios.py index 61aaf70..71ac5b5 100644 --- a/tools/ios.py +++ b/tools/ios.py @@ -20,11 +20,11 @@ def options(opts): opts.Add(BoolVariable("ios_simulator", "Target iOS Simulator", False)) opts.Add("ios_min_version", "Target minimum iphoneos/iphonesimulator version", "10.0") opts.Add( - "IPHONEPATH", - "Path to iPhone toolchain", + "IOS_TOOLCHAIN_PATH", + "Path to iOS toolchain", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain", ) - opts.Add("IPHONESDK", "Path to the iPhone SDK", "") + opts.Add("IOS_SDK_PATH", "Path to the iOS SDK", "") ios_osxcross.options(opts) @@ -45,9 +45,9 @@ def generate(env): env.Append(CCFLAGS=["-miphoneos-version-min=" + env["ios_min_version"]]) if sys.platform == "darwin": - if env["IPHONESDK"] == "": + if env["IOS_SDK_PATH"] == "": try: - env["IPHONESDK"] = decode_utf8( + env["IOS_SDK_PATH"] = decode_utf8( subprocess.check_output(["xcrun", "--sdk", sdk_name, "--show-sdk-path"]).strip() ) except (subprocess.CalledProcessError, OSError): @@ -55,13 +55,13 @@ def generate(env): "Failed to find SDK path while running xcrun --sdk {} --show-sdk-path.".format(sdk_name) ) - compiler_path = env["IPHONEPATH"] + "/usr/bin/" + compiler_path = env["IOS_TOOLCHAIN_PATH"] + "/usr/bin/" env["CC"] = compiler_path + "clang" env["CXX"] = compiler_path + "clang++" env["AR"] = compiler_path + "ar" env["RANLIB"] = compiler_path + "ranlib" env["SHLIBSUFFIX"] = ".dylib" - env["ENV"]["PATH"] = env["IPHONEPATH"] + "/Developer/usr/bin/:" + env["ENV"]["PATH"] + env["ENV"]["PATH"] = env["IOS_TOOLCHAIN_PATH"] + "/Developer/usr/bin/:" + env["ENV"]["PATH"] else: ios_osxcross.generate(env) @@ -77,8 +77,8 @@ def generate(env): env.Append(LINKFLAGS=["-arch", env["arch"]]) env.Append(CCFLAGS=["-arch", env["arch"]]) - env.Append(CCFLAGS=["-isysroot", env["IPHONESDK"]]) - env.Append(LINKFLAGS=["-isysroot", env["IPHONESDK"], "-F" + env["IPHONESDK"]]) + env.Append(CCFLAGS=["-isysroot", env["IOS_SDK_PATH"]]) + env.Append(LINKFLAGS=["-isysroot", env["IOS_SDK_PATH"], "-F" + env["IOS_SDK_PATH"]]) if env["target"] == "debug": env.Append(CCFLAGS=["-Og", "-g"]) diff --git a/tools/ios_osxcross.py b/tools/ios_osxcross.py index aa8dd46..21a3f5e 100644 --- a/tools/ios_osxcross.py +++ b/tools/ios_osxcross.py @@ -10,7 +10,7 @@ def exists(env): def generate(env): - compiler_path = "$IPHONEPATH/usr/bin/${ios_triple}" + compiler_path = "$IOS_TOOLCHAIN_PATH/usr/bin/${ios_triple}" env["CC"] = compiler_path + "clang" env["CXX"] = compiler_path + "clang++" env["AR"] = compiler_path + "ar" @@ -19,8 +19,8 @@ def generate(env): env.Prepend( CPPPATH=[ - "$IPHONESDK/usr/include", - "$IPHONESDK/System/Library/Frameworks/AudioUnit.framework/Headers", + "$IOS_SDK_PATH/usr/include", + "$IOS_SDK_PATH/System/Library/Frameworks/AudioUnit.framework/Headers", ] ) env.Append(CCFLAGS=["-stdlib=libc++"]) diff --git a/tools/osx.py b/tools/macos.py index b709472..57e9d7f 100644 --- a/tools/osx.py +++ b/tools/macos.py @@ -1,16 +1,16 @@ import os import sys -import osxcross +import macos_osxcross def options(opts): opts.Add("macos_deployment_target", "macOS deployment target", "default") opts.Add("macos_sdk_path", "macOS SDK path", "") - osxcross.options(opts) + macos_osxcross.options(opts) def exists(env): - return sys.platform == "darwin" or osxcross.exists(env) + return sys.platform == "darwin" or macos_osxcross.exists(env) def generate(env): @@ -24,7 +24,7 @@ def generate(env): env["CC"] = "clang" else: # Use osxcross - osxcross.generate(env) + macos_osxcross.generate(env) if env["arch"] == "universal": env.Append(LINKFLAGS=["-arch", "x86_64", "-arch", "arm64"]) diff --git a/tools/osxcross.py b/tools/macos_osxcross.py index f11166d..f11166d 100644 --- a/tools/osxcross.py +++ b/tools/macos_osxcross.py |