Update electron builder and fix mobile terminal background

This commit is contained in:
LukeGus
2025-09-10 01:11:11 -05:00
parent 4b7cb03f7a
commit 9d84469ea3
11 changed files with 5585 additions and 50 deletions

35
build-electron.js Normal file
View File

@@ -0,0 +1,35 @@
import { execSync } from 'child_process';
import path from 'path';
import fs from 'fs';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
// Check if we're in a path with spaces
const currentPath = process.cwd();
if (currentPath.includes(' ')) {
console.log('⚠️ Warning: Project path contains spaces which may cause issues with native modules.');
console.log('Current path:', currentPath);
console.log('Consider moving the project to a path without spaces for better compatibility.');
console.log('');
}
// Set environment variables to help with native module compilation
process.env.npm_config_cache = path.join(process.cwd(), 'node_modules', '.cache');
process.env.npm_config_tmp = path.join(process.cwd(), 'node_modules', '.tmp');
console.log('Building Electron application...');
// Skip better-sqlite3 rebuild due to path issues
console.log('Skipping better-sqlite3 rebuild due to path space issues...');
console.log('Note: Using existing better-sqlite3 installation.');
// Run the electron-builder
try {
execSync('npx electron-builder', { stdio: 'inherit' });
console.log('✅ Electron build completed successfully!');
} catch (error) {
console.error('❌ Electron build failed:', error.message);
process.exit(1);
}