-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbuild.py
More file actions
40 lines (29 loc) · 1.13 KB
/
Copy pathbuild.py
File metadata and controls
40 lines (29 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
"""
Release build script for DistrictHeatingSim (no console window).
Builds DistrictHeatingSim_Release.spec, then runs the shared post-build steps
(drop device-specific files, lift user data out of _internal). See build_common.py.
"""
import sys
from build_common import DIST_ROOT, configure_utf8_stdout, post_build, run_pyinstaller
def main():
configure_utf8_stdout()
print("=" * 70)
print("RELEASE BUILD - No Console Window")
print("=" * 70)
print()
return_code, log_file = run_pyinstaller("DistrictHeatingSim_Release.spec", "pyinstaller_release")
if return_code == 0:
exe_path = f"{DIST_ROOT}/DistrictHeatingSim.exe"
print("\n[OK] Release build successful!")
print(f"Executable: {exe_path}")
post_build()
print("\n" + "=" * 70)
print("[OK] RELEASE BUILD COMPLETE")
print("=" * 70)
print(f"The application is ready for distribution: {DIST_ROOT}/")
else:
print(f"\n[FAIL] Build failed with return code {return_code}")
print(f"Check log file for details: {log_file}")
return return_code
if __name__ == "__main__":
sys.exit(main())