From ae5ccd49941b1e5d09e555f354319b4fb0a9d54c Mon Sep 17 00:00:00 2001 From: agrechenkov Date: Mon, 15 Jun 2026 12:32:39 -0400 Subject: [PATCH 1/4] Fix Inno Setup SourceDir; ship tray icon assets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The installer build got past the MinVersion fix (#17) and then failed at Inno Setup compile: Error on line 66 in installer.iss: The system cannot find the path specified. Line 66 is SetupIconFile=scripts\assets\flowkey.ico. Every Source path in the script (dist\, vendor\, scripts\, SetupIconFile, LICENSE, README.md) is written relative to the repo root, but Inno Setup resolves relative paths against the .iss file's own directory by default — which is installer\, not the root. (The build log confirms this: OutputDir=out resolved to installer\out.) So the icon read failed first, and the [Files] sources would have failed next. Fix: set SourceDir=.. so all Source paths resolve against the repo root. This also lands OutputDir at \out — exactly where build.ps1 and release-installer.yml look for the .exe (previously a latent mismatch). Also ship scripts\assets\* (the .ico the tray loads at runtime via A_ScriptDir "\assets\flowkey.ico") — [Files] copied scripts\grammarFix.ahk, lib, and ui but not assets, so the installed app would silently have no tray icon. Added matching [UninstallDelete] cleanup. Co-Authored-By: Claude Opus 4.8 (1M context) --- installer/installer.iss | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/installer/installer.iss b/installer/installer.iss index 9dc0914..7e98937 100644 --- a/installer/installer.iss +++ b/installer/installer.iss @@ -55,6 +55,13 @@ AppUpdatesURL={#AppURL}/releases DefaultDirName={commonpf}\FastFlowPrompt DefaultGroupName={#AppName} DisableProgramGroupPage=yes +; Every Source path below (dist\, vendor\, scripts\, SetupIconFile, LICENSE, +; README.md) is written relative to the REPO ROOT, but Inno Setup resolves +; relative paths against the directory containing this .iss by default — which +; is installer\, not the root. Point SourceDir at the root (this script lives +; in installer\, so "..") so every Source resolves. This also lands OutputDir +; at \out, where build.ps1 and release-installer.yml look for the exe. +SourceDir=.. OutputDir=out OutputBaseFilename=Flowkey-Setup-{#AppVersion} PrivilegesRequired=admin @@ -96,6 +103,10 @@ Source: "vendor\ahk\LICENSE.txt"; DestDir: "{app}\ahk"; Flags: ignoreversio Source: "scripts\grammarFix.ahk"; DestDir: "{app}\scripts"; Flags: ignoreversion Source: "scripts\lib\*"; DestDir: "{app}\scripts\lib"; Flags: ignoreversion recursesubdirs Source: "scripts\ui\*"; DestDir: "{app}\scripts\ui"; Flags: ignoreversion recursesubdirs +; Tray/window icon — grammarFix.ahk loads {app}\scripts\assets\flowkey.ico at +; runtime (A_ScriptDir "\assets\flowkey.ico"); without this it silently has no +; tray icon. Same .ico is the compile-time SetupIconFile above. +Source: "scripts\assets\*"; DestDir: "{app}\scripts\assets"; Flags: ignoreversion recursesubdirs ; --- Docs --------------------------------------------------------------------- Source: "LICENSE"; DestDir: "{app}"; Flags: ignoreversion skipifsourcedoesntexist; DestName: "LICENSE.txt" @@ -168,6 +179,7 @@ Type: filesandordirs; Name: "{app}\dist" Type: dirifempty; Name: "{app}\ahk" Type: dirifempty; Name: "{app}\scripts\lib" Type: dirifempty; Name: "{app}\scripts\ui" +Type: dirifempty; Name: "{app}\scripts\assets" Type: dirifempty; Name: "{app}\scripts" Type: dirifempty; Name: "{app}" From c8f4e88de6d8cd3a0a2f216980ba4cc2d15b0604 Mon Sep 17 00:00:00 2001 From: agrechenkov Date: Mon, 15 Jun 2026 12:36:53 -0400 Subject: [PATCH 2/4] Fix [Code] brace-comment closed early by {app} constant With SourceDir fixed, the compile reached the [Code] section and failed: Error on line 284 in installer.iss: Column 29: 'BEGIN' expected. Inno Setup Pascal { } comments do NOT nest, so the {app} constant inside the CurUninstallStepChanged doc-comment closed the comment at its '}', and the trailing "are removed but BEFORE..." text was parsed as code. Reword the comment to avoid a brace constant (the other {app}/{localappdata} refs in [Code] are inside single-quoted ExpandConstant strings, which are safe). Co-Authored-By: Claude Opus 4.8 (1M context) --- installer/installer.iss | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/installer/installer.iss b/installer/installer.iss index 7e98937..39a314d 100644 --- a/installer/installer.iss +++ b/installer/installer.iss @@ -281,8 +281,10 @@ begin end; { During uninstall: ask whether to wipe per-user config/data/logs, then act. - Runs AFTER files in {app} are removed but BEFORE the uninstaller exits, so - the prompt isn't competing with file-in-use errors. } + Runs AFTER files in the install dir are removed but BEFORE the uninstaller + exits, so the prompt isn't competing with file-in-use errors. + (Don't write a brace constant like the app-dir token here — Pascal { } + comments don't nest, so its closing brace would end this comment early.) } procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); var Wipe: Integer; From b5f9a71c0db25a3e8cb4593fde97944ed598b47f Mon Sep 17 00:00:00 2001 From: agrechenkov Date: Mon, 15 Jun 2026 12:39:38 -0400 Subject: [PATCH 3/4] Really remove inner braces from the [Code] doc-comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous fix replaced {app} but my replacement text contained a literal "{ }" — whose '}' closed the brace comment early all over again (error just moved to line 287). Reworded with zero brace characters in the comment body. Verified: every brace remaining in [Code] is either a matched comment delimiter with no inner braces, or a constant inside a single-quoted string. Co-Authored-By: Claude Opus 4.8 (1M context) --- installer/installer.iss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/installer.iss b/installer/installer.iss index 39a314d..152e9de 100644 --- a/installer/installer.iss +++ b/installer/installer.iss @@ -283,8 +283,8 @@ end; { During uninstall: ask whether to wipe per-user config/data/logs, then act. Runs AFTER files in the install dir are removed but BEFORE the uninstaller exits, so the prompt isn't competing with file-in-use errors. - (Don't write a brace constant like the app-dir token here — Pascal { } - comments don't nest, so its closing brace would end this comment early.) } + NB: never put an Inno brace-constant in a Pascal comment — these comments + do not nest, so the constant's closing brace would end the comment early. } procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); var Wipe: Integer; From 62d5fa8b803fce1143e4a010ee5ed8bc1cbb4e10 Mon Sep 17 00:00:00 2001 From: agrechenkov Date: Mon, 15 Jun 2026 12:43:59 -0400 Subject: [PATCH 4/4] docs: changelog note for the installer-compile fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Document the three installer.iss fixes (MinVersion comment, SourceDir, [Code] brace comment) + the shipped tray-icon assets — the build workflow's first green run produced Flowkey-Setup-1.6.0.exe. Co-Authored-By: Claude Opus 4.8 (1M context) --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e92710..33ca4cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ - CI: bumped `actions/checkout` v4→v5 and `actions/setup-python` v5→v6 onto the Node 24 runtime ahead of GitHub's Node 20 removal, and added a `node --check` syntax gate for the dashboard's `app.js`. - CI: added a `Build & release installer` workflow (manual dispatch or `v*` tag) that PyInstaller-freezes the four executables, compiles the Inno Setup installer, and uploads the artifact (attaching it to a GitHub Release on tag). Uses Node-24 actions (`checkout@v5`, `setup-python@v6`, `upload-artifact@v7`). - Installer build: `build.ps1 -BundleAhk` now fetches AutoHotkey v2 from its GitHub release (pinned 2.0.26) instead of `autohotkey.com`, which began returning a Cloudflare bot-challenge page to non-browser clients (the download succeeded but `Expand-Archive` failed on the HTML). `autohotkey.com` is kept as a fallback. +- Installer compile: `installer.iss` now actually compiles end-to-end (the build workflow's first green run). Three latent bugs, each masking the next, are fixed: (1) a trailing `; ...` comment on the `MinVersion` directive was parsed as part of the value (Inno Setup only treats `;` as a comment at the start of a line); (2) no `SourceDir` was set, so Inno resolved every repo-root-relative `Source`/`SetupIconFile`/`OutputDir` against the script's own `installer\` directory — now `SourceDir=..`, which also lands the output at `\out` where the build script and CI look for it; (3) an `{app}` Inno constant inside a Pascal `{ }` doc-comment in `[Code]` closed the comment early (these comments don't nest). Also ships `scripts\assets\*` (the tray `.ico` the AHK loads at runtime), which `[Files]` had omitted. ## 1.6.0