Request for classic confinement highlighterpdf

I am sorry to bother you all again but that yaml comes up with the following error:

Failed to stage: Parts ‘highlighterpdf’ and ‘launcher’ have the following files, but with different contents:
highlighterpdf.sh
snapcraft.yaml

not sure where that file comes from … my dir has exactly the two files i gave you above when i build the package and it builds fine …

$ find .
.
./snap
./snap/snapcraft.yaml
./launcher
$

yes I will do that take out the files from my git repository too

that is deeply wierd I have removed the files from my git repository and my local directory and it still comes up with that error

ok I just needed to clean snapcraft sorry to bother you

if you have everythig (i.e. snapcraft.yaml and launcher) in your git tree you have to re-work the snapcraft.yaml accordingly … also the name of the launcher is launcher, not launcher.sh or launcher.bin or launcher.exe … if you change file names, you need to change them everywhere (i.e. also in the snapcraft.yaml) …

something like below should work as snap/snapcraft.yaml added to your git tree …

name: highlighterpdf
title: HighlighterPdf
version: 1.0.2
summary: Highiight the text in a Pdf.
description:
  HighlighterPdf  is a free and open source software application that you can use to 
  highlight text in your pdf document. You can select text in a colour of your choice        
  and then save it.
confinement: strict
grade: stable  
base: core18

plugs:
  gtk-2-engines:
    interface: content
    target: $SNAP/lib/gtk-2.0
    default-provider: gtk2-common-themes
  gtk-3-themes:
    default-provider: gtk-common-themes:gtk-3-themes
    interface: content
    target: $SNAP/data-dir/themes
  sound-themes:
    default-provider: gtk-common-themes:sound-themes
    interface: content
    target: $SNAP/data-dir/sounds
  gnome-3-28-1804:
    default-provider: gnome-3-28-1804:gnome-3-28-1804
    interface: content
    target: $SNAP/gnome-platform
  icon-themes:
    default-provider: gtk-common-themes:icon-themes
    interface: content
    target: $SNAP/data-dir/icons

layout:
  /usr/bin/lpr:
    bind-file: $SNAP/usr/bin/lpr

apps:
  highlighterpdf:
    extensions: [gnome-3-28]
    command: desktop-launch launcher
    environment:
      JAVA_HOME: $SNAP/usr/lib/jvm/java-11-openjdk-amd64
      PATH: $JAVA_HOME/bin:$PATH
    plugs:
      - avahi-control
      - home
      - network
      - network-bind
      - cups-control

parts:
  highlighterpdf:
    source: https://github.com/gerry136/highlighterpdf.git
    plugin: dump
    stage-packages:
      - cups-bsd # for /usr/bin/lpr
      - unzip
      - openjdk-11-jdk
      - x11-xserver-utils # for xrdb
    organize:
      highlighterpdf.jar: highlighterpdf.jar
      launcher: bin/launcher

I got it running but it is the same as before it will not print in strict confinement.

well, it works fine here … did you connect both interfaces i mentioned above ?

yes its working thank you so much for all your help never thought I was going to finish with this

1 Like