Skip to content

Commit

Permalink
Update ZIP file generation script
Browse files Browse the repository at this point in the history
  • Loading branch information
RPGHacker committed Feb 9, 2024
1 parent 1bc71ce commit 938b10c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions generate_release_zip.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
if len(sys.argv) != 2:
print("Usage: {} version_number".format(sys.argv[0]))
sys.exit(1)

branch_name = 'asar_19'

zipf = zipfile.ZipFile("asar"+sys.argv[1]+".zip", 'x', compression=zipfile.ZIP_DEFLATED)

build_server_prefix = lambda f, n: f"https://random.muncher.se/ftp/asar/windows/xp_compat/build/asar/{f}/MinSizeRel/{n}"
with urllib.request.urlopen(build_server_prefix("bin", "asar.exe")) as resp:
build_server_prefix = lambda f, n, b: f"https://random.muncher.se/ftp/asar/windows/{branch_name}/{b}/build/asar/{f}/MinSizeRel/{n}"
with urllib.request.urlopen(build_server_prefix("bin", "asar.exe", "win64")) as resp:
exe_data = resp.read()
with urllib.request.urlopen(build_server_prefix("lib", "asar.dll")) as resp:
with urllib.request.urlopen(build_server_prefix("lib", "asar.dll", "win32")) as resp:
dll_data = resp.read()

zipf.writestr("asar.exe", exe_data)
Expand Down

0 comments on commit 938b10c

Please sign in to comment.