4.4 KiB
4.4 KiB
Windows Package Builder
Automated build system for creating Windows portable packages of Pixelle-Video.
Quick Start
Prerequisites
- Python 3.11+ (for running the build script)
- PyYAML:
pip install pyyaml - Internet connection (for downloading Python, FFmpeg, etc.)
Build Package
# Basic build
python packaging/windows/build.py
# Build with China mirrors (faster in China)
python packaging/windows/build.py --cn-mirror
# Custom output directory
python packaging/windows/build.py --output /path/to/output
Configuration
Edit config/build_config.yaml to customize:
- Python version
- FFmpeg version
- Excluded files/folders
- Build options
- Mirror settings
Output
The build process creates:
dist/windows/
├── Pixelle-Video-v*-win64/ # Build directory (version number varies)
│ ├── python/ # Python embedded
│ ├── tools/ # FFmpeg, etc.
│ ├── Pixelle-Video/ # Project files
│ ├── data/ # User data (empty)
│ ├── output/ # Output (empty)
│ ├── start.bat # Main launcher
│ ├── start_api.bat # API launcher
│ ├── start_web.bat # Web launcher
│ └── README.txt # User guide
├── Pixelle-Video-v*-win64.zip # ZIP package (version number varies)
└── Pixelle-Video-v*-win64.zip.sha256 # Checksum (version number varies)
Build Process
The builder performs these steps:
-
Download Phase
- Python embedded distribution
- FFmpeg portable
- Cached in
.cache/for reuse
-
Extract Phase
- Extract Python to
build/python/ - Extract FFmpeg to
build/tools/ffmpeg/
- Extract Python to
-
Prepare Phase
- Enable site-packages in Python
- Install pip
- Install uv (if configured)
-
Install Phase
- Install project dependencies using uv/pip
- Pre-install all packages
-
Copy Phase
- Copy project files (excluding test/docs/cache)
- Generate launcher scripts from templates
- Create empty directories
-
Package Phase
- Create ZIP archive
- Generate SHA256 checksum
Templates
Launcher script templates in templates/:
start.bat- Main Web UI launcherstart_api.bat- API server launcherstart_web.bat- Web UI only launcherREADME.txt- User documentation
Templates support placeholders:
{VERSION}- Project version{BUILD_DATE}- Build timestamp
Cache
Downloaded files are cached in .cache/:
.cache/
├── python-3.11.9-embed-amd64.zip
├── ffmpeg-6.1.1-win64.zip
└── get-pip.py
Delete cache to force re-download.
Troubleshooting
Build fails with "PyYAML not found"
pip install pyyaml
Downloads are slow
Use China mirrors:
python build.py --cn-mirror
Dependencies installation fails
Check:
- Internet connection
- PyPI mirrors accessibility
- Project dependencies in
pyproject.toml
ZIP creation fails
Ensure:
- Sufficient disk space
- Write permissions to output directory
- No files are locked by other processes
Advanced Usage
Custom Configuration
Create custom config file:
cp config/build_config.yaml config/my_config.yaml
# Edit my_config.yaml
python build.py --config config/my_config.yaml
Skip ZIP Creation
Edit build_config.yaml:
build:
create_zip: false
Include Chrome Portable
Edit build_config.yaml:
chrome:
include: true
download_url: "https://path/to/chrome-portable.zip"
Maintenance
Update Python Version
Edit config/build_config.yaml:
python:
version: "3.11.10"
download_url: "https://www.python.org/ftp/python/3.11.10/python-3.11.10-embed-amd64.zip"
Update FFmpeg Version
Edit config/build_config.yaml:
ffmpeg:
version: "6.2.0"
download_url: "https://github.com/BtbN/FFmpeg-Builds/releases/download/..."
Distribution
To distribute the package:
- Upload ZIP file to release page
- Include SHA256 checksum for verification
- Provide installation instructions
Users verify download:
# Windows PowerShell
Get-FileHash Pixelle-Video-v*-win64.zip -Algorithm SHA256
Compare with .sha256 file.
License
Same as Pixelle-Video project license.