Update application to include desktop build and release configurations

Update application to include desktop build and release configurations by modifying tsconfig.json, electron-builder.yml, adding GitHub Actions workflows, and providing necessary license and icon files for cross-platform distribution.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9203795e-937a-4306-b81d-b4d5c78c240e
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 9d6edecd-d966-491d-a685-ab034128511d
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7c94b7a0-29c7-4f2e-94ef-44b2153872b7/9203795e-937a-4306-b81d-b4d5c78c240e/lX9tyiI
Replit-Helium-Checkpoint-Created: true
This commit is contained in:
sirpiglr 2025-12-05 23:20:50 +00:00
parent 1f4e8aab8d
commit 0ac27118bc
9 changed files with 513 additions and 5 deletions

122
.github/workflows/desktop-build.yml vendored Normal file
View file

@ -0,0 +1,122 @@
name: Build Desktop App
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
version:
description: 'Version tag (e.g., v1.0.0)'
required: false
default: 'dev'
jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build desktop app
run: npm run desktop:build
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Windows artifact
uses: actions/upload-artifact@v4
with:
name: AeThex-Windows
path: dist/*.exe
if-no-files-found: error
build-macos:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build desktop app
run: npm run desktop:build
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload macOS artifact
uses: actions/upload-artifact@v4
with:
name: AeThex-macOS
path: dist/*.dmg
if-no-files-found: error
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build desktop app
run: npm run desktop:build
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Linux artifact
uses: actions/upload-artifact@v4
with:
name: AeThex-Linux
path: |
dist/*.AppImage
dist/*.deb
if-no-files-found: warn
create-release:
needs: [build-windows, build-macos, build-linux]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
permissions:
contents: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
artifacts/AeThex-Windows/*.exe
artifacts/AeThex-macOS/*.dmg
artifacts/AeThex-Linux/*.AppImage
artifacts/AeThex-Linux/*.deb
draft: false
prerelease: false
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

21
LICENSE Normal file
View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2025 AeThex
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
</dict>
</plist>

64
build/icons/README.md Normal file
View file

@ -0,0 +1,64 @@
# App Icons
This directory contains the application icons for the AeThex Desktop app.
## Required Files
| File | Platform | Size | Format |
|------|----------|------|--------|
| `icon.ico` | Windows | 256x256 (multi-size) | ICO |
| `icon.icns` | macOS | 512x512 (multi-size) | ICNS |
| `icon.png` | Linux | 512x512 | PNG |
## Converting from SVG
The `icon.svg` file is the source icon. Use one of these methods to generate platform-specific icons:
### Option 1: Online Converters
1. **ICO**: https://convertio.co/svg-ico/ or https://cloudconvert.com/svg-to-ico
2. **ICNS**: https://cloudconvert.com/svg-to-icns
3. **PNG**: Any image editor or https://svgtopng.com/
### Option 2: Command Line (requires ImageMagick)
```bash
# Install ImageMagick
# macOS: brew install imagemagick
# Ubuntu: sudo apt install imagemagick
# Windows: choco install imagemagick
# Generate PNG
convert -background none -resize 512x512 icon.svg icon.png
# Generate ICO (Windows)
convert -background none icon.svg -define icon:auto-resize=256,128,64,48,32,16 icon.ico
# For ICNS (macOS), use iconutil:
mkdir icon.iconset
sips -z 16 16 icon.png --out icon.iconset/icon_16x16.png
sips -z 32 32 icon.png --out icon.iconset/icon_16x16@2x.png
sips -z 32 32 icon.png --out icon.iconset/icon_32x32.png
sips -z 64 64 icon.png --out icon.iconset/icon_32x32@2x.png
sips -z 128 128 icon.png --out icon.iconset/icon_128x128.png
sips -z 256 256 icon.png --out icon.iconset/icon_128x128@2x.png
sips -z 256 256 icon.png --out icon.iconset/icon_256x256.png
sips -z 512 512 icon.png --out icon.iconset/icon_256x256@2x.png
sips -z 512 512 icon.png --out icon.iconset/icon_512x512.png
sips -z 1024 1024 icon.png --out icon.iconset/icon_512x512@2x.png
iconutil -c icns icon.iconset
rm -rf icon.iconset
```
### Option 3: electron-icon-builder (Recommended)
```bash
npm install -g electron-icon-builder
electron-icon-builder --input=icon.svg --output=./
```
## Replacing the Default Icon
1. Create your custom icon as a 512x512 or larger PNG/SVG
2. Convert to all three formats using the methods above
3. Replace the files in this directory
4. Rebuild the desktop app: `npm run desktop:build`

16
build/icons/icon.svg Normal file
View file

@ -0,0 +1,16 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512">
<defs>
<linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" style="stop-color:#1e3a5f;stop-opacity:1" />
<stop offset="100%" style="stop-color:#0f172a;stop-opacity:1" />
</linearGradient>
<linearGradient id="accent" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" style="stop-color:#3b82f6;stop-opacity:1" />
<stop offset="100%" style="stop-color:#8b5cf6;stop-opacity:1" />
</linearGradient>
</defs>
<rect width="512" height="512" rx="80" fill="url(#bg)"/>
<path d="M256 100 L380 380 L256 320 L132 380 Z" fill="url(#accent)" opacity="0.9"/>
<path d="M256 140 L350 340 L256 295 L162 340 Z" fill="#0f172a" opacity="0.3"/>
<circle cx="256" cy="220" r="30" fill="#fff" opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 861 B

View file

@ -1,5 +1,4 @@
import { useState } from "react"; import { useState } from "react";
import "../types/preload";
interface OverlayProps { interface OverlayProps {
defaultPath?: string; defaultPath?: string;

191
docs/DESKTOP-RELEASE.md Normal file
View file

@ -0,0 +1,191 @@
# AeThex Desktop App - Release Guide
This guide covers building, signing, and distributing the AeThex Desktop application.
## Quick Start
### Prerequisites
- Node.js 20+
- npm or yarn
- For Windows builds: Windows 10/11
- For macOS builds: macOS 11+ with Xcode Command Line Tools
- For Linux builds: Ubuntu 20.04+ or equivalent
### Building Locally
```bash
# Install dependencies
npm install
# Build the desktop app (creates installers in ./dist)
npm run desktop:build
```
## Automated Builds (GitHub Actions)
The repository includes a GitHub Actions workflow that automatically builds for all platforms.
### Triggering a Release
1. **Tag a release:**
```bash
git tag v1.0.0
git push origin v1.0.0
```
2. **Manual trigger:**
Go to Actions > Build Desktop App > Run workflow
### Build Artifacts
After a successful build, artifacts are available:
- **Windows:** `AeThex Desktop Terminal-{version}-win-x64.exe`
- **macOS:** `AeThex Desktop Terminal-{version}-mac-{arch}.dmg`
- **Linux:** `AeThex Desktop Terminal-{version}-x64.AppImage`, `.deb`
## Code Signing
### Windows Code Signing
To sign Windows builds, you need a code signing certificate.
1. **Get a certificate:**
- Purchase from DigiCert, Sectigo, or other CA
- Or use Azure SignTool with Azure Key Vault
2. **Add GitHub Secrets:**
```
WIN_CSC_LINK: Base64-encoded .pfx certificate
WIN_CSC_KEY_PASSWORD: Certificate password
```
3. **Update electron-builder.yml:**
```yaml
win:
certificateFile: ${env.WIN_CSC_LINK}
certificatePassword: ${env.WIN_CSC_KEY_PASSWORD}
```
### macOS Code Signing & Notarization
Apple requires apps to be signed and notarized for distribution.
1. **Prerequisites:**
- Apple Developer Program membership ($99/year)
- Developer ID Application certificate
- App-specific password for notarization
2. **Add GitHub Secrets:**
```
APPLE_ID: Your Apple ID email
APPLE_APP_SPECIFIC_PASSWORD: Generated from appleid.apple.com
APPLE_TEAM_ID: Your Team ID (from Developer Portal)
CSC_LINK: Base64-encoded .p12 certificate
CSC_KEY_PASSWORD: Certificate password
```
3. **Update GitHub workflow to include notarization:**
```yaml
- name: Build and notarize
run: npm run desktop:build
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
```
4. **Update electron-builder.yml:**
```yaml
mac:
notarize:
teamId: ${env.APPLE_TEAM_ID}
```
## Auto-Updates
The app is configured to check for updates from GitHub Releases.
### How it works:
1. User installs the app
2. On launch, app checks GitHub Releases for newer version
3. If found, prompts user to download and install
### Configuration
The `publish` section in `electron-builder.yml` configures the update server:
```yaml
publish:
provider: github
owner: aethex
repo: aethex-desktop
releaseType: release
```
### Testing Updates
1. Build version 1.0.0 and install
2. Push version 1.0.1 to GitHub Releases
3. Launch the app - it should detect and offer the update
## Customization
### App Icons
Replace files in `build/icons/`:
- `icon.ico` - Windows (256x256 multi-size)
- `icon.icns` - macOS (512x512 multi-size)
- `icon.png` - Linux (512x512)
See `build/icons/README.md` for conversion instructions.
### Installer Graphics
**Windows NSIS:**
- `build/installerHeader.bmp` - 150x57 pixels
- `build/installerSidebar.bmp` - 164x314 pixels
**macOS DMG:**
- `build/icons/icon.icns` - Volume icon
- (Optional) Add `build/dmg-background.png` (540x380 pixels) and update electron-builder.yml with `dmg.background: build/dmg-background.png`
### License
Add a `LICENSE` file to the root directory to display during Windows installation.
## Troubleshooting
### "App is damaged" on macOS
- App is not signed or notarized
- Run: `xattr -cr /Applications/AeThex\ Desktop\ Terminal.app`
### Windows SmartScreen warning
- App is not code-signed
- Users can click "More info" > "Run anyway"
### Linux AppImage won't run
```bash
chmod +x AeThex*.AppImage
./AeThex*.AppImage
```
### Build fails with "icon not found"
- Ensure `build/icons/icon.ico` exists for Windows builds
- Ensure `build/icons/icon.icns` exists for macOS builds
## Version Management
Update version in `package.json` before creating a release tag:
```json
{
"version": "1.0.0"
}
```
The version is used in:
- Installer filename
- Auto-update checks
- About dialog

View file

@ -1,17 +1,99 @@
appId: com.aethex.desktop appId: com.aethex.desktop
productName: AeThex Desktop Terminal productName: AeThex Desktop Terminal
copyright: Copyright (c) 2025 AeThex
artifactName: "${productName}-${version}-${os}-${arch}.${ext}"
directories:
output: dist
buildResources: build
files: files:
- "dist/**" - "dist/desktop/**"
- "electron/**" - "electron/**"
- "services/**" - "services/**"
- "package.json"
extraResources:
- from: "build/icons"
to: "icons"
asar: true asar: true
npmRebuild: false npmRebuild: false
buildDependenciesFromSource: false buildDependenciesFromSource: false
win: win:
target: nsis target:
- target: nsis
arch:
- x64
icon: build/icons/icon.ico icon: build/icons/icon.ico
publisherName: AeThex
requestedExecutionLevel: asInvoker
nsis:
oneClick: false
perMachine: false
allowToChangeInstallationDirectory: true
createDesktopShortcut: true
createStartMenuShortcut: true
shortcutName: AeThex Terminal
menuCategory: Development
installerIcon: build/icons/icon.ico
uninstallerIcon: build/icons/icon.ico
installerHeaderIcon: build/icons/icon.ico
license: LICENSE
deleteAppDataOnUninstall: false
mac: mac:
target: dmg target:
- target: dmg
arch:
- x64
- arm64
category: public.app-category.developer-tools category: public.app-category.developer-tools
icon: build/icons/icon.icns icon: build/icons/icon.icns
darkModeSupport: true
hardenedRuntime: true
gatekeeperAssess: false
entitlements: build/entitlements.mac.plist
entitlementsInherit: build/entitlements.mac.plist
dmg:
iconSize: 80
contents:
- x: 130
y: 220
type: file
- x: 410
y: 220
type: link
path: /Applications
linux:
target:
- target: AppImage
arch:
- x64
- target: deb
arch:
- x64
icon: build/icons
category: Development
maintainer: AeThex <support@aethex.dev>
synopsis: AeThex Desktop Terminal
description: Desktop terminal application for the AeThex development platform
appImage:
artifactName: "${productName}-${version}-${arch}.${ext}"
deb:
depends:
- libnotify4
- libxtst6
- libnss3
publish:
provider: github
owner: aethex
repo: aethex-desktop
releaseType: release

View file

@ -37,7 +37,8 @@
"server/**/*", "server/**/*",
"shared/**/*", "shared/**/*",
"vite.config.ts", "vite.config.ts",
"vite.config.server.ts" "vite.config.server.ts",
"vite.desktop.config.ts"
], ],
"exclude": ["node_modules", "dist"] "exclude": ["node_modules", "dist"]
} }