]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/scripts/CreateBatchFiles.py
Added pyshell and pycrust scripts
[wxWidgets.git] / wxPython / scripts / CreateBatchFiles.py
... / ...
CommitLineData
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
13import sys, os
14
15python = sys.executable
16pythonw = ow.path.join(os.path.split(python)[0], 'pythonw.exe')
17scriptdir = os.getcwd()
18
19scripts = [ ("img2png", 0),
20 ("img2py", 0),
21 ("img2xpm", 0),
22 ("xrced", 1),
23 ("pyshell", 1),
24 ("pycrust", 1),
25 ]
26
27template = """\
28@echo off
29
30%s %s\\%s %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9
31"""
32
33for script, usegui in scripts:
34 batfile = os.path.join(scriptdir, script + '.bat')
35 print "Creating", batfile
36 f = open(batfile, 'w')
37 if usegui:
38 f.write(template % (pythonw, scriptdir, script))
39 else:
40 f.write(template % (python, scriptdir, script))
41 f.close()
42
43