Untested changes to make the '-s windows' option

work on Windows.
This commit is contained in:
Guido van Rossum 1998-03-04 18:12:39 +00:00
parent c7e76c885b
commit f888350dec
2 changed files with 17 additions and 0 deletions

View File

@ -240,6 +240,9 @@ def main():
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:

View File

@ -1,5 +1,19 @@
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: