Commit graph

218 commits

Author SHA1 Message Date
Lea Anthony
3594b77666 feat(v3): add cross-platform build system and signing support
Add Docker-based cross-compilation for building Wails apps on any platform:
- Linux builds from macOS/Windows using Docker with Zig
- Windows builds with CGO from Linux/macOS using Docker
- macOS builds from Linux/Windows using Docker with osxcross

Add wails3 tool lipo command using konoui/lipo library for creating
macOS universal binaries on any platform.

Add code signing infrastructure:
- wails3 sign wrapper command (like build/package)
- wails3 tool sign low-level command for Taskfiles
- wails3 setup signing interactive wizard
- wails3 setup entitlements for macOS entitlements
- Keychain integration for secure credential storage

Update all platform Taskfiles with signing tasks:
- darwin:sign, darwin:sign:notarize
- windows:sign, windows:sign:installer
- linux:sign:deb, linux:sign:rpm, linux:sign:packages

Reorganize documentation:
- Move building/signing guides to guides/build/
- Add platform-specific packaging guides (macos, linux, windows)
- Add cross-platform build documentation
- Add comprehensive signing guide with CI/CD examples
- Add auto-updates guide and updater reference
- Add distribution tutorial

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-06 13:53:37 +11:00
Lea Anthony
f8175363cf fix(docs): rewrite lifecycle documentation with correct v3 API
- Replace incorrect OnStartup hook with actual v3 lifecycle mechanisms
- Document Services with ServiceStartup/ServiceShutdown interfaces
- Document application-level hooks: ShouldQuit, OnShutdown, PostShutdown
- Document event-based lifecycle with OnApplicationEvent and OnWindowEvent
- Document window hooks with RegisterHook for cancellable events
- Add correct platform-specific defaults for quit-on-last-window-close
- Add JavaScript example to services Quick Start
- Make Taskfile dev task depend on setup task

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 06:34:45 +11:00
Lea Anthony
3f0091aba9 fix(docs): update starlight-blog to v0.25.1 to fix build error 2025-11-24 21:54:59 +11:00
Lea Anthony
55f2782559 fix(docs): update starlight to v0.36.2 to support social links array 2025-11-24 21:52:26 +11:00
Lea Anthony
0d02db8ce6 fix(docs): comment out all broken d2 diagrams and fix invalid aside type 2025-11-24 21:46:26 +11:00
Lea Anthony
7e21ce614a fix(docs): disable broken d2 diagram and fix installer 2025-11-24 21:33:15 +11:00
Lea Anthony
3c78e45426 docs: Trigger rebuild with minor update 2025-11-23 22:36:06 +11:00
Lea Anthony
c8c5bd15e7 fix: Add React integration to Astro config to resolve JSX renderer issue 2025-11-23 21:30:24 +11:00
Lea Anthony
fc510586df fix: Add D2 installation to GitHub Pages workflow and remove temp dev file
- Install D2 binary in GitHub Actions before building docs
- Remove DEVELOPER_GUIDE.md temporary file from docs content
- This fixes the docs build failure on GitHub Pages
2025-11-23 21:28:46 +11:00
Lea Anthony
c84506a8a8 docs: Comprehensive documentation redesign and v3-alpha updates
This commit represents a complete redesign of the Wails v3 documentation structure
and includes all recent v3-alpha updates.

## Major Changes

### Documentation Restructure
- Migrated from /learn to organized /features, /guides, /reference structure
- Created new Quick Start section with installation and first app guides
- Added comprehensive Concepts section explaining architecture and lifecycle
- Reorganized Contributing section with detailed guides for different contribution types
- Added complete API Reference with separate pages for each major component

### New Documentation
- Custom URL Protocols guide with NSIS automatic registration
- Windows Packaging guide with NSIS, MSI, and MSIX options
- Typed Events system with TypeScript binding generation
- Complete menu documentation (Application, Context, System Tray)
- Comprehensive dialog documentation (File, Message, Custom)
- Window management guides (Basics, Events, Frameless, Multiple Windows)
- Bindings documentation (Services, Methods, Models, Best Practices)
- New tutorials: Todo app and Notes app (vanilla JS)

