fix mac builds (#1557)

This commit is contained in:
Jason Dove
2024-01-15 10:29:07 -06:00
committed by GitHub
parent 2ce8db9e01
commit 1ad42fffb1
2 changed files with 13 additions and 11 deletions
+11
View File
@@ -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"
# 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.Scanner"
chmod +x "$APP_NAME/Contents/MacOS/ErsatzTV-macOS"
+2 -11
View File
@@ -1,19 +1,10 @@
#! /bin/bash
SCRIPT_FOLDER=$(dirname ${BASH_SOURCE[0]})
REPO_ROOT="$SCRIPT_FOLDER/../.."
REPO_ROOT=$(realpath "$SCRIPT_FOLDER/../..")
APP_NAME="$REPO_ROOT/ErsatzTV.app"
ENTITLEMENTS="$SCRIPT_FOLDER/ErsatzTV.entitlements"
SIGNING_IDENTITY="C3BBCFB2D6851FF0DCA6CAC06A3EF1ECE71F9FFF"
find "$APP_NAME/Contents/MacOS/"|while read fname; do
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"
codesign --force --verbose --timestamp --options=runtime --entitlements "$ENTITLEMENTS" --sign "$SIGNING_IDENTITY" --deep "$APP_NAME"