Advertisement
Guest User

Untitled

a guest
Jul 20th, 2019
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.26 KB | None | 0 0
  1. name: electron-hello-world-kiosk
  2. version: '0.1'
  3. summary: Hello World Electron app
  4. description: |
  5. Simple Hello World Electron app as an example
  6. base: core18
  7. confinement: strict
  8. grade: devel
  9.  
  10. apps:
  11. electron-hello-world-kiosk:
  12. command: desktop-launch "$SNAP/electron-helloworld/electron-quick-start"
  13. plugs:
  14. - browser-sandbox
  15. - network
  16. - network-bind
  17. - opengl
  18. - pulseaudio
  19. - wayland
  20. - x11
  21.  
  22. plugs:
  23. browser-sandbox:
  24. interface: browser-support
  25. allow-sandbox: true
  26.  
  27. parts:
  28. electron-helloworld:
  29. plugin: nodejs
  30. source: https://github.com/electron/electron-quick-start.git
  31. after: [desktop-gtk3]
  32. override-build: |
  33. case $SNAPCRAFT_ARCH_TRIPLET in
  34. "i386-linux-gnu") ARCH="ia32";;
  35. "x86_64-linux-gnu") ARCH="x64";;
  36. "arm-linux-gnueabihf") ARCH="armv7l";;
  37. "aarch64-linux-gnu") ARCH="arm64";;
  38. *) echo "ERROR: electron does not support the '$SNAPCRAFT_ARCH_TRIPLET' architecture" && exit 1;;
  39. esac
  40. npm install electron-packager &&
  41. ./node_modules/.bin/electron-packager . --overwrite --platform=linux --arch=$ARCH --output=release-build --prune=true
  42. cp -v -R ./electron-quick-start-linux-$ARCH $SNAPCRAFT_PART_INSTALL/electron-helloworld
  43. stage-packages:
  44. - libasound2
  45. - libgconf-2-4
  46. - libnss3
  47. - libx11-xcb1
  48. - libxss1
  49. - libxtst6
  50.  
  51. build-packages:
  52. - nodejs
  53. - npm
  54.  
  55. # Adapted from snapcraft-desktop-helpers https://github.com/ubuntu/snapcraft-desktop-helpers/blob/master/snapcraft.yaml#L183
  56. desktop-gtk3:
  57. source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
  58. source-subdir: gtk
  59. plugin: make
  60. make-parameters: ["FLAVOR=gtk3"]
  61. build-packages:
  62. - build-essential
  63. - libgtk-3-dev
  64. stage-packages:
  65. - libxkbcommon0 # XKB_CONFIG_ROOT
  66. - ttf-ubuntu-font-family
  67. - dmz-cursor-theme
  68. - light-themes
  69. - adwaita-icon-theme
  70. - gnome-themes-standard
  71. - shared-mime-info
  72. - libgtk-3-0
  73. - libgdk-pixbuf2.0-0
  74. - libglib2.0-bin
  75. - libgtk-3-bin
  76. - unity-gtk3-module
  77. - libappindicator3-1
  78. - locales-all
  79. - xdg-user-dirs
  80. - ibus-gtk3
  81. - libibus-1.0-5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement