forked from opentoonz/opentoonz_installer_windows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfilelist.py
25 lines (19 loc) · 895 Bytes
/
filelist.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
# list up files in program and stuff
import os
import codecs
fout = codecs.open("files.iss", "w", "utf_8_sig")
for path, dirs, files in os.walk(ur'program'):
for file in files:
print >> fout, """Source: "%s"; DestDir: "{app}%s"; Flags: ignoreversion""" % (
os.path.join(path, file),
path[len("program"):])
print
for path, dirs, files in os.walk(ur'stuff'):
for file in files:
print >> fout, """Source: "%s"; DestDir: "{code:GetGeneralDir}%s"; Flags: uninsneveruninstall; Check: IsOverwiteStuffCheckBoxChecked""" % (
os.path.join(path, file),
path[len("stuff"):])
print >> fout, """Source: "%s"; DestDir: "{code:GetGeneralDir}%s"; Flags: onlyifdoesntexist uninsneveruninstall; Check: not IsOverwiteStuffCheckBoxChecked""" % (
os.path.join(path, file),
path[len("stuff"):])
fout.close()