fix: Windows-safe DB_PATH via env var, add Windows installer scripts

This commit is contained in:
2026-03-07 13:43:35 +01:00
parent fd8b4ef1f9
commit 069dfc0ae4
7 changed files with 364 additions and 38 deletions

45
build_windows.bat Normal file
View File

@@ -0,0 +1,45 @@
@echo off
title BatchTube Windows Build
echo.
echo ============================================================
echo BatchTube Windows Installer Builder v1.0.0
echo Intentures LLC - https://batchtube.com
echo ============================================================
echo.
python --version >nul 2>&1
if errorlevel 1 (echo ERROR: Python not found. Install Python 3.11+ && pause && exit /b 1)
echo [1/5] Creating virtual environment...
if exist build_venv rmdir /s /q build_venv
python -m venv build_venv
call build_venv\Scripts\activate.bat
echo [2/5] Installing dependencies...
pip install --upgrade pip -q
pip install -r backend\requirements.txt -q
pip install pyinstaller -q
echo [3/5] Downloading yt-dlp...
if not exist tools mkdir tools
curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe -o tools\yt-dlp.exe
echo [4/5] Building with PyInstaller...
cd backend
pyinstaller batchtube-windows.spec --clean --noconfirm
cd ..
if not exist backend\dist\BatchTube.exe (echo ERROR: Build failed && pause && exit /b 1)
echo Build successful: backend\dist\BatchTube.exe
echo [5/5] Creating NSIS installer...
makensis /VERSION >nul 2>&1
if errorlevel 1 (
echo NSIS not found - install from https://nsis.sourceforge.io/
echo Your EXE is ready at: backend\dist\BatchTube.exe
) else (
makensis installer.nsi
echo.
echo SUCCESS: BatchTube-Setup-1.0.0.exe created
)
pause