Getting ready for stable

Thanks for working on this!

Are you running the snapcraft command in the snap folder or in the parent folder? You should run it in the parent folder so that `$PWD/snap/gui contains the desktop file and icon.

You don’t need to add this line when the desktop file is already in snap/gui. The desktop key should only be used if the desktop launcher is generated when your application builds.

Probably, the reason why meta/gui doesn’t contain the files yet is because the snap build fails before those files are copied. First, it copies any desktop launchers specified with the desktop keyword. Then it copies any desktop launchers from meta/gui.

Some more comments:

  • command: desktop-launch python3 $SNAP/pynsource-gui.py: You don’t need to manually add desktop-launch any more when you use the gnome-3-28 extension. The extension adds it to the command chain for you.
  • The variable $SNAP is meant to be used after installation of your snap. It points to the directory of your snap after it is intalled. You should not use it during build. These are some of the variables to use during build: https://snapcraft.io/docs/parts-lifecycle#heading--parts-directories. If your build generates the desktop file and you want to use that one, you can do something like desktop: ${SNAPCRAFT_STAGE}/usr/share/applications/pynsource.desktop
  • You can also remove the plugs desktop, desktop-legacy, gsettings and x11 as these are also added by the gnome-3-28 extension.
  • It’s better to use audio-playback instead of pulseaudio. the pulseaudio plug is deprecated. audio-playback gives access to the same functionality and is auto-connected to new snaps.
  • You also don’t need the LD_LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/x86_64-linux-gnu/pulseaudio line because the gnome-3-28 extension takes care of that.