Skip to content

Commit

Permalink
Merge pull request #127 from tmoroney/V2-Windows-Dev
Browse files Browse the repository at this point in the history
Updated mac package script
  • Loading branch information
tmoroney authored Dec 7, 2024
2 parents 2a0517f + 155d49d commit befce80
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/package-mac.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Package AutoSubs for MacOS
on:
pull_request:
branches:
- main
push:
branches:
- main
Expand Down Expand Up @@ -87,18 +90,26 @@ jobs:
codesign --force --options runtime --timestamp --entitlements "$ENTITLEMENTS" --sign "$IDENTITY" "$file"
}
export -f sign_file # Export the function so it's available in subshells
export -f sign_file # Export the function so it's available in subshells
export IDENTITY # Export IDENTITY so it's available in subshells
export ENTITLEMENTS # Export ENTITLEMENTS so it's available in subshells
# Sign the main executable
sign_file "$APP_DIR/transcription-server"
# Sign all embedded binaries and executables in the _internal directory
# Sign all embedded binaries and executables in the _internal directory based on known extensions
find "$APP_DIR/_internal" -type f \( -name "*.dylib" -o -name "*.so" -o -name "*.exe" -o -name "*.bin" -o -name "ffmpeg*" \) -exec bash -c 'sign_file "$0"' {} \;
# Sign the entire Python framework directory (recursively) to ensure the actual binary is signed
FRAMEWORK_DIR="$APP_DIR/_internal/Python.framework"
if [ -d "$FRAMEWORK_DIR" ]; then
echo "Signing framework at $FRAMEWORK_DIR..."
codesign --force --deep --options runtime --timestamp --entitlements "$ENTITLEMENTS" --sign "$IDENTITY" "$FRAMEWORK_DIR"
fi
# Sign any other executables in the main app directory
find "$APP_DIR" -type f -perm +111 -exec bash -c 'sign_file "$0"' {} \;
# Use -perm /111 to match executables on macOS/BSD
find "$APP_DIR" -type f -perm /111 -exec bash -c 'sign_file "$0"' {} \;
- name: Move Python Server to resources folder
run: |
Expand Down

0 comments on commit befce80

Please sign in to comment.