diff --git a/build.py b/build.py index 2d4382b..489d78a 100755 --- a/build.py +++ b/build.py @@ -69,7 +69,7 @@ def finished(n, p): with zipfile.ZipFile(client_package, 'w', zipfile.ZIP_DEFLATED) as zipf: zipf.write(f'client/target/{mode}/{client_bin}', client_bin) - # package server and mods + # package server server_bin = 'server' + binary_ext server_package = f'server-{target_platform}-{mode}.zip' print(f'{GREEN} -> generating `{server_package}`{ENDC}') @@ -81,5 +81,15 @@ def finished(n, p): filename = 'mods/' + file if filename.endswith('.zip') or filename.endswith('.ron'): zipf.write('server/' + filename, filename) + + # package mods + mods_package = f'server-{target_platform}-{mode}.zip' + print(f'{GREEN} -> generating `{mods_package}`{ENDC}') + + with zipfile.ZipFile(mods_package, 'w', zipfile.ZIP_DEFLATED) as zipf: + for file in os.listdir('server/mods'): + filename = 'mods/' + file + if filename.endswith('.zip'): + zipf.write('server/' + filename, filename) print(f'{BOLD}done.{ENDC}') \ No newline at end of file