Add Docker+Wine Windows cross-build from Linux CI
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
2e36b189cf
commit
56f1f058ae
8 files changed
+184
-24
No files matched your search
+29
-12
@@ -29,21 +29,39 @@ Automated builds for **Windows, macOS, and Linux** run from the repo root.
|
||||
|
||||
#### Runners (match your other repos)
|
||||
|
||||
**Build Scribd** uses your **Linux runner** (`ubuntu-latest`) for two jobs:
|
||||
**Build Scribd** on your **Linux runner** (`ubuntu-latest`) runs three jobs:
|
||||
|
||||
| Job | What you get | Notes |
|
||||
|-----|----------------|-------|
|
||||
| **Linux** | `Scribd-PDF-Downloader-Linux.tar.gz` | Full standalone app (PyInstaller + Chromium) |
|
||||
| **Windows portable** | `Scribd-PDF-Downloader-Windows-Portable.zip` | Source + `Install Scribd Downloader.bat` |
|
||||
| Job | Artifact | How |
|
||||
|-----|----------|-----|
|
||||
| **Linux** | `Scribd-PDF-Downloader-Linux.tar.gz` | Native PyInstaller |
|
||||
| **Windows (.exe)** | `Scribd-PDF-Downloader-Windows.zip` | **Docker + Wine** cross-build |
|
||||
| **Windows portable** | `Scribd-PDF-Downloader-Windows-Portable.zip` | Source + install `.bat` (fallback) |
|
||||
|
||||
### Why not a Windows `.exe` from Linux?
|
||||
### Windows `.exe` from Linux (Docker + Wine)
|
||||
|
||||
Playwright ships **OS-specific Chromium**. PyInstaller cannot cross-compile this app from Linux to a real Windows `.exe`. That requires either:
|
||||
CI runs `build/ci/docker-build-windows.sh`, which:
|
||||
|
||||
- A **Windows machine** / `windows-latest` runner, or
|
||||
- Local build: `.\build\windows\build.ps1` on your PC
|
||||
1. Builds image `build/docker/Dockerfile.cross-win` (Ubuntu + Wine + Windows Python 3.12)
|
||||
2. Installs dependencies and Playwright **Windows** Chromium inside Wine
|
||||
3. Runs **PyInstaller** inside Wine → real `Scribd PDF Downloader.exe`
|
||||
|
||||
### Windows portable zip (from Linux CI)
|
||||
**Runner requirement:** Docker must be available to the act runner (socket mounted, user in `docker` group).
|
||||
|
||||
Test locally on Linux:
|
||||
|
||||
```bash
|
||||
cd Scribd
|
||||
chmod +x build/ci/docker-build-windows.sh
|
||||
./build/ci/docker-build-windows.sh
|
||||
```
|
||||
|
||||
This is **experimental** — Wine builds can be slow (~20–40 min) or fail on some packages. If it fails, use **scribd-windows-portable** or build on Windows with `.\build\windows\build.ps1`.
|
||||
|
||||
### macOS from Linux?
|
||||
|
||||
**Not supported.** macOS `.app` bundles require Xcode/tooling on real macOS (or a `macos-latest` runner).
|
||||
|
||||
### Windows portable zip (fallback)
|
||||
|
||||
1. Download artifact **`scribd-windows-portable`**
|
||||
2. Extract on a Windows PC
|
||||
@@ -82,10 +100,9 @@ Optional: add repo secret **`GITEA_TOKEN`** (releases scope) for `release-scribd
|
||||
| Artifact | File |
|
||||
|----------|------|
|
||||
| `scribd-linux` | `Scribd-PDF-Downloader-Linux.tar.gz` |
|
||||
| `scribd-windows` | `Scribd-PDF-Downloader-Windows.zip` (`.exe` inside folder) |
|
||||
| `scribd-windows-portable` | `Scribd-PDF-Downloader-Windows-Portable.zip` |
|
||||
|
||||
For a full Windows `.exe`, build locally with `.\build\windows\build.ps1`.
|
||||
|
||||
> **Note:** Each archive is large (~500–900 MB) because Chromium is bundled. Hosted runners may hit artifact size limits; self-hosted runners avoid that.
|
||||
|
||||
---
|
||||
|
||||
Reference in new issue
Block a user