Files
eboek.info-scraper/docs/WINDOWS_BUILD.md
Louis Mylle 3248060317 final update
2026-01-10 15:04:21 +01:00

90 lines
2.1 KiB
Markdown

# 🪟 Windows Executable Build Guide
## ✅ Yes, Windows will have .exe extension!
**PyInstaller automatically adds `.exe` extension when building on Windows.**
## 🏗️ Building on Windows
### Method 1: Simple Batch Script
```cmd
# Double-click or run in Command Prompt
scripts\build_exe.bat
```
### Method 2: Cross-Platform Python Script
```cmd
python scripts\build_executable.py
```
## 📦 Expected Output
**Windows build creates:**
```
dist/
└── EBoek_Scraper.exe ← Windows executable (~30MB)
```
**What happens:**
1. ✅ PyInstaller detects Windows platform
2. ✅ Automatically adds `.exe` extension
3. ✅ Creates `dist/EBoek_Scraper.exe`
4. ✅ Bundles all dependencies (PyQt5, Selenium, Python runtime)
## 🚀 Distribution
**Share this file:** `dist/EBoek_Scraper.exe`
**End users can:**
- ✅ Double-click to run (no Python needed)
- ✅ Run from Command Prompt: `EBoek_Scraper.exe`
- ⚠️ May see Windows security warning on first run
## 🔐 Windows Security Warning
**First run may show:**
```
Windows protected your PC
Microsoft Defender SmartScreen prevented...
```
**Solution:**
1. Click **"More Info"**
2. Click **"Run Anyway"**
3. This only happens once per PC
## 🧪 Testing
**Verify build worked:**
```cmd
cd dist
dir EBoek_Scraper.exe
EBoek_Scraper.exe --help
```
## 💡 Platform-Specific Notes
| Build Platform | Creates | Best For |
|----------------|---------|----------|
| **Windows** | `.exe` file | ✅ Windows distribution |
| **macOS** | `.app` + Unix binary | ✅ macOS distribution |
| **Linux** | Unix binary | ✅ Linux distribution |
**Best practice:** Build on the target operating system for optimal compatibility.
## 🛠️ Troubleshooting
**Build fails on Windows:**
1. Install Python 3.8+ from python.org
2. Ensure pip works: `pip --version`
3. Install dependencies: `pip install -r requirements.txt`
4. Try again: `scripts\build_exe.bat`
**Missing .exe after build:**
- Check `dist/` folder contents
- Look for error messages in build output
- Try alternative: `python -m PyInstaller --onefile --windowed gui_main.py`
---
**🎉 Windows users will definitely get a proper .exe file!**