dragonflight/services/premiere-plugin/build/README.md
Zac Gaetano 8aece9cbc4 fix(premiere-plugin): make build pipeline portable to Windows PowerShell 5.1
End-to-end verification on a fresh Windows machine surfaced three issues:

1. pwsh isn't installed by default — Windows ships powershell.exe (5.1).
   Switched all script invocations + docs from `pwsh` to `powershell`.
2. .NET's strict XML parser rejects manifest.xml because the <Resources>
   comment legally contains `--` (inside `--enable-nodejs`/`--mixed-context`
   CEF flag names). Switched build-installer.ps1 to regex extraction,
   matching what build-zxp.mjs already does.
3. winget installs Inno Setup 6 to %LOCALAPPDATA%\Programs by default, not
   Program Files (x86). Added the user-scope path to the ISCC.exe fallback
   list.

Verified: `powershell -File build-all.ps1` produces both artifacts —
dragonflight-premiere-panel-1.0.0.zxp (35 KB, signature valid)
dragonflight-premiere-panel-1.0.0-windows-setup.exe (2 MB).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 16:22:46 -04:00

86 lines
3.1 KiB
Markdown

# Premiere panel installer — build pipeline
Produces two artifacts from `services/premiere-plugin/`:
| File | Platform | How an editor installs it |
|------|----------|----------------------------|
| `dist/dragonflight-premiere-panel-<version>.zxp` | macOS + Windows | Drag into [Anastasiy's ZXP Installer](https://install.anastasiy.com/) |
| `dist/dragonflight-premiere-panel-<version>-windows-setup.exe` | Windows | Double-click, Next → Finish |
The version is read from `CSXS/manifest.xml`'s `<ExtensionBundleVersion>`. To
cut a new release: bump that one number, rebuild, attach the two files to a
Forgejo release tag.
## Prerequisites
| Building | Requires |
|----------|----------|
| `.zxp` only | Node 18+, runs on macOS / Linux / Windows |
| `.exe` | Windows + [Inno Setup 6](https://jrsoftware.org/isinfo.php) on `PATH` (`ISCC.exe`) |
| Both via `build-all.ps1` | Windows + Node 18+ + Inno Setup 6 |
Install Inno Setup with winget:
```
winget install --id JRSoftware.InnoSetup
```
## Build
```
cd services/premiere-plugin/build
npm install
powershell -File build-all.ps1
```
Artifacts land in `services/premiere-plugin/build/dist/`.
To build just one:
```
node build-zxp.mjs # cross-platform .zxp
powershell -File build-installer.ps1 # Windows .exe (needs ISCC.exe)
```
## Signing cert (.zxp)
The first `node build-zxp.mjs` run generates a self-signed cert at
`cert/dragonflight-selfsigned.p12` + passphrase at `cert/cert-passphrase.txt`.
**Commit both files** — they need to be stable across builds so Adobe accepts
ZXP upgrades in place. If you regenerate the cert, every editor who already
installed an older `.zxp` has to uninstall + reinstall.
The cert is self-signed → editors still need `PlayerDebugMode=1`. The Windows
`.exe` installer sets this automatically. ZXP installs on macOS need a manual
`defaults write com.adobe.CSXS.11 PlayerDebugMode 1`.
See `cert/README.md` for cert details + how to regenerate.
## What the installers do
Both install the bundle as `net.wilddragon.dragonflight.panel`. The Windows
`.exe` additionally:
1. Removes any legacy `com.wilddragon.mam.panel` folder (with a consent
checkbox, default on) — avoids editors seeing two panels in
**Window → Extensions**.
2. Sets `HKCU\Software\Adobe\CSXS.{8..13}\PlayerDebugMode = "1"` so unsigned
CEP extensions load.
3. Registers itself in Add/Remove Programs so uninstall reverses both.
## Layout
```
build/
├── README.md ← this file
├── package.json ← devDep: zxp-sign-cmd
├── .gitignore ← ignores dist/ + node_modules/
├── build-all.ps1 ← runs both builders
├── build-zxp.mjs ← Node: generates cert (first run), signs, packages
├── build-installer.ps1 ← wraps ISCC.exe with version + bundle-id flags
├── installer.iss ← Inno Setup script
└── cert/
├── README.md ← how to regenerate
├── dragonflight-selfsigned.p12 ← generated on first build (commit it)
└── cert-passphrase.txt ← generated on first build (commit it)
```