Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- name: electron-hello-world-kiosk
- version: '0.1'
- summary: Hello World Electron app
- description: |
- Simple Hello World Electron app as an example
- base: core18
- confinement: strict
- grade: devel
- apps:
- electron-hello-world-kiosk:
- command: desktop-launch "$SNAP/electron-helloworld/electron-quick-start"
- plugs:
- - browser-sandbox
- - network
- - network-bind
- - opengl
- - pulseaudio
- - wayland
- - x11
- plugs:
- browser-sandbox:
- interface: browser-support
- allow-sandbox: true
- parts:
- electron-helloworld:
- plugin: nodejs
- source: https://github.com/electron/electron-quick-start.git
- after: [desktop-gtk3]
- override-build: |
- case $SNAPCRAFT_ARCH_TRIPLET in
- "i386-linux-gnu") ARCH="ia32";;
- "x86_64-linux-gnu") ARCH="x64";;
- "arm-linux-gnueabihf") ARCH="armv7l";;
- "aarch64-linux-gnu") ARCH="arm64";;
- *) echo "ERROR: electron does not support the '$SNAPCRAFT_ARCH_TRIPLET' architecture" && exit 1;;
- esac
- npm install electron-packager &&
- ./node_modules/.bin/electron-packager . --overwrite --platform=linux --arch=$ARCH --output=release-build --prune=true
- cp -v -R ./electron-quick-start-linux-$ARCH $SNAPCRAFT_PART_INSTALL/electron-helloworld
- stage-packages:
- - libasound2
- - libgconf-2-4
- - libnss3
- - libx11-xcb1
- - libxss1
- - libxtst6
- build-packages:
- - nodejs
- - npm
- # Adapted from snapcraft-desktop-helpers https://github.com/ubuntu/snapcraft-desktop-helpers/blob/master/snapcraft.yaml#L183
- desktop-gtk3:
- source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
- source-subdir: gtk
- plugin: make
- make-parameters: ["FLAVOR=gtk3"]
- build-packages:
- - build-essential
- - libgtk-3-dev
- stage-packages:
- - libxkbcommon0 # XKB_CONFIG_ROOT
- - ttf-ubuntu-font-family
- - dmz-cursor-theme
- - light-themes
- - adwaita-icon-theme
- - gnome-themes-standard
- - shared-mime-info
- - libgtk-3-0
- - libgdk-pixbuf2.0-0
- - libglib2.0-bin
- - libgtk-3-bin
- - unity-gtk3-module
- - libappindicator3-1
- - locales-all
- - xdg-user-dirs
- - ibus-gtk3
- - libibus-1.0-5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement