Support space in folder names for build scripts

This commit is contained in:
Yee Cheng Chin
2022-11-03 22:37:29 -07:00
parent b54b98c494
commit b64e13c2e2
4 changed files with 20 additions and 20 deletions
+1 -1
View File
@@ -1053,7 +1053,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "./scripts/cleanup-after-build $BUILT_PRODUCTS_DIR/$WRAPPER_NAME\n";
shellScript = "./scripts/cleanup-after-build \"$BUILT_PRODUCTS_DIR/$WRAPPER_NAME\"\n";
showEnvVarsInLog = 0;
};
90BD4EF224E0E8B700BF29F2 /* Copy locale message translation files */ = {
+2 -2
View File
@@ -13,10 +13,10 @@ macvim_path=$1
sparkle_xpcservices="$macvim_path/Contents/Frameworks/Sparkle.framework/Versions/Current/XPCServices"
if [ -d $sparkle_xpcservices ]; then
if [ -d "$sparkle_xpcservices" ]; then
# This only happens when building using Sparkle 2. It contains XPC Services
# files which are only necessary for sandboxed apps, and not recommended
# otherwise. See https://sparkle-project.org/documentation/sandboxing/.
set -x
rm -rf $sparkle_xpcservices
rm -rf "$sparkle_xpcservices"
fi
+6 -6
View File
@@ -11,7 +11,7 @@ fi
set -e
macvim_dmg=$1
macvim_dmg="$1"
# Xcode 13 changed the workflow to use "notarytool" instead of "altool". Use that by default.
@@ -31,7 +31,7 @@ if [[ "$USE_ALTOOL" != "1" ]]; then
fi
# Step 1.1: Submit app for notarization, and wait till it finishes.
notarize_submit_results=$(set -x; xcrun notarytool submit ${macvim_dmg} --keychain-profile "${NOTARIZATION_KEYCHAIN_PROFILE}")
notarize_submit_results=$(set -x; xcrun notarytool submit "${macvim_dmg}" --keychain-profile "${NOTARIZATION_KEYCHAIN_PROFILE}")
echo $notarize_submit_results
notarize_submit_uuid=$(echo $notarize_submit_results | grep "id:" | head -1 | sed -E "s/^.*id:[ ]*(.*)/\1/")
@@ -73,7 +73,7 @@ else
# Step 1.1: Submit app to Apple's servers for notarization
set -x
notarize_submit_uuid=$(xcrun altool --notarize-app --primary-bundle-id "org.vim.macvim" --file ${macvim_dmg} --username "${ALTOOL_USERNAME}" --password "${ALTOOL_PASSWORD}" | grep "RequestUUID" | sed -E "s/RequestUUID = (.*)/\1/")
notarize_submit_uuid=$(xcrun altool --notarize-app --primary-bundle-id "org.vim.macvim" --file "${macvim_dmg}" --username "${ALTOOL_USERNAME}" --password "${ALTOOL_PASSWORD}" | grep "RequestUUID" | sed -E "s/RequestUUID = (.*)/\1/")
set +x
if [[ ${notarize_submit_uuid} == "" ]]; then
@@ -117,10 +117,10 @@ fi
# Step 2: Staple the notarization info to the DMG so that an offline user can
# verify that it is notarized.
(set -x; xcrun stapler staple ${macvim_dmg})
(set -x; xcrun stapler staple "${macvim_dmg}")
# Just print out extra info for reference
echo "--------------------"
set -x
codesign -d --verbose=2 ${macvim_dmg}
spctl -a -t open --context context:primary-signature -v ${macvim_dmg}
codesign -d --verbose=2 "${macvim_dmg}"
spctl -a -t open --context context:primary-signature -v "${macvim_dmg}"
+11 -11
View File
@@ -17,27 +17,27 @@ set -e
macvim_path=$1
entitlements=$2
if [[ $macvim_path =~ dmg ]]; then
if [[ "$macvim_path" =~ dmg ]]; then
set -x
codesign -f -s "Developer ID Application" -o runtime --timestamp $macvim_path
codesign -f -s "Developer ID Application" -o runtime --timestamp "$macvim_path"
else
# Sign bottom-up to make sure everything is signed in order.
# Note: Not using --deep because it's been deprecated since macOS 13, and
# also it doesn't catch all the binaries anyway so it's better to just be
# explicit and sign everything in order to be clear what we are doing.
if [ -d $macvim_path/Contents/Frameworks/Sparkle.framework/Versions/A ]; then
if [ -d "$macvim_path/Contents/Frameworks/Sparkle.framework/Versions/A" ]; then
(set -x
codesign -f -s "Developer ID Application" -o runtime --timestamp $macvim_path/Contents/Frameworks/Sparkle.framework/Versions/A/Resources/Autoupdate.app)
codesign -f -s "Developer ID Application" -o runtime --timestamp "$macvim_path/Contents/Frameworks/Sparkle.framework/Versions/A/Resources/Autoupdate.app")
fi
if [ -d $macvim_path/Contents/Frameworks/Sparkle.framework/Versions/B ]; then
(set -x
codesign -f -s "Developer ID Application" -o runtime --timestamp $macvim_path/Contents/Frameworks/Sparkle.framework/Versions/B/Autoupdate
codesign -f -s "Developer ID Application" -o runtime --timestamp $macvim_path/Contents/Frameworks/Sparkle.framework/Versions/B/Updater.app)
codesign -f -s "Developer ID Application" -o runtime --timestamp "$macvim_path/Contents/Frameworks/Sparkle.framework/Versions/B/Autoupdate"
codesign -f -s "Developer ID Application" -o runtime --timestamp "$macvim_path/Contents/Frameworks/Sparkle.framework/Versions/B/Updater.app")
fi
set -x
codesign -f -s "Developer ID Application" -o runtime --timestamp $macvim_path/Contents/Frameworks/Sparkle.framework
codesign -f -s "Developer ID Application" -o runtime --timestamp $macvim_path/Contents/Frameworks/PSMTabBarControl.framework
codesign -f -s "Developer ID Application" -o runtime --timestamp $macvim_path/Contents/Library/QuickLook/QLStephen.qlgenerator/Contents/MacOS/QLStephen
codesign -f -s "Developer ID Application" -o runtime --timestamp --entitlements $entitlements $macvim_path/Contents/MacOS/Vim
codesign -f -s "Developer ID Application" -o runtime --timestamp --entitlements $entitlements $macvim_path
codesign -f -s "Developer ID Application" -o runtime --timestamp "$macvim_path/Contents/Frameworks/Sparkle.framework"
codesign -f -s "Developer ID Application" -o runtime --timestamp "$macvim_path/Contents/Frameworks/PSMTabBarControl.framework"
codesign -f -s "Developer ID Application" -o runtime --timestamp "$macvim_path/Contents/Library/QuickLook/QLStephen.qlgenerator/Contents/MacOS/QLStephen"
codesign -f -s "Developer ID Application" -o runtime --timestamp --entitlements $entitlements "$macvim_path/Contents/MacOS/Vim"
codesign -f -s "Developer ID Application" -o runtime --timestamp --entitlements $entitlements "$macvim_path"
fi