Commit graph

5,404 commits

Author SHA1 Message Date
Lea Anthony
36aa349322 fix(linux): add empty slice guards to prevent panic in icon/bitmap handling
Adds guards to check for empty slices before taking &slice[0] which would
panic. Affects setIcon(), menuItemAddProperties(), menuItemSetBitmap(),
and runQuestionDialog() in both CGO and purego implementations.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 18:37:04 +11:00
Lea Anthony
77cb9866a2 Revert "fix(linux): add empty slice guards to prevent panic in icon/bitmap handling"
This reverts commit 05cbe108de.
2026-02-02 18:36:55 +11:00
Lea Anthony
05cbe108de fix(linux): add empty slice guards to prevent panic in icon/bitmap handling
Adds guards to check for empty slices before taking &slice[0] which would
panic. Affects setIcon(), menuItemAddProperties(), menuItemSetBitmap(),
and runQuestionDialog() in both CGO and purego implementations.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 18:36:26 +11:00
github-actions[bot]
9d6c03ca57 chore(v3): bump to v3.0.0-alpha.65 and update changelog [skip ci] v3.0.0-alpha.65 2026-02-01 03:10:36 +00:00
Lea Anthony
284c67d037 perf(ci): use native ARM64 runner for linux/arm64 builds
Use ubuntu-24.04-arm runner for linux/arm64 cross-compile tests
instead of QEMU emulation. This should reduce build time from ~20min
to ~3min.

