diff --git a/package_dist.py b/package_dist.py index e4dadae..ee86214 100644 --- a/package_dist.py +++ b/package_dist.py @@ -51,11 +51,12 @@ def build_linux_zipapp_binary(): ) print(f"[+] Successfully generated {bin_output}") -def generate_checksums(): - checksum_file = os.path.join(DIST_DIR, "SHA256SUMS.txt") +def generate_checksums(os_type="windows"): + checksum_filename = f"SHA256SUMS-{os_type}.txt" + checksum_file = os.path.join(DIST_DIR, checksum_filename) lines = [] for fname in sorted(os.listdir(DIST_DIR)): - if fname == "SHA256SUMS.txt": + if fname.startswith("SHA256SUMS"): continue fpath = os.path.join(DIST_DIR, fname) if os.path.isfile(fpath): @@ -64,6 +65,7 @@ def generate_checksums(): lines.append(f"{digest} {fname}") with open(checksum_file, "w", encoding="utf-8") as f: f.write("\n".join(lines) + "\n") + print(f"[+] Generated checksums file: {checksum_filename}") def main(): print("=" * 60) @@ -84,8 +86,7 @@ def main(): server_script = os.path.join(OUT_DIR, "server", "Server.py") build_pyinstaller_binary(server_script, "Server") - # Build Linux client standalone binary - build_linux_zipapp_binary() + generate_checksums("windows") else: # On Linux runner: Build native Linux binaries linux_client_script = os.path.join(OUT_DIR, "linux_client", "Linux_Client.py") @@ -94,19 +95,7 @@ def main(): server_script = os.path.join(OUT_DIR, "server", "Server.py") build_pyinstaller_binary(server_script, "Server.bin") - # Also package standalone Windows zipapp executable - win_app_dir = os.path.join(BUILD_TEMP, "win_app") - os.makedirs(win_app_dir, exist_ok=True) - shutil.copy(os.path.join(OUT_DIR, "win_client", "Win_Client.py"), os.path.join(win_app_dir, "Win_Client.py")) - win_bin_output = os.path.join(DIST_DIR, "Win_Client.pyz") - zipapp.create_archive( - source=win_app_dir, - target=win_bin_output, - interpreter="/usr/bin/env python3", - main="Win_Client:main" - ) - - generate_checksums() + generate_checksums("linux") # Clean temporary build directory if os.path.exists(BUILD_TEMP):