diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index d5b1394c64..c905ef7c2a 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -668,7 +668,14 @@ def CompileCxx(obj,src,opts): cmd = "cl " if (platform.architecture()[0]=="64bit"): cmd += "/favor:blend " - cmd += "/wd4996 /wd4275 /wd4267 /wd4101 /wd4273 /Fo" + obj + " /nologo /c" + cmd += "/wd4996 /wd4275 /wd4267 /wd4101 /wd4273 " + + # Enables Windows 7 mode if SDK is detected. + platsdk = GetRegistryKey("SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v7.0", "InstallationFolder") + if platsdk and os.path.isdir(platsdk): + cmd += "/DPANDA_WIN7 /DWINVER=0x601 " + + cmd += "/Fo" + obj + " /nologo /c" for x in ipath: cmd += " /I" + x for (opt,dir) in INCDIRECTORIES: if (opt=="ALWAYS") or (opts.count(opt)): cmd += " /I" + BracketNameWithQuotes(dir) diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index f56e3892b3..40dc350e45 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -1411,8 +1411,14 @@ def SdkLocateVisualStudio(): def SdkLocateMSPlatform(): if (sys.platform != "win32"): return - platsdk = GetRegistryKey("SOFTWARE\\Microsoft\\MicrosoftSDK\\InstalledSDKs\\D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1", "Install Dir") - if (platsdk and not os.path.isdir(platsdk)): platsdk = 0 + platsdk = GetRegistryKey("SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v7.0", "InstallationFolder") + if (platsdk and not os.path.isdir(platsdk)): + platsdk = 0 + else: + print "Windows 7 SDK detected. Enabling special features (multi-touch)." + if (platsdk == 0): + platsdk = GetRegistryKey("SOFTWARE\\Microsoft\\MicrosoftSDK\\InstalledSDKs\\D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1", "Install Dir") + if (platsdk and not os.path.isdir(platsdk)): platsdk = 0 if (platsdk == 0): platsdk = GetRegistryKey("SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v6.1","InstallationFolder") if (platsdk and not os.path.isdir(platsdk)): platsdk = 0