TGCocoa::SetIconPixmap()/SetClassHints() are no-ops on macOS, so the xpm
mupp_plot set on its TRootCanvas only ever applied on X11 - the Dock/window
icon stayed the generic ROOT one on macOS. Use the same Cocoa helper
(PMacDockIcon.mm's SetMacDockIcon()) already used by musrview/musrFT/musrt0
to set the Dock icon from a compiled-in PNG.
The new icon's tile shape and background were measured off
src/classes/icons/musrview-512.png and matched: a rounded-square tile with
~22% corner radius and a vertical light-to-medium blue gradient background,
instead of the previous plain white tile with a gray border.
Also:
- compile PMacDockIcon.mm into mupp_plot on Darwin and link Cocoa, mirroring
src/classes/CMakeLists.txt
- fix MUSRFIT_XDG_DATA_DIR -> MUSRFIT_XDG_DATADIR in the Linux install rules
(the former is not a defined variable, so install() was resolving to
absolute paths at the filesystem root)
- install a 512x512 icon on Linux too (hicolor/512x512/apps), matching
musrview, and list it in the rpm spec
Done for both the Qt6 and Qt5 plotter.
Like musrFT and musrt0: set a compiled-in xpm icon (rendered from
mupp-plain.svg) and the class hint "mupp_plot" on the TRootCanvas, and on
Linux install a matching .desktop file and 48x48 icon to MUSRFIT_XDG_DATA_DIR,
refreshing an existing gtk icon cache. Done for the Qt6 and Qt5 plotter.
Port of adc991f72 (root6). The ROOT canvas sets the macro_s.xpm icon and
WM_CLASS "ROOT". Set a compiled-in xpm icon and a per-tool class hint, and
install matching .desktop files (with full Exec path) and icons to
MUSRFIT_XDG_DATA_DIR. An existing gtk icon cache is refreshed at install time.
musrview was already handled on this branch.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the usual install prefix ($ROOTSYS) the .desktop files and icons ended
up in $ROOTSYS/share, which is neither in $XDG_DATA_HOME nor $XDG_DATA_DIRS.
They now go to MUSRFIT_XDG_DATA_DIR, defaulting to the system share dir for
/usr and /usr/local prefixes and to $XDG_DATA_HOME (~/.local/share) otherwise.
The .desktop files are configured from templates so that Exec= holds the full
path of the binary, since $ROOTSYS/bin is typically not on the PATH of the
graphical session.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
musrview is a plain executable, hence on macOS it showed up with the generic
'exec' icon. The QApplication behind the embedded display is created by ROOT,
musrview now sets its name and icon after the first window is shown (needs
Qt6::Widgets, the same Qt ROOT's qt6web links against).
- new application icon src/musrview_web/musrview.svg/.png, installed next to
musrview.html and found the same way (PMusrWebCanvas::WebDir())
- macOS: an Info.plist embedded into the binary gives name and bundle id
- Linux: musrview.desktop plus hicolor icons, and setDesktopFileName() so that
Wayland compositors can match the window to its icon
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
check_cxx_source_compiles() caches MUSRVIEW_HAS_ROOT7_API under a plain
variable name with no dependency tracking, so a failure recorded once
(e.g. against an older ROOT built into the same build/ directory) kept
being reported as missing on every later reconfigure even after ROOT was
fine. Unset both cache entries before the check so it always re-runs.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Since musrview is built on the ROOT7 web graphics it needs a fair number of
ROOT build options which are not all on by default. Without them musrview
either does not compile at all or, worse, compiles and then shows a blank
window at run time. The only check so far was for the ROOT::ROOTWebDisplay
target.
The new cmake/MusrfitCheckROOT7.cmake collects all problems and reports them
in one go, together with the ROOT cmake flags needed to fix them:
- the ROOT build options root7, webgui and http (ROOT_<option>_FOUND),
- the libraries ROOT::ROOTWebDisplay and ROOT::RHTTP,
- the headers ROOT/RWebWindow.hxx and ROOT/RWebWindowsManager.hxx,
- the API itself, through a compile-only check of the calls musrview and
PMusrWebCanvas make. If that fails it is retried in the ROOT::Experimental
namespace, which tells the user that the ROOT is older than 6.32 instead of
leaving them with a compiler error,
- JSROOT: the js directory (overridable with -DMUSRVIEW_JSROOT_DIR=<dir>), the
modules musrview.html imports and the '<!--jsroot_importmap-->' support of
THttpServer which resolves the 'jsroot/...' specifiers.
Not fatal, but warned about and shown in the config summary:
- MUSRVIEW_HAS_QT6WEB: without ROOT's qt6web musrview falls back from its
embedded window to the standard browser of the system,
- MUSRVIEW_HAS_IMAGE_EXPORT: without libASImage 'musrview --png/--gif/--jpg'
writes nothing. In that case the musrview_check tests, which compare
rendered PNGs, are no longer registered - they could then only fail for a
reason that has nothing to do with musrfit.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Ck7v5F7KjinfC2EyE7K3C
add post (un)install scripts to musrfit cpack. Currently for rpm only. Furthermore a minimal required root version is added. Will need to see if this is sufficient or if more detailed work needs to be added.