feat: add flatpak support for linux (#6387)
Signed-off-by: The-Best-Codes <bestcodes.official@gmail.com>
This commit is contained in:
@@ -75,11 +75,15 @@ npm run make -- --targets=@electron-forge/maker-zip
|
||||
|
||||
# For DEB package (Debian/Ubuntu)
|
||||
npm run make -- --targets=@electron-forge/maker-deb
|
||||
|
||||
# For Flatpak (requires flatpak and flatpak-builder)
|
||||
npm run make -- --targets=@electron-forge/maker-flatpak
|
||||
```
|
||||
|
||||
The built application will be available in:
|
||||
- ZIP: `out/make/zip/linux/x64/goose-linux-x64-{version}.zip`
|
||||
- DEB: `out/make/deb/x64/goose_{version}_amd64.deb`
|
||||
- Flatpak: `out/make/flatpak/x86_64/*.flatpak`
|
||||
- Executable: `out/goose-linux-x64/goose`
|
||||
|
||||
### Windows
|
||||
|
||||
@@ -93,6 +93,45 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: '@electron-forge/maker-flatpak',
|
||||
config: {
|
||||
options: {
|
||||
categories: ['Development'],
|
||||
icon: 'src/images/icon.png',
|
||||
homepage: 'https://block.github.io/goose/',
|
||||
runtimeVersion: '25.08',
|
||||
baseVersion: '25.08',
|
||||
bin: 'Goose',
|
||||
modules: [
|
||||
{
|
||||
name: 'libbz2-shim',
|
||||
buildsystem: 'simple',
|
||||
'build-commands': [
|
||||
// Create the lib directory in the app bundle
|
||||
'mkdir -p /app/lib',
|
||||
// Point to the actual library in the 25.08 runtime
|
||||
// We use a wildcard to handle multi-arch paths (x86_64-linux-gnu, etc)
|
||||
'ln -s $(find /usr/lib -name "libbz2.so.1" | head -n 1) /app/lib/libbz2.so.1.0'
|
||||
]
|
||||
}
|
||||
],
|
||||
finishArgs: [
|
||||
'--share=ipc',
|
||||
'--socket=x11',
|
||||
'--socket=wayland',
|
||||
'--device=dri',
|
||||
'--share=network',
|
||||
'--filesystem=home',
|
||||
'--talk-name=org.freedesktop.Notifications',
|
||||
'--socket=session-bus',
|
||||
'--socket=system-bus',
|
||||
// This ensures the app looks in our shim folder first
|
||||
'--env=LD_LIBRARY_PATH=/app/lib'
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
plugins: [
|
||||
{
|
||||
|
||||
Generated
+611
-463
File diff suppressed because it is too large
Load Diff
@@ -94,6 +94,7 @@
|
||||
"devDependencies": {
|
||||
"@electron-forge/cli": "^7.10.2",
|
||||
"@electron-forge/maker-deb": "^7.10.2",
|
||||
"@electron-forge/maker-flatpak": "^7.10.2",
|
||||
"@electron-forge/maker-rpm": "^7.10.2",
|
||||
"@electron-forge/maker-squirrel": "^7.10.2",
|
||||
"@electron-forge/maker-zip": "^7.10.2",
|
||||
|
||||
Reference in New Issue
Block a user