Use SHLIBPREFIX, env suffix and SHLIBSUFFIX for the binary names. Use the library name in the framework folder name. This renames the mac and windows binaries.

pull/55/head
Lukas Tenbrink 2024-10-03 10:44:32 +02:00
parent f304a86a60
commit 131ed7b482
4 changed files with 14 additions and 14 deletions

View File

@ -291,7 +291,7 @@ jobs:
APPLE_CERT_BASE64: ${{ secrets.APPLE_CERT_BASE64 }} APPLE_CERT_BASE64: ${{ secrets.APPLE_CERT_BASE64 }}
uses: ./.github/actions/sign uses: ./.github/actions/sign
with: with:
FRAMEWORK_PATH: bin/macos/macos.framework FRAMEWORK_PATH: bin/macos/EXTENSION-NAME-macos.framework
APPLE_CERT_BASE64: ${{ secrets.APPLE_CERT_BASE64 }} APPLE_CERT_BASE64: ${{ secrets.APPLE_CERT_BASE64 }}
APPLE_CERT_PASSWORD: ${{ secrets.APPLE_CERT_PASSWORD }} APPLE_CERT_PASSWORD: ${{ secrets.APPLE_CERT_PASSWORD }}
APPLE_DEV_PASSWORD: ${{ secrets.APPLE_DEV_PASSWORD }} APPLE_DEV_PASSWORD: ${{ secrets.APPLE_DEV_PASSWORD }}

View File

@ -102,7 +102,7 @@ jobs:
APPLE_CERT_BASE64: ${{ secrets.APPLE_CERT_BASE64 }} APPLE_CERT_BASE64: ${{ secrets.APPLE_CERT_BASE64 }}
uses: godotengine/godot-cpp-template/.github/actions/sign@main uses: godotengine/godot-cpp-template/.github/actions/sign@main
with: with:
FRAMEWORK_PATH: bin/macos/macos.framework FRAMEWORK_PATH: bin/macos/EXTENSION-NAME-macos.framework
APPLE_CERT_BASE64: ${{ secrets.APPLE_CERT_BASE64 }} APPLE_CERT_BASE64: ${{ secrets.APPLE_CERT_BASE64 }}
APPLE_CERT_PASSWORD: ${{ secrets.APPLE_CERT_PASSWORD }} APPLE_CERT_PASSWORD: ${{ secrets.APPLE_CERT_PASSWORD }}
APPLE_DEV_PASSWORD: ${{ secrets.APPLE_DEV_PASSWORD }} APPLE_DEV_PASSWORD: ${{ secrets.APPLE_DEV_PASSWORD }}

View File

@ -76,20 +76,20 @@ if env["target"] in ["editor", "template_debug"]:
except AttributeError: except AttributeError:
print("Not including class reference as we're targeting a pre-4.3 baseline.") print("Not including class reference as we're targeting a pre-4.3 baseline.")
file = "{}{}{}".format(libname, env["suffix"], env["SHLIBSUFFIX"]) lib_filename = "{}{}{}{}".format(env.subst("$SHLIBPREFIX"), libname, env["suffix"], env.subst("$SHLIBSUFFIX"))
filepath = "" lib_filepath = ""
if env["platform"] == "macos" or env["platform"] == "ios": if env["platform"] == "macos" or env["platform"] == "ios":
filepath = "{}.framework/".format(env["platform"]) # For signing, the dylibs need to be in a folder, along with the plist files.
file = "{}.{}.{}".format(libname, env["platform"], env["target"]) 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( library = env.SharedLibrary(
libraryfile, libraryfile,
source=sources, 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] default_args = [library, copy]
if localEnv.get("compiledb", False): if localEnv.get("compiledb", False):

View File

@ -5,12 +5,12 @@ compatibility_minimum = "4.1"
[libraries] [libraries]
macos.debug = "res://bin/macos/macos.framework/libEXTENSION-NAME.macos.template_debug" macos.debug = "res://bin/macos/EXTENSION-NAME-macos.framework/libEXTENSION-NAME.macos.template_debug.universal.dylib"
macos.release = "res://bin/macos/macos.framework/libEXTENSION-NAME.macos.template_release" 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" 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" ios.release = "res://bin/ios/ios.framework/libEXTENSION-NAME.ios.template_release.universal.dylib"
windows.debug.x86_32 = "res://bin/windows/libEXTENSION-NAME.windows.template_debug.x86_32.dll" windows.debug.x86_32 = "res://bin/windows/EXTENSION-NAME.windows.template_debug.x86_32.dll"
windows.release.x86_32 = "res://bin/windows/libEXTENSION-NAME.windows.template_release.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.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" 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" linux.debug.x86_64 = "res://bin/linux/libEXTENSION-NAME.linux.template_debug.x86_64.so"