mirror of
https://github.com/godotengine/webrtc-native.git
synced 2026-01-01 05:48:15 +03:00
Merge pull request #130 from Faless/spike/macos_framework
[MacOS] Use framekwork to package GDExtension
This commit is contained in:
14
SConstruct
14
SConstruct
@@ -177,7 +177,19 @@ env.Depends(sources, ssl + rtc)
|
||||
|
||||
# Make the shared library
|
||||
result_name = "libwebrtc_native{}{}".format(env["suffix"], env["SHLIBSUFFIX"])
|
||||
library = env.SharedLibrary(target=os.path.join(result_path, "lib", result_name), source=sources)
|
||||
if env["godot_version"] != "3" and env["platform"] == "macos":
|
||||
framework_path = os.path.join(
|
||||
result_path, "lib", "libwebrtc_native.macos.{}.{}.framework".format(env["target"], env["arch"])
|
||||
)
|
||||
library_file = env.SharedLibrary(target=os.path.join(framework_path, result_name), source=sources)
|
||||
plist_file = env.Substfile(
|
||||
os.path.join(framework_path, "Resources", "Info.plist"),
|
||||
"misc/dist/macos/Info.plist",
|
||||
SUBST_DICT={"{LIBRARY_NAME}": result_name, "{DISPLAY_NAME}": "libwebrtc_native" + env["suffix"]},
|
||||
)
|
||||
library = [library_file, plist_file]
|
||||
else:
|
||||
library = env.SharedLibrary(target=os.path.join(result_path, "lib", result_name), source=sources)
|
||||
Default(library)
|
||||
|
||||
# GDNativeLibrary
|
||||
|
||||
28
misc/dist/macos/Info.plist
vendored
Normal file
28
misc/dist/macos/Info.plist
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
<?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>{LIBRARY_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.godotengine.webrtc-native</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>{DISPLAY_NAME}</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>webrtc_native</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>11.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -16,7 +16,7 @@ DESTDIR="${DESTINATION}/${VERSION}/${TYPE}"
|
||||
|
||||
mkdir -p ${DESTDIR}/lib
|
||||
|
||||
find "${ARTIFACTS}" -wholename "*/${VERSION}/${TYPE}/lib/*" | xargs cp -t "${DESTDIR}/lib/"
|
||||
find "${ARTIFACTS}" -maxdepth 5 -wholename "*/${VERSION}/${TYPE}/lib/*" | xargs cp -r -t "${DESTDIR}/lib/"
|
||||
find "${ARTIFACTS}" -wholename "*/LICENSE*" | xargs cp -t "${DESTDIR}/"
|
||||
|
||||
if [ $VERSION = "gdnative" ]; then
|
||||
|
||||
@@ -9,7 +9,7 @@ linux.debug.x86_64 = "lib/libwebrtc_native.linux.template_debug.x86_64.so"
|
||||
linux.debug.x86_32 = "lib/libwebrtc_native.linux.template_debug.x86_32.so"
|
||||
linux.debug.arm64 = "lib/libwebrtc_native.linux.template_debug.arm64.so"
|
||||
linux.debug.arm32 = "lib/libwebrtc_native.linux.template_debug.arm32.so"
|
||||
macos.debug = "lib/libwebrtc_native.macos.template_debug.universal.dylib"
|
||||
macos.debug = "lib/libwebrtc_native.macos.template_debug.universal.framework"
|
||||
windows.debug.x86_64 = "lib/libwebrtc_native.windows.template_debug.x86_64.dll"
|
||||
windows.debug.x86_32 = "lib/libwebrtc_native.windows.template_debug.x86_32.dll"
|
||||
android.debug.arm64 = "lib/libwebrtc_native.android.template_debug.arm64.so"
|
||||
@@ -21,7 +21,7 @@ linux.release.x86_64 = "lib/libwebrtc_native.linux.template_release.x86_64.so"
|
||||
linux.release.x86_32 = "lib/libwebrtc_native.linux.template_release.x86_32.so"
|
||||
linux.release.arm64 = "lib/libwebrtc_native.linux.template_release.arm64.so"
|
||||
linux.release.arm32 = "lib/libwebrtc_native.linux.template_release.arm32.so"
|
||||
macos.release = "lib/libwebrtc_native.macos.template_release.universal.dylib"
|
||||
macos.release = "lib/libwebrtc_native.macos.template_release.universal.framework"
|
||||
windows.release.x86_64 = "lib/libwebrtc_native.windows.template_release.x86_64.dll"
|
||||
windows.release.x86_32 = "lib/libwebrtc_native.windows.template_release.x86_32.dll"
|
||||
android.release.arm64 = "lib/libwebrtc_native.android.template_release.arm64.so"
|
||||
|
||||
Reference in New Issue
Block a user