Build .exe wrapper for .p3d deploy tools on Windows

This commit is contained in:
rdb 2015-11-20 20:25:46 +01:00
parent 4c61db6374
commit 5b4b6ced70
2 changed files with 6 additions and 7 deletions

View File

@ -1879,13 +1879,12 @@ def Package(target, inputs, opts):
oscmd(command) oscmd(command)
if GetTarget() == 'windows': if GetTarget() == 'windows':
# TODO: build p3dWrapper.c executable. # Make an .exe that calls this .p3d.
#objfile = FindLocation('p3dWrapper_' + basename + '.obj', []) objfile = FindLocation('p3dWrapper_' + basename + '.obj', [])
#CompileCxx(objfile, 'p3dWrapper.c', ['DIR:direct/src/p3d']) CompileCxx(objfile, 'direct/src/p3d/p3dWrapper.c', [])
#exefile = os.path.splitext(target)[0] + '.exe' exefile = FindLocation(basename + '.exe', [])
#CompileLink(exefile, [objfile], ['ADVAPI']) CompileLink(exefile, [objfile], ['ADVAPI'])
pass
# Move it to the bin directory. # Move it to the bin directory.
os.rename(GetOutputDir() + '/stage/' + basename + P3DSUFFIX + '.p3d', target) os.rename(GetOutputDir() + '/stage/' + basename + P3DSUFFIX + '.p3d', target)

View File

@ -1874,7 +1874,7 @@ def SdkLocatePython(prefer_thirdparty_python=False):
if (GetTargetArch() == 'x64' and os.path.isdir(SDK["PYTHON"] + "-x64")): if (GetTargetArch() == 'x64' and os.path.isdir(SDK["PYTHON"] + "-x64")):
SDK["PYTHON"] += "-x64" SDK["PYTHON"] += "-x64"
SDK["PYTHONEXEC"] = SDK["PYTHON"].replace('/', '\\') + "\\python" SDK["PYTHONEXEC"] = SDK["PYTHON"].replace('\\', '/') + "/python"
if (GetOptimize() <= 2): if (GetOptimize() <= 2):
SDK["PYTHONEXEC"] += "_d.exe" SDK["PYTHONEXEC"] += "_d.exe"
else: else: