File size: 1,389 Bytes
b667e37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
@echo off
echo ========================================
echo   Scan2Doc Pro v6.0 - Quick Install
echo ========================================
echo.

:: Step 1: Install Tesseract via winget
echo [1/4] Installing Tesseract OCR...
winget install UB-Mannheim.TesseractOCR --silent --accept-package-agreements --accept-source-agreements
if errorlevel 1 (
    echo [INFO] winget failed, trying choco...
    choco install tesseract -y
)

:: Step 2: Install Python packages
echo.
echo [2/4] Installing Python packages...
pip install opencv-python numpy pytesseract python-docx Pillow beautifulsoup4 lxml pymupdf pyinstaller customtkinter --quiet

:: Step 3: Refresh PATH
echo.
echo [3/4] Refreshing PATH...
set PATH=%PATH%;C:\Program Files\Tesseract-OCR

:: Step 4: Build exe
echo.
echo [4/4] Building exe files...
echo Building CLI...
pyinstaller --onefile --console --clean --noconfirm --name=Scan2Doc_CLI scan2doc_pro_v6.py 2>nul
echo Building GUI...
pyinstaller --onefile --windowed --clean --noconfirm --name=Scan2Doc_Pro --add-data=scan2doc_pro_v6.py;. scan2doc_gui_pro.py 2>nul

echo.
echo ========================================
echo   DONE! 
echo ========================================
echo.
echo EXE files are in: dist\ folder
echo.
echo If Tesseract still not found, add this to PATH:
echo   C:\Program Files\Tesseract-OCR
echo.
echo Then double-click: Scan2Doc_Pro.exe
echo.
pause