I dont have any core22 based ones currently. But here are some core20 examples (using electron-builder from the snapcraft.yaml):
1 Like
name: electron-packager-hello-world
version: '0.1'
summary: Hello World Electron app
description: |
Simple Hello World Electron app as an example
base: core20
confinement: strict
grade: stable
apps:
electron-packager-hello-world:
command: electron-quick-start/electron-quick-start --no-sandbox
extensions: [gnome-3-38]
plugs:
- browser-support
- network
- network-bind
environment:
# Correct the TMPDIR path for Chromium Framework/Electron to ensure
# libappindicator has readable resources.
TMPDIR: $XDG_RUNTIME_DIR
parts:
electron-quick-start:
plugin: nil
source: https://github.com/electron/electron-quick-start.git
override-build: |
npm install electron electron-packager
npx electron-packager . --overwrite --platform=linux --output=release-build --prune=true
cp -rv ./electron-quick-start-linux-* $SNAPCRAFT_PART_INSTALL/electron-quick-start
build-snaps:
- node/16/stable
build-packages:
- unzip
stage-packages:
- libnss3
- libnspr4
what was the command you used to produce the error ? (as a quick hack you can just call chmod to change the file permissions before the cp command, though it would still be good to find out why it happens)
I use the command “snapcraft”
well, just add:
chmod 0755 $SNAPCRAFT_PART_INSTALL/electron-quick-start
below the cp line and you should be fine …
do not use tabs but spaces … yaml is very strict about this …
1 Like