Parcourir la source

Release packaging: Debian package alongside AppImage

- electron-builder deb target with maintainer, description, homepage
  and runtime dependencies; M2 application icon (assets/icon.png)
  used for the deb, desktop entry and AppImage
- yarn package now builds AppImage + deb; README documents
  sudo apt install and removal
Eric Streit il y a 1 semaine
Parent
commit
0f43fa530b
3 fichiers modifiés avec 42 ajouts et 7 suppressions
  1. 22 4
      README.md
  2. BIN
      apps/electron/assets/icon.png
  3. 20 3
      apps/electron/package.json

+ 22 - 4
README.md

@@ -50,16 +50,34 @@ yarn start:electron
 
 The language extension is intentionally a VS Code-compatible extension because Theia recommends VS Code extensions for language support. Native Theia extensions are used for product-specific workbench features.
 
-## Release packaging (AppImage)
+## Release packaging (AppImage + Debian package)
 
-The Electron app packages to a self-contained AppImage with everything
-except the compiler toolchain (see host prerequisites below):
+The Electron app packages to a self-contained AppImage and a Debian
+package with everything except the compiler toolchain (see host
+prerequisites below):
 
 ```bash
 cd apps/electron
-yarn package   # production bundle + plugin staging + AppImage in dist/
+yarn package   # production bundle + plugin staging + dist/*.AppImage, dist/*.deb
 ```
 
+This runs `bundle:prod` (native rebuild + production esbuild), stages the
+`modula2-language` plugin with its runtime dependencies into
+`apps/electron/plugins/`, and builds the artifacts via electron-builder.
+The packaged launcher (`electron-launcher.js`) points the backend at the
+bundled plugins through the `THEIA_PLUGINS` environment variable, so no
+`--plugins` flag is needed.
+
+Debian users install with:
+
+```bash
+sudo apt install ./modula2-ide-electron_0.15.0_amd64.deb
+```
+
+then launch `Modula-2 IDE` from the applications menu (Development
+section). The package ships its icon and desktop entry; uninstall with
+`sudo apt remove modula2-ide-electron`.
+
 This runs `bundle:prod` (native rebuild + production esbuild), stages the
 `modula2-language` plugin with its runtime dependencies into
 `apps/electron/plugins/`, and builds

BIN
apps/electron/assets/icon.png


+ 20 - 3
apps/electron/package.json

@@ -3,6 +3,7 @@
   "name": "modula2-ide-electron",
   "version": "0.15.0",
   "description": "GNU Modula-2 IDE built on Eclipse Theia",
+  "homepage": "https://yojik.eu",
   "author": "Eric Streit <eric@yojik.eu>",
   "main": "electron-launcher.js",
   "dependencies": {
@@ -44,11 +45,12 @@
     "sync-plugins": "rm -rf plugins && mkdir -p plugins && cp -a ../../plugins/modula2-language plugins/modula2-language && rm -rf plugins/modula2-language/src && npm install --omit=dev --no-audit --no-fund --ignore-scripts --prefix plugins/modula2-language",
     "start": "theia start --plugins=local-dir:../../plugins",
     "watch": "yarn rebuild && theia build --watch --mode development",
-    "package": "yarn bundle:prod && yarn sync-plugins && electron-builder --linux AppImage --publish never"
+    "package": "yarn bundle:prod && yarn sync-plugins && electron-builder --linux AppImage deb --publish never"
   },
   "build": {
     "appId": "eu.yojik.modula2-ide",
     "productName": "Modula-2 IDE",
+    "icon": "assets/icon.png",
     "files": [
       "electron-launcher.js",
       "lib/**",
@@ -64,9 +66,24 @@
     ],
     "linux": {
       "target": [
-        "AppImage"
+        "AppImage",
+        "deb"
       ],
-      "category": "Development"
+      "category": "Development",
+      "maintainer": "Eric Streit <eric@yojik.eu>",
+      "description": "GNU Modula-2 IDE built on Eclipse Theia"
+    },
+    "deb": {
+      "depends": [
+        "libgtk-3-0",
+        "libnotify4",
+        "libnss3",
+        "libxss1",
+        "libxtst6",
+        "xdg-utils",
+        "libatspi2.0-0",
+        "libuuid1"
+      ]
     },
     "publish": null
   },