icons, bundle: Linux hicolor PNG, Windows .rc icon, macOS amulegui.app - #464
Merged
Merged
Conversation
Linux, Windows and macOS aMule builds were each missing a piece of the application-icon story: * **Linux**: amule.png existed in the repo but was never installed, so the GTK/KDE/Wayland desktop menu, taskbar and panel couldn't resolve `Icon=amule` from amule.desktop and fell back to a generic icon. * **Windows**: amule.rc already declared `amule ICON "amule.ico"` but was not referenced from CMakeLists, so windres never embedded the icon into the .exe. Explorer file icon, window title bar and taskbar all showed Windows' default icon. * **macOS**: the monolithic aMule target is a .app bundle with amule.icns, but amulegui (remote-control GUI) was built as a bare executable with no bundle. Launching it gave no Dock icon, no proper menu bar and macOS treated it like a CLI tool. Fixes: 1. Install amule.png into $(datadir)/icons/hicolor/128x128/apps for BUILD_MONOLITHIC, on both CMake and autotools. The legacy XPM at $(datadir)/pixmaps stays as a fallback. 2. Pull src/amule.rc into target_sources of every WIN32 executable alongside version.rc, so windres embeds the .ico. SetIcon(wxICON(aMule)) in src/amuleDlg.cpp:216 now also resolves on Windows (it was already working on GTK via src/aMule.xpm). 3. Give amulegui the same APPLE block that the monolithic aMule has: MACOSX_BUNDLE, amule.icns copied into Contents/Resources, ATS opt-out via plutil POST_BUILD, install(BUNDLE DESTINATION .). Produces aMuleGUI.app with its own Dock/menu/lifecycle identity (bundle ID org.amule.aMuleGUI). PR amule-project#337 proposed the hicolor install for Linux but this is softer (keeps the XPM fallback) and also handles the Windows and macOS amulegui gaps, which PR amule-project#337 did not touch.
Contributor
Author
|
@mrjimenez probably can close #337 |
Closed
This was referenced Apr 23, 2026
ngosang
pushed a commit
to ngosang/amule
that referenced
this pull request
Jul 13, 2026
…-project#417) (amule-project#464) EC_TAG_KNOWNFILE_FILENAME is overloaded: the ".part" control-file basename while a file is downloading, but the completed file's on-disk directory once it finishes. amuleapi funnelled both into a single snapshot field, so across the completed-but-not-cleared transition: * GET /downloads/{hash} `met_file` returned a directory path instead of the ".part" basename; * GET /shared/{hash} `path` stayed "[PartFile]" even though a real destination directory had become available; * GET /downloads/{hash} exposed no `path` field at all. Add a dedicated EC_TAG_KNOWNFILE_PATH carrying the on-disk directory (the Temp dir while downloading, the destination dir once completed) — always a directory, never the basename. The legacy _FILENAME tag is left untouched, so amulecmd and amulegui are unaffected. Split the snapshot into part_met_basename + on_disk_dir and derive: * met_file = part_met_basename, empty once the download completes * path = on_disk_dir (new on /downloads; on /shared now gated on an incomplete partfile, not merely is_downloading) Regenerates ECCodes.h from the abstract. Updates RefresherTest, the 04 curl read test, and docs/api/REFERENCE.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the application icon on Linux and Windows (both
amuleandamulegui), and bundlesamuleguias a proper.appon macOS:amule.pnginto the XDG hicolor theme, addStartupWMClasstoamule.desktop, and share the icon withamulegui.desktop.src/amule.rc(which already declaredamule ICON "amule.ico") into the CMake build of the two GUI targets, sowindresembeds the icon intoamule.exe/amulegui.exe.amuleguithe sameMACOSX_BUNDLEsetup the monolithicamulealready has, producingaMuleGUI.appwith the same.icns, plus the same ATS opt-out.5 files changed, ~60 lines. Nothing in runtime code paths — only CMakeLists.txt / Makefile.am install rules, two
.desktopentries, and one.rcfile added totarget_sources.PR #337 proposed the Linux hicolor install but is narrower: it deletes
amule.xpmand dropsSetIcon(wxICON(aMule)). This PR is softer (keeps the XPM fallback and the in-codeSetIcon) and additionally handles Windows and the macOS amulegui.Before / after per platform
Linux (GTK 3 / GNOME / KDE)
Before: GNOME Shell's activity switcher / taskbar showed the generic cogwheel because:
amule.pngwas in the repo but never installed anywhere.amule.desktophad noStartupWMClass, so GNOME couldn't match the running window (WM_CLASS=amule) to the.desktopfile.amulegui.desktopreferenced anIcon=amuleguithat had no corresponding PNG anywhere on disk.After:
amule.pnglands at/usr/share/icons/hicolor/128x128/apps/amule.pngfor both CMake and autotoolsmake install.StartupWMClass=amule(lowercase — GTK derivesWM_CLASSfrom the binary name viag_get_prgname(), which is the argv[0] basename, notwxApp::SetAppName()).amulegui.desktopnow alsoIcon=amule, sharing the same visual identity (same choice we already made on macOS where bothamuleandamuleguiuseamule.icns).The title-bar icon (via
SetIcon(wxICON(aMule))readingsrc/aMule.xpmat compile time) is unchanged — still works regardless of install.Windows (MinGW / MSYS2, both x86_64 and ARM64)
Before:
src/amule.rcexisted withamule ICON "amule.ico"but was never referenced from CMakeLists.txt, sowindresnever compiled it into any.exe. The result: generic Windows icon in Explorer, in the title bar, and in the taskbar.After:
src/amule.rcis added totarget_sourcesalongsideversion.rcfor the two GUI executables (amule,amulegui). The.icois now embedded in a.rsrcsection (exes grow from 13 sections to 14).SetIcon(wxICON(aMule))atsrc/amuleDlg.cpp:216now also resolves on Windows (was already working on GTK viasrc/aMule.xpm).The three console targets (
amuled,amulecmd,ed2k) are intentionally left at justversion.rc— they don't link wxWidgets GUI, so includingamule.rc(which#include <wx/msw/wx.rc>) would fail at windres time with "wx/msw/wx.rcfile not found".macOS (wx 3.2+ on Homebrew)
Before:
amulewas already a proper.appbundle withamule.icnsinContents/Resources, butamuleguiwas built as a bare executable — no Dock icon, no proper menu bar, macOS treated it like a CLI tool.After:
amuleguigets the sameAPPLEblock the monolithic target has:MACOSX_BUNDLE TRUE+MACOSX_BUNDLE_*metadata, identifierorg.amule.aMuleGUI, bundle nameaMuleGUI.amule.icnscopied intoaMuleGUI.app/Contents/ResourcesviaMACOSX_PACKAGE_LOCATION.plutil -replace NSAppTransportSecurityPOST_BUILDcommand (amulegui uses the sameCHTTPDownloadThread/wxWebRequestpath, so ATS opt-out applies equally).install(BUNDLE DESTINATION .)socmake --installrelocates the whole.appcorrectly.Build / install instructions, with working icons
The PR's install rules put every icon asset in a standard XDG / bundle location. The
.desktopfiles'Exec=amule %u/Exec=amuleguiare relative, so they only work whenamule{gui}is onPATH. The recipes below follow that contract.Linux (Ubuntu / Debian / Fedora / Arch / openSUSE)
Most common: system-wide install to
/usr/local./usr/local/binis onPATHby default on every mainstream distro, soExec=amule %uresolves.StartupWMClass=amulematches the running window and GNOME resolvesIcon=amuleagainst/usr/local/share/icons/hicolor/128x128/apps/amule.png.User-level (no sudo) install to
~/.local: works the same, with one caveat — on Ubuntu with GDM,~/.local/binis not in the graphical session'sPATHby default, which tripsGio.DesktopAppInfo'sExec=validation and hides the.desktopfrom GNOME Shell. Add it before logging in:systemctl --user set-environment PATH="$HOME/.local/bin:$PATH"Or use an absolute
Exec=path in the installed.desktopif you just want to iterate locally.macOS (Homebrew, wx 3.2+)
Monolithic GUI:
Both
aMule.appandaMuleGUI.appnow carryamule.icnsinContents/Resources, the same Dock icon, and the same ATS opt-out inInfo.plist.Windows (MSYS2 MINGW64 x86_64 or CLANGARM64 ARM64)
The icon embeds at build time. Configure + build + install produces a self-contained portable tree:
File Explorer, window title bar and taskbar now show the amule icon directly from the
.exeresource section. The.icoresolution is fully local to the.exe— no additional install step, no registry tweaks.Diff
No source changes, no ABI / runtime behaviour changes.
Risk / compatibility
amule.xpminstall under$(datadir)/pixmapsis kept — pure addition of the hicolor PNG. Packagers who already pullamule.pngthemselves (e.g. from their own packaging) keep working.amuled,amulecmd,ed2k) intentionally do not getamule.rc— they would fail to compile it because they don't link wx (andamule.rcincludes<wx/msw/wx.rc>). Only GUI executables get the icon, which matches the intent.amuleguias a.appchanges theinstalloutput shape. The autotools path on macOS was never fully wired anyway, so in practice only users on the CMake path see the change — they gain a proper bundle.