add Applications symlink this time

This commit is contained in:
Anirudh Sevugan 2025-08-07 21:03:04 -05:00 committed by GitHub
parent fdfa95790c
commit df9557786d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,10 +50,31 @@ jobs:
# --- Set up variables ---
APP_NAME="SimpliPlay"
# --- Function to create a DMG from a signed app bundle ---
create_dmg() {
local app_path="$1"
local dmg_name="$2"
local volume_name="$3"
# Create a temporary directory to build DMG contents
local temp_dir="dmg_contents"
mkdir "$temp_dir"
# Copy the app bundle and create the symlink
cp -r "$app_path" "$temp_dir/"
ln -s /Applications "$temp_dir/Applications"
# Create the DMG from the temporary directory
hdiutil create -volname "$volume_name" -srcfolder "$temp_dir" -fs HFS+ -ov "$dmg_name"
# Clean up the temporary directory
rm -r "$temp_dir"
}
# --- Create DMG for each architecture ---
hdiutil create -volname "SimpliPlay x64" -srcfolder dist/mac/ -fs HFS+ -ov "dist/SimpliPlay-x64-darwin.dmg"
hdiutil create -volname "SimpliPlay arm64" -srcfolder dist/mac-arm64/ -fs HFS+ -ov "dist/SimpliPlay-arm64-darwin.dmg"
hdiutil create -volname "SimpliPlay Universal" -srcfolder dist/mac-universal/ -fs HFS+ -ov "dist/SimpliPlay-universal-darwin.dmg"
create_dmg "dist/mac/SimpliPlay.app" "dist/SimpliPlay-x64-darwin.dmg" "SimpliPlay x64"
create_dmg "dist/mac-arm64/SimpliPlay.app" "dist/SimpliPlay-arm64-darwin.dmg" "SimpliPlay arm64"
create_dmg "dist/mac-universal/SimpliPlay.app" "dist/SimpliPlay-universal-darwin.dmg" "SimpliPlay Universal"
working-directory: simpliplay