outfp = open(frozen_c, 'w')
try:
makefreeze.makefreeze(outfp, dict)
+ if win and subsystem == 'windows':
+ import winmakemakefile
+ outfp.write(winmakemakefile.WINMAINTEMPLATE)
finally:
outfp.close()
if backup:
import sys, os, string
+WINMAINTEMPLATE = """
+#include <windows.h>
+
+int WINAPI WinMain(
+ HINSTANCE hInstance, // handle to current instance
+ HINSTANCE hPrevInstance, // handle to previous instance
+ LPSTR lpCmdLine, // pointer to command line
+ int nCmdShow // show state of window
+ )
+{
+ return main(__argc, __argv);
+}
+"""
+
def makemakefile(outfp, vars, files, target):
save = sys.stdout
try: