Find all available XP toolchains

feature/quick-start-py
kaetemi 3 years ago
parent d5474ae8ca
commit c65d765459
No known key found for this signature in database
GPG Key ID: 9873C4D40BB479BC

@ -33,7 +33,24 @@
"WinXP/VS/v100/x86", "WinXP/VS/v100/x86",
"Win98/VS/v80/x86" "Win98/VS/v80/x86"
], ],
"Server": { "OS": "Ubuntu20" }, "Server": [{ "OS": "Ubuntu20", "Hunter": false }],
"Client": {
"exedll_32": "Win32",
"exedll_64": "Win64"
},
"Win32": [
{ "OS": "Win98", "Platform": "x86", "Hunter": false },
{ "OS": "Win2k", "Platform": "x86", "Hunter": false },
{ "OS": "WinXP", "Platform": "x86", "Hunter": false },
{ "OS": "Win7", "Platform": "x86", "Hunter": false },
{ "OS": "WinXP", "Platform": "x86" },
{ "OS": "Win7", "Platform": "x86" }
],
"Win64": [
{ "OS": "WinXP", "Platform": "x64", "Hunter": false },
{ "OS": "Win7", "Platform": "x64", "Hunter": false },
{ "OS": "Win7", "Platform": "x64" }
],
"Options": [ "Options": [
{ {
"Filter": { "Compiler": "MSVC" }, "Filter": { "Compiler": "MSVC" },

@ -9,7 +9,7 @@ def FindToolchain(filter):
ts = NeLToolchains[tsn] ts = NeLToolchains[tsn]
okay = True okay = True
for k in filter: for k in filter:
if ts[k] != filter[k]: if not ((not k in ts and not filter[k]) or ts[k] == filter[k]):
okay = False okay = False
break break
if okay: if okay:
@ -26,17 +26,16 @@ def FindToolchain(filter):
res = tsn res = tsn
return res return res
NeLToolchainWin32 = FindToolchain({ "OS": "Win98", "Platform": "x86" }) def FindToolchainEx(filters):
if not NeLToolchainWin32: for filter in filters:
NeLToolchainWin32 = FindToolchain({ "OS": "Win2k", "Platform": "x86" }) res = FindToolchain(filter)
if not NeLToolchainWin32: if res:
NeLToolchainWin32 = FindToolchain({ "OS": "WinXP", "Platform": "x86" }) return res
if not NeLToolchainWin32: return
NeLToolchainWin32 = FindToolchain({ "OS": "Win7", "Platform": "x86" })
NeLToolchainWin64 = FindToolchain({ "OS": "WinXP", "Platform": "x64" }) NeLToolchainWin32 = FindToolchainEx(NeLConfig["Toolchain"]["Win32"])
if not NeLToolchainWin64: NeLToolchainWin64 = FindToolchainEx(NeLConfig["Toolchain"]["Win64"])
NeLToolchainWin64 = FindToolchain({ "OS": "Win7", "Platform": "x64" }) NeLToolchainServer = FindToolchainEx(NeLConfig["Toolchain"]["Server"])
NeLToolchainServer = FindToolchain(NeLConfig["Toolchain"]["Server"])
print("Win32:") print("Win32:")
print(NeLToolchainWin32) print(NeLToolchainWin32)

@ -33,6 +33,14 @@ VSMajor["2017"] = 15
VSMajor["2019"] = 16 VSMajor["2019"] = 16
VSMajor["2022"] = 17 VSMajor["2022"] = 17
VSPlatform = {}
VSPlatform["v110"] = "v110"
VSPlatform["v120"] = "v120"
VSPlatform["v140"] = "v140"
VSPlatform["v141"] = "v150"
VSPlatform["v142"] = "v160"
VSPlatform["v143"] = "v170"
# "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\afx.h" # "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\afx.h"
# "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.16.27023\atlmfc\include\afx.h" # "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.16.27023\atlmfc\include\afx.h"
# "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\*\atlmfc\include\afx.h" # "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\*\atlmfc\include\afx.h"
@ -108,6 +116,15 @@ for yearVersion in os.listdir("C:\\Program Files\\Microsoft Visual Studio"):
ProcessYearPath(yearVersion, yearPath) ProcessYearPath(yearVersion, yearPath)
del yearPath del yearPath
# Check for any available XP toolsets
for vs in list(FoundVisualStudio):
if (vs["Version"] >= 11):
platform = VSPlatform[vs["Toolset"]]
# C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v150\Platforms\Win32\PlatformToolsets\v141_xp
checkPath = os.path.join(vs["Path"], "MSBuild\\Microsoft\\VC\\" + platform + "\\Platforms\\Win32\\PlatformToolsets\\" + vs["Toolset"] + "_xp")
if os.path.isdir(checkPath):
FoundVisualStudio += [ { "Name": vs["Name"], "DisplayName": vs["DisplayName"] + " (Windows XP Support)", "Path": vs["Path"], "Version": vs["Version"], "Toolset": vs["Toolset"] + "_xp", "HasMFC": vs["HasMFC"] } ]
def FindVCVars32(path): def FindVCVars32(path):
auxVars = os.path.join(path, "VC\\Auxiliary\\Build\\vcvars32.bat") auxVars = os.path.join(path, "VC\\Auxiliary\\Build\\vcvars32.bat")
if os.path.isfile(auxVars): if os.path.isfile(auxVars):
@ -149,6 +166,7 @@ def HasXAudio2(path):
del ProcessYearPath del ProcessYearPath
del VSVersions del VSVersions
del VSMajor del VSMajor
del VSPlatform
#print(FoundVisualStudio) #print(FoundVisualStudio)

Loading…
Cancel
Save