From 280e64f97de7a4bb7835767f6491a65466cbd72e Mon Sep 17 00:00:00 2001 From: Michel de Bree Date: Thu, 20 Nov 2025 13:00:30 +0100 Subject: [PATCH] Simplified macos build - Create final DMG directly - Use newer compression - Skip generation documentation --- .github/workflows/build-macos.yaml | 4 +- macos/Makefile | 39 ++++--------------- macos/make_dmg.sh | 60 ------------------------------ macos/player11.md | 54 --------------------------- 4 files changed, 9 insertions(+), 148 deletions(-) delete mode 100755 macos/make_dmg.sh delete mode 100644 macos/player11.md diff --git a/.github/workflows/build-macos.yaml b/.github/workflows/build-macos.yaml index 1650a2fd..8c9ad4ec 100644 --- a/.github/workflows/build-macos.yaml +++ b/.github/workflows/build-macos.yaml @@ -7,9 +7,9 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install extra build tooling - run: brew install gnu-sed librsvg pandoc + run: brew install gnu-sed librsvg - name: Build binaries - run: (cd macos && make raw) + run: (cd macos && make dmg) - name: Upload artifact uses: actions/upload-artifact@v4 with: diff --git a/macos/Makefile b/macos/Makefile index 4076f63c..25f0b446 100644 --- a/macos/Makefile +++ b/macos/Makefile @@ -1,6 +1,8 @@ # Makefile for macOS version -TARGET=x86_64-apple-macos10.09 +# The ULMO compression used in DMG target is only supported from 10.15 +# So we might aswell compile for that version +TARGET=x86_64-apple-macos10.15 BUILD_NR=$(shell git show --no-patch --format='%cs').yth.$(shell git rev-parse --short HEAD) BUILD_NR_TARGET=$(BUILD_NR).$(TARGET) @@ -17,10 +19,8 @@ APP_NAME=SIDFactoryII ARTIFACTS_FOLDER=artifacts EXE=$(ARTIFACTS_FOLDER)/$(APP_NAME) APP=$(ARTIFACTS_FOLDER)/$(APP_NAME).app -DMG=$(ARTIFACTS_FOLDER)/$(APP_NAME)_macOS_$(BUILD_NR).dmg -DMG_RAW=$(ARTIFACTS_FOLDER)/$(APP_NAME)_macOS_$(BUILD_NR)-RAW.dmg +DMG=$(ARTIFACTS_FOLDER)/$(APP_NAME)_$(BUILD_NR).dmg DMG_CONTENTS=$(ARTIFACTS_FOLDER)/dmg -DMG_TITLE=$(APP_NAME) DMG_SIZE=25600 ICONSET=$(ARTIFACTS_FOLDER)/$(APP_NAME).iconset ICONS=$(ARTIFACTS_FOLDER)/$(APP_NAME).icns @@ -77,15 +77,6 @@ universal: | clean $(EXE) .PHONY: app app: $(APP) -# ---------------------------------------------------- - -# Step 1: "make raw" to create a "raw" DMG -.PHONY: raw -raw: $(DMG_RAW) - -# Step 2: Mount tmp.dmg, lay it out manually, unmount - -# Step 3: "make dmg" to finalize the DMG .PHONY: dmg dmg: $(DMG) @@ -106,32 +97,20 @@ $(APP): universal $(ICONS) mv $(ICONS) $(APP)/Contents/Resources gsed -i 's/{VERSION}/$(BUILD_NR)/g' $(APP)/Contents/Info.plist -# Make final distribution DMG -$(DMG): - DMG=$(DMG) \ - APP_NAME=$(APP_NAME) \ - DMG_TITLE=$(DMG_TITLE) \ - DMG_RAW=$(DMG_RAW) \ - ./make_dmg.sh - # Collect the contents of the DMG -$(DMG_CONTENTS): $(APP) $(EXE_SF2C) $(ARTIFACTS_FOLDER)/keys.html +$(DMG_CONTENTS): $(APP) rm -rf $(DMG_CONTENTS) mkdir -p $(DMG_CONTENTS)/$(APP_NAME) mv $(APP) $(DMG_CONTENTS) cp -r $(DOCS)/ $(DMG_CONTENTS)/$(APP_NAME)/documentation cp $(PROJECT_ROOT)/COPYING $(DMG_CONTENTS) - mv $(ARTIFACTS_FOLDER)/keys.html $(DMG_CONTENTS)/$(APP_NAME)/documentation cp -r Install.txt $(DMG_CONTENTS) cp -r $(PROJECT_ROOT)/music/ ${DMG_CONTENTS}/$(APP_NAME)/music cp -r $(PROJECT_ROOT)/drivers ${DMG_CONTENTS}/$(APP_NAME)/drivers ln -s /Applications $(DMG_CONTENTS)/Applications -# Make a temporary DMG. This needs to be laid out nicely by hand before building the final DMG. -$(DMG_RAW): $(DMG_CONTENTS) - rm -f $(DMG_RAW) - hdiutil create -srcfolder "$<" -volname "$(DMG_TITLE)" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW -size $(DMG_SIZE)k $@ - rm -rf "$<" +$(DMG): $(DMG_CONTENTS) + hdiutil create -srcfolder "$<" -volname "$(APP_NAME)" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format ULMO -imagekey -zlib-level=9 -size $(DMG_SIZE)k -ov $@ # https://developer.apple.com/library/archive/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Optimizing/Optimizing.html $(ICONS): ../resources/logo.svg $(ARTIFACTS_FOLDER) @@ -148,10 +127,6 @@ $(ICONS): ../resources/logo.svg $(ARTIFACTS_FOLDER) iconutil -c icns -o $@ $(ICONSET) rm -rf $(ICONSET) -# Create html from markdown documentation -$(ARTIFACTS_FOLDER)/%.html: %.md - pandoc $< -c github.css --toc --standalone --self-contained --metadata title="$(APP_NAME) Keys (macOS)" -o $@ - $(ARTIFACTS_FOLDER): mkdir -p $@ diff --git a/macos/make_dmg.sh b/macos/make_dmg.sh deleted file mode 100755 index e67d495e..00000000 --- a/macos/make_dmg.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/sh -set -e - -# remove existing dmg -rm -f "${DMG}" - -# mount the temporary image -DEVICE=$(hdiutil attach -readwrite -noverify -noautoopen "${DMG_RAW}" | egrep '^/dev/' | sed 1q | awk '{print $1}') -sleep 5 - -# layout the window (this doesn't work reliably yet) -# Make sure that "Enable access for assistive devices" is checked in System Preferences>>Universal Access. It is required for -# the AppleScript to work. You may have to reboot after this change. -#echo ' - #tell application "Finder" - #tell disk "'${DMG_TITLE}'" - #open - #set current view of container window to icon view - #delay 1 - #set toolbar visible of container window to false - #delay 1 - #set statusbar visible of container window to false - #delay 1 - #set theViewOptions to the icon view options of container window - #delay 1 - #set arrangement of theViewOptions to not arranged - #delay 1 - #set icon size of theViewOptions to 72 - #set the bounds of container window to {100, 100, 800, 800} - #delay 2 - #set position of item "Install.txt" of container window to {55, 180} - #delay 1 - #set position of item "'${APP_NAME}'" of container window to {255, 180} - #delay 1 - #set position of item "'${APP_NAME}.app'" of container window to {255, 32} - #delay 1 - #set position of item "Applications" of container window to {55, 32} - #delay 1 - #set the bounds of container window to {100, 100, 450, 450} - #delay 1 - #update without registering applications - #close - #open - #delay 5 - #end tell - #end tell -#' | osascript - -# make read only -chmod -Rf go-w /Volumes/"${DMG_TITLE}" - -# flush file cache -sync -sync - -# unmount -hdiutil detach "${DEVICE}" - -# make the final compressed DMG -hdiutil convert "${DMG_RAW}" -format UDZO -imagekey zlib-level=9 -o "${DMG}" diff --git a/macos/player11.md b/macos/player11.md deleted file mode 100644 index 6b87d611..00000000 --- a/macos/player11.md +++ /dev/null @@ -1,54 +0,0 @@ -# Player 11 - -## Instruments - -| AD | SR | Switches | Filter | Pulse | Wave | -| ---- | ---- | ------------------ | -------------------------- | ------------------------- | ------------------------ | -| `ad` | `sr` | `80`: Hard restart | `xx` → **Filter** row | `xx` → **Pulse** row | `xx` → **Wave** row | -| | | `40`: Filter on | | | | -| | | `10`: Osc reset | | | | -| | | `0x`: HR index | | | | - -## Wave - -| Waveform | Note | -| -------- | ---------------------------- | -| `xx` | `00`- `7f`: relative | -| `xx` | `80`- `ff`: absolute (`-80`) | -| `7f` | `xx`: jump to index | - -## Pulse - -| Pulse.. | ..width | Duration / Index | -| ------- | ----------------------------------------- | ------------------- | -| `8x` | `xx`: set pulsewidth to `xxx` | `yy` | -| `0x` | `xx`: add `xxx` to pulsewidth every frame | `yy` | -| `7f` | `??` | `xx`: jump to index | - -## Filter - -| Type / Jump | Cutoff | Resonance / Duration / Index | -| -------------------- | --------------------- | ------------------------------- | -| `xy`: type `x` (x>8) | `yy`: cutoff `yyy` | `zq`: resonance `z`, voices `q` | -| `0x` | `xx`: add cutoff`xxx` | `yy`: duration | -| `7f` | `--` | `xx`: jump to index | - -## Arp - -| Note / Jump | -| ------------------------------- | -| `00`-`6f`: relative note | -| `7x`: jump to start index + `x` | - -## Commands - -| Type | Parameter | Parameter | Description | -| -------------------- | --------- | ---------- | --------------------------------------------- | -| `00` slide | `xx` spd | `yy` spd | Slide @ speed `xxyy` | -| `01` vibrato | `xx` freq | `yy` amp | Vibrato @ frequency `xx` & amplitude `yy` | -| `02` portamento | `xx` spd | `yy` spd | Portamento @ speed `xxyy` (`8000` to disable) | -| `03` arpeggio | `xx` spd | `yy` index | Arpeggio from **Arp** index `yy` @ speed `xx` | -| `08` adsr note | `ad` | `sr` | ADSR `adsr` until next note plays | -| `09` adsr instrument | `ad` | `sr` | ADSR `adsr` until next instrument plays | -| `0a` filter | `--` | `yy` | Start **Filter** @ index `yy` | -| `0b` wave | `--` | `yy` | Start **Wave** @ index `yy` |