-
-
Notifications
You must be signed in to change notification settings - Fork 202
Add Windows support (WebView2 + Go build tags) #542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
chaoz23
wants to merge
15
commits into
johnste:main
Choose a base branch
from
chaoz23:windows-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
f38bb2e
feat: add Windows support via WebView2 and Go build tags
5ed1293
fix(windows): address CodeRabbit review findings
1bda128
fix(windows): default browser = Edge, rule-editor focus, detect logging
c6c9771
feat(windows): embed app icon + version resource; About cross-platfor…
0eda5c7
fix(windows): repair UI<->Go bridge, named-pipe IPC, and version defa…
chaoz23 593c9d4
fix(windows): F10 - make Finicky selectable as default browser on Win11
chaoz23 c872e97
fix(windows): F11 - Start Menu shortcut must pass --window (bare laun…
chaoz23 c60c0e5
fix(windows): F12 - read default-browser choice from UserChoiceLatest
chaoz23 0d22a3b
feat(windows): dual-mode installer - admin/HKLM default, /CURRENTUSER…
chaoz23 9a86aa2
chore(installer): no install-mode dialog - straight to UAC
chaoz23 f023514
fix(windows): F7 - inject real version via ldflags (git describe)
chaoz23 f531aba
fix(ui): F2 - Test tab timeout and error states
chaoz23 55e3ca4
ci: run macOS build on windows-support/windows-smoke pushes
chaoz23 109d233
ci: clarify macOS check name; run Windows build on port branches
chaoz23 e2ae44d
ci: fix Windows build - pwsh instead of cmd (npm.cmd chaining ate the…
chaoz23 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,135 @@ | ||
| name: Windows Build | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, windows-support, windows-smoke] | ||
| pull_request: | ||
| branches: [main] | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build-windows: | ||
| runs-on: windows-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 # full history + tags so `git describe` yields the real version | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
| cache: 'npm' | ||
| cache-dependency-path: | | ||
| packages/config-api/package-lock.json | ||
| packages/finicky-ui/package-lock.json | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v4 | ||
| with: | ||
| go-version: '1.24' | ||
| cache-dependency-path: | | ||
| apps/finicky/src/go.sum | ||
|
|
||
| - name: Install Node dependencies | ||
| run: | | ||
| cd packages/config-api | ||
| npm ci | ||
| cd ../finicky-ui | ||
| npm ci | ||
|
|
||
| # pwsh, not cmd: in a cmd script, `npm` (npm.cmd) without `call` transfers | ||
| # control and never returns, so everything after the first npm line was | ||
| # silently skipped and the embed assets never landed. | ||
| - name: Build config-api | ||
| run: | | ||
| cd packages/config-api | ||
| npm run build | ||
| npm run generate-types | ||
| Copy-Item dist/finickyConfigAPI.js ../../apps/finicky/src/assets/finickyConfigAPI.js -Force | ||
| shell: pwsh | ||
|
|
||
| - name: Build UI | ||
| run: | | ||
| cd packages/finicky-ui | ||
| npm run build | ||
| New-Item -ItemType Directory -Force ../../apps/finicky/src/assets/templates | Out-Null | ||
| Copy-Item dist/* ../../apps/finicky/src/assets/templates/ -Recurse -Force | ||
| shell: pwsh | ||
|
|
||
| - name: Build Windows binary | ||
| env: | ||
| CGO_ENABLED: '0' | ||
| GOOS: windows | ||
| GOARCH: amd64 | ||
| run: | | ||
| $commitHash = git rev-parse --short HEAD | ||
| $buildDate = Get-Date -Format "yyyy-MM-dd HH:mm:ss UTC" -AsUTC | ||
| $version = git describe --tags --match 'v*' --always | ||
| cd apps/finicky/src | ||
| go build -ldflags "-X 'finicky/version.commitHash=$commitHash' -X 'finicky/version.buildDate=$buildDate' -X 'finicky/version.version=$version' -H windowsgui" -o ../build/windows/Finicky.exe . | ||
| shell: pwsh | ||
|
|
||
| - name: Run tests | ||
| run: | | ||
| cd apps/finicky/src | ||
| go test ./... | ||
| env: | ||
| CGO_ENABLED: '0' | ||
|
|
||
| - name: Upload Windows binary | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: Finicky-windows-x64 | ||
| path: apps/finicky/build/windows/Finicky.exe | ||
| retention-days: 14 | ||
|
|
||
| cross-compile-check: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
| cache: 'npm' | ||
| cache-dependency-path: | | ||
| packages/config-api/package-lock.json | ||
| packages/finicky-ui/package-lock.json | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v4 | ||
| with: | ||
| go-version: '1.24' | ||
| cache-dependency-path: | | ||
| apps/finicky/src/go.sum | ||
|
|
||
| - name: Build assets | ||
| run: | | ||
| cd packages/config-api && npm ci && npm run build && npm run generate-types | ||
| cp dist/finickyConfigAPI.js ../../apps/finicky/src/assets/finickyConfigAPI.js | ||
| cd ../finicky-ui && npm ci && npm run build | ||
| mkdir -p ../../apps/finicky/src/assets/templates | ||
| cp -r dist/* ../../apps/finicky/src/assets/templates/ | ||
|
|
||
| - name: Cross-compile for Windows | ||
| env: | ||
| CGO_ENABLED: '0' | ||
| GOOS: windows | ||
| GOARCH: amd64 | ||
| run: | | ||
| cd apps/finicky/src | ||
| go build -o /dev/null . | ||
|
|
||
| - name: Cross-compile for macOS (verify no regressions) | ||
| env: | ||
| CGO_ENABLED: '0' | ||
| GOOS: darwin | ||
| GOARCH: arm64 | ||
| run: | | ||
| cd apps/finicky/src | ||
| go build -o /dev/null . 2>&1 || echo "Expected: macOS build needs CGO for ObjC (this is OK)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,4 +3,7 @@ node_modules | |
| build | ||
| .env | ||
| dist | ||
| example-config | ||
| example-config | ||
| *.exe | ||
| *.msi | ||
| Output/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.