Skip to content

Commit 7ad927c

Browse files
grauxmusicclaude
andcommitted
feat: production installers for Mac and Windows
Mac: - pkgbuild .pkg → installs VST3 to /Library/Audio/Plug-Ins/VST3/ and AU to /Library/Audio/Plug-Ins/Components/ (double-click install) Windows: - perMachine: true → system-wide install with elevation - VST3 bundled in Electron extraResources - installer.nsh copies Morph.vst3 to C:\Program Files\Common Files\VST3\ during NSIS install; removes it on uninstall - build-installer-win job depends on build-windows to get fresh VST3 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 93d7d87 commit 7ad927c

3 files changed

Lines changed: 48 additions & 15 deletions

File tree

.github/workflows/build-plugin.yml

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- 'Libs/**'
99
- 'CMakeLists.txt'
1010
- '.github/workflows/build-plugin.yml'
11+
- 'CompanionWin/**'
1112
workflow_dispatch:
1213

1314
jobs:
@@ -34,19 +35,30 @@ jobs:
3435
- name: Build
3536
run: cmake --build build-mac --config Release --parallel
3637

37-
- name: Collect artifacts
38+
- name: Collect plugin files
3839
run: |
3940
mkdir -p dist/mac
40-
# VST3
4141
find build-mac -name "*.vst3" -exec cp -R {} dist/mac/ \;
42-
# AU component
4342
find build-mac -name "*.component" -exec cp -R {} dist/mac/ \;
4443
45-
- name: Upload Mac artifacts
44+
- name: Build .pkg installer
45+
run: |
46+
mkdir -p pkg-root/Library/Audio/Plug-Ins/VST3
47+
mkdir -p pkg-root/Library/Audio/Plug-Ins/Components
48+
cp -R dist/mac/Morph.vst3 pkg-root/Library/Audio/Plug-Ins/VST3/
49+
cp -R dist/mac/Morph.component pkg-root/Library/Audio/Plug-Ins/Components/
50+
pkgbuild \
51+
--root pkg-root \
52+
--identifier ai.95ent.morph \
53+
--version 1.0.0 \
54+
--install-location / \
55+
Morph-Mac-Installer.pkg
56+
57+
- name: Upload Mac installer
4658
uses: actions/upload-artifact@v4
4759
with:
48-
name: Morph-Mac
49-
path: dist/mac/
60+
name: Morph-Mac-Installer
61+
path: Morph-Mac-Installer.pkg
5062
retention-days: 14
5163

5264
# ── Windows (VST3, x64) ────────────────────────────────────────────────────
@@ -78,16 +90,17 @@ jobs:
7890
New-Item -ItemType Directory -Force -Path dist\win | Out-Null
7991
Copy-Item -Path $vst3.FullName -Destination dist\win -Recurse
8092
81-
- name: Upload Windows artifacts
93+
- name: Upload Windows VST3 artifact
8294
uses: actions/upload-artifact@v4
8395
with:
84-
name: Morph-Windows
96+
name: Morph-Windows-VST3
8597
path: dist\win\
86-
retention-days: 14
98+
retention-days: 1
8799

88-
# ── Windows companion (Electron .exe installer) ───────────────────────────
89-
build-companion-win:
100+
# ── Windows installer (VST3 + Electron companion, bundled) ────────────────
101+
build-installer-win:
90102
runs-on: windows-2022
103+
needs: build-windows
91104
defaults:
92105
run:
93106
working-directory: CompanionWin
@@ -98,6 +111,12 @@ jobs:
98111
with:
99112
node-version: '20'
100113

114+
- name: Download VST3 artifact
115+
uses: actions/download-artifact@v4
116+
with:
117+
name: Morph-Windows-VST3
118+
path: CompanionWin/vst3
119+
101120
- name: Install deps
102121
run: npm install
103122

@@ -106,7 +125,7 @@ jobs:
106125
env:
107126
CSC_IDENTITY_AUTO_DISCOVERY: false
108127

109-
- name: Upload installer
128+
- name: Upload Windows installer
110129
uses: actions/upload-artifact@v4
111130
with:
112131
name: WaterMorphHelper-Win-Setup

CompanionWin/installer.nsh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
; Custom NSIS sections injected by electron-builder
2+
; Installs Morph.vst3 to the system VST3 directory and removes it on uninstall.
3+
4+
!macro customInstall
5+
CreateDirectory "$PROGRAMFILES64\Common Files\VST3"
6+
nsExec::ExecToLog 'cmd /C xcopy /E /I /Y "$INSTDIR\resources\Morph.vst3" "$PROGRAMFILES64\Common Files\VST3\Morph.vst3"'
7+
!macroend
8+
9+
!macro customUnInstall
10+
RMDir /r "$PROGRAMFILES64\Common Files\VST3\Morph.vst3"
11+
!macroend

CompanionWin/package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,16 @@
1717
},
1818
"nsis": {
1919
"oneClick": true,
20-
"perMachine": false,
20+
"perMachine": true,
2121
"allowToChangeInstallationDirectory": false,
2222
"runAfterFinish": true,
23-
"createStartMenuShortcut": true
23+
"createStartMenuShortcut": true,
24+
"include": "installer.nsh"
2425
},
2526
"files": ["main.js", "preload.js"],
26-
"extraResources": []
27+
"extraResources": [
28+
{ "from": "vst3/Morph.vst3", "to": "Morph.vst3", "filter": ["**/*"] }
29+
]
2730
},
2831
"dependencies": {},
2932
"devDependencies": {

0 commit comments

Comments
 (0)