diff options
author | TimeZlicer <llihder@gmail.com> | 2023-03-13 00:21:21 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-12 17:21:21 +0100 |
commit | 05a41b31bc4d2b973662ac370458697c0bf712a9 (patch) | |
tree | 5a06bb56905d4ca2d0f249bc80f61e0713d7bda1 /distribution/macos/create_app_bundle.sh | |
parent | eed17f963efd978d01a7fe11f187f5470bbe67a2 (diff) |
Misc: Support space in path on macOS distribution (#4462)1.1.661
* .
* Apply suggestions from code review
Co-authored-by: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
* wildcard(*) needs to be outside of quotes(") for cp to work
---------
Co-authored-by: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Diffstat (limited to 'distribution/macos/create_app_bundle.sh')
-rwxr-xr-x | distribution/macos/create_app_bundle.sh | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/distribution/macos/create_app_bundle.sh b/distribution/macos/create_app_bundle.sh index b62f3491..0886bc24 100755 --- a/distribution/macos/create_app_bundle.sh +++ b/distribution/macos/create_app_bundle.sh @@ -6,31 +6,31 @@ PUBLISH_DIRECTORY=$1 OUTPUT_DIRECTORY=$2 ENTITLEMENTS_FILE_PATH=$3 -APP_BUNDLE_DIRECTORY=$OUTPUT_DIRECTORY/Ryujinx.app +APP_BUNDLE_DIRECTORY="$OUTPUT_DIRECTORY/Ryujinx.app" -rm -rf $APP_BUNDLE_DIRECTORY -mkdir -p $APP_BUNDLE_DIRECTORY/Contents -mkdir $APP_BUNDLE_DIRECTORY/Contents/Frameworks -mkdir $APP_BUNDLE_DIRECTORY/Contents/MacOS -mkdir $APP_BUNDLE_DIRECTORY/Contents/Resources +rm -rf "$APP_BUNDLE_DIRECTORY" +mkdir -p "$APP_BUNDLE_DIRECTORY/Contents" +mkdir "$APP_BUNDLE_DIRECTORY/Contents/Frameworks" +mkdir "$APP_BUNDLE_DIRECTORY/Contents/MacOS" +mkdir "$APP_BUNDLE_DIRECTORY/Contents/Resources" # Copy executables first -cp $PUBLISH_DIRECTORY/Ryujinx.Ava $APP_BUNDLE_DIRECTORY/Contents/MacOS/Ryujinx -chmod u+x $APP_BUNDLE_DIRECTORY/Contents/MacOS/Ryujinx +cp "$PUBLISH_DIRECTORY/Ryujinx.Ava" "$APP_BUNDLE_DIRECTORY/Contents/MacOS/Ryujinx" +chmod u+x "$APP_BUNDLE_DIRECTORY/Contents/MacOS/Ryujinx" # Then all libraries -cp $PUBLISH_DIRECTORY/*.dylib $APP_BUNDLE_DIRECTORY/Contents/Frameworks +cp "$PUBLISH_DIRECTORY"/*.dylib "$APP_BUNDLE_DIRECTORY/Contents/Frameworks" # Then resources -cp Info.plist $APP_BUNDLE_DIRECTORY/Contents -cp Ryujinx.icns $APP_BUNDLE_DIRECTORY/Contents/Resources/Ryujinx.icns -cp updater.sh $APP_BUNDLE_DIRECTORY/Contents/Resources/updater.sh -cp -r $PUBLISH_DIRECTORY/THIRDPARTY.md $APP_BUNDLE_DIRECTORY/Contents/Resources +cp Info.plist "$APP_BUNDLE_DIRECTORY/Contents" +cp Ryujinx.icns "$APP_BUNDLE_DIRECTORY/Contents/Resources/Ryujinx.icns" +cp updater.sh "$APP_BUNDLE_DIRECTORY/Contents/Resources/updater.sh" +cp -r "$PUBLISH_DIRECTORY/THIRDPARTY.md" "$APP_BUNDLE_DIRECTORY/Contents/Resources" -echo -n "APPL????" > $APP_BUNDLE_DIRECTORY/Contents/PkgInfo +echo -n "APPL????" > "$APP_BUNDLE_DIRECTORY/Contents/PkgInfo" # Fixup libraries and executable -python3 bundle_fix_up.py $APP_BUNDLE_DIRECTORY MacOS/Ryujinx +python3 bundle_fix_up.py "$APP_BUNDLE_DIRECTORY" MacOS/Ryujinx # Now sign it if ! [ -x "$(command -v codesign)" ]; @@ -44,9 +44,9 @@ then # NOTE: Currently require https://github.com/indygreg/apple-platform-rs/pull/44 to work on other OSes. # cargo install --git "https://github.com/marysaka/apple-platform-rs" --branch "fix/adhoc-app-bundle" apple-codesign --bin "rcodesign" echo "Usign 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 echo "Usign codesign for ad-hoc signing" - codesign --entitlements $ENTITLEMENTS_FILE_PATH -f --deep -s - $APP_BUNDLE_DIRECTORY + codesign --entitlements "$ENTITLEMENTS_FILE_PATH" -f --deep -s - "$APP_BUNDLE_DIRECTORY" fi |