feat(desktop): packaging + self-hosted auto-update (electron-builder/updater)
- package.json build config: NSIS installer, app icon, generic publish provider → https://remote.bizgaze.com/downloads/ (self-hosted update feed). - main.js: electron-updater checks the feed on launch + every 6h, downloads in the background, installs on restart. Active only in packaged builds. - build/icon.ico app icon; PACKAGING.md documents build/release/signing. - Key design: web/UI changes reach installed apps instantly (they load the live server); only native shell changes need an auto-updated build. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+18
-4
@@ -7,6 +7,9 @@
|
||||
"start": "electron .",
|
||||
"dist": "electron-builder"
|
||||
},
|
||||
"dependencies": {
|
||||
"electron-updater": "^6.3.9"
|
||||
},
|
||||
"devDependencies": {
|
||||
"electron": "^31.0.0",
|
||||
"electron-builder": "^24.13.3"
|
||||
@@ -14,9 +17,20 @@
|
||||
"build": {
|
||||
"appId": "com.bizgaze.connect.desktop",
|
||||
"productName": "Biz Connect",
|
||||
"files": ["main.js", "preload.js", "assets/**"],
|
||||
"win": { "target": "nsis" },
|
||||
"mac": { "target": "dmg", "category": "public.app-category.business" },
|
||||
"linux": { "target": "AppImage" }
|
||||
"directories": { "buildResources": "build", "output": "dist" },
|
||||
"publish": [
|
||||
{ "provider": "generic", "url": "https://remote.bizgaze.com/downloads/" }
|
||||
],
|
||||
"win": { "target": "nsis", "icon": "build/icon.ico" },
|
||||
"nsis": {
|
||||
"oneClick": false,
|
||||
"perMachine": false,
|
||||
"allowToChangeInstallationDirectory": true,
|
||||
"createDesktopShortcut": true,
|
||||
"createStartMenuShortcut": true,
|
||||
"shortcutName": "Biz Connect"
|
||||
},
|
||||
"mac": { "target": "dmg", "category": "public.app-category.business", "icon": "build/icon.ico" },
|
||||
"linux": { "target": "AppImage", "category": "Network" }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user