wails/v3/examples
Lea Anthony 41ba4e7d11
feat(linux): generate .desktop file during build (#4575) (#4780)
* ## Summary

I've implemented the fix for issue #4575. Here's what was changed:

### Changes Made

**File: `v3/internal/commands/build_assets/linux/Taskfile.yml`**

1. Added `generate:dotdesktop` as a dependency to `build:native` task (line 45)
2. Added `generate:dotdesktop` as a dependency to `build:docker` task (line 63)

This ensures that the `.desktop` file is generated during every Linux build (both native and Docker-based), not just during packaging operations.

### How it works

- When running `wails build` or `wails dev` on Linux, the build process now automatically generates a `.desktop` file at `build/linux/<app-name>.desktop`
- The `.desktop` file contains:
  - Application name
  - Executable path
  - Icon reference
  - Categories (defaulting to "Development")
- This allows Linux desktop environments to properly display the application icon and metadata even during development

### Testing

To test the changes:
1. Create a new Wails v3 project: `wails3 init -n testapp`
2. Build it: `cd testapp && wails3 build`
3. Verify the `.desktop` file exists: `cat build/linux/testapp.desktop`

Would you like me to run a test or make any additional changes?

* feat(linux): generate .desktop file during build (#4575)

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

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-13 12:22:59 +11:00
..
android feat(linux): generate .desktop file during build (#4575) (#4780) 2025-12-13 12:22:59 +11:00
badge [v3] Typed Events, revisited (#4633) 2025-11-11 20:25:57 +11:00
badge-custom [v3] Typed Events, revisited (#4633) 2025-11-11 20:25:57 +11:00
binding Refactor Manager API to use singular naming convention (#4367) 2025-06-22 12:19:14 +10:00
build Refactor to using Window interface (#4471) 2025-08-09 15:28:08 +10:00
cancel-async Refactor Manager API to use singular naming convention (#4367) 2025-06-22 12:19:14 +10:00
cancel-chaining Refactor Manager API to use singular naming convention (#4367) 2025-06-22 12:19:14 +10:00
clipboard Refactor Manager API to use singular naming convention (#4367) 2025-06-22 12:19:14 +10:00
contextmenus Refactor Manager API to use singular naming convention (#4367) 2025-06-22 12:19:14 +10:00
custom-protocol-example [v3] Typed Events, revisited (#4633) 2025-11-11 20:25:57 +11:00
dev feat(linux): generate .desktop file during build (#4575) (#4780) 2025-12-13 12:22:59 +11:00
dialogs Refactor Manager API to use singular naming convention (#4367) 2025-06-22 12:19:14 +10:00
dialogs-basic Refactor Manager API to use singular naming convention (#4367) 2025-06-22 12:19:14 +10:00
dock [v3] macOS Dock Service (#4451) 2025-09-24 07:30:02 +00:00
drag-n-drop [V3] Drag-n-Drop Zones and improvements (#4318) 2025-08-04 20:40:19 +10:00
environment Refactor Manager API to use singular naming convention (#4367) 2025-06-22 12:19:14 +10:00
events Refactor Manager API to use singular naming convention (#4367) 2025-06-22 12:19:14 +10:00
events-bug Refactor to using Window interface (#4471) 2025-08-09 15:28:08 +10:00
file-association feat(linux): generate .desktop file during build (#4575) (#4780) 2025-12-13 12:22:59 +11:00
frameless window.ToggleFrameless() api (#4317) 2025-07-15 22:53:21 +10:00
gin-example feat(linux): generate .desktop file during build (#4575) (#4780) 2025-12-13 12:22:59 +11:00
gin-routing feat(linux): generate .desktop file during build (#4575) (#4780) 2025-12-13 12:22:59 +11:00
gin-service feat(linux): generate .desktop file during build (#4575) (#4780) 2025-12-13 12:22:59 +11:00
hide-window Refactor Manager API to use singular naming convention (#4367) 2025-06-22 12:19:14 +10:00
html-dnd-api Refactor Manager API to use singular naming convention (#4367) 2025-06-22 12:19:14 +10:00
ignore-mouse Refactor Manager API to use singular naming convention (#4367) 2025-06-22 12:19:14 +10:00
ios feat(linux): generate .desktop file during build (#4575) (#4780) 2025-12-13 12:22:59 +11:00
ios-poc Merge iOS support from v3-alpha-feature/ios-support 2025-12-10 18:34:21 +11:00
keybindings Refactor to using Window interface (#4471) 2025-08-09 15:28:08 +10:00
liquid-glass Add native Liquid Glass effect support for macOS (#4534) 2025-08-24 07:16:19 +10:00
menu [V3 Alpha] Improves macOS Window menu support (#4588) 2025-09-25 13:30:59 +10:00
notifications feat(linux): generate .desktop file during build (#4575) (#4780) 2025-12-13 12:22:59 +11:00
panic-handling Refactor Manager API to use singular naming convention (#4367) 2025-06-22 12:19:14 +10:00
plain Refactor Manager API to use singular naming convention (#4367) 2025-06-22 12:19:14 +10:00
raw-message [V3] Add origin to raw message handler (#4710) 2025-12-08 20:29:09 +11:00
screen Refactor Manager API to use singular naming convention (#4367) 2025-06-22 12:19:14 +10:00
services Refactor Manager API to use singular naming convention (#4367) 2025-06-22 12:19:14 +10:00
show-macos-toolbar Refactor Manager API to use singular naming convention (#4367) 2025-06-22 12:19:14 +10:00
single-instance Refactor Manager API to use singular naming convention (#4367) 2025-06-22 12:19:14 +10:00
systray-basic Refactor to using Window interface (#4471) 2025-08-09 15:28:08 +10:00
systray-clock [v3 alpha] windows tray minor refactor (#4653) 2025-11-04 07:44:58 +11:00
systray-custom Refactor Manager API to use singular naming convention (#4367) 2025-06-22 12:19:14 +10:00
systray-menu Refactor to using Window interface (#4471) 2025-08-09 15:28:08 +10:00
video Refactor Manager API to use singular naming convention (#4367) 2025-06-22 12:19:14 +10:00
websocket-transport [V3] Refactor binding transport layer (#4702) 2025-12-07 22:19:12 +11:00
window feat: Add Content Protection for Windows and macOS (#4485) 2025-08-09 17:12:39 +10:00
window-api Refactor Manager API to use singular naming convention (#4367) 2025-06-22 12:19:14 +10:00
window-call Refactor Manager API to use singular naming convention (#4367) 2025-06-22 12:19:14 +10:00
window-menu Refactor to using Window interface (#4471) 2025-08-09 15:28:08 +10:00
wml Refactor Manager API to use singular naming convention (#4367) 2025-06-22 12:19:14 +10:00
linux_status.org add linux status for examples 2023-11-06 10:49:14 -06:00
README.md Improve documentation 2023-12-13 22:40:35 +11:00

v3

NOTE: The examples in this directory may or may not compile / run at any given time during alpha development.

Running the examples

cd v3/examples/<example>
go mod tidy
go run .

Compiling the examples

cd v3/examples/<example>
go mod tidy
go build
./<example>