2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 01:07:43 +00:00

Windows refactors

This commit is contained in:
Jack Andersen
2015-08-30 17:36:24 -10:00
parent 199b8e7c32
commit e4f53eaa7c
30 changed files with 479 additions and 251 deletions

View File

@@ -0,0 +1,18 @@
import sys, os
import zipfile
def zipdir(path, ziph):
# ziph is zipfile handle
for root, dirs, files in os.walk(path):
for file in files:
ziph.write(os.path.join(root, file))
package_path = 'hecl'
target_zip = 'hecl.zip'
zf = zipfile.ZipFile(target_zip, mode='w', compression=zipfile.ZIP_DEFLATED)
print('GENERATING', target_zip)
if os.path.isdir(package_path):
zipdir(package_path, zf)
zf.close()