mirror of
https://github.com/cemu-project/idapython.git
synced 2024-11-28 03:54:18 +01:00
build.py: Make ZIP archives of the builds
This commit is contained in:
parent
29187c6f53
commit
d06fa3e155
8
build.py
8
build.py
@ -12,6 +12,7 @@
|
|||||||
# build.py - Custom build script
|
# build.py - Custom build script
|
||||||
#------------------------------------------------------------
|
#------------------------------------------------------------
|
||||||
import os, sys, platform, types, shutil
|
import os, sys, platform, types, shutil
|
||||||
|
import zipfile
|
||||||
from distutils import sysconfig
|
from distutils import sysconfig
|
||||||
|
|
||||||
# Start of user configurable options
|
# Start of user configurable options
|
||||||
@ -247,6 +248,10 @@ def build_distribution(manifest, distrootdir):
|
|||||||
if os.path.exists(distrootdir):
|
if os.path.exists(distrootdir):
|
||||||
shutil.rmtree(distrootdir)
|
shutil.rmtree(distrootdir)
|
||||||
|
|
||||||
|
# Also make a ZIP archive of the build
|
||||||
|
zippath = distrootdir + ".zip"
|
||||||
|
zip = zipfile.ZipFile(zippath, "w", zipfile.ZIP_DEFLATED)
|
||||||
|
|
||||||
# Create output directory
|
# Create output directory
|
||||||
os.makedirs(distrootdir)
|
os.makedirs(distrootdir)
|
||||||
|
|
||||||
@ -271,9 +276,10 @@ def build_distribution(manifest, distrootdir):
|
|||||||
os.makedirs(dstdir)
|
os.makedirs(dstdir)
|
||||||
|
|
||||||
dstfilepath = dstdir + os.sep + srcfilename
|
dstfilepath = dstdir + os.sep + srcfilename
|
||||||
|
|
||||||
shutil.copyfile(srcfilepath, dstfilepath)
|
shutil.copyfile(srcfilepath, dstfilepath)
|
||||||
|
zip.write(dstfilepath)
|
||||||
|
|
||||||
|
zip.close()
|
||||||
|
|
||||||
def build_plugin(system, idasdkdir):
|
def build_plugin(system, idasdkdir):
|
||||||
""" Build the plugin from the SWIG wrapper and plugin main source """
|
""" Build the plugin from the SWIG wrapper and plugin main source """
|
||||||
|
Loading…
Reference in New Issue
Block a user