- Component: Web UI Packaging System
- Module:
installer/directory - Source:
installer/
Related: Electron Integration, NSIS Installer
Overview
The Web UI Packaging System is GAIA’s infrastructure for creating standalone desktop applications from Python-based web UIs. It combines Electron packaging, embedded Python distribution, and NSIS Windows installers to deliver turnkey AI applications. Key Features:- Python embedding (no system Python required)
- Electron-based desktop app generation
- NSIS installer creation
- Multi-app support (Jira, Chat, Docker)
- Automatic dependency installation
Requirements
Functional Requirements
-
Python Embedding
- Download Python embedded distribution (3.10.9)
- Install pip in embedded environment
- Configure site-packages access
- Install GAIA and dependencies
-
File Packaging
- Exclude development files (.git, .pyc)
- Include installer scripts
- Package GAIA source code
- Create bin directory structure
-
Dependency Management
- Handle package installations
- Support optional dependencies
- Manage version compatibility
- Track installation failures
-
Post-Install Configuration
- PATH environment updates
- Desktop shortcut creation
- Launch script installation
- Optional component installation (RAUX)
Non-Functional Requirements
-
Reliability
- Robust error handling
- Installation logging
- Retry logic for downloads
- Cleanup on failure
-
Performance
- Parallel downloads where possible
- Progress indication
- Timeout management
- Efficient file operations
-
User Experience
- Silent install mode support
- Clear progress messages
- Error reporting
- Manual fallback options
System Architecture
Component Diagram
Directory Structure
API Specification
install.bat
Purpose: Install GAIA package in embedded Python environment Parameters:%1: Path to python.exe%2: Installation directory
- 0: Success
- 1: Python executable not found
- 2: Pip upgrade failed
- 3: GAIA installation failed
- 4: Verification failed
launch_gaia.bat
Purpose: Launch GAIA CLI with embedded Python Parameters:--cli: Launch CLI mode--app <name>: Launch specific app- All other args passed to GAIA
installer_utils.py
Purpose: Utility functions for installer validation Key Functions:Implementation Details
Python Embedding Process
Step 1: Download Embedded PythonPackage Installation Strategy
Priority 1: Core DependenciesError Handling
Network Failures:Testing Requirements
Unit Tests
File:tests/installer/test_installer_utils.py
Integration Tests
Manual Test Procedure:-
Clean Install Test
-
Upgrade Test
-
Silent Install Test
-
PATH Verification Test
-
Launch Script Test
Dependencies
Build Dependencies
Runtime Dependencies
Optional Dependencies
Configuration
NSIS Build Variables
Environment Variables
Installer Sets:Usage Examples
Example 1: Building Installer
Example 2: Silent Deployment
Example 3: Custom Installation Path
Error Handling
Common Errors
Error: Python download failedRecovery Procedures
Incomplete Installation:Documentation Updates Required
installer/README.md
Add packaging documentation:Acceptance Criteria
- Installer creates embedded Python environment
- GAIA package installs with all dependencies
- Launch scripts work from any directory
- PATH updated correctly in user environment
- Desktop shortcuts created
- Silent install mode works
- Custom install path supported
- Installation logs created
- Error messages clear and actionable
- Uninstaller removes all files
- Upgrade preserves user data
- Version checking prevents conflicts
Related Specifications
- electron-integration - Electron app packaging
- nsis-installer - NSIS installer details
- agent-base - Agent system architecture
Web UI Packaging System Technical Specification