forked from jsnbuchanan/crowd-funder-for-time-pwa
WIP: add Electron platform configuration to Capacitor
- Add electron platform section to capacitor.config.json - Configure deep linking with timesafari:// scheme - Set up build options for macOS, Windows, and Linux - Configure output directory and file inclusion - Add platform-specific build targets (DMG, NSIS, AppImage) - Support both x64 and arm64 architectures for macOS - Set appropriate app categories for each platform This enables building TimeSafari as a native desktop application using Capacitor's Electron platform while maintaining existing mobile and web functionality.
This commit is contained in:
@@ -27,7 +27,6 @@ All scripts automatically handle environment variables for different build types
|
||||
|----------|------|-------------|-----------------|--------------|
|
||||
| `web` | web | true | false | `build-web.sh` |
|
||||
| `capacitor` | capacitor | false | true | `build-capacitor.sh` |
|
||||
| `electron` | electron | false | true | `build-electron.sh` |
|
||||
|
||||
#### Automatic Environment Setup
|
||||
|
||||
@@ -96,10 +95,7 @@ exit 0
|
||||
|
||||
### Build Scripts
|
||||
|
||||
- **`build-electron.sh`**: Complete Electron build process
|
||||
- **`build-android.sh`**: Complete Android build process
|
||||
- **`build-electron-linux.sh`**: Linux Electron packaging (AppImage, .deb)
|
||||
- **`build-electron-mac.sh`**: macOS Electron packaging (standard, universal)
|
||||
|
||||
### Development Scripts
|
||||
|
||||
@@ -152,10 +148,8 @@ print_footer "Script Title"
|
||||
```
|
||||
|
||||
### Building Applications
|
||||
```bash
|
||||
# Build Electron
|
||||
./scripts/build-electron.sh
|
||||
|
||||
```bash
|
||||
# Build Android
|
||||
./scripts/build-android.sh
|
||||
|
||||
@@ -170,19 +164,21 @@ print_footer "Script Title"
|
||||
```
|
||||
|
||||
### Development Workflows
|
||||
|
||||
```bash
|
||||
# Start Electron development
|
||||
./scripts/electron-dev.sh
|
||||
# Start development
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## Environment Variable Features
|
||||
|
||||
### Automatic Setup
|
||||
|
||||
All scripts automatically configure the correct environment variables for their build type:
|
||||
|
||||
```bash
|
||||
# Electron builds automatically get:
|
||||
export VITE_PLATFORM=electron
|
||||
# Capacitor builds automatically get:
|
||||
export VITE_PLATFORM=capacitor
|
||||
export VITE_PWA_ENABLED=false
|
||||
export VITE_DISABLE_PWA=true
|
||||
export DEBUG_MIGRATIONS=0
|
||||
@@ -214,7 +210,6 @@ validate_env_vars "VITE_API_URL" "VITE_DEBUG" || exit 1
|
||||
View current environment variables with the `--env` flag:
|
||||
|
||||
```bash
|
||||
./scripts/build-electron.sh --env
|
||||
./scripts/test-env.sh --env
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user