-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
be2ff1c
commit 8b6ee32
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import zipfile | ||
import sys | ||
import urllib.request | ||
import os | ||
|
||
# massive hack but whatever | ||
|
||
if len(sys.argv) != 3: | ||
print("Usage: {} appveyor_job_id version_number".format(sys.argv[0])) | ||
sys.exit(1) | ||
|
||
zipf = zipfile.ZipFile("asar"+sys.argv[2]+".zip", 'x', compression=zipfile.ZIP_DEFLATED) | ||
|
||
appveyor_prefix = "https://ci.appveyor.com/api/buildjobs/{}/artifacts/build/asar/MinSizeRel/".format(sys.argv[1]) | ||
with urllib.request.urlopen(appveyor_prefix + "asar-standalone.exe") as resp: | ||
exe_data = resp.read() | ||
with urllib.request.urlopen(appveyor_prefix + "asar.dll") as resp: | ||
dll_data = resp.read() | ||
|
||
zipf.writestr("asar.exe", exe_data) | ||
zipf.writestr("dll/asar.dll", dll_data) | ||
|
||
for (dirpath, dirnames, filenames) in os.walk("docs"): | ||
for x in filenames: | ||
zipf.write(dirpath + "/" + x) | ||
|
||
for (dirpath, dirnames, filenames) in os.walk("ext"): | ||
for x in filenames: | ||
zipf.write(dirpath + "/" + x) | ||
|
||
zipf.write("README.txt") | ||
zipf.write("LICENSE") | ||
zipf.write("license-gpl.txt") | ||
zipf.write("license-lgpl.txt") | ||
zipf.write("license-wtfpl.txt") | ||
|
||
for (dirpath, dirnames, filenames) in os.walk("src/asar-dll-bindings"): | ||
for x in filenames: | ||
zipf.write(dirpath+"/"+x, dirpath.replace("src/asar-dll-bindings", "dll/bindings")+"/"+x) |