You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							56 lines
						
					
					
						
							1.4 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							56 lines
						
					
					
						
							1.4 KiB
						
					
					
				
								#!/bin/bash
							 | 
						|
								
							 | 
						|
								# Electron Test App Setup Script
							 | 
						|
								echo "🚀 Setting up Electron Test App..."
							 | 
						|
								
							 | 
						|
								# Check if we're in the right directory
							 | 
						|
								if [ ! -d "electron-test" ]; then
							 | 
						|
								    echo "❌ Error: electron-test directory not found!"
							 | 
						|
								    echo "Please run this script from the test-apps directory"
							 | 
						|
								    exit 1
							 | 
						|
								fi
							 | 
						|
								
							 | 
						|
								cd electron-test
							 | 
						|
								
							 | 
						|
								# Check Node.js version
							 | 
						|
								echo "🔍 Checking Node.js version..."
							 | 
						|
								node_version=$(node --version 2>/dev/null)
							 | 
						|
								if [ $? -ne 0 ]; then
							 | 
						|
								    echo "❌ Error: Node.js not found!"
							 | 
						|
								    echo "Please install Node.js 18+ from https://nodejs.org/"
							 | 
						|
								    exit 1
							 | 
						|
								fi
							 | 
						|
								echo "✅ Node.js version: $node_version"
							 | 
						|
								
							 | 
						|
								# Install dependencies
							 | 
						|
								echo "📦 Installing dependencies..."
							 | 
						|
								npm install
							 | 
						|
								if [ $? -ne 0 ]; then
							 | 
						|
								    echo "❌ Error: Failed to install dependencies!"
							 | 
						|
								    exit 1
							 | 
						|
								fi
							 | 
						|
								
							 | 
						|
								# Build web assets
							 | 
						|
								echo "🔨 Building web assets..."
							 | 
						|
								npm run build-web
							 | 
						|
								if [ $? -ne 0 ]; then
							 | 
						|
								    echo "❌ Error: Failed to build web assets!"
							 | 
						|
								    exit 1
							 | 
						|
								fi
							 | 
						|
								
							 | 
						|
								echo ""
							 | 
						|
								echo "✅ Electron test app setup complete!"
							 | 
						|
								echo ""
							 | 
						|
								echo "📋 Prerequisites check:"
							 | 
						|
								echo "- Node.js installed: ✅"
							 | 
						|
								echo "- Electron dependencies: ✅"
							 | 
						|
								echo ""
							 | 
						|
								echo "🚀 Next steps:"
							 | 
						|
								echo "1. Run Electron app: npm start"
							 | 
						|
								echo "2. Run in dev mode: npm run dev"
							 | 
						|
								echo "3. Build and run: npm run electron"
							 | 
						|
								echo ""
							 | 
						|
								echo "🔧 Troubleshooting:"
							 | 
						|
								echo "- If Electron doesn't start, check Node.js version (18+)"
							 | 
						|
								echo "- For development, use: npm run dev"
							 | 
						|
								echo "- Check console logs for detailed error information"
							 | 
						|
								
							 |