MACOS build fixes

See merge request ryubing/ryujinx!12
This commit is contained in:
TheToid 2025-04-14 15:21:37 -05:00 committed by GreemDev
parent 4a6d9c2b3f
commit 611f8b9aba
3 changed files with 30 additions and 18 deletions

4
.gitignore vendored
View file

@ -178,3 +178,7 @@ PublishProfiles/
# Ignore MacOS Attribute Files # Ignore MacOS Attribute Files
._* ._*
# Ignore distribution build files
distribution/macos/temp/
distribution/macos/output/

View file

@ -562,9 +562,11 @@ search_path = [
for path in content_directory.rglob("**/*.dylib"): for path in content_directory.rglob("**/*.dylib"):
if not path.name.startswith("._"):
current_search_path = [path.parent] current_search_path = [path.parent]
current_search_path.extend(search_path) current_search_path.extend(search_path)
print(f"Fixing path '{path}' using search path of '{current_search_path}' for context of '{content_directory}'.")
fixup_dylib( fixup_dylib(
path, path,
get_path_related_to_target_exec(content_directory, path), get_path_related_to_target_exec(content_directory, path),
@ -573,6 +575,7 @@ for path in content_directory.rglob("**/*.dylib"):
) )
for path in content_directory.rglob("**/*.so"): for path in content_directory.rglob("**/*.so"):
if not path.name.startswith("._"):
current_search_path = [path.parent] current_search_path = [path.parent]
current_search_path.extend(search_path) current_search_path.extend(search_path)

View file

@ -30,9 +30,14 @@ cp -r "$PUBLISH_DIRECTORY/THIRDPARTY.md" "$APP_BUNDLE_DIRECTORY/Contents/Resourc
echo -n "APPL????" > "$APP_BUNDLE_DIRECTORY/Contents/PkgInfo" echo -n "APPL????" > "$APP_BUNDLE_DIRECTORY/Contents/PkgInfo"
# Fixup libraries and executable # Fixup libraries and executable
echo "Running bundle fix up python script"
python3 bundle_fix_up.py "$APP_BUNDLE_DIRECTORY" MacOS/Ryujinx python3 bundle_fix_up.py "$APP_BUNDLE_DIRECTORY" MacOS/Ryujinx
# Resign all dyplib files as ad-hoc after changing them
find "$APP_BUNDLE_DIRECTORY/Contents/Frameworks" -type f -name "*.dylib" -exec codesign --force --sign - {} \;
# Now sign it # Now sign it
echo "Starting signing process"
if ! [ -x "$(command -v codesign)" ]; if ! [ -x "$(command -v codesign)" ];
then then
if ! [ -x "$(command -v rcodesign)" ]; if ! [ -x "$(command -v rcodesign)" ];
@ -42,9 +47,9 @@ then
fi fi
# cargo install apple-codesign # cargo install apple-codesign
echo "Usign rcodesign for ad-hoc signing" echo "Using rcodesign for ad-hoc signing"
rcodesign sign --entitlements-xml-path "$ENTITLEMENTS_FILE_PATH" "$APP_BUNDLE_DIRECTORY" rcodesign sign --entitlements-xml-path "$ENTITLEMENTS_FILE_PATH" "$APP_BUNDLE_DIRECTORY"
else else
echo "Usign codesign for ad-hoc signing" echo "Using codesign for ad-hoc signing"
codesign --entitlements "$ENTITLEMENTS_FILE_PATH" -f -s - "$APP_BUNDLE_DIRECTORY" codesign --entitlements "$ENTITLEMENTS_FILE_PATH" -f -s - "$APP_BUNDLE_DIRECTORY"
fi fi