|
|
1 mês atrás | |
|---|---|---|
| .. | ||
| README.md | 3 meses atrás | |
| build.sh | 3 meses atrás | |
| create-tray-icon.js | 3 meses atrás | |
| entitlements.mac.plist | 3 meses atrás | |
| icon.png | 3 meses atrás | |
| main.js | 2 meses atrás | |
| package-lock.json | 1 mês atrás | |
| package.json | 2 meses atrás | |
| preload.js | 2 meses atrás | |
| tray-icon-windows.png | 2 meses atrás | |
| tray-iconTemplate.png | 3 meses atrás | |
| [email protected] | 3 meses atrás | |
This directory contains the Electron wrapper for New API, providing a native desktop application with system tray support for Windows, macOS, and Linux.
The Electron app requires the compiled Go binary to function. You have two options:
Option A: Use existing binary (without Go installed)
# If you have a pre-built binary (e.g., new-api-macos)
cp ../new-api-macos ../new-api
Option B: Build from source (requires Go) TODO
cd electron
npm install
Run the app in development mode:
npm start
This will:
../data/new-api.db# Ensure Go binary exists in parent directory
ls ../new-api # Should exist
# Build for current platform
npm run build
# Platform-specific builds
npm run build:mac # Creates .dmg and .zip
npm run build:win # Creates .exe installer
npm run build:linux # Creates .AppImage and .deb
electron/dist/.dmg (installer) and .zip (portable).exe (installer) and portable exe.AppImage and .debDefault port is 3000. To change, edit main.js:
const PORT = 3000; // Change to desired port
../data/new-api.db (project directory)~/Library/Application Support/New API/data/%APPDATA%/New API/data/~/.config/New API/data/