5.8 KiB
Building installable apps
You can ship Scribd PDF Downloader as a standalone app on Windows and macOS. Each platform must be built on that OS (you cannot build a Mac .app from Windows).
| Platform | Output | Build machine |
|---|---|---|
| Windows | dist/Scribd PDF Downloader/Scribd PDF Downloader.exe + zip |
Windows PC |
| macOS | dist/Scribd PDF Downloader.app + zip |
MacBook Pro / any Mac |
| Linux | dist/Scribd PDF Downloader/ + .tar.gz |
Linux PC |
The app bundles Python + Chromium (~200–850 MB). No separate Python install is required on the target machine.
CI builds (Gitea / GitHub Actions)
Automated builds for Windows, macOS, and Linux run from the repo root.
| Workflow | Trigger | Output |
|---|---|---|
| Build Scribd | Push to main, PR, or manual |
Artifacts per OS |
| Release Scribd | Tag v* (e.g. v1.0.0) |
Gitea Release with all zips |
Enable on Gitea (git.masengr.com)
- Site admin: enable Actions for the instance.
- Repo → Settings → Actions: allow workflows.
- Register act runners with the right labels.
Runners (match your other repos)
Build Scribd on your Linux runner (ubuntu-latest) runs three jobs:
| 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) |
Windows .exe from Linux (Docker + Wine)
CI runs build/ci/docker-build-windows.sh, which:
- Builds image
build/docker/Dockerfile.cross-win(Ubuntu + Wine + Windows Python 3.12) - Installs dependencies and Playwright Windows Chromium inside Wine
- Runs PyInstaller inside Wine → real
Scribd PDF Downloader.exe
Runner requirement: Docker must be available to the act runner (socket mounted, user in docker group).
Test locally on Linux:
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)
- Download artifact
scribd-windows-portable - Extract on a Windows PC
- Run
Install Scribd Downloader.bat(installs Python deps + Chromium once, then opens GUI)
Linux CI artifact
tar -xzf Scribd-PDF-Downloader-Linux.tar.gz
./Scribd\ PDF\ Downloader/Scribd\ PDF\ Downloader
- Open Actions → Build Scribd on push to
main.
Workflows (repo root)
.gitea/workflows/build-scribd.yml # Windows + macOS + Linux on push
.gitea/workflows/release-scribd.yml # all platforms on tag v*
.github/workflows/build-scribd.yml # GitHub mirror
CI scripts live in Scribd/build/ci/ (build-windows.ps1, build-unix.sh).
Create a release
git tag v1.0.0
git push origin v1.0.0
Optional: add repo secret GITEA_TOKEN (releases scope) for release-scribd.yml.
Artifact names
| 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 |
Note: Each archive is large (~500–900 MB) because Chromium is bundled. Hosted runners may hit artifact size limits; self-hosted runners avoid that.
Windows (.exe)
- Open PowerShell in the project folder.
- Run:
.\build\windows\build.ps1
- When finished:
- Folder:
dist\Scribd PDF Downloader\ - Zip:
dist\Scribd-PDF-Downloader-Windows.zip
- Folder:
Copy the whole folder (or unzip the archive) to any Windows PC and run Scribd PDF Downloader.exe.
macOS (.app)
On your MacBook Pro (or any Mac):
chmod +x build/macos/build.sh
./build/macos/build.sh
Outputs:
- App:
dist/Scribd PDF Downloader.app - Zip:
dist/Scribd-PDF-Downloader-macOS.zip
First launch on Mac
macOS may block unsigned apps:
- Right-click the app → Open → Open again, or
- System Settings → Privacy & Security → Open Anyway
Optional: ad-hoc sign (reduces warnings)
codesign --force --deep --sign - "dist/Scribd PDF Downloader.app"
For distribution outside your Mac, use an Apple Developer ID certificate and notarize the app.
Linux
chmod +x build/ci/build-unix.sh
./build/ci/build-unix.sh
Output: dist/Scribd-PDF-Downloader-Linux.tar.gz
Extract and run:
tar -xzf dist/Scribd-PDF-Downloader-Linux.tar.gz -C dist
./dist/Scribd\ PDF\ Downloader/Scribd\ PDF\ Downloader
Requires a desktop environment (GUI uses tkinter).
Troubleshooting builds
| Issue | Fix |
|---|---|
pyinstaller not found |
Run build script again (installs requirements-build.txt) |
| Chromium missing at runtime | Rebuild after PLAYWRIGHT_BROWSERS_PATH=0 playwright install chromium |
| Windows SmartScreen | Expected for unsigned exe; click More info → Run anyway |
| Mac “damaged” message | Run xattr -cr "dist/Scribd PDF Downloader.app" or ad-hoc sign above |
What gets built
- GUI only (
gui.py) — same as Start Scribd Downloader.bat - config.ini copied next to the executable
- session.json and downloaded PDFs are saved in the same folder as the
.exe/.app
Command-line use (main.py) is not included in the frozen build; use the source project with .venv for CLI.