summaryrefslogtreecommitdiffstats
path: root/launcher.bat
diff options
context:
space:
mode:
Diffstat (limited to 'launcher.bat')
-rw-r--r--launcher.bat116
1 files changed, 116 insertions, 0 deletions
diff --git a/launcher.bat b/launcher.bat
new file mode 100644
index 0000000..95d8e5e
--- /dev/null
+++ b/launcher.bat
@@ -0,0 +1,116 @@
+@echo off
+REM Veilith Portable - Windows Launcher
+REM Automatically launches the Windows executable with portable settings
+
+title Veilith Portable v0.9 - Launcher
+
+cls
+
+echo.
+echo ========================================================
+echo.
+echo VEILITH PORTABLE v0.9
+echo Privacy-First P2P Messenger
+echo Windows Launcher
+echo.
+echo ========================================================
+echo.
+
+REM Get script directory
+set "SCRIPT_DIR=%~dp0"
+cd /d "%SCRIPT_DIR%"
+
+echo [System Detection]
+echo --------------------------------------------------------
+echo OS: Windows %PROCESSOR_ARCHITECTURE%
+echo Location: %SCRIPT_DIR%
+echo.
+
+REM Check if running from removable drive
+set "DRIVE_LETTER=%SCRIPT_DIR:~0,1%"
+set "IS_REMOVABLE=0"
+
+REM Check if drive letter is E: or higher (typical USB range)
+if "%DRIVE_LETTER%" GEQ "E" (
+ set "IS_REMOVABLE=1"
+ echo Status: Running from removable drive
+) else (
+ echo Status: Running from local drive
+)
+echo.
+
+REM Check if executable exists
+if not exist "Windows\veilith.exe" (
+ echo.
+ echo ========================================================
+ echo ERROR: Windows executable not found!
+ echo ========================================================
+ echo.
+ echo Expected location: Windows\veilith.exe
+ echo.
+ echo Please build the Windows executable:
+ echo make windows
+ echo.
+ echo Or run the build script:
+ echo build.sh
+ echo.
+ pause
+ exit /b 1
+)
+
+REM Create data directories if they don't exist
+if not exist "data" mkdir data
+if not exist "tor" mkdir tor
+if not exist "temp" mkdir temp
+
+echo [Launch]
+echo --------------------------------------------------------
+echo.
+echo Starting Veilith Portable...
+echo.
+
+REM Set environment variables for portable mode
+set "VEILITH_PORTABLE=1"
+set "VEILITH_DATA_DIR=%SCRIPT_DIR%data"
+set "VEILITH_TOR_DIR=%SCRIPT_DIR%tor"
+set "VEILITH_TEMP_DIR=%SCRIPT_DIR%temp"
+
+REM Change to Windows directory and launch
+cd /d "%SCRIPT_DIR%Windows"
+start "" "veilith.exe"
+
+REM Check if launch was successful
+if errorlevel 1 (
+ echo.
+ echo ========================================================
+ echo ERROR: Failed to launch Veilith
+ echo ========================================================
+ echo.
+ echo Possible issues:
+ echo - Antivirus blocking the executable
+ echo - Insufficient permissions
+ echo - USB drive write-protected
+ echo - Missing dependencies
+ echo.
+ echo Troubleshooting:
+ echo 1. Add veilith.exe to antivirus exceptions
+ echo 2. Run as Administrator (one time)
+ echo 3. Check USB drive is not read-only
+ echo 4. Verify Windows version compatibility
+ echo.
+ pause
+ exit /b 1
+)
+
+REM Success
+echo.
+echo Veilith launched successfully!
+echo.
+echo The application window should open shortly...
+echo You can close this window.
+echo.
+
+REM Wait a moment to ensure app started
+timeout /t 3 /nobreak >nul
+
+exit /b 0