| 1 |
# PyInstaller Build Configuration |
| 2 |
|
| 3 |
This directory contains the configuration for building standalone dirsearch executables using PyInstaller. |
| 4 |
|
| 5 |
## Supported Platforms |
| 6 |
|
| 7 |
| Platform | Architecture | Runner | |
| 8 |
|----------|--------------|--------| |
| 9 |
| Linux | AMD64 | ubuntu-latest | |
| 10 |
| Windows | x64 | windows-latest | |
| 11 |
| macOS | Intel (x86_64) | macos-13 | |
| 12 |
| macOS | Silicon (ARM64) | macos-14 | |
| 13 |
|
| 14 |
## Quick Start |
| 15 |
|
| 16 |
### Build for Current Platform |
| 17 |
|
| 18 |
```bash |
| 19 |
# Install dependencies |
| 20 |
pip install -r requirements.txt pyinstaller==6.3.0 |
| 21 |
|
| 22 |
# Run PyInstaller |
| 23 |
pyinstaller pyinstaller/dirsearch.spec |
| 24 |
``` |
| 25 |
|
| 26 |
### Using Build Script |
| 27 |
|
| 28 |
```bash |
| 29 |
chmod +x pyinstaller/build.sh |
| 30 |
./pyinstaller/build.sh |
| 31 |
``` |
| 32 |
|
| 33 |
## GitHub Actions |
| 34 |
|
| 35 |
The workflow automatically builds for all platforms when: |
| 36 |
- A version tag is pushed (e.g., `v0.4.4RC1`) |
| 37 |
- Manually triggered via workflow_dispatch |
| 38 |
|
| 39 |
### Triggering a Release |
| 40 |
|
| 41 |
```bash |
| 42 |
git tag v0.4.4RC1 |
| 43 |
git push origin v0.4.4RC1 |
| 44 |
``` |
| 45 |
|
| 46 |
This creates a GitHub Release with binaries for all platforms. |
| 47 |
|
| 48 |
## Files |
| 49 |
|
| 50 |
| File | Description | |
| 51 |
|------|-------------| |
| 52 |
| `dirsearch.spec` | PyInstaller specification file | |
| 53 |
| `build.sh` | Build script for local builds | |
| 54 |
|
| 55 |
## Output |
| 56 |
|
| 57 |
Binaries are created in `dist/`: |
| 58 |
|
| 59 |
``` |
| 60 |
dist/ |
| 61 |
├── dirsearch-linux-amd64 |
| 62 |
├── dirsearch-windows-x64.exe |
| 63 |
├── dirsearch-macos-intel |
| 64 |
└── dirsearch-macos-silicon |
| 65 |
``` |
| 66 |
|
| 67 |
## Troubleshooting |
| 68 |
|
| 69 |
### Missing modules |
| 70 |
Add hidden imports to the PyInstaller command or `.spec` file: |
| 71 |
``` |
| 72 |
--hidden-import=module_name |
| 73 |
``` |
| 74 |
|
| 75 |
### macOS code signing |
| 76 |
For distribution, sign binaries with: |
| 77 |
```bash |
| 78 |
codesign --sign "Developer ID" dirsearch-macos-* |
| 79 |
``` |