🚧 Add build script
This commit is contained in:
@@ -116,10 +116,52 @@ pip install -e .[dev]
|
||||
pytest
|
||||
```
|
||||
|
||||
## Building a self-executing exe
|
||||
|
||||
The CLI can be packaged as a standalone Windows executable with PyInstaller.
|
||||
|
||||
```bash
|
||||
pip install -e .[dev] # includes pyinstaller
|
||||
|
||||
# one-folder build (default): fast start-up, distribute the whole folder
|
||||
.\build.ps1
|
||||
|
||||
# single-file build: one .exe, slower start-up (self-extracting)
|
||||
.\build.ps1 -Onefile
|
||||
|
||||
# rebuild from scratch and smoke-test the exe against assets/
|
||||
.\build.ps1 -Clean -Test
|
||||
|
||||
# explicit interpreter if several Pythons are installed
|
||||
.\build.ps1 -Python C:\Path\To\python.exe
|
||||
```
|
||||
|
||||
Results land in `dist/`:
|
||||
|
||||
- **one-folder** (default): `dist/mitsubishi-label-converter/mitsubishi-label-converter.exe`
|
||||
plus supporting DLLs — distribute the whole folder; starts fast.
|
||||
- **onefile**: `dist/mitsubishi-label-converter.exe` — a single 8.8 MB file to
|
||||
copy anywhere; a little slower to start.
|
||||
|
||||
Notes:
|
||||
|
||||
- The script prefers the project `.venv`, then `python`/`py` on PATH; the
|
||||
Microsoft Store `python` alias is detected and skipped automatically.
|
||||
- `run.py` at the project root is the packaging entry point (PyInstaller cannot
|
||||
execute `cli.py` directly because of its relative imports).
|
||||
- Antivirus software may flag unsigned PyInstaller exes; sign the exe or add
|
||||
an exclusion if this matters in your environment.
|
||||
- Build artifacts (`build/`, `dist/`, `*.spec`) are git-ignored.
|
||||
|
||||
## TODO / Roadmap
|
||||
|
||||
Done:
|
||||
|
||||
- [x] **Self-executing exe** — `build.ps1` wraps PyInstaller with
|
||||
one-folder/onefile modes, clean rebuild, built-in smoke test, and robust
|
||||
Python resolution; verified all three subcommands and the lossless
|
||||
round-trip through the packaged exe.
|
||||
|
||||
- [x] **Expose struct members with addresses in Excel** — dotted member rows
|
||||
inline under each structured variable (189 structured variables -> 1,220
|
||||
member rows in the sample file).
|
||||
|
||||
Reference in New Issue
Block a user