forked from Xenland/BitShares
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make_install.py
34 lines (28 loc) · 909 Bytes
/
make_install.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import shutil
import os
import zipfile
def zipdir(path, zip):
for root, dirs, files in os.walk(path):
for file in files:
zip.write(os.path.join(root, file))
if __name__ == '__main__':
#copy files listed in install_lst.txt to temporary bin dir
binDir = "bin"
if os.path.exists(binDir):
shutil.rmtree(binDir)
os.mkdir(binDir)
for line in open("install_list.txt",'r'):
line=line.strip()
if line:
print(line)
shutil.copy(line,binDir)
#copy platform file
platformDir = binDir + '/platforms';
os.mkdir(platformDir)
qtdir = os.environ['QTDIR']
windowsPlatformDll = qtdir + '/plugins/platforms/qwindows.dll';
shutil.copy(windowsPlatformDll,platformDir)
#zip up files in bin dir to keyhotee.zip
zip = zipfile.ZipFile('keyhotee.zip','w')
zipdir(binDir, zip)
zip.close()