You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 719696e
Browse filesBrowse the repository at this point in the historyBrowse files
add PyInstaller-based packaging for java-inventory
- add cross-platform packaging script and PyInstaller spec
- bundle java components, resources, and project metadata
- validate required checkstyle and maven build artifacts before packaging
- addg github actions builds for linux, windows, and macOS
- test packaged executables with help, setup, and test coverage commands
- document local packaging and platform build requirements
Build `java-inventory` as a standalone executable with PyInstaller:
332
+
333
+
```sh
334
+
python build.py
335
+
```
336
+
337
+
The build script:
338
+
339
+
1. Creates a project-local `.venv` if it does not exist.
340
+
2. Installs PyInstaller into the build environment if necessary.
341
+
3. Runs `python java_inventory.py setup`.
342
+
4. Verifies that the required Checkstyle and Maven build artifacts exist.
343
+
5. Packages the application and its required resources into a standalone executable.
344
+
345
+
The resulting executable is written to:
346
+
347
+
```shell
348
+
dist/java-inventory
349
+
```
350
+
351
+
On Windows, the executable is:
352
+
353
+
```powershell
354
+
dist\java-inventory.exe
355
+
```
356
+
357
+
Run the packaged executable with:
358
+
359
+
```shell
360
+
./dist/java-inventory --help
361
+
```
362
+
363
+
On Windows:
364
+
365
+
```powershell
366
+
dist\java-inventory.exe --help
367
+
```
368
+
369
+
### Packaging options
370
+
371
+
Skip cleanup of previous PyInstaller build artifacts:
372
+
373
+
```shell
374
+
python build.py --no-cleanup
375
+
```
376
+
377
+
Use a different PyInstaller spec file:
378
+
379
+
```shell
380
+
python build.py --spec path/to/custom.spec
381
+
```
382
+
383
+
Enable debug output:
384
+
385
+
```shell
386
+
python build.py --debug
387
+
```
388
+
389
+
The build requires Python, JDK, and Maven. The `setup` step builds the Java components required by the packaged application.
390
+
391
+
### Platform builds
392
+
393
+
PyInstaller produces a native executable for the platform on which it runs. To produce binaries for multiple platforms, run the build on each target platform.
394
+
395
+
For official releases, the project uses GitHub Actions to build platform-specific binaries and attach them to GitHub Releases.
396
+
329
397
## Checkstyle
330
398
331
399
The linter uses the project's Checkstyle configuration and custom Checkstyle checks:
0 commit comments