Skip to content

Commit 2fc98e7

Browse files
committed
Updated windows binary build
1 parent 2269db4 commit 2fc98e7

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.github/workflows/main-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444

4545
# Run the unified build script (no arguments needed)
4646
- name: Run build script
47-
run: pyinstaller --onefile --name ssh-tunnel-manager --icon=ssh_tunnel_manager/icon.ico ssh_tunnel_manager/main.py
47+
run: pyinstaller --onefile --name ssh-tunnel-manager-gui --windowed --icon="ssh_tunnel_manager/icon.ico" --add-data "ssh_tunnel_manager/icon.ico:ssh_tunnel_manager" run_app.py
4848

4949
# Upload the artifacts prepared by build.py
5050
- name: Upload Artifacts

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ To build manually:
9595
2. Install build dependencies: `pip install pyinstaller`
9696
3. Run PyInstaller (example):
9797
```bash
98-
pyinstaller --onefile --name ssh-tunnel-manager-gui --windowed ssh_tunnel_manager/main.py
98+
pyinstaller --onefile --name ssh-tunnel-manager-gui --windowed --icon="ssh_tunnel_manager/icon.ico" --add-data "ssh_tunnel_manager/icon.ico:ssh_tunnel_manager" run_app.py
9999
```
100-
(Adjust `ssh_tunnel_manager/main.py` to your actual main script path. `--windowed` is good for GUI apps, especially on Windows. The name `ssh-tunnel-manager-gui` aligns with the assumed PyPI name.)
100+
(The `run_app.py` script is a dedicated entry point for PyInstaller. `--icon` sets the executable icon. `--add-data` ensures the icon is also bundled for runtime access. `--windowed` is good for GUI apps. The name `ssh-tunnel-manager-gui` aligns with the PyPI name.)
101101
Executables are found in the `dist` directory.
102102

103103
## Contributing

run_app.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# run_app.py
2+
import sys
3+
import ssh_tunnel_manager.main
4+
5+
if __name__ == '__main__':
6+
sys.exit(ssh_tunnel_manager.main.main())

0 commit comments

Comments
 (0)