- Remove QEMU and Buildx setup (not needed with native runner)
- Remove --platform flag from Docker commands
- Each matrix entry now specifies its runner

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 10:10:58 +11:00
Wilko
2db6a1c427
feat(v3): Support for Icon Composer Liquid Glass Icons (macOS) (#4934)
* feat(icons): implement Mac asset (.car) generation with actool

- Check actool version >= 26 requirement
- Generate asset.car from Icon Composer input
- Validate compilation output and cleanup temp files

* Wails Icon as Icon Composer file

* a generated assets.car from the wails icon

* handle absolute paths correctly in actool command

- Check if paths are absolute before prepending "./"
- Use filepath.Join for temp.plist path construction

* add test for Assets.car generation

* Skipping Asset.car generation and test on non mac-systems

* add CFBundleIconName generation to plist, if Assets.car exists

* also create .icns from .icon-File and use always absolut path

Use absolut path, because otherwise we got strange behavior from actool.

* update to use appicon as CFBundleIconName and optionally use the name from config

* update the Taskfiles

* remove log prints

* the awesome new LiquidGlass icon files

* update doc

* Update UNRELEASED_CHANGELOG.md

* Update UNRELEASED_CHANGELOG.md

* fix security bug

* Skip icon generation test with actool on CI

* fix error from coderabbitai

* solved the coderabbitai nitpicks

* fix coderabbitai findings

* Update changelog

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2026-02-01 10:07:56 +11:00
Lea Anthony
7e74a5d9d0 fix(build): use QEMU emulation for Linux cross-arch builds
For Linux ARM64 builds on x86_64 hosts, use Docker's QEMU emulation
instead of trying to cross-compile with Zig or install multi-arch packages.

Changes:
- Workflow: Set up QEMU and Docker Buildx for Linux cross-arch builds
- Workflow: Build Docker image with --platform for target architecture
- Dockerfile: Simplify to use native GCC (QEMU handles arch translation)
- Taskfile: Add --platform flag to docker run for Linux builds

This approach is slower but reliable and doesn't require complex
cross-compilation toolchain setup.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 00:25:41 +11:00
Lea Anthony
d9348686dc fix(build): use proper cross-compilation toolchain for Linux ARM64
Instead of trying to use Zig for Linux cross-compilation (which has
glibc header compatibility issues), install the proper aarch64-linux-gnu
cross-compilation toolchain and ARM64 GTK/WebKit libraries.

Changes:
- Enable multi-arch and install gcc-aarch64-linux-gnu toolchain
- Install ARM64 versions of libgtk-3-dev and libwebkit2gtk-4.1-dev
- Set PKG_CONFIG_PATH for ARM64 libraries when cross-compiling
- Use aarch64-linux-gnu-gcc as the cross-compiler

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 00:19:04 +11:00
Lea Anthony
e6bf084197 fix(build): use Zig for Linux cross-arch compilation in Docker
Add Zig CC wrappers for Linux ARM64 and AMD64 targets. The build script
now detects if host architecture matches target architecture:
- If match: use native GCC (faster, better optimization)
- If different: use Zig for cross-compilation

This allows building Linux ARM64 binaries from an x86_64 Docker host
without requiring multi-arch images or QEMU emulation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 00:12:09 +11:00
Lea Anthony
985ce8deed fix(build): remove --platform flag from Linux cross-compile Docker
The wails-cross image is an x86_64 image that uses Zig for cross-compilation.
It doesn't need to run ON the target platform - it cross-compiles TO it.
Remove the --platform flag that was causing Docker to try pulling a
non-existent arm64 version of the image.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 00:05:00 +11:00
Lea Anthony
d5cd33d4fb fix(build): use Docker for cross-arch Linux compilation
When building Linux binaries with a different target architecture than
the host (e.g., arm64 on x86_64), use Docker-based cross-compilation
instead of native build. The native GCC cannot compile ARM64 assembly
on an x86_64 host.

Adds a third condition to the build task selection: target architecture
must match host architecture to use native build.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 23:53:41 +11:00
Lea Anthony
259c33dfda fix(ci): use absolute path for replace directive in Docker build
The Docker mounts v3 at the same absolute path, so change the replace
directive to use the absolute workspace path instead of removing it.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 23:45:05 +11:00
Lea Anthony
513669bf13 fix(ci): remove replace directive before Docker cross-compile
The project created by wails3 init has a replace directive pointing
to the local v3 source. This doesn't work inside Docker containers.
Remove it before running the cross-compile tasks.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 23:38:18 +11:00
Lea Anthony
4af09b43a8 fix(ci): use correct task names for cross-compilation
- common:setup:docker instead of setup:docker
- darwin:build, linux:build, windows:build instead of build:darwin, etc.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 23:24:42 +11:00
Lea Anthony
72fcf2fa1c fix(ci): use Go 1.25 and go install for wails3 CLI
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 22:57:56 +11:00
Lea Anthony
fb0f10ca70 fix(ci): add Linux dependencies for wails3 CLI build
The wails3 CLI requires webkit2gtk, gtk, and other Linux libraries
to compile due to CGO dependencies.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 22:57:16 +11:00
Lea Anthony
46d27c526b fix(ci): use wails3 init and task-based cross-compile workflow
Instead of building Docker images from scratch, the workflow now:
- Installs wails3 CLI
- Creates a test project with wails3 init
- Runs setup:docker to build the cross-compile image
- Uses task build:<platform> for cross-compilation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 22:49:52 +11:00
Lea Anthony
df2175b950 fix(docker): add BuildKit syntax directive for heredoc support
The Dockerfiles use heredoc syntax which requires BuildKit's
dockerfile:1 syntax directive to parse correctly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 22:48:41 +11:00
Lea Anthony
403be215a2 feat(ci): add cross-compile test workflow for v3 PRs
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 22:45:13 +11:00
Lea Anthony
cf42f57592 ci: add registry caching for faster Docker builds
Adds registry-based cache alongside GHA cache to improve build times
when GHA cache is evicted (7-day retention limit).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 08:50:48 +11:00
Lea Anthony
9742aec9af ci: add linux/amd64 to cross-compile tests
Always use linux:build:docker for Linux targets to properly test
the Docker image for both amd64 and arm64 architectures.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 08:41:53 +11:00
drc5521
679e4843d2
Update 03-notes-vanilla.mdx (#4917)
* Update 03-notes-vanilla.mdx

The API has been hanged.
application.SaveFileDialog() -> application.Get().Dialog.SaveFile()
application.OpenFileDialog() -> application.Get().Dialog.OpenFile()
application.InfoDialog() -> application.Get().Dialog.Info()

Please refer to the document.
https://v3alpha.wails.io/reference/dialogs/

* Update docs/src/content/docs/tutorials/03-notes-vanilla.mdx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-01-29 06:04:45 +11:00
Lea Anthony
ec78af1fee ci: remove darwin/amd64 from cross-compile tests
Intel Macs are EOL (last released 2020, support ending ~2027).
Focus testing on darwin/arm64 which is the current/future platform.
The Dockerfile still supports amd64 if needed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 09:59:15 +11:00
Lea Anthony
c8b4d8534b ci: pull correct platform variant for Docker image
The task uses --platform flag which requires the matching architecture
variant. Pull arm64 variant explicitly for Linux arm64 test.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 09:38:07 +11:00
Lea Anthony
bc13f7377a ci: force Docker build for Linux arm64 cross-compilation
The linux:build task chooses native build when gcc is available,
but native x86_64 gcc can't cross-compile to arm64 (assembly errors).
Explicitly call linux:build:docker for Linux arm64 target.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 09:30:09 +11:00
Lea Anthony
c8fc68a66b ci: pull and tag Docker image as 'wails-cross' for task system
The wails3 task system expects a locally tagged 'wails-cross' image.
Pull from ghcr.io and tag it appropriately before running tasks.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 09:23:15 +11:00
Lea Anthony
2f534f0a5e ci: fix conflicting replace directive in test project
wails3 init already adds a replace directive with relative path.
Use sed to update it to absolute path instead of adding a duplicate.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 09:18:23 +11:00
Lea Anthony
282854a964 ci: add amd64 cross-compile tests for darwin and windows
Tests 5 cross-compilation targets from Linux/amd64 runner:
- darwin/amd64, darwin/arm64 (cross-platform)
- windows/amd64, windows/arm64 (cross-platform)
- linux/arm64 (cross-architecture)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 09:17:40 +11:00
Lea Anthony
65b1b838f2 ci: use wails3 task system for cross-compile tests
- Use `wails3 task {os}:build` instead of manual Docker commands
- Test actual cross-compilation only (skip host-to-host):
  - darwin/arm64 from Linux/amd64
  - windows/arm64 from Linux/amd64
  - linux/arm64 from Linux/amd64
- Let task system handle frontend build, bindings, etc.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 09:10:27 +11:00
Lea Anthony
7bbfc52ca7 ci: generate bindings before frontend build
The frontend build requires Go bindings to be generated first.
Run `wails3 generate bindings` on the host before building frontend.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 09:07:15 +11:00
Lea Anthony
39e5d47477 ci: install Linux dev dependencies for wails3 CLI build
The wails3 CLI requires GTK3/WebKit2GTK dev packages to build on
the GitHub runner (for CGO).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 08:58:43 +11:00
Lea Anthony
7b7c27271d ci: simplify cross-compile tests to 3 parallel platform jobs
- Use 3 parallel jobs (darwin, linux, windows) instead of 6
- Each job builds both amd64 and arm64 architectures
- Use real wails3 projects via `wails3 init` instead of fake test programs
- Remove pointless non-CGO tests
- Keep library dependency verification for Linux binaries

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 08:55:37 +11:00
Lea Anthony
6592db81cb ci: add cross-compiler image build workflow
Adds workflow to build and test the wails-cross Docker image:
- Builds multi-arch image (amd64/arm64)
- Tests cross-compilation for all 6 platform/arch combinations
- Tests both CGO and non-CGO builds
- Verifies Linux binary library dependencies with readelf
- Publishes to ghcr.io/wailsapp/wails-cross

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 08:37:45 +11:00
Lea Anthony
70c969bf3b feat(build): use GCC for Linux cross-compilation
- Switch from Alpine to Debian (golang:1.25-bookworm)
- Install GTK3/GTK4 and WebKit2GTK 4.1/6.0 dev packages
- Use native GCC for Linux targets instead of Zig
- Add --platform flag to Docker run for architecture matching
- Remove unused zcc-linux-* wrappers (Zig had glibc header issues)
- Keep Zig for Darwin (macOS SDK) and Windows (bundled mingw)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 08:36:45 +11:00
Lea Anthony
f91b8cfeb1 feat: support ARM64 hosts in cross-compiler Docker image
Add TARGETARCH detection to download the correct Zig binary for
the host architecture (aarch64 vs x86_64). This enables native
performance on Apple Silicon Macs instead of requiring emulation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 06:32:47 +11:00
github-actions[bot]
279eea9799 chore(v3): bump to v3.0.0-alpha.64 and update changelog [skip ci] v3.0.0-alpha.64 2026-01-26 02:56:39 +00:00
GitHub Actions
a23c3c4e87 [skip ci] Publish @wailsio/runtime v3.0.0-alpha.79 2026-01-25 03:34:50 +00:00
Lea Anthony
9a363d7be5
feat(v3): add server mode for headless HTTP deployment (#4903)
* feat(v3): add server mode for headless HTTP deployment

Server mode allows Wails applications to run as pure HTTP servers
without native GUI dependencies. Enable with `-tags server` build tag.

Features:
- HTTP server with configurable host/port via ServerOptions
- WAILS_SERVER_HOST and WAILS_SERVER_PORT env var overrides
- WebSocket event broadcasting to connected browsers
- Browser clients represented as BrowserWindow (Window interface)
- Health check endpoint at /health
- Graceful shutdown with configurable timeout
- Docker support with Dockerfile.server template and tasks

Build and run:
  wails3 task build:server
  wails3 task run:server
  wails3 task build:docker
  wails3 task run:docker

Documentation at docs/guides/server-build.mdx

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(v3): add server mode for headless HTTP deployment

Server mode allows Wails applications to run as pure HTTP servers
without native GUI dependencies. Enable with `-tags server` build tag.

Features:
- HTTP server with configurable host/port via ServerOptions
- WAILS_SERVER_HOST and WAILS_SERVER_PORT env var overrides
- WebSocket event broadcasting to connected browsers
- Browser clients represented as BrowserWindow (Window interface)
- Health check endpoint at /health
- Graceful shutdown with configurable timeout
- Docker support with Dockerfile.server template and tasks

Build and run:
  wails3 task build:server
  wails3 task run:server
  wails3 task build:docker
  wails3 task run:docker

Documentation at docs/guides/server-build.mdx

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: address CodeRabbit review comments

- Fix corrupted test file with embedded terminal output
- Fix module name mismatch in gin-routing (was gin-example)
- Fix replace directive version mismatch in gin-service
- Fix placeholder module name in ios example (was changeme)
- Fix Dockerfile COPY path to work from both build contexts
- Fix bare URL in README (MD034 compliance)
- Fix comment accuracy in getScreens (returns error, not empty slice)
- Remove deprecated docker-compose version field
- Add port documentation in Taskfile template

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: address CodeRabbit review comments

- Add note about healthcheck wget not being available in distroless images
- Add !server build constraint to menu_windows.go and menu_darwin.go
- Downgrade window-visibility-test go.mod from 1.25 to 1.24 to match CI

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 14:33:44 +11:00
github-actions[bot]
103ff347e0 chore(v3): bump to v3.0.0-alpha.63 and update changelog [skip ci] v3.0.0-alpha.63 2026-01-25 02:55:49 +00:00
Lea Anthony
537c74327d
fix(darwin): make Position() and SetPosition() use consistent coordinate systems (#4818)
* fix(darwin): make Position() and SetPosition() use consistent coordinate systems

On macOS, windowGetPosition() was returning raw Cocoa coordinates (Y=0 at
bottom of screen) while windowSetPosition() expected coordinates with Y=0
at the top of the screen. This caused window positions to drift when saving
and restoring window state across application sessions.

The fix updates windowGetPosition() to:
1. Convert Y coordinates to top-origin (matching windowSetPosition)
2. Apply DPI scale factor (matching windowSetPosition)

This ensures Position() returns values that can be directly passed back to
SetPosition() for consistent round-trip behavior.

Fixes #4816

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(darwin): make Position() and SetPosition() use consistent coordinate systems

On macOS, windowGetPosition() was returning raw Cocoa coordinates (Y=0 at
bottom of screen) while windowSetPosition() expected coordinates with Y=0
at the top of the screen. This caused window positions to drift when saving
and restoring window state across application sessions.

The fix updates windowGetPosition() to:
1. Convert Y coordinates to top-origin (matching windowSetPosition)
2. Apply DPI scale factor (matching windowSetPosition)

This ensures Position() returns values that can be directly passed back to
SetPosition() for consistent round-trip behavior.

Fixes #4816

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-25 12:40:25 +11:00
github-actions[bot]
9a131a049d chore(v3): bump to v3.0.0-alpha.62 and update changelog [skip ci] v3.0.0-alpha.62 2026-01-22 02:51:17 +00:00
Lea Anthony
8d28e2d06b
fix(windows): skip DPI awareness API call when already set via manifest (#4811)
Check current DPI awareness before calling SetProcessDpiAwarenessContext.
Windows only allows setting DPI awareness once per process - either via
manifest or API, not both. If already set (e.g., via application manifest
in built binaries), skip the API call to avoid "Access is denied" errors.

Fixes #4803

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-21 19:23:56 +11:00
github-actions[bot]
a0d2e03f64 chore(v3): bump to v3.0.0-alpha.61 and update changelog [skip ci] v3.0.0-alpha.61 2026-01-20 02:48:15 +00:00
Ndianabasi Udonkang
8598034942
Change Window Type from WebviewWindow to Window (#4829)
* fix: change window type from WebviewWindow to Window

* docs: update `UNRELEASED_CHANGELOG`

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2026-01-20 10:42:54 +11:00
Abdelhadi Seddar
9158c49e30
docs: fixed incorrect tag in Custom Output Directory of Bindings (#4873)
* docs: fixed incorrect tag in Custom Output Directory of Bindings

After some usage of wails I found out that

```bash
wails3 generate bindings -o ./src/bindings
``` 
does not work and according to 
```bash
$ wails3 generate bindings --help 
```
it uses the `-d string` tag instead

* Update UNRELEASED_CHANGELOG.md

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2026-01-20 10:41:46 +11:00
github-actions[bot]
d7d6720d54 chore(v3): bump to v3.0.0-alpha.60 and update changelog [skip ci] v3.0.0-alpha.60 2026-01-14 02:50:25 +00:00
Zach Botterman
37fb9b9ba5
fix(v3/linux): Fix menu update by clearing menu (#4875)
* clear menu

* update changelog

* free list

* register glistfree
2026-01-13 21:42:09 +11:00
github-actions[bot]
9db2f74c44 chore(v3): bump to v3.0.0-alpha.59 and update changelog [skip ci] v3.0.0-alpha.59 2026-01-11 02:54:04 +00:00
Ndianabasi Udonkang
897479d52b
Enhance Drag-N-Drop README with Internal Drag and Drop Info (#4869)
* Enhance README with internal drag and drop info

Added details about internal drag and drop functionality.

* Update UNRELEASED_CHANGE.md
2026-01-10 20:00:52 +11:00
github-actions[bot]
be0e9bab9b chore(v3): bump to v3.0.0-alpha.58 and update changelog [skip ci] v3.0.0-alpha.58 2026-01-09 02:46:28 +00:00