@echo off echo =============================================== echo EBoek.info Scraper - Installation and Setup echo =============================================== echo. REM Check if Python is installed python --version >nul 2>&1 if %errorlevel% neq 0 ( echo Python is not installed or not in PATH. echo. echo Please install Python from: https://www.python.org/downloads/ echo Make sure to check "Add Python to PATH" during installation. echo. pause exit /b 1 ) echo Python found! Checking version... for /f "tokens=2" %%i in ('python --version') do set PYTHON_VERSION=%%i echo Python version: %PYTHON_VERSION% REM Check if this is the first run if exist "..\gui_main.py" ( echo GUI application already set up. echo. goto :run_gui ) echo. echo Installing required packages... echo =============================================== python -m pip install --upgrade pip python -m pip install -r requirements.txt if %errorlevel% neq 0 ( echo. echo ERROR: Failed to install requirements. echo Please check your internet connection and try again. echo You may need to run this as Administrator. pause exit /b 1 ) echo. echo Requirements installed successfully! echo Setting up GUI application... REM The GUI files will be created by the setup process echo. echo =============================================== echo Installation complete! echo =============================================== :run_gui if exist "..\gui_main.py" ( echo Starting EBoek.info Scraper GUI... echo. python ..\gui_main.py if %errorlevel% neq 0 ( echo. echo GUI failed to start. You can still use the terminal version: echo python main.py echo. pause ) ) else ( echo GUI version not found. Running terminal version... echo. if exist "main.py" ( python main.py ) else ( echo Error: No scraper found. Please check installation. pause exit /b 1 ) ) echo. echo Application closed. pause