Add Windows installe and portable app

This commit is contained in:
2026-10-04 21:40:38 +03:00
parent c2b1c41393
commit 12e40aac6d
6 changed files with 3734 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
name: Desktop builds
on:
workflow_dispatch:
jobs:
package:
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
command: npm run dist:win
artifact: windows
files: release/*.exe
- os: ubuntu-22.04
command: npm run dist:linux
artifact: linux
files: |
release/*.AppImage
release/*.deb
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
- run: npm ci
- run: ${{ matrix.command }}
- uses: actions/upload-artifact@v4
with:
name: daybreak-mail-${{ matrix.artifact }}
path: ${{ matrix.files }}
if-no-files-found: error
+3
View File
@@ -0,0 +1,3 @@
node_modules/
release/
dist/
+6
View File
@@ -2,6 +2,12 @@
A desktop-style mail client concept with the **Eternity Daylight** and **Wasteland** themes. It includes an inbox, message reader, search, starring, archive and trash actions, compose/reply/forward, contacts, and a month calendar. A desktop-style mail client concept with the **Eternity Daylight** and **Wasteland** themes. It includes an inbox, message reader, search, starring, archive and trash actions, compose/reply/forward, contacts, and a month calendar.
## Desktop app
The Electron app runs in its own window. With Node.js installed, run `npm install` and then `npm start`. To package it on Windows, run `npm run dist:win`; the installer and portable `.exe` are written to `release/`. To package on Linux, run `npm install` and `npm run dist:linux` on a Linux machine; this produces AppImage and Debian packages in `release/`.
The `.github/workflows/desktop-build.yml` workflow builds both Windows and Linux artifacts on their native GitHub-hosted runners when manually started from the Actions tab.
## Run on Windows or Linux ## Run on Windows or Linux
Install Python 3, open a terminal in this folder, and run: Install Python 3, open a terminal in this folder, and run:
+39
View File
@@ -0,0 +1,39 @@
const { app, BrowserWindow, shell } = require('electron');
const path = require('node:path');
function createWindow() {
const window = new BrowserWindow({
width: 1440,
height: 920,
minWidth: 920,
minHeight: 680,
title: 'Daybreak Mail',
backgroundColor: '#f4f5f1',
autoHideMenuBar: true,
icon: path.join(__dirname, '..', 'icon.svg'),
webPreferences: {
contextIsolation: true,
nodeIntegration: false,
sandbox: true
}
});
window.loadFile(path.join(__dirname, '..', 'index.html'));
window.webContents.setWindowOpenHandler(({ url }) => {
if (url.startsWith('https://') || url.startsWith('mailto:')) shell.openExternal(url);
return { action: 'deny' };
});
window.webContents.on('will-navigate', event => event.preventDefault());
}
app.whenReady().then(() => {
app.setAppUserModelId('studio.daybreak.mail');
createWindow();
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) createWindow();
});
});
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') app.quit();
});
+3587
View File
File diff suppressed because it is too large Load Diff
+64
View File
@@ -0,0 +1,64 @@
{
"name": "daybreak-mail",
"version": "0.1.0",
"private": true,
"description": "Daybreak Mail desktop client prototype",
"author": "Daybreak Studio",
"desktopName": "daybreak-mail",
"main": "desktop/main.cjs",
"scripts": {
"start": "electron .",
"dev": "electron .",
"dist:win": "electron-builder --win",
"dist:win:portable": "electron-builder --win portable",
"dist:linux": "electron-builder --linux AppImage deb",
"dist:linux:appimage": "electron-builder --linux AppImage",
"dist:linux:deb": "electron-builder --linux deb"
},
"devDependencies": {
"electron": "44.5.1",
"electron-builder": "26.17.0"
},
"build": {
"appId": "studio.daybreak.mail",
"productName": "Daybreak Mail",
"asar": true,
"files": [
"index.html",
"styles.css",
"app.js",
"icon.svg",
"manifest.webmanifest",
"service-worker.js",
"desktop/**/*"
],
"directories": {
"output": "release"
},
"win": {
"target": [
"nsis",
"portable"
]
},
"nsis": {
"oneClick": false,
"allowToChangeInstallationDirectory": true,
"createDesktopShortcut": true,
"createStartMenuShortcut": true
},
"linux": {
"category": "Office",
"syncDesktopName": true,
"target": [
"AppImage",
"deb"
],
"synopsis": "A calmer place for mail, people, and plans"
}
},
"allowScripts": {
"electron@44.5.1": true,
"electron-winstaller@5.4.0": true
}
}