Commit 8836fa00 authored by Guido van Rossum's avatar Guido van Rossum

Untested changes to make the '-s windows' option

work on Windows.
parent 43fefe08
......@@ -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:
......
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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment