Add electron-builder packaging configuration
- Install electron-builder as dev dependency - Configure build targets for macOS (dmg, zip), Windows (nsis, zip), and Linux (AppImage, deb) - Add npm scripts for building unpacked app (dist:dir) and macOS packages (dist:mac) - Set base path to "./" in production builds for proper asset loading in packaged app - Fix index.html asset paths to use relative paths (./ prefix) - Update README to document packaging commands and note unsigned/unnotarized status
This commit is contained in:
16
README.md
16
README.md
@@ -58,6 +58,8 @@ npm run dev:renderer # Vite frontend only
|
||||
npm run dev:electron # Electron only, expects renderer on port 1420
|
||||
npm run build # TypeScript + Vite production build
|
||||
npm run desktop # Run Electron against the built dist/
|
||||
npm run dist:dir # Build an unpacked Electron app in release/
|
||||
npm run dist:mac # Build macOS .dmg and .zip packages in release/
|
||||
```
|
||||
|
||||
## Production-Like Local Run
|
||||
@@ -119,16 +121,18 @@ Current limitation:
|
||||
|
||||
That is convenient for development, but it is not the right long-term storage mechanism for a production desktop app. A future improvement should move credentials into the OS keychain or another secure secret store.
|
||||
|
||||
## Packaging Status
|
||||
## Packaging
|
||||
|
||||
Electron packaging for release builds is not set up yet.
|
||||
Electron packaging is set up with `electron-builder`.
|
||||
|
||||
Right now, the repository supports:
|
||||
Current packaging commands:
|
||||
|
||||
- local development with `npm run dev:desktop`
|
||||
- local production-style execution with `npm run build && npm run desktop`
|
||||
- `npm run dist:dir` creates an unpacked app bundle in `release/`
|
||||
- `npm run dist:mac` creates macOS `.dmg` and `.zip` artifacts in `release/`
|
||||
|
||||
If you want distributable `.dmg`, `.AppImage`, `.deb`, or `.exe` artifacts, the next step is to add an Electron packaging tool such as Electron Forge or electron-builder.
|
||||
The current mac build is unsigned and not notarized, which is fine for local use and testing but not enough for friction-free public distribution through Gatekeeper.
|
||||
|
||||
Windows and Linux targets are also configured in `package.json`, but they have not been validated in this repository yet.
|
||||
|
||||
## Legacy Tauri Script
|
||||
|
||||
|
||||
Reference in New Issue
Block a user