### v3-alpha API Updates
- Typed Events: RegisterEvent[T] with strict mode and binding generation
- Custom Protocols: NSIS macros for automatic Windows protocol registration
- System Tray: Windows Show/Hide now fully functional with tooltip limits
- Window Hidden: Fixed white flash on Windows when creating hidden windows
- Notifications: Corrected import path to pkg/services/notifications
- Frontend Runtime: Events.Emit now returns Promise<boolean> for cancellation

### Documentation Improvements
- Updated all code examples to use @wailsio/runtime imports
- Added platform-specific event tables and examples
- Created comprehensive event reference with use cases
- Added security best practices and validation patterns
- Improved code examples with real-world use cases
- Added troubleshooting sections and common patterns

### Files
- Created: 60+ new documentation pages
- Deleted: Old /learn structure (13 files)
- Modified: 15 existing files for v3-alpha compatibility
- Added: Tutorial assets and showcase images
2025-11-23 20:57:25 +11:00
github-actions[bot]
986efc7e7f chore(v3): bump to v3.0.0-alpha.41 and update changelog [skip ci] 2025-11-23 02:46:07 +00:00
github-actions[bot]
c36618c2ac chore(v3): bump to v3.0.0-alpha.40 and update changelog [skip ci] 2025-11-13 02:38:55 +00:00
github-actions[bot]
c3b169f0d3 chore(v3): bump to v3.0.0-alpha.39 and update changelog [skip ci] 2025-11-12 02:38:00 +00:00
Ian VanSchooten
bbd5d99667
[v3] Typed Events, revisited (#4633)
* Add strong event typings

* Make `EmitEvent` take one data argument only

* Add event registration logic

* Report event cancellation to the emitter

* Prevent registration of system events

* Add support for typed event data initialisation

* Binding generation for events

* Tests for event bindings

* Add vite plugin for typed events

* Fix dev command execution order

Co-authored-by: Fabio Massaioli <fabio.massaioli@gmail.com>

* Propagate module path to templates

* Update templates

Co-authored-by: Ian VanSchooten <ian.vanschooten@gmail.com>

* Go mod tidy for examples

* Switch to tsconfig.json for jetbrains IDE support

* Replace jsconfig in example

* Convert vite plugin to typescript

* Downgrade vite for now

The templates all use 5.x

* Remove root plugins dir from npm files

It's now '/dist/plugins'

* Include types for Create

But keep out of the docs

* Assign a type for cancelAll results

* Restore variadic argument in EmitEvent methods

* Support registered events with void data

* Test cases for void alias support

* Support strict mode

* Support custom event hooks

* Update docs

* Update changelog

* Testdata for typed events

* Test data for void alias support

* fix webview_window emit event

* Update changelog.mdx

* Update events

* Fix generator test path normalization for cross-platform compatibility

The generator tests were failing on CI because they compared absolute file paths
in warning messages. These paths differ between development machines and CI environments.

Changes:
- Normalize file paths in warnings to be relative to testcases/ directory
- Handle both Unix and Windows path separators
- Use Unix line endings consistently in test output
- Update all test expectation files to use normalized paths

This ensures tests pass consistently across different environments including
Windows, macOS, Linux, and CI systems.

* Remove stale comment

* Handle errors returned from validation

* Restore variadic argument to Emit (fix bad rebase)

* Event emitters return a boolean

* Don't use `EmitEvent` in docs

Supposedly it's for internal use, according to comment

* Fix event docs (from rebase)

* Ensure all templates specify @wailsio/runtime: "latest"

* Fix Windows test failure due to CRLF line endings

The test was failing on Windows because:
1. Hardcoded "\n" was being used instead of render.Newline when writing
   warning logs, causing CRLF vs LF mismatch
2. The render package import was missing
3. .got.log files weren't being skipped when building expected file list

Changes:
- Add render package import
- Use render.Newline instead of hardcoded "\n" for cross-platform compatibility
- Skip .got.log files in test file walker

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

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

* Fix template tests by using local runtime package

The template tests were failing because they were installing @wailsio/runtime@latest from npm, which doesn't have the new vite plugin yet. This change packs the local runtime and uses it in template tests instead.

Changes:
- Pack the runtime to a tarball in test_js job
- Upload the runtime package as an artifact
- Download and install the local runtime in template tests before building
- Update cleanup job to delete the runtime package artifact

* Apply suggestion from @leaanthony

* Fix: Install local runtime in frontend directory with correct path

The previous fix wasn't working because:
1. npm install was run in the project root, not in frontend/
2. wails3 build runs npm install again, which would reinstall from npm

Fixed by:
- Using npm pkg set to modify package.json to use file:// protocol
- This ensures subsequent npm install calls use the local tarball

* Fix Vue template syntax conflicts with Go template delimiters

The Vue templates were converted to .tmpl files to support dynamic module
paths, but Vue's template syntax {{ }} conflicts with Go's template syntax.

Fixed by escaping Vue template braces:
- {{ becomes {{"{{"}}
- }} becomes {{"}}"}}

This allows the Go template engine to output the literal {{ }} for Vue to process.

* Fix Vue template escaping and Windows shell compatibility

Two issues fixed:

1. Vue template escaping: Changed from {{"{{"}} to {{ "{{" }}
   - The previous syntax caused "missing value for command" error
   - Correct Go template syntax uses spaces between delimiters and strings

2. Windows PowerShell compatibility: Added 'shell: bash' to template generation step
   - The bash syntax (ls, head, $()) doesn't work in PowerShell
   - Git Bash is available on all GitHub runners including Windows

* Fix: test_templates depends on test_js for runtime package artifact

The runtime-package artifact is created in test_js job, not test_go.
Added test_js to the needs array so the artifact is available for download.

* Fix Windows path compatibility for runtime package artifact

Changed from absolute Unix path '/tmp/wails-runtime' to relative path
'wails-runtime-temp' which works cross-platform. Using realpath to
convert to absolute path for file:// URL in npm pkg set command.

* Fix realpath issue on Windows for runtime package

realpath on Windows Git Bash was producing malformed paths with duplicate
drive letters (D:\d\a\...). Replaced with portable solution using pwd
that works correctly across all platforms.

* Use pwd -W on Windows to get native Windows paths

Git Bash's pwd returns Unix-style paths (/d/a/wails/wails) which npm
then incorrectly resolves as D:/d/a/wails/wails. Using pwd -W returns
native Windows paths (D:\a\wails\wails) that npm can handle correctly.

This is the root cause of all the Windows path issues.

* Improve typechecking for Events.Emit()

* [docs] Clarify where `Events` is imported from in each example

* Add docs for runtime Events.Emit()

* Revert to v2-style Events.Emit (name, data)

* Update changelog

---------

Co-authored-by: Fabio Massaioli <fabio.massaioli@gmail.com>
Co-authored-by: Atterpac <Capretta.Michael@gmail.com>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-11 20:25:57 +11:00
github-actions[bot]
6e4e340ade chore(v3): bump to v3.0.0-alpha.38 and update changelog [skip ci] 2025-11-04 02:38:30 +00:00
github-actions[bot]
8ac5984dfd chore(v3): bump to v3.0.0-alpha.37 and update changelog [skip ci] 2025-11-02 02:39:44 +00:00
github-actions[bot]
57d55643bc chore(v3): bump to v3.0.0-alpha.36 and update changelog [skip ci] 2025-10-15 02:36:28 +00:00
github-actions[bot]
8cd89fc5ef chore(v3): bump to v3.0.0-alpha.35 and update changelog [skip ci] 2025-10-14 02:34:13 +00:00
github-actions[bot]
ca594c5919 chore(v3): bump to v3.0.0-alpha.34 and update changelog [skip ci] 2025-10-06 02:34:59 +00:00
github-actions[bot]
e2c95ba292 chore(v3): bump to v3.0.0-alpha.33 and update changelog [skip ci] 2025-10-04 02:28:46 +00:00
github-actions[bot]
f5fa1158dc chore(v3): bump to v3.0.0-alpha.32 and update changelog [skip ci] 2025-10-02 02:32:29 +00:00
rxliuli
6023f8ba5b
docs(v3): fixed notifications pkg path (#4617)
* docs(v3): fixed notifications pkg path

* chore(v3): update changelog

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2025-10-02 12:29:51 +10:00
github-actions[bot]
cbf70499c3 chore(v3): bump to v3.0.0-alpha.31 and update changelog [skip ci] 2025-09-27 02:30:33 +00:00
github-actions[bot]
966e3d5fbc chore(v3): bump to v3.0.0-alpha.30 and update changelog [skip ci] 2025-09-26 02:33:55 +00:00
Lea Anthony
91ee276115 Move to d2 diagrams in docs 2025-09-25 14:02:19 +10:00
Lea Anthony
bfd7a6279c chore(v3): bump to v3.0.0-alpha.29 and update changelog [skip ci] 2025-09-25 13:57:32 +10:00
Zach Botterman
ff6a333621
[v3] macOS Dock Service (#4451)
* dock service

* add docs and update comments

* remove unneeded doc imports

* update comment

* update comment

* update comment

* update changelog

* consolidate to dock service

* update examples + thread safety

* fix linux

* update docs

* thread safety

* Update v3/pkg/services/dock/dock_darwin.go

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

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-09-24 07:30:02 +00:00
Lea Anthony
f7326d8fef v3.0.0-alpha.27 2025-09-07 14:06:08 +10:00
Etesam
91f4906908
[v3] Liquid glass redefinition error (#4542)
* Fixed issue with redefinition of NSGlassEffectViewStyle

* Added entry to changelog

* Updated enum names

* Fix docs

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2025-08-30 11:57:21 +10:00
github-actions[bot]
043c4a0d94 v3.0.0-alpha.26 2025-08-24 02:40:05 +00:00
github-actions[bot]
8115b88a71 v3.0.0-alpha.25 2025-08-16 02:37:32 +00:00
github-actions[bot]
47af2d2d48 v3.0.0-alpha.24 2025-08-13 02:39:39 +00:00
Aldrich Asuncion
b7414a4303
[v3] Fix SetBackgroundColour on Windows (#4492)
* Fix SetBackgroundColour on Windows

Update Chromium window color on calls to SetBackgroundColour.

* update changelog

* v3.0.0-alpha.23

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-08-12 20:45:24 +10:00
github-actions[bot]
fdff7e7b21 v3.0.0-alpha.22 2025-08-10 02:50:53 +00:00
Lea Anthony
bf805b4152
Update CLI to pass through variables (#4488)
* feat: Update CLI to pass parameters through to Task commands

- Modified build and package commands to accept otherArgs parameter
- Updated task wrapper to forward CLI variables to Task
- Enhanced task.go to properly parse and handle CLI variables (KEY=VALUE format)
- Fixes issue where 'wails3 build' and 'wails3 package' commands weren't forwarding parameters

Fixes #4422

* Update changelog

* Apply suggestion from @coderabbitai[bot]

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

* Fix cli.mdx

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-08-09 21:44:30 +10:00
Lea Anthony
3f11d4e3fa
feat: Add Content Protection for Windows and macOS (#4485)
* feat: Add Content Protection for Windows and macOS

- Prevents window contents from being captured by screen recording/sharing software
- Windows: Uses WDA_EXCLUDEFROMCAPTURE on Windows 10 2004+, falls back to WDA_MONITOR
- macOS: Uses NSWindowSharingType to set window as read-only for screen sharing
- Added ContentProtectionEnabled option to WebviewWindowOptions
- Added SetContentProtection() method for runtime control
- Added comprehensive documentation and example usage

* fix changelog.mdx

* Misc fixes

* Misc fixes

* Update v3/pkg/w32/user32.go

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

* Remove debug line

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-08-09 17:12:39 +10:00
github-actions[bot]
1a03404983 v3.0.0-alpha.21 2025-08-07 02:49:31 +00:00
github-actions[bot]
69929c2c37 v3.0.0-alpha.20 2025-08-06 02:49:12 +00:00
Yules
c02ba8f5d6
[v3] update docs to reflect changes from Manager API Refactoring (#4476)
* (docs) installation.mdx: update required Go version to 1.24

* (docs) update for Manager API Refactoring https://github.com/wailsapp/wails/pull/4359

* add entry in UNRELEASED_CHANGELOG.md to satisfy github actions

* thx coderabbitai

* thx coderabbitai
2025-08-05 23:59:45 +10:00
github-actions[bot]
1cf9042063 v3.0.0-alpha.19 2025-08-05 02:50:29 +00:00
Atterpac
10447e6fcd
[V3] Drag-n-Drop Zones and improvements (#4318)
* new events

* macOS dnd improvements

* wailsio adds for dropzone

* update example

* sorta working

the top 300px of the window are not dropabble for some reason i suspect it has to do with the drag enter/drag leave xy as the performOperation needed to use the ContentView for appropriate X/Y

* implement attribute detection for data-wails-dropzone

* docs

* pass x/y dnd linux

* cleanup exmample

* changelog

* pass all attributes to golang on dragdrop

* filetree example

* fix dnd build windows

* Fix windows dnd

* update docs

* remove debug log

* appease the security bot

* Fix changelog

* Fix changelog

* Revert "Fix event generation issues."

This reverts commit ae4ed4fe

* Fix events

* Fix merge conflicts. Fix events generation formatting

* Update docs

* Fix duplicate bundledassets import causing build failures

Remove duplicate import of bundledassets package that was causing
compilation errors in PR #4318. The import was declared twice in
the same import block, causing "bundledassets redeclared" errors.

Fixes build issues in GitHub Actions for drag-and-drop zones feature.

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

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

* Replace fmt.Printf debug statements with globalApplication.debug

Replace all fmt.Printf debug logging statements in drag-and-drop
functionality with proper globalApplication.debug calls. This provides:

- Consistent logging with the rest of the application
- Proper key-value structured logging
- Better integration with the application's logging system
- Cleaner debug output format

Changes:
- application_darwin.go: Replace 2 fmt.Printf calls
- webview_window.go: Replace 6 fmt.Printf calls
- webview_window_windows.go: Replace 13 fmt.Printf calls
- Remove unused fmt import from application_darwin.go

All debug messages maintain the same information but now use
structured logging with key-value pairs instead of printf formatting.

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

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

* Add nil checks to WindowEventContext methods

Ensure all WindowEventContext methods properly handle nil c.data
by initializing the map when it's nil. This prevents panics when
methods are called on contexts that haven't been properly initialized.

Changes:
- DroppedFiles(): Add nil check and map initialization
- setCoordinates(): Add nil check and map initialization
- setDropZoneDetails(): Add nil check and map initialization
- DropZoneDetails(): Add nil check and map initialization

All methods now follow the same pattern as setDroppedFiles()
where a nil data map is automatically initialized to prevent
runtime panics during drag-and-drop operations.

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

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

* Update v3/pkg/application/webview_window_darwin.m

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

* reinstate events docs.

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-08-04 20:40:19 +10:00
github-actions[bot]
1227f140b7 v3.0.0-alpha.18 2025-08-03 02:53:39 +00:00
Lea Anthony
55277fd695
feature: V3 alpha feature/snapassist support (#4463)
* initial implementation

* Push missed files

* linux fix

* Update changelog, runtime and docs.
2025-08-02 16:59:49 +10:00
TDF
6539c80ba2
Add goModTidy function to clean up Go module dependencies during inst… (#4286)
* Add goModTidy function to clean up Go module dependencies during installation (#4283)

* Add goModTidy function and update changelog for automatic execution after wails init (#4283)

* Update CLI documentation to clarify bypassing 'go mod tidy' during project initialization (#4283)

* Add -skipgomodtidy flag to CLI and update installation logic to conditionally run go mod tidy

* Update CLI documentation to reflect default value of -skipgomodtidy flag and clean up code (#4283)

* Update docs/src/content/docs/guides/cli.mdx

* fix changelog

---------

Co-authored-by: Triadmoko  Denny Fatrosa <triadmoko.fatrosa@codemi.co.id>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2025-08-02 15:51:30 +10:00
github-actions[bot]
afcdb15503 v3.0.0-alpha.17 2025-07-31 02:48:09 +00:00
github-actions[bot]
09e71d82b5 v3.0.0-alpha.16 2025-07-25 22:17:30 +00:00
github-actions[bot]
7bd1b4911c 🤖 Automated nightly release v3.0.0-alpha.15
Generated with [Claude Code](https://claude.ai/code)

    Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-25 11:47:24 +00:00
ALMAS
33a9c05213
[V3] feat: add Windows getAccentColor implementation (#4427)
* [V3] feat: add Windows getAccentColor implementation

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2025-07-25 21:46:05 +10:00
Lea Anthony
9d6e6232d6
v3.0.0-alpha.14 2025-07-25 19:36:50 +10:00
Lea Anthony
cc5b46cba1
Merge branch 'v3-alpha' into v3/deeplink 2025-07-22 21:46:04 +10:00