-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_desktop.bat
More file actions
63 lines (49 loc) · 1.47 KB
/
Copy pathrun_desktop.bat
File metadata and controls
63 lines (49 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
@echo off
setlocal EnableExtensions
REM ========================================
REM Eaglearn Desktop Application Launcher
REM ========================================
REM Set UTF-8 encoding for Python output
chcp 65001 >nul 2>&1
set PYTHONIOENCODING=utf-8
echo ========================================
echo Eaglearn Desktop Application
echo ========================================
echo Starting desktop application...
echo.
REM Require GPU virtual environment to avoid confusion
set "VENV_DIR=.venv_gpu"
if exist "%VENV_DIR%\Scripts\python.exe" goto :venv_ok
echo ERROR: GPU virtual environment not found: %VENV_DIR%
echo Please use the GPU environment to run Eaglearn Desktop.
echo Expected: %VENV_DIR%\Scripts\python.exe
pause
exit /b 1
REM Activate virtual environment
:venv_ok
call "%VENV_DIR%\Scripts\activate.bat"
if errorlevel 1 goto :venv_activate_fail
REM Check if pywebview is installed
python -c "import pywebview" >nul 2>&1
if errorlevel 1 goto :install_pywebview
goto :deps_ok
:install_pywebview
echo Installing desktop dependencies (pywebview)...
python -m pip install pywebview[cef] pywin32
if errorlevel 1 goto :deps_fail
:deps_ok
echo Starting desktop application...
echo.
REM Run the desktop application
python desktop_launcher.py
pause
exit /b 0
:venv_activate_fail
echo ERROR: Failed to activate virtual environment.
pause
exit /b 1
:deps_fail
echo ERROR: Failed to install desktop dependencies.
echo Please check your internet connection and try again.
pause
exit /b 1