]> git.saurik.com Git - wxWidgets.git/blame - wxPython/scripts/CreateBatchFiles.py
reSWIGged
[wxWidgets.git] / wxPython / scripts / CreateBatchFiles.py
CommitLineData
bd4b9c8c
RD
1#----------------------------------------------------------------------
2# Name: CreateBatchFiles.py
1e4a197e 3# Purpose: Run by the InnoSetup installer to create a DOS batch
bd4b9c8c
RD
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
13import sys, os
14
15python = sys.executable
107e0248 16pythonw = 'start ' + os.path.join(os.path.split(python)[0], 'pythonw.exe')
bd4b9c8c
RD
17scriptdir = os.getcwd()
18
1fded56b
RD
19scripts = [ ("img2png", 0),
20 ("img2py", 0),
21 ("img2xpm", 0),
b7c75283 22 ("genaxmodule",0),
1fded56b
RD
23 ("xrced", 1),
24 ("pyshell", 1),
25 ("pycrust", 1),
45e07d7a 26 ("pywrap", 0),
1fded56b
RD
27 ("pyalamode", 1),
28 ("pyalacarte", 1),
1e4a197e 29 ("helpviewer", 1),
2e0ae50e 30 ("pywxrc", 0),
bd4b9c8c
RD
31 ]
32
33template = """\
34@echo off
9239ff22
RD
35
36%s %s\\%s %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9
bd4b9c8c
RD
37"""
38
2eb31f8b
RD
39def main():
40 for script, usegui in scripts:
41 batfile = os.path.join(scriptdir, script + '.bat')
42 print "Creating", batfile
43 f = open(batfile, 'w')
44 if usegui:
45 f.write(template % (pythonw, scriptdir, script))
46 else:
47 f.write(template % (python, scriptdir, script))
48 f.close()
49
50
51if __name__ == '__main__':
52 main()
bd4b9c8c 53