I’m trying to include a desktop file for my snap (p4merge in this case), and following the instructions on the build-snaps/metadata note that:
Alternatively, you can create a
snap/gui/
directory at the root of your snapcraft project to host a desktop file
I’ve tried the above, with both snap/gui/p4merge.desktop
and gui/p4merge.desktop
with no luck (by which i mean there is no P4Merge application listed in the launcher). Examining the installed snap itself, i see the p4merge.desktop
file:
$find /snap/p4merge/current/ -name '*.desktop'
/snap/p4merge/current/snap/gui/p4merge.desktop
Full snapcraft.yaml:
name: p4merge
version: "18.2"
summary: Helix Visual Merge Tool (p4merge)
description: |
Helix Visual Merge Tool (P4Merge) is a three-way merging and side-by-side file
comparison tool. Use it to visualize your merges, obtain comprehensive file
history, and compare a broad range of image files.
# How to use an icon file provided by a part as the snap icon ?
#icon: lib/P4VResources/icons/p4merge.svg
grade: devel
confinement: devmode
apps:
p4merge:
command: desktop-launch $SNAP/bin/p4merge
# Docs note that you can 'create a snap/gui/ directory at the root of your
# snapcraft project to host a desktop', but this doesn't seem to work,
# either as snap/gui/p4merge.desktop nor gui/p4merge.desktop
#desktop: ./snap/gui/p4merge.desktop
parts:
p4merge:
plugin: dump
source: https://cdist2.perforce.com/perforce/r18.2/bin.linux26x86_64/p4v.tgz
after: [desktop-qt5]
stage-packages:
- libxslt1.1