Browse Source

fix mac builds (#1557)

pull/1558/head
Jason Dove 1 year ago committed by GitHub
parent
commit
1ad42fffb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      scripts/macOS/bundle.sh
  2. 13
      scripts/macOS/sign.sh

11
scripts/macOS/bundle.sh

@ -18,6 +18,17 @@ cp -R "$REPO_ROOT/ErsatzTV-macOS/build/Release/ErsatzTV-macOS.app" "$APP_NAME"
cp -a "$PUBLISH_OUTPUT_DIRECTORY" "$APP_NAME/Contents/MacOS" cp -a "$PUBLISH_OUTPUT_DIRECTORY" "$APP_NAME/Contents/MacOS"
# codesign fails with some files in directories that have periods in them, so move to resources and symlink
pushd "$APP_NAME"/Contents/MacOS/wwwroot/_content/ || exit
for file in *; do
if test -d "$file" && test ! -L "$file"; then
FOLDER=$(basename "$file")
mv "$file" "$APP_NAME/Contents/Resources/"
ln -s "../../../Resources/$FOLDER" "$file"
fi
done
popd || exit
chmod +x "$APP_NAME/Contents/MacOS/ErsatzTV" chmod +x "$APP_NAME/Contents/MacOS/ErsatzTV"
chmod +x "$APP_NAME/Contents/MacOS/ErsatzTV.Scanner" chmod +x "$APP_NAME/Contents/MacOS/ErsatzTV.Scanner"
chmod +x "$APP_NAME/Contents/MacOS/ErsatzTV-macOS" chmod +x "$APP_NAME/Contents/MacOS/ErsatzTV-macOS"

13
scripts/macOS/sign.sh

@ -1,19 +1,10 @@
#! /bin/bash #! /bin/bash
SCRIPT_FOLDER=$(dirname ${BASH_SOURCE[0]}) SCRIPT_FOLDER=$(dirname ${BASH_SOURCE[0]})
REPO_ROOT="$SCRIPT_FOLDER/../.." REPO_ROOT=$(realpath "$SCRIPT_FOLDER/../..")
APP_NAME="$REPO_ROOT/ErsatzTV.app" APP_NAME="$REPO_ROOT/ErsatzTV.app"
ENTITLEMENTS="$SCRIPT_FOLDER/ErsatzTV.entitlements" ENTITLEMENTS="$SCRIPT_FOLDER/ErsatzTV.entitlements"
SIGNING_IDENTITY="C3BBCFB2D6851FF0DCA6CAC06A3EF1ECE71F9FFF" SIGNING_IDENTITY="C3BBCFB2D6851FF0DCA6CAC06A3EF1ECE71F9FFF"
find "$APP_NAME/Contents/MacOS/"|while read fname; do codesign --force --verbose --timestamp --options=runtime --entitlements "$ENTITLEMENTS" --sign "$SIGNING_IDENTITY" --deep "$APP_NAME"
if [[ -f $fname ]]; then
echo "[INFO] Signing $fname"
codesign --force --timestamp --options=runtime --entitlements "$ENTITLEMENTS" --sign "$SIGNING_IDENTITY" "$fname"
fi
done
echo "[INFO] Signing app file"
codesign --force --timestamp --options=runtime --entitlements "$ENTITLEMENTS" --sign "$SIGNING_IDENTITY" "$APP_NAME"

Loading…
Cancel
Save