]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/scripts/CreateBatchFiles.py
Make batch files for the tool scripts, and other related changes for
[wxWidgets.git] / wxPython / scripts / CreateBatchFiles.py
diff --git a/wxPython/scripts/CreateBatchFiles.py b/wxPython/scripts/CreateBatchFiles.py
new file mode 100644 (file)
index 0000000..4427ce4
--- /dev/null
@@ -0,0 +1,36 @@
+#----------------------------------------------------------------------
+# Name:         CreateBatchFiles.py
+# Purpose:     Run by the InnoSetup installer to create a DOS batch
+#               file for each of the wxPython tool scripts.
+#
+# Author:       Robin Dunn
+#
+# Created:      8-Aug-2002
+# Copyright:    (c) 2002 by Total Control Software
+# Licence:      wxWindows license
+#----------------------------------------------------------------------
+
+import sys, os
+
+python = sys.executable
+scriptdir = os.getcwd()
+
+scripts = [ "img2png",
+            "img2py",
+            "img2xpm",
+            "xrced",
+            ]
+
+template = """\
+@echo off
+%(python)s %(scriptdir)s\\%(script)s %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9
+"""
+
+for script in scripts:
+    batfile = os.path.join(scriptdir, script + '.bat')
+    print "Creating", batfile
+    f = open(batfile, 'w')
+    f.write(template % vars())
+    f.close()
+
+