Flowcharting / install.bat
westland's picture
Add install.bat Windows installer and update .gitignore
390cfa4
Raw
History Blame Contribute Delete
1.79 kB
@echo off
echo ==================================================
echo B^&W Flowchart Sketcher - Installer
echo ==================================================
echo.
:: 1. Check Python
python --version >nul 2>&1
if %errorlevel% neq 0 (
echo [ERROR] Python is not installed or not in system PATH.
echo Please install Python (3.8+) and check "Add Python to PATH" during setup.
pause
exit /b 1
)
:: 2. Create Virtual Environment
echo [1/3] Creating virtual environment (.venv)...
python -m venv .venv
if %errorlevel% neq 0 (
echo [ERROR] Failed to create virtual environment.
pause
exit /b 1
)
:: 3. Install Dependencies
echo [2/3] Installing dependencies inside virtual environment...
call .venv\Scripts\activate.bat
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
if %errorlevel% neq 0 (
echo [ERROR] Failed to install dependencies.
pause
exit /b 1
)
:: 4. Create Launcher Scripts
echo [3/3] Creating quick launch shortcuts...
echo @echo off > run_desktop.bat
echo echo Starting B^&W Flowchart Sketcher (Desktop App)... >> run_desktop.bat
echo call .venv\Scripts\activate.bat >> run_desktop.bat
echo python flowchart_app.py >> run_desktop.bat
echo @echo off > run_web.bat
echo echo Starting B^&W Flowchart Sketcher (Web App)... >> run_web.bat
echo call .venv\Scripts\activate.bat >> run_web.bat
echo streamlit run app.py >> run_web.bat
echo.
echo ==================================================
echo [SUCCESS] Installation Complete!
echo ==================================================
echo.
echo You can now use the following launcher scripts:
echo - Double-click 'run_desktop.bat' to launch the Desktop application.
echo - Double-click 'run_web.bat' to launch the Streamlit Web application.
echo.
pause