Commits

Thomas Kluyver committed bbbbe66

Fix cxfreeze-quickstart for Win32* bases.

Comments (0)

Files changed (1)

cx_Freeze/setupwriter.py

         w("# fine tuning.")
         w("buildOptions = dict(packages = [], excludes = [])")
         w("")
+        
+        if self.base.startswith('Win32'):
+            w("import sys")
+            w("base = %r if sys.platform=='win32' else None" % self.base)
+        else:
+            w("base = %r" % self.base)
 
         w("executables = [")
         if self.executableName != self.defaultExecutableName:
-            w("    Executable(%r, %r, targetName = %r)" % \
-                    (self.script, self.base, self.executableName))
+            w("    Executable(%r, base=base, targetName = %r)" % \
+                    (self.script, self.executableName))
         else:
-            w("    Executable(%r, %r)" % (self.script, self.base))
+            w("    Executable(%r, base=base)" % self.script)
         w("]")
         w("")