EU-Utility-V3/docs/BUILD_WINDOWS_STATIC.md

64 lines
1.4 KiB
Markdown

# Static Build Configuration for Windows
This configuration builds EU-Utility V3 as a single .exe file with all OCR libraries statically linked.
## Prerequisites
### 1. Install vcpkg
```powershell
git clone https://github.com/Microsoft/vcpkg.git C:\vcpkg
C:\vcpkg\bootstrap-vcpkg.bat
C:\vcpkg\vcpkg integrate install
```
### 2. Install Static Libraries
```powershell
# Install Tesseract and dependencies as static libraries
C:\vcpkg\vcpkg install tesseract:x64-windows-static-md
C:\vcpkg\vcpkg install leptonica:x64-windows-static-md
C:\vcpkg\vcpkg install libpng:x64-windows-static-md
C:\vcpkg\vcpkg install tiff:x64-windows-static-md
C:\vcpkg\vcpkg install libjpeg-turbo:x64-windows-static-md
```
**Note:** This takes 30-60 minutes on first run.
### 3. Set Environment Variables
```powershell
$env:VCPKG_ROOT = "C:\vcpkg"
$env:VCPKGRS_DYNAMIC = "0"
```
## Building
### Development Build
```powershell
npm run tauri-dev
```
### Production Build (Single .exe)
```powershell
npm run tauri-build
```
The output will be:
- `src-tauri/target/release/bundle/msi/*.msi` - Windows installer
- `src-tauri/target/release/eu-utility-v3.exe` - Standalone executable
## Build Size
- **Without OCR:** ~15MB
- **With OCR (static):** ~80-120MB
## Distribution
The .msi installer includes everything needed:
- Main application (single .exe)
- WebView2 runtime (if not present)
- Start menu shortcuts
Users do not need to install Tesseract separately.