Add Info.plist files. Improve the gitignore. Use .framework file structures for macOS and iOS for App Store purposes.

pull/55/head
Lukas Tenbrink 2024-10-04 18:07:08 +02:00
parent 131ed7b482
commit a822314951
5 changed files with 76 additions and 20 deletions

23
.gitignore vendored
View File

@ -1,20 +1,15 @@
# Godot 4+ specific ignores
.godot/
# Ignore library files but not the gdextension file
demo/bin/*
!demo/bin/android
demo/bin/android/*
!demo/bin/android/.gitkeep
!demo/bin/linux
demo/bin/linux/*
!demo/bin/linux/.gitkeep
!demo/bin/macos
demo/bin/macos/*
!demo/bin/macos/.gitkeep
!demo/bin/windows
demo/bin/windows/*
!demo/bin/windows/.gitkeep
# Ignore built binaries
/demo/bin/**/*
!/demo/bin/**/
!/demo/bin/**/*.gitkeep
!/demo/bin/**/*.plist
/bin/**/*
!/bin/**/
!/bin/**/*.gitkeep
!/bin/**/*.plist
!demo/bin/*.gdextension
.sconsign*.dblite

View File

@ -80,8 +80,17 @@ lib_filename = "{}{}{}{}".format(env.subst("$SHLIBPREFIX"), libname, env["suffix
lib_filepath = ""
if env["platform"] == "macos" or env["platform"] == "ios":
# For signing, the dylibs need to be in a folder, along with the plist files.
lib_filepath = "{}-{}.framework/".format(libname, env["platform"])
# By default, the above code generates .dylib files on macOS and iOS.
# The App Store rejects entries containing .dylib files, requiring a .framework structure instead.
# Details about the .framework structure are described Framework Programming Guide:
# https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/FrameworkAnatomy.html#//apple_ref/doc/uid/20002253-BAJEJJAB
framework_name = "{}{}".format(libname, env["suffix"])
lib_filename = framework_name
lib_filepath = "{}.framework/".format(framework_name)
# Prevents the binary from getting a prefix / suffix automatically
env["SHLIBPREFIX"] = ""
env["SHLIBSUFFIX"] = ""
libraryfile = "bin/{}/{}{}".format(env["platform"], lib_filepath, lib_filename)
library = env.SharedLibrary(

View File

@ -5,10 +5,10 @@ compatibility_minimum = "4.1"
[libraries]
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"
macos.debug = "res://bin/macos/EXTENSION-NAME.framework"
macos.release = "res://bin/macos/EXTENSION-NAME.framework"
ios.debug = "res://bin/ios/EXTENSION-NAME.framework"
ios.release = "res://bin/ios/EXTENSION-NAME.framework"
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"

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>EXTENSION-NAME.macos.template_debug.universal</string>
<key>CFBundleIdentifier</key>
<string>org.godotengine.EXTENSION-NAME.macos.template_debug.universal</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>EXTENSION-NAME.macos.template_debug.universal</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1.0.0</string>
<key>LSMinimumSystemVersion</key>
<string>10.12</string>
</dict>
</plist>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>EXTENSION-NAME.macos.template_release.universal</string>
<key>CFBundleIdentifier</key>
<string>org.godotengine.EXTENSION-NAME.macos.template_release.universal</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>EXTENSION-NAME.macos.template_release.universal</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1.0.0</string>
<key>LSMinimumSystemVersion</key>
<string>10.12</string>
</dict>
</plist>