Skip to content

Commit

Permalink
changedpackaging
Browse files Browse the repository at this point in the history
  • Loading branch information
justanothercell committed Jun 11, 2023
1 parent 46b9860 commit d8976d1
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}')
Expand All @@ -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}')

0 comments on commit d8976d1

Please sign in to comment.