Implement edge filtering, state tracking, clean out/ directory, and add Gitea CI workflow
CI Test Suite / Run Component Tests & Pipeline Verification (push) Successful in 1m40s
CI Test Suite / Run Component Tests & Pipeline Verification (push) Successful in 1m40s
This commit is contained in:
+7
-6
@@ -6,6 +6,7 @@ import hashlib
|
||||
import platform
|
||||
import subprocess
|
||||
|
||||
ROOT_DIR = os.path.abspath(os.path.dirname(__file__))
|
||||
DIST_DIR = os.path.abspath("dist")
|
||||
OUT_DIR = os.path.abspath("out")
|
||||
BUILD_TEMP = os.path.abspath("build_temp")
|
||||
@@ -40,7 +41,7 @@ def build_linux_zipapp_binary():
|
||||
print("[*] Packaging Linux_Client.bin executable binary...")
|
||||
app_dir = os.path.join(BUILD_TEMP, "linux_app")
|
||||
os.makedirs(app_dir, exist_ok=True)
|
||||
shutil.copy(os.path.join(OUT_DIR, "linux_client", "Linux_Client.py"), os.path.join(app_dir, "Linux_Client.py"))
|
||||
shutil.copy(os.path.join(ROOT_DIR, "Linux_Client.py"), os.path.join(app_dir, "Linux_Client.py"))
|
||||
|
||||
bin_output = os.path.join(DIST_DIR, "Linux_Client.bin")
|
||||
zipapp.create_archive(
|
||||
@@ -77,27 +78,27 @@ def main():
|
||||
|
||||
if is_windows:
|
||||
# Build Windows client executable
|
||||
win_client_script = os.path.join(OUT_DIR, "win_client", "Win_Client.py")
|
||||
win_client_script = os.path.join(ROOT_DIR, "Win_Client.py")
|
||||
build_pyinstaller_binary(win_client_script, "Win_Client")
|
||||
|
||||
# Build Windows server executable
|
||||
server_script = os.path.join(OUT_DIR, "server", "Server.py")
|
||||
server_script = os.path.join(ROOT_DIR, "Server.py")
|
||||
build_pyinstaller_binary(server_script, "Server")
|
||||
|
||||
# Build Linux client standalone binary
|
||||
build_linux_zipapp_binary()
|
||||
else:
|
||||
# On Linux runner: Build native Linux binaries
|
||||
linux_client_script = os.path.join(OUT_DIR, "linux_client", "Linux_Client.py")
|
||||
linux_client_script = os.path.join(ROOT_DIR, "Linux_Client.py")
|
||||
build_pyinstaller_binary(linux_client_script, "Linux_Client.bin")
|
||||
|
||||
server_script = os.path.join(OUT_DIR, "server", "Server.py")
|
||||
server_script = os.path.join(ROOT_DIR, "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"))
|
||||
shutil.copy(os.path.join(ROOT_DIR, "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,
|
||||
|
||||
Reference in New Issue
Block a user