-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFinScan.bat
More file actions
49 lines (40 loc) · 1.18 KB
/
FinScan.bat
File metadata and controls
49 lines (40 loc) · 1.18 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
@echo off
REM FinScan Qt Launcher - All-in-one version
REM This batch file launches the all-in-one FinScan Qt application
echo Starting FinScan Qt All-in-One...
echo.
REM Set UTF-8 encoding for console
chcp 65001 >nul
REM Set environment variables to avoid Qt WebEngine cache errors
set QTWEBENGINE_DISABLE_SANDBOX=1
set QTWEBENGINE_CHROMIUM_FLAGS=--disable-gpu
set PYTHONIOENCODING=utf-8
REM Check if Python is available
where python >nul 2>nul
if %ERRORLEVEL% neq 0 (
echo Error: Python not found in PATH.
echo Please install Python and ensure it is in your PATH.
pause
exit /b 1
)
REM Check if the script exists
if not exist "%~dp0finscan.py" (
echo Error: finscan.py not found in the current directory.
pause
exit /b 1
)
REM Clear previous Qt WebEngine cache
if exist "%LOCALAPPDATA%\python3\QtWebEngine" (
echo Clearing previous Qt WebEngine cache...
rd /s /q "%LOCALAPPDATA%\python3\QtWebEngine" >nul 2>nul
)
REM Launch the application
echo Launching application...
python "%~dp0finscan.py"
REM Handle any errors
if %ERRORLEVEL% neq 0 (
echo.
echo FinScan Qt failed to start correctly.
echo See the error messages above for details.
pause
)