]> git.saurik.com Git - wxWidgets.git/blob - wxPython/scripts/CreateBatchFiles.py
Added missing header files
[wxWidgets.git] / wxPython / scripts / CreateBatchFiles.py
1 #----------------------------------------------------------------------
2 # Name: CreateBatchFiles.py
3 # Purpose: Run by the InnoSetup installer to create a DOS batch
4 # file for each of the wxPython tool scripts.
5 #
6 # Author: Robin Dunn
7 #
8 # Created: 8-Aug-2002
9 # Copyright: (c) 2002 by Total Control Software
10 # Licence: wxWindows license
11 #----------------------------------------------------------------------
12
13 import sys, os
14
15 python = sys.executable
16 pythonw = 'start ' + os.path.join(os.path.split(python)[0], 'pythonw.exe')
17 scriptdir = os.getcwd()
18
19 scripts = [ ("img2png", 0),
20 ("img2py", 0),
21 ("img2xpm", 0),
22 ("xrced", 1),
23 ("pyshell", 1),
24 ("pycrust", 1),
25 ("pywrap", 1),
26 ("pyalamode", 1),
27 ("pyalacarte", 1),
28 ("helpviewer", 1),
29 ]
30
31 template = """\
32 @echo off
33
34 %s %s\\%s %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9
35 """
36
37 def main():
38 for script, usegui in scripts:
39 batfile = os.path.join(scriptdir, script + '.bat')
40 print "Creating", batfile
41 f = open(batfile, 'w')
42 if usegui:
43 f.write(template % (pythonw, scriptdir, script))
44 else:
45 f.write(template % (python, scriptdir, script))
46 f.close()
47
48
49 if __name__ == '__main__':
50 main()
51