-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathbuild.bat
More file actions
56 lines (46 loc) · 1.53 KB
/
build.bat
File metadata and controls
56 lines (46 loc) · 1.53 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
@echo off
REM ============================================================
REM Book Translator - Build Script for Windows
REM ============================================================
REM This script creates the .exe executable with all dependencies
REM ============================================================
echo.
echo ============================================================
echo Book Translator - Build Script
echo ============================================================
echo.
REM Check Python
python --version >nul 2>&1
if errorlevel 1 (
echo [ERROR] Python not found. Please install Python 3.10+
pause
exit /b 1
)
echo [1/4] Creating virtual environment...
if not exist "venv_build" (
python -m venv venv_build
)
echo [2/4] Activating environment and installing dependencies...
call venv_build\Scripts\activate.bat
pip install --upgrade pip
pip install pyinstaller
pip install flaskwebgui
pip install flask flask-cors requests psutil werkzeug
echo [3/4] Creating executable with PyInstaller...
pyinstaller book_translator.spec --clean --noconfirm
echo [4/4] Cleaning temporary files...
rmdir /s /q build 2>nul
echo.
echo ============================================================
echo BUILD COMPLETED!
echo ============================================================
echo.
echo The executable is at:
echo dist\BookTranslator\BookTranslator.exe
echo.
echo To distribute, copy the entire folder:
echo dist\BookTranslator\
echo.
echo ============================================================
echo.
pause