Windows Executable #77

Closed
opened 2026-05-14 19:47:38 +00:00 by guettli · 2 comments
guettli commented 2026-05-14 19:47:38 +00:00 (Migrated from codeberg.org)

Windows Linux Executable.

First create a plan. What is a common way to provide a Windows executable?

I would like to have auto-update enabled. Currently we release often. Users should get the latest version automatically.


Labels:

  • State/InProgress — Set this when you start working on an issue
  • State/Question — Set this when you hit a blocker or need clarification
Windows Linux Executable. First create a plan. What is a common way to provide a Windows executable? I would like to have auto-update enabled. Currently we release often. Users should get the latest version automatically. --- Labels: - **State/InProgress** — Set this when you start working on an issue - **State/Question** — Set this when you hit a blocker or need clarification
guettlibot commented 2026-05-14 21:55:11 +00:00 (Migrated from codeberg.org)

Plan: Windows Executable with auto-update

Approach: zip bundle + update banner (mirrors existing Linux setup)

The simplest consistent approach is to match what's already working for Linux:

  1. Build: flutter build windows --release --dart-define=GIT_HASH=<hash>
  2. Package: zip the build/windows/x64/runner/Release/ bundle
  3. Deploy: SCP the zip to the server under public_html/builds/YYYY/MM/DD/
  4. Update latest.json on the server — extend it with a windows key:
    {"version":"<hash>","linux":"<url>","windows":"<url>"}
  5. In-app: the existing _UpdateBanner + updateInfoProvider just needs
    Platform.isWindows added alongside Platform.isLinux

Key blocker: Windows CI runner required

Flutter Windows builds need MSVC — they cannot be cross-compiled from Linux.
A Windows self-hosted runner must be registered in Forgejo Actions with
the label windows (or similar). Steps to set it up:

  1. On the Windows machine: install Flutter, Git, Visual Studio 2022 (C++ workload)
  2. Download the Forgejo Actions runner binary for Windows from the Forgejo release page
  3. Register it against https://codeberg.org/guettli/sharedinbox with label windows-runner
  4. Start it as a service

What I'll implement now

  • Taskfile.yml: build-windows-release + deploy-windows-to-server tasks
  • .forgejo/workflows/ci.yml: build-windows job (runs on windows-runner label, triggers after check passes on main)
  • lib/core/services/update_service.dart: extend to also serve Platform.isWindows

The CI job will be pending until a Windows runner is registered — all other jobs are unaffected.

## Plan: Windows Executable with auto-update ### Approach: zip bundle + update banner (mirrors existing Linux setup) The simplest consistent approach is to match what's already working for Linux: 1. Build: `flutter build windows --release --dart-define=GIT_HASH=<hash>` 2. Package: zip the `build/windows/x64/runner/Release/` bundle 3. Deploy: SCP the zip to the server under `public_html/builds/YYYY/MM/DD/` 4. Update `latest.json` on the server — extend it with a `windows` key: `{"version":"<hash>","linux":"<url>","windows":"<url>"}` 5. In-app: the existing `_UpdateBanner` + `updateInfoProvider` just needs `Platform.isWindows` added alongside `Platform.isLinux` ### Key blocker: Windows CI runner required Flutter Windows builds need MSVC — they cannot be cross-compiled from Linux. A Windows self-hosted runner must be registered in Forgejo Actions with the label `windows` (or similar). Steps to set it up: 1. On the Windows machine: install Flutter, Git, Visual Studio 2022 (C++ workload) 2. Download the Forgejo Actions runner binary for Windows from the Forgejo release page 3. Register it against `https://codeberg.org/guettli/sharedinbox` with label `windows-runner` 4. Start it as a service ### What I'll implement now - `Taskfile.yml`: `build-windows-release` + `deploy-windows-to-server` tasks - `.forgejo/workflows/ci.yml`: `build-windows` job (runs on `windows-runner` label, triggers after check passes on main) - `lib/core/services/update_service.dart`: extend to also serve `Platform.isWindows` The CI job will be pending until a Windows runner is registered — all other jobs are unaffected.
guettli commented 2026-05-15 05:13:59 +00:00 (Migrated from codeberg.org)

Update: don't build windows on every merge to main.

Create a new CI Job: windows-nightly: build once a day (only if there were changes on main).

But keep the job disabled, because I don't have a Windows runner yet.

Update: don't build windows on every merge to main. Create a new CI Job: windows-nightly: build once a day (only if there were changes on main). But keep the job disabled, because I don't have a Windows runner yet.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: guettli/sharedinbox#77