Skip to content

V3-alpha-bugfix/linux-appimage-taskfile-broken#4641

Closed
jaideepheer wants to merge 1 commit into
wailsapp:v3-alphafrom
jaideepheer:v3-alpha-bugfix/linux-appimage-taskfile-broken
Closed

V3-alpha-bugfix/linux-appimage-taskfile-broken#4641
jaideepheer wants to merge 1 commit into
wailsapp:v3-alphafrom
jaideepheer:v3-alpha-bugfix/linux-appimage-taskfile-broken

Conversation

@jaideepheer

@jaideepheer jaideepheer commented Oct 11, 2025

Copy link
Copy Markdown

Description

This PR fixes an AppImage build failure caused by an icon filename mismatch between the desktop file specification and the actual icon file in the AppDir.

Root Cause: The desktop file (app.desktop) specifies Icon=app, but the AppDir contains appicon.png -> .DirIcon (symlink). The linuxdeploy appimage plugin validates the Icon= field and fails when it cannot find app.png, app.svg, or app.xpm in the AppDir root.

The Fix: Aligns the icon variable in the Taskfile's generate:dotdesktop task to match the icon filename created by the create:appimage task, ensuring both use appicon as the base name.

Configuration Chain:

  • Taskfile (build/linux/Taskfile.yml line 113): ICON: '{{.APP_NAME}}' → Desktop file gets Icon=app
  • Taskfile (build/linux/Taskfile.yml line 55): ICON: '../../appicon.png' → Path used for symlink
  • Wails3 Code (appimage.go line 101): filepath.Base("../../appicon.png") = "appicon.png" → Creates appicon.png -> .DirIcon

This mismatch causes linuxdeploy to fail when searching for the icon referenced in the desktop file.

Fixes #4642

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Test Environment: Linux (Ubuntu/Fedora-based distribution)

Pre-Fix Testing:

  1. Executed linuxdeploy manually with debug output to capture raw error
  2. Verified AppDir file structure showing appicon.png symlink exists but app.png is missing
  3. Confirmed desktop file contains Icon=app while actual file is appicon.png
  4. Reproduced 100% failure rate on AppImage packaging

Post-Fix Testing:

  1. Modified Taskfile to align icon variables (ICON: 'appicon' in both tasks)
  2. Rebuilt AppImage using wails3 package --platform linux/amd64 --target appimage
  3. Verified linuxdeploy succeeds with exit code 0
  4. Confirmed AppImage file created successfully (~124MB)
  5. Tested AppImage launches correctly

Additional Validation:

  • Verified DEB, RPM, and AUR packaging still work (not affected by this change)

  • Confirmed binary build works

  • Tested with custom app names to ensure fix works generically

  • Windows

  • macOS

  • Linux

Linux Distro: Fedora/Ubuntu-based (development environment uses Fedora based on user profile)

Test Configuration

System: Linux (Fedora-based)
Go Version: 1.22+
Wails Version: v3.0.0-alpha.34
Node Version: Latest LTS
Architecture: x86_64
Desktop Environment: Wayland/X11

Note: Full wails doctor output can be provided upon request

Checklist:

  • I have updated website/src/pages/changelog.mdx with details of this PR
  • My code follows the general coding style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@coderabbitai

coderabbitai Bot commented Oct 11, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Updated the generate:dotdesktop task in v3/internal/commands/build_assets/linux/Taskfile.yml, changing the ICON variable from '{{.APP_NAME}}' to 'appicon'. No other task variables or flow were modified.

Changes

Cohort / File(s) Summary of Changes
Linux build assets Taskfile
v3/internal/commands/build_assets/linux/Taskfile.yml
In generate:dotdesktop, ICON changed from '{{.APP_NAME}}' to 'appicon'.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Suggested labels

Bug, Linux, v3-alpha, size:XS

Poem

A hop and a bop in the build’s cool den,
I swap an icon, then hop back again.
From {{.APP_NAME}} to appicon I glide—
carrots aligned, configs tidied with pride.
Thump-thump, done—ship it, my friend! 🥕🐇

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The current title reads like a branch name rather than a concise summary of the change and it does not clearly convey what was fixed or why, making it harder for reviewers to understand the purpose at a glance. Please update the title to a clear, single sentence that describes the primary change such as “Fix Linux AppImage Taskfile icon mismatch for desktop entry.”
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Description Check ✅ Passed The pull request description adheres to the repository template by including a clear summary of changes, issue reference (Fixes #4642), change type selection, detailed testing steps for Linux, and test configuration. It uses the required section headings (# Description, ## Type of change, # How Has This Been Tested?, ## Test Configuration, # Checklist) and provides root cause analysis and context. All required template elements are present and sufficiently detailed, and the checklist section is included.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud

Copy link
Copy Markdown

@COD3HUNT3R

Copy link
Copy Markdown
Contributor

related #4477
Will break all linux packaging again except appimage?

@COD3HUNT3R

Copy link
Copy Markdown
Contributor

Can you modify line 50 and 55 {{.APP_NAME}}.png and check if that works?

@leaanthony

Copy link
Copy Markdown
Member

Thanks for opening this 🙏 I think using the dynamic naming option in #4644 is preferable so closing this in favour of that. Thanks again 🙏

@leaanthony leaanthony closed this Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants