-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: get strict-confined snaps building
- Loading branch information
1 parent
28b69a9
commit f845149
Showing
2 changed files
with
51 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
packages/app-electron/patches/@davidwinter+electron-forge-maker-snap+0.7.1.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
diff --git a/node_modules/@davidwinter/electron-forge-maker-snap/snap-packager.js b/node_modules/@davidwinter/electron-forge-maker-snap/snap-packager.js | ||
index 28a8775..0c17661 100644 | ||
--- a/node_modules/@davidwinter/electron-forge-maker-snap/snap-packager.js | ||
+++ b/node_modules/@davidwinter/electron-forge-maker-snap/snap-packager.js | ||
@@ -92,9 +92,11 @@ module.exports = class SnapPackager { | ||
this.deps.fse.copySync(this.options.makeOptions.dir, appFiles); | ||
debug(`App files copied to: ${appFiles}`); | ||
|
||
- this.deps.fse.renameSync(path.join(appFiles, this.values.packagedExecutableName), path.join(appFiles, this.values.executableName)); | ||
+ const dest = path.join(appFiles, this.values.executableName); | ||
+ if (!this.deps.fse.existsSync(dest)) { | ||
+ this.deps.fse.renameSync(path.join(appFiles, this.values.packagedExecutableName), dest); | ||
debug(`Rename '${this.values.packagedExecutableName} to ${this.values.executableName} in: ${appFiles}`); | ||
- | ||
+ } | ||
return true; | ||
} | ||
|
||
@@ -111,7 +113,7 @@ module.exports = class SnapPackager { | ||
result = await new Promise((resolve, reject) => { | ||
const spawnSnapcraftInDirectory = path.join(this.options.makeOptions.makeDir, 'snapcraft'); | ||
|
||
- const snapcraft = this.deps.spawn('snapcraft', ['snap', '--output', snapFile], { | ||
+ const snapcraft = this.deps.spawn('snapcraft', ['snap', '--output', snapFile, '--enable-experimental-extensions'], { | ||
cwd: spawnSnapcraftInDirectory | ||
}); | ||
|
||
diff --git a/node_modules/@davidwinter/electron-forge-maker-snap/snapcraft.template.yaml b/node_modules/@davidwinter/electron-forge-maker-snap/snapcraft.template.yaml | ||
index c0882d6..40213e5 100644 | ||
--- a/node_modules/@davidwinter/electron-forge-maker-snap/snapcraft.template.yaml | ||
+++ b/node_modules/@davidwinter/electron-forge-maker-snap/snapcraft.template.yaml | ||
@@ -4,14 +4,14 @@ version: '' | ||
icon: ./build/icon.png | ||
summary: '' | ||
description: '' | ||
-base: core18 | ||
+base: core20 | ||
confinement: '' | ||
grade: '' | ||
|
||
apps: | ||
SNAP-TEMPLATE: | ||
command: SNAP-TEMPLATE/SNAP-TEMPLATE --no-sandbox | ||
- extensions: [gnome-3-34] | ||
+ extensions: [gnome-3-38] | ||
plugs: | ||
- alsa | ||
- browser-support |