diff --git a/docs/GROWING_FILES_QUICKSTART.md b/docs/GROWING_FILES_QUICKSTART.md index 40a8a4a..2e9c02a 100644 --- a/docs/GROWING_FILES_QUICKSTART.md +++ b/docs/GROWING_FILES_QUICKSTART.md @@ -45,7 +45,7 @@ Building locally (requires Windows for the `.exe`, any OS for the `.zxp`): ``` cd services/premiere-plugin/build npm install -pwsh -File build-all.ps1 # or: node build-zxp.mjs +powershell -File build-all.ps1 # or: node build-zxp.mjs ``` The Windows installer takes care of `PlayerDebugMode`. If you installed the diff --git a/services/premiere-plugin/QUICK_START.md b/services/premiere-plugin/QUICK_START.md index e20c913..44bfd4e 100644 --- a/services/premiere-plugin/QUICK_START.md +++ b/services/premiere-plugin/QUICK_START.md @@ -30,7 +30,7 @@ sets `PlayerDebugMode=1` for CSXS 8..13, and offers to remove any legacy ``` cd services/premiere-plugin/build npm install -pwsh -File build-all.ps1 +powershell -File build-all.ps1 ``` See [`build/README.md`](build/README.md). diff --git a/services/premiere-plugin/build/README.md b/services/premiere-plugin/build/README.md index e8e0001..c5ce8cc 100644 --- a/services/premiere-plugin/build/README.md +++ b/services/premiere-plugin/build/README.md @@ -30,7 +30,7 @@ winget install --id JRSoftware.InnoSetup ``` cd services/premiere-plugin/build npm install -pwsh -File build-all.ps1 +powershell -File build-all.ps1 ``` Artifacts land in `services/premiere-plugin/build/dist/`. @@ -39,7 +39,7 @@ To build just one: ``` node build-zxp.mjs # cross-platform .zxp -pwsh -File build-installer.ps1 # Windows .exe (needs ISCC.exe) +powershell -File build-installer.ps1 # Windows .exe (needs ISCC.exe) ``` ## Signing cert (.zxp) diff --git a/services/premiere-plugin/build/build-installer.ps1 b/services/premiere-plugin/build/build-installer.ps1 index 1175757..9079273 100644 --- a/services/premiere-plugin/build/build-installer.ps1 +++ b/services/premiere-plugin/build/build-installer.ps1 @@ -12,20 +12,30 @@ $manifestPath = Join-Path $PSScriptRoot '..\CSXS\manifest.xml' if (-not (Test-Path $manifestPath)) { throw "Manifest not found at $manifestPath" } -$manifestXml = [xml](Get-Content -Raw -Path $manifestPath) -$version = $manifestXml.ExtensionManifest.ExtensionBundleVersion -if (-not $version) { +# Regex over XML because the manifest's comment contains '--' +# (the --enable-nodejs/--mixed-context CEF flags), which is illegal per the +# XML spec — .NET's strict parser rejects the doc even though Adobe CEP +# tolerates it. +$manifestRaw = Get-Content -Raw -Path $manifestPath +if ($manifestRaw -notmatch '([^<]+)') { throw 'Could not read from manifest.xml' } +$version = $Matches[1].Trim() Write-Host "Dragonflight Premiere panel - Windows installer build v$version" $iscc = Get-Command 'ISCC.exe' -ErrorAction SilentlyContinue if (-not $iscc) { - # Common install location if not on PATH. - $fallback = "${env:ProgramFiles(x86)}\Inno Setup 6\ISCC.exe" - if (Test-Path $fallback) { - $iscc = Get-Command $fallback - } else { + # Common Inno Setup 6 install locations. winget user-scope drops it in + # %LOCALAPPDATA%\Programs; machine-wide installs land in Program Files. + $fallbacks = @( + "${env:LOCALAPPDATA}\Programs\Inno Setup 6\ISCC.exe", + "${env:ProgramFiles(x86)}\Inno Setup 6\ISCC.exe", + "${env:ProgramFiles}\Inno Setup 6\ISCC.exe" + ) + foreach ($p in $fallbacks) { + if (Test-Path $p) { $iscc = Get-Command $p; break } + } + if (-not $iscc) { throw "ISCC.exe not found. Install Inno Setup 6: winget install JRSoftware.InnoSetup" } } diff --git a/services/premiere-plugin/build/package.json b/services/premiere-plugin/build/package.json index 579ef1e..a25d397 100644 --- a/services/premiere-plugin/build/package.json +++ b/services/premiere-plugin/build/package.json @@ -6,8 +6,8 @@ "type": "module", "scripts": { "build:zxp": "node build-zxp.mjs", - "build:exe": "pwsh -NoProfile -ExecutionPolicy Bypass -File build-installer.ps1", - "build": "pwsh -NoProfile -ExecutionPolicy Bypass -File build-all.ps1" + "build:exe": "powershell -NoProfile -ExecutionPolicy Bypass -File build-installer.ps1", + "build": "powershell -NoProfile -ExecutionPolicy Bypass -File build-all.ps1" }, "devDependencies": { "zxp-sign-cmd": "^2.0.0"