mirror of https://github.com/python/cpython
Untested changes to make the '-s windows' option
work on Windows.
This commit is contained in:
parent
c7e76c885b
commit
f888350dec
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue