diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index ad17222..cb7a44e 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -291,7 +291,7 @@ jobs: APPLE_CERT_BASE64: ${{ secrets.APPLE_CERT_BASE64 }} uses: ./.github/actions/sign with: - FRAMEWORK_PATH: bin/macos/macos.framework + FRAMEWORK_PATH: bin/macos/EXTENSION-NAME-macos.framework APPLE_CERT_BASE64: ${{ secrets.APPLE_CERT_BASE64 }} APPLE_CERT_PASSWORD: ${{ secrets.APPLE_CERT_PASSWORD }} APPLE_DEV_PASSWORD: ${{ secrets.APPLE_DEV_PASSWORD }} diff --git a/README.md b/README.md index 673595a..cdbd1c2 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ jobs: APPLE_CERT_BASE64: ${{ secrets.APPLE_CERT_BASE64 }} uses: godotengine/godot-cpp-template/.github/actions/sign@main with: - FRAMEWORK_PATH: bin/macos/macos.framework + FRAMEWORK_PATH: bin/macos/EXTENSION-NAME-macos.framework APPLE_CERT_BASE64: ${{ secrets.APPLE_CERT_BASE64 }} APPLE_CERT_PASSWORD: ${{ secrets.APPLE_CERT_PASSWORD }} APPLE_DEV_PASSWORD: ${{ secrets.APPLE_DEV_PASSWORD }} diff --git a/SConstruct b/SConstruct index 05dafd0..3f3edce 100644 --- a/SConstruct +++ b/SConstruct @@ -76,20 +76,20 @@ if env["target"] in ["editor", "template_debug"]: except AttributeError: print("Not including class reference as we're targeting a pre-4.3 baseline.") -file = "{}{}{}".format(libname, env["suffix"], env["SHLIBSUFFIX"]) -filepath = "" +lib_filename = "{}{}{}{}".format(env.subst("$SHLIBPREFIX"), libname, env["suffix"], env.subst("$SHLIBSUFFIX")) +lib_filepath = "" if env["platform"] == "macos" or env["platform"] == "ios": - filepath = "{}.framework/".format(env["platform"]) - file = "{}.{}.{}".format(libname, env["platform"], env["target"]) + # For signing, the dylibs need to be in a folder, along with the plist files. + lib_filepath = "{}-{}.framework/".format(libname, env["platform"]) -libraryfile = "bin/{}/{}{}".format(env["platform"], filepath, file) +libraryfile = "bin/{}/{}{}".format(env["platform"], lib_filepath, lib_filename) library = env.SharedLibrary( libraryfile, source=sources, ) -copy = env.InstallAs("{}/bin/{}/{}lib{}".format(projectdir, env["platform"], filepath, file), library) +copy = env.Install("{}/bin/{}/{}".format(projectdir, env["platform"], lib_filepath), library), default_args = [library, copy] if localEnv.get("compiledb", False): diff --git a/demo/bin/example.gdextension b/demo/bin/example.gdextension index f3b7df0..a0a02c2 100644 --- a/demo/bin/example.gdextension +++ b/demo/bin/example.gdextension @@ -5,12 +5,12 @@ compatibility_minimum = "4.1" [libraries] -macos.debug = "res://bin/macos/macos.framework/libEXTENSION-NAME.macos.template_debug" -macos.release = "res://bin/macos/macos.framework/libEXTENSION-NAME.macos.template_release" -ios.debug = "res://bin/ios/ios.framework/libEXTENSION-NAME.ios.template_debug" -ios.release = "res://bin/ios/ios.framework/libEXTENSION-NAME.ios.template_release" -windows.debug.x86_32 = "res://bin/windows/libEXTENSION-NAME.windows.template_debug.x86_32.dll" -windows.release.x86_32 = "res://bin/windows/libEXTENSION-NAME.windows.template_release.x86_32.dll" +macos.debug = "res://bin/macos/EXTENSION-NAME-macos.framework/libEXTENSION-NAME.macos.template_debug.universal.dylib" +macos.release = "res://bin/macos/EXTENSION-NAME-macos.framework/libEXTENSION-NAME.macos.template_release.universal.dylib" +ios.debug = "res://bin/ios/ios.framework/libEXTENSION-NAME.ios.template_debug.universal.dylib" +ios.release = "res://bin/ios/ios.framework/libEXTENSION-NAME.ios.template_release.universal.dylib" +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/libEXTENSION-NAME.windows.template_debug.x86_64.dll" windows.release.x86_64 = "res://bin/windows/libEXTENSION-NAME.windows.template_release.x86_64.dll" linux.debug.x86_64 = "res://bin/linux/libEXTENSION-NAME.linux.template_debug.x86_64.so"