Changeset 30227 in vbox
- Timestamp:
- Jun 16, 2010 2:05:26 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 62713
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.vbs
r28800 r30227 55 55 g_blnInternalFirst = True 56 56 57 ' Whether to try the new tools: Visual Studio 10.0, Windows 7 SDK and WDK. 58 dim g_blnNewTools 59 g_blnNewTools = False 'True 60 57 61 58 62 … … 129 133 end if 130 134 end function 135 136 137 '' 138 ' Returns a reverse sorted array (strings). 139 function ArraySortStrings(arrStrings) 140 for i = LBound(arrStrings) to UBound(arrStrings) 141 str1 = arrStrings(i) 142 for j = i + 1 to UBound(arrStrings) 143 str2 = arrStrings(j) 144 if StrComp(str2, str1) < 0 then 145 arrStrings(j) = str1 146 str1 = str2 147 end if 148 next 149 arrStrings(i) = str1 150 next 151 ArraySortStrings = arrStrings 152 end function 153 154 155 '' 156 ' Prints a string array. 157 sub ArrayPrintStrings(arrStrings, strPrefix) 158 for i = LBound(arrStrings) to UBound(arrStrings) 159 Print strPrefix & "arrStrings(" & i & ") = '" & arrStrings(i) & "'" 160 next 161 end sub 162 163 164 '' 165 ' Returns a reverse sorted array (strings). 166 function ArrayRSortStrings(arrStrings) 167 ' Sort it. 168 arrStrings = ArraySortStrings(arrStrings) 169 170 ' Reverse the array. 171 cnt = UBound(arrStrings) - LBound(arrStrings) + 1 172 if cnt > 0 then 173 j = UBound(arrStrings) 174 iHalf = Fix(LBound(arrStrings) + cnt / 2) 175 for i = LBound(arrStrings) to iHalf - 1 176 strTmp = arrStrings(i) 177 arrStrings(i) = arrStrings(j) 178 arrStrings(j) = strTmp 179 j = j - 1 180 next 181 end if 182 ArrayRSortStrings = arrStrings 183 end function 184 185 186 '' 187 ' Returns the input array with the string appended. 188 ' Note! There must be some better way of doing this... 189 function ArrayAppend(arr, str) 190 dim i, cnt 191 cnt = UBound(arr) - LBound(arr) + 1 192 redim arrRet(cnt) 193 for i = LBound(arr) to UBound(arr) 194 arrRet(i) = arr(i) 195 next 196 arrRet(UBound(arr) + 1) = str 197 ArrayAppend = arrRet 198 end function 199 131 200 132 201 … … 142 211 RegTransRoot = HKEY_CURRENT_USER 143 212 case else 144 MsgFatal "Reg EnumSubKeys: Unknown root: " & strRoot213 MsgFatal "RegTransRoot: Unknown root: '" & strRoot & "'" 145 214 RegTransRoot = 0 146 215 end select … … 237 306 238 307 '' 308 ' Returns an array of full path subkey strings. 309 function RegEnumSubKeysFull(strRoot, strKeyPath) 310 dim arrTmp 311 arrTmp = RegEnumSubKeys(strRoot, strKeyPath) 312 for i = LBound(arrTmp) to UBound(arrTmp) 313 arrTmp(i) = strKeyPath & "\" & arrTmp(i) 314 next 315 RegEnumSubKeysFull = arrTmp 316 end function 317 318 319 '' 320 ' Returns an rsorted array of subkey strings. 321 function RegEnumSubKeysRSort(strRoot, strKeyPath) 322 RegEnumSubKeysRSort = ArrayRSortStrings(RegEnumSubKeys(strRoot, strKeyPath)) 323 end function 324 325 326 '' 327 ' Returns an rsorted array of subkey strings. 328 function RegEnumSubKeysFullRSort(strRoot, strKeyPath) 329 RegEnumSubKeysFullRSort = ArrayRSortStrings(RegEnumSubKeysFull(strRoot, strKeyPath)) 330 end function 331 332 333 '' 239 334 ' Gets the commandline used to invoke the script. 240 335 function GetCommandline() … … 308 403 ' Get the abs path, use the short version if necessary. 309 404 function PathAbs(str) 310 PathAbs = g_objFileSys.GetAbsolutePathName(DosSlashes(str)) 311 if (InStr(1, PathAbs, " ") > 0) _ 312 Or (InStr(1, PathAbs, "&") > 0) _ 313 Or (InStr(1, PathAbs, "$") > 0) _ 314 then 315 if FileExists(PathAbs) then 316 dim objFile 317 set objFile = g_objFileSys.GetFile(PathAbs) 318 PathAbs = objFile.ShortPath 319 elseif DirExists(PathAbs) then 320 dim objFolder 321 set objFolder = g_objFileSys.GetFolder(PathAbs) 322 PathAbs = objFolder.ShortPath 323 else 324 ' ignore non-existing paths. 325 end if 326 end if 327 328 329 if (FileExists(PathAbs) Or DirExists(PathAbs)) _ 330 And ( (InStr(1, PathAbs, " ") > 0) _ 331 Or (InStr(1, PathAbs, "&") > 0) _ 332 Or (InStr(1, PathAbs, "$") > 0)) _ 333 then 334 MsgFatal "PathAbs(" & str & ") attempted to return filename with problematic " _ 335 & "characters in it (" & PathAbs & "). The tool/sdk referenced will probably " _ 336 & "need to be copied or reinstalled to a location without 'spaces', '$', ';' " _ 337 & "or '&' in the path name. (Unless it's a problem with this script of course...)" 405 strAbs = g_objFileSys.GetAbsolutePathName(DosSlashes(str)) 406 strParent = g_objFileSys.GetParentFolderName(strAbs) 407 if strParent = "" then 408 PathAbs = strAbs 409 else 410 strParent = PathAbs(strParent) ' Recurse to resolve parent paths. 411 PathAbs = g_objFileSys.BuildPath(strParent, g_objFileSys.GetFileName(strAbs)) 412 413 dim obj 414 set obj = Nothing 415 if FileExists(PathAbs) then 416 set obj = g_objFileSys.GetFile(PathAbs) 417 elseif DirExists(PathAbs) then 418 set obj = g_objFileSys.GetFolder(PathAbs) 419 end if 420 421 if not (obj is nothing) then 422 for each objSub in obj.ParentFolder.SubFolders 423 if obj.Name = objSub.Name or obj.ShortName = objSub.ShortName then 424 if InStr(1, objSub.Name, " ") > 0 _ 425 Or InStr(1, objSub.Name, "&") > 0 _ 426 Or InStr(1, objSub.Name, "$") > 0 _ 427 then 428 PathAbs = g_objFileSys.BuildPath(strParent, objSub.ShortName) 429 if InStr(1, PathAbs, " ") > 0 _ 430 Or InStr(1, PathAbs, "&") > 0 _ 431 Or InStr(1, PathAbs, "$") > 0 _ 432 then 433 MsgFatal "PathAbs(" & str & ") attempted to return filename with problematic " _ 434 & "characters in it (" & PathAbs & "). The tool/sdk referenced will probably " _ 435 & "need to be copied or reinstalled to a location without 'spaces', '$', ';' " _ 436 & "or '&' in the path name. (Unless it's a problem with this script of course...)" 437 end if 438 else 439 PathAbs = g_objFileSys.BuildPath(strParent, objSub.Name) 440 end if 441 exit for 442 end if 443 next 444 end if 445 end if 446 end function 447 448 449 '' 450 ' Get the abs path, use the long version. 451 function PathAbsLong(str) 452 strAbs = g_objFileSys.GetAbsolutePathName(DosSlashes(str)) 453 strParent = g_objFileSys.GetParentFolderName(strAbs) 454 if strParent = "" then 455 PathAbsLong = strAbs 456 else 457 strParent = PathAbsLong(strParent) ' Recurse to resolve parent paths. 458 PathAbsLong = g_objFileSys.BuildPath(strParent, g_objFileSys.GetFileName(strAbs)) 459 460 dim obj 461 set obj = Nothing 462 if FileExists(PathAbsLong) then 463 set obj = g_objFileSys.GetFile(PathAbsLong) 464 elseif DirExists(PathAbsLong) then 465 set obj = g_objFileSys.GetFolder(PathAbsLong) 466 end if 467 468 if not (obj is nothing) then 469 for each objSub in obj.ParentFolder.SubFolders 470 if obj.Name = objSub.Name or obj.ShortName = objSub.ShortName then 471 PathAbsLong = g_objFileSys.BuildPath(strParent, objSub.Name) 472 exit for 473 end if 474 next 475 end if 338 476 end if 339 477 end function … … 416 554 '' 417 555 ' Prints a success message 418 sub PrintResult (strTest, strResult)556 sub PrintResultMsg(strTest, strResult) 419 557 LogPrint "** " & strTest & ": " & strResult 420 558 Wscript.Echo " Found "& strTest & ": " & strResult 559 end sub 560 561 562 '' 563 ' Prints a successfully detected path 564 sub PrintResult(strTest, strPath) 565 strLongPath = PathAbsLong(strPath) 566 if PathAbs(strPath) <> strLongPath then 567 LogPrint "** " & strTest & ": " & strPath & " (" & UnixSlashes(strLongPath) & ")" 568 Wscript.Echo " Found " & strTest & ": " & strPath & " (" & UnixSlashes(strLongPath) & ")" 569 else 570 LogPrint "** " & strTest & ": " & strPath 571 Wscript.Echo " Found " & strTest & ": " & strPath 572 end if 421 573 end sub 422 574 … … 803 955 804 956 '' 805 ' Checks for Visual C++ version 7 or 8.957 ' Checks for Visual C++ version 7.1, 8 or 10. 806 958 sub CheckForVisualCPP(strOptVC, strOptVCCommon, blnOptVCExpressEdition) 807 959 dim strPathVC, strPathVCCommon, str, str2, blnNeedMsPDB … … 821 973 822 974 if (strPathVC = "") And (g_blnInternalFirst = True) Then 823 strPathVC = g_strPathDev & "/win.x86/vcc/v8" 824 if CheckForVisualCPPSub(strPathVC, "", blnOptVCExpressEdition) = False then 825 strPathVC = g_strPathDev & "/win.x86/vcc/v7" 975 if g_blnNewTools Then 976 strPathVC = g_strPathDev & "/win.x86/vcc/v10" 826 977 if CheckForVisualCPPSub(strPathVC, "", blnOptVCExpressEdition) = False then 827 978 strPathVC = "" 979 end if 980 end if 981 if strPathVC = "" then 982 strPathVC = g_strPathDev & "/win.x86/vcc/v8" 983 if CheckForVisualCPPSub(strPathVC, "", blnOptVCExpressEdition) = False then 984 strPathVC = g_strPathDev & "/win.x86/vcc/v7" 985 if CheckForVisualCPPSub(strPathVC, "", blnOptVCExpressEdition) = False then 986 strPathVC = "" 987 end if 828 988 end if 829 989 end if … … 839 999 strPathVC = PathParent(PathStripFilename(str)) 840 1000 strPathVCCommon = PathParent(strPathVC) & "/Common7" 1001 end if 1002 end if 1003 1004 if (strPathVC = "") And g_blnNewTools then 1005 str = RegGetString("HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Setup\VS\ProductDir") 1006 if str <> "" Then 1007 str2 = str & "Common7" 1008 str = str & "VC" 1009 if CheckForVisualCPPSub(str, str2, blnOptVCExpressEdition) then 1010 strPathVC = str 1011 strPathVCCommon = str2 1012 end if 1013 end if 1014 end if 1015 1016 if (strPathVC = "") And g_blnNewTools then 1017 str = RegGetString("HKLM\SOFTWARE\Microsoft\VisualStudio\10.0\Setup\VS\ProductDir") 1018 if str <> "" Then 1019 str2 = str & "Common7" 1020 str = str & "VC" 1021 if CheckForVisualCPPSub(str, str2, blnOptVCExpressEdition) then 1022 strPathVC = str 1023 strPathVCCommon = str2 1024 end if 841 1025 end if 842 1026 end if … … 964 1148 965 1149 if (InStr(1, g_strShellOutput, "Version 13.10") <= 0) _ 966 And (InStr(1, g_strShellOutput, "Version 14.") <= 0) then 967 MsgError "The Visual C++ compiler we found ('" & strPathVC & "') isn't 7.1 or 8.0. Check the build requirements." 1150 And (InStr(1, g_strShellOutput, "Version 14.") <= 0) _ 1151 And (InStr(1, g_strShellOutput, "Version 16.") <= 0) then 1152 MsgError "The Visual C++ compiler we found ('" & strPathVC & "') isn't 7.1, 8.0 or 10.0. Check the build requirements." 968 1153 exit sub 969 1154 end if … … 972 1157 ' Ok, emit build config variables. 973 1158 ' 974 if InStr(1, g_strShellOutput, "Version 14.") > 0 then 1159 if InStr(1, g_strShellOutput, "Version 16.") > 0 then 1160 CfgPrint "VBOX_USE_VCC100 := 1" 1161 CfgPrint "PATH_TOOL_VCC100 := " & g_strPathVCC 1162 CfgPrint "PATH_TOOL_VCC100X86 = $(PATH_TOOL_VCC100)" 1163 CfgPrint "PATH_TOOL_VCC100AMD64 = $(PATH_TOOL_VCC100)" 1164 if LogFileExists(strPathVC, "atlmfc/include/atlbase.h") then 1165 PrintResult "Visual C++ v10 with ATL", g_strPathVCC 1166 elseif LogFileExists(g_strPathDDK, "inc/atl71/atlbase.h") _ 1167 And LogFileExists(g_strPathDDK, "lib/ATL/i386/atls.lib") then 1168 CfgPrint "TOOL_VCC100X86_MT = $(PATH_SDK_WINPSDK)/Bin/mt.exe" 1169 CfgPrint "TOOL_VCC100AMD64_MT = $(TOOL_VCC100X86_MT)" 1170 CfgPrint "VBOX_WITHOUT_COMPILER_REDIST=1" 1171 CfgPrint "PATH_TOOL_VCC100_ATLMFC_INC = " & g_strPathDDK & "/inc/atl71" 1172 CfgPrint "PATH_TOOL_VCC100_ATLMFC_LIB.amd64 = " & g_strPathDDK & "/lib/ATL/amd64" 1173 CfgPrint "PATH_TOOL_VCC100_ATLMFC_LIB.x86 = " & g_strPathDDK & "/lib/ATL/i386" 1174 CfgPrint "PATH_TOOL_VCC100AMD64_ATLMFC_INC = " & g_strPathDDK & "/inc/atl71" 1175 CfgPrint "PATH_TOOL_VCC100AMD64_ATLMFC_LIB = " & g_strPathDDK & "/lib/ATL/amd64" 1176 CfgPrint "PATH_TOOL_VCC100X86_ATLMFC_INC = " & g_strPathDDK & "/inc/atl71" 1177 CfgPrint "PATH_TOOL_VCC100X86_ATLMFC_LIB = " & g_strPathDDK & "/lib/ATL/i386" 1178 PrintResult "Visual C++ v10 with DDK ATL", g_strPathVCC 1179 else 1180 CfgPrint "TOOL_VCC100X86_MT = $(PATH_SDK_WINPSDK)/Bin/mt.exe" 1181 CfgPrint "TOOL_VCC100AMD64_MT = $(TOOL_VCC100X86_MT)" 1182 CfgPrint "VBOX_WITHOUT_COMPILER_REDIST=1" 1183 DisableCOM "No ATL" 1184 PrintResult "Visual C++ v10 (or later) without ATL", g_strPathVCC 1185 end if 1186 elseif InStr(1, g_strShellOutput, "Version 14.") > 0 then 975 1187 CfgPrint "VBOX_USE_VCC80 := 1" 976 1188 CfgPrint "PATH_TOOL_VCC80 := " & g_strPathVCC … … 1022 1234 Or ( LogFileExists(strPathVC, "atlmfc/include/atlbase.h") _ 1023 1235 And LogFileExists(strPathVC, "atlmfc/lib/atls.lib")) _ 1236 Or ( LogFileExists(g_strPathDDK, "inc/atl71/atlbase.h") _ 1237 And LogFileExists(g_strPathDDK, "lib/ATL/i386/atls.lib")) _ 1024 1238 Then 1025 1239 '' @todo figure out a way we can verify the version/build! … … 1045 1259 1046 1260 ' The tools location (first). 1047 if (strPathPSDK = "") And (g_blnInternalFirst = True)then1261 if strPathPSDK = "" And g_blnInternalFirst then 1048 1262 str = g_strPathDev & "/win.x86/sdk/200604" 1049 1263 if CheckForPlatformSDKSub(str) then strPathPSDK = str 1050 1264 end if 1051 1265 1052 if (strPathPSDK = "") And (g_blnInternalFirst = True)then1266 if strPathPSDK = "" And g_blnInternalFirst then 1053 1267 str = g_strPathDev & "/win.x86/sdk/200504" 1054 1268 if CheckForPlatformSDKSub(str) then strPathPSDK = str 1055 1269 end if 1056 1270 1057 if (strPathPSDK = "") And (g_blnInternalFirst = True)then1271 if strPathPSDK = "" And g_blnInternalFirst then 1058 1272 str = g_strPathDev & "/win.x86/sdk/200209" 1059 1273 if CheckForPlatformSDKSub(str) then strPathPSDK = str … … 1062 1276 ' Look for it in the environment 1063 1277 str = EnvGet("MSSdk") 1064 if (strPathPSDK = "") And (str <> "")then1278 if strPathPSDK = "" And str <> "" then 1065 1279 if CheckForPlatformSDKSub(str) then strPathPSDK = str 1066 1280 end if 1067 1281 1068 1282 str = EnvGet("Mstools") 1069 if (strPathPSDK = "") And (str <> "")then1283 if strPathPSDK = "" And str <> "" then 1070 1284 if CheckForPlatformSDKSub(str) then strPathPSDK = str 1071 1285 end if 1072 1286 1073 1287 ' Check if there is one installed with the compiler. 1074 if (strPathPSDK = "") And (str <> "")then1288 if strPathPSDK = "" And str <> "" then 1075 1289 str = g_strPathVCC & "/PlatformSDK" 1076 1290 if CheckForPlatformSDKSub(str) then strPathPSDK = str 1077 1291 end if 1078 1292 1079 ' Check the registry next . (first pair is vista, second is pre-vista)1080 arrSubKeys = RegEnumSubKeys ("HKLM", "SOFTWARE\Microsoft\Microsoft SDKs\Windows")1081 for Each strSubKey In arrSubKeys1293 ' Check the registry next (ASSUMES sorting). (first pair is vista, second is pre-vista) 1294 arrSubKeys = RegEnumSubKeysRSort("HKLM", "SOFTWARE\Microsoft\Microsoft SDKs\Windows") 1295 for each strSubKey in arrSubKeys 1082 1296 str = RegGetString("HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\" & strSubKey & "\InstallationFolder") 1083 if (strPathPSDK = "") And (str <> "")then1297 if strPathPSDK = "" And str <> "" then 1084 1298 if CheckForPlatformSDKSub(str) then strPathPSDK = str 1085 1299 end if 1086 1300 Next 1087 arrSubKeys = RegEnumSubKeys ("HKCU", "SOFTWARE\Microsoft\Microsoft SDKs\Windows")1088 for Each strSubKey In arrSubKeys1301 arrSubKeys = RegEnumSubKeysRSort("HKCU", "SOFTWARE\Microsoft\Microsoft SDKs\Windows") 1302 for each strSubKey in arrSubKeys 1089 1303 str = RegGetString("HKCU\SOFTWARE\Microsoft\Microsoft SDKs\Windows\" & strSubKey & "\InstallationFolder") 1090 if (strPathPSDK = "") And (str <> "")then1304 if strPathPSDK = "" And str <> "" then 1091 1305 if CheckForPlatformSDKSub(str) then strPathPSDK = str 1092 1306 end if 1093 1307 Next 1094 1308 1095 arrSubKeys = RegEnumSubKeys ("HKLM", "SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs")1096 for Each strSubKey In arrSubKeys1309 arrSubKeys = RegEnumSubKeysRSort("HKLM", "SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs") 1310 for each strSubKey in arrSubKeys 1097 1311 str = RegGetString("HKLM\SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs\" & strSubKey & "\Install Dir") 1098 if (strPathPSDK = "") And (str <> "")then1312 if strPathPSDK = "" And str <> "" then 1099 1313 if CheckForPlatformSDKSub(str) then strPathPSDK = str 1100 1314 end if 1101 1315 Next 1102 arrSubKeys = RegEnumSubKeys ("HKCU", "SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs")1103 for Each strSubKey In arrSubKeys1316 arrSubKeys = RegEnumSubKeysRSort("HKCU", "SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs") 1317 for each strSubKey in arrSubKeys 1104 1318 str = RegGetString("HKCU\SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs\" & strSubKey & "\Install Dir") 1105 if (strPathPSDK = "") And (str <> "")then1319 if strPathPSDK = "" And str <> "" then 1106 1320 if CheckForPlatformSDKSub(str) then strPathPSDK = str 1107 1321 end if … … 1158 1372 1159 1373 '' 1160 ' Checks for a Windows 2003 DDK that works with the compiler intrinsics.1374 ' Checks for a Windows 2003 DDK or Windows 7 Driver Kit. 1161 1375 sub CheckForWin2k3DDK(strOptDDK) 1162 1376 dim strPathDDK, str, strSubKeys … … 1168 1382 strPathDDK = "" 1169 1383 ' The specified path. 1170 if (strPathDDK = "") And (strOptDDK <> "")then1384 if strPathDDK = "" And strOptDDK <> "" then 1171 1385 if CheckForWin2k3DDKSub(strOptDDK, True) then strPathDDK = strOptDDK 1172 1386 end if 1173 1387 1174 1388 ' The tools location (first). 1175 if (strPathDDK = "") And (g_blnInternalFirst = True)then1389 if strPathDDK = "" And g_blnInternalFirst then 1176 1390 str = g_strPathDev & "/win.x86/ddkwin2k3/200503" 1177 1391 if CheckForWin2k3DDKSub(str, False) then strPathDDK = str 1178 1392 end if 1179 1393 1180 if (strPathDDK = "") And (g_blnInternalFirst = True)then1394 if strPathDDK = "" And g_blnInternalFirst then 1181 1395 str = g_strPathDev & "/win.x86/ddkwin2k3/2004" 1182 1396 if CheckForWin2k3DDKSub(str, False) then strPathDDK = str … … 1185 1399 ' Check the environment 1186 1400 str = EnvGet("DDK_INC_PATH") 1187 if (strPathDDK = "") And (str <> "")then1401 if strPathDDK = "" And str <> "" then 1188 1402 str = PathParent(PathParent(str)) 1189 1403 if CheckForWin2k3DDKSub(str, True) then strPathDDK = str … … 1191 1405 1192 1406 str = EnvGet("BASEDIR") 1193 if (strPathDDK = "") And (str <> "")then1407 if strPathDDK = "" And str <> "" then 1194 1408 if CheckForWin2k3DDKSub(str, True) then strPathDDK = str 1195 1409 end if 1196 1410 1197 ' Check the registry next. (the first pair is for vista (WDK), the second for pre-vista (DDK)) 1198 arrSubKeys = RegEnumSubKeys("HKLM", "SOFTWARE\Microsoft\WINDDK") '' @todo Need some sorting stuff here. 1199 for Each strSubKey In arrSubKeys 1200 str = RegGetString("HKLM\SOFTWARE\Microsoft\WINDDK\" & strSubKey & "\Setup\BUILD") 1201 if (strPathDDK = "") And (str <> "") then 1202 if CheckForWin2k3DDKSub(str, False) then strPathDDK = str 1203 end if 1204 Next 1205 arrSubKeys = RegEnumSubKeys("HKCU", "SOFTWARE\Microsoft\WINDDK") '' @todo Need some sorting stuff here. 1206 for Each strSubKey In arrSubKeys 1207 str = RegGetString("HKCU\SOFTWARE\Microsoft\WINDDK\" & strSubKey & "\Setup\BUILD") 1208 if (strPathDDK = "") And (str <> "") then 1209 if CheckForWin2k3DDKSub(str, False) then strPathDDK = str 1210 end if 1211 Next 1212 1213 arrSubKeys = RegEnumSubKeys("HKLM", "SOFTWARE\Microsoft\WINDDK") '' @todo Need some sorting stuff here. 1214 for Each strSubKey In arrSubKeys 1215 str = RegGetString("HKLM\SOFTWARE\Microsoft\WINDDK\" & strSubKey & "\SFNDirectory") 1216 if (strPathDDK = "") And (str <> "") then 1217 if CheckForWin2k3DDKSub(str, False) then strPathDDK = str 1218 end if 1219 Next 1220 arrSubKeys = RegEnumSubKeys("HKCU", "SOFTWARE\Microsoft\WINDDK") '' @todo Need some sorting stuff here. 1221 for Each strSubKey In arrSubKeys 1222 str = RegGetString("HKCU\SOFTWARE\Microsoft\WINDDK\" & strSubKey & "\SFNDirectory") 1223 if (strPathDDK = "") And (str <> "") then 1224 if CheckForWin2k3DDKSub(str, False) then strPathDDK = str 1225 end if 1226 Next 1411 ' Some array constants to ease the work. 1412 arrSoftwareKeys = array("SOFTWARE", "SOFTWARE\Wow6432Node") 1413 arrRoots = array("HKLM", "HKCU") 1414 1415 ' Windows 7 WDK. 1416 arrLocations = array() 1417 for each strSoftwareKey in arrSoftwareKeys 1418 for each strSubKey in RegEnumSubKeysFull("HKLM", strSoftwareKey & "\Microsoft\KitSetup\configured-kits") 1419 for each strSubKey2 in RegEnumSubKeysFull("HKLM", strSubKey) 1420 str = RegGetString("HKLM\" & strSubKey2 & "\setup-install-location") 1421 if str <> "" then 1422 arrLocations = ArrayAppend(arrLocations, PathAbsLong(str)) 1423 end if 1424 next 1425 next 1426 next 1427 arrLocations = ArrayRSortStrings(arrLocations) 1428 1429 ' Vista WDK. 1430 for each strRoot in arrRoots 1431 for each strSubKey in RegEnumSubKeysFullRSort(strRoot, "SOFTWARE\Microsoft\WINDDK") 1432 str = RegGetString(strRoot & "\" & strSubKey & "\Setup\BUILD") 1433 if str <> "" then arrLocations = ArrayAppend(arrLocations, PathAbsLong(str)) 1434 Next 1435 next 1436 1437 ' Pre-Vista WDK? 1438 for each strRoot in arrRoots 1439 for each strSubKey in RegEnumSubKeysFullRSort(strRoot, "SOFTWARE\Microsoft\WINDDK") 1440 str = RegGetString(strRoot & "\" & strSubKey & "\SFNDirectory") 1441 if str <> "" then arrLocations = ArrayAppend(arrLocations, PathAbsLong(str)) 1442 Next 1443 next 1444 1445 ' Check the locations we've gathered. 1446 for each str in arrLocations 1447 if strPathDDK = "" then 1448 if CheckForWin2k3DDKSub(str, True) then strPathDDK = str 1449 end if 1450 next 1227 1451 1228 1452 ' The tools location (post). … … 1247 1471 ' 1248 1472 strPathDDK = UnixSlashes(PathAbs(strPathDDK)) 1249 CfgPrint "PATH_SDK_W2K3DDK := " & strPathDDK 1250 CfgPrint "PATH_SDK_W2K3DDKX86 = $(PATH_SDK_W2K3DDK)" 1251 CfgPrint "PATH_SDK_W2K3DDKAMD64 = $(PATH_SDK_W2K3DDK)" 1473 if LogFileExists(strPathDDK, "inc/api/ntdef.h") then 1474 CfgPrint "VBOX_USE_WINDDK := 1" 1475 CfgPrint "PATH_SDK_WINDDK := " & strPathDDK 1476 else 1477 CfgPrint "PATH_SDK_W2K3DDK := " & strPathDDK 1478 CfgPrint "PATH_SDK_W2K3DDKX86 = $(PATH_SDK_W2K3DDK)" 1479 CfgPrint "PATH_SDK_W2K3DDKAMD64 = $(PATH_SDK_W2K3DDK)" 1480 end if 1252 1481 1253 1482 PrintResult "Windows 2003 DDK", strPathDDK … … 1259 1488 CheckForWin2k3DDKSub = False 1260 1489 LogPrint "trying: strPathDDK=" & strPathDDK & " blnCheckBuild=" & blnCheckBuild 1261 '' @todo vista: if ( LogFileExists(strPathDDK, "inc/ddk/wnet/ntdef.h") _ 1262 ' Or LogFileExists(strPathDDK, "inc/api/ntdef.h")) _ 1490 if g_blnNewTools _ 1491 And LogFileExists(strPathDDK, "inc/api/ntdef.h") _ 1492 And LogFileExists(strPathDDK, "lib/wnet/i386/int64.lib") _ 1493 then 1494 '' @todo figure out a way we can verify the version/build! 1495 CheckForWin2k3DDKSub = True 1496 end if 1497 1263 1498 if LogFileExists(strPathDDK, "inc/ddk/wnet/ntdef.h") _ 1264 1499 And LogFileExists(strPathDDK, "lib/wnet/i386/int64.lib") _ … … 1278 1513 ' Skip if no COM/ATL. 1279 1514 if g_blnDisableCOM then 1280 PrintResult "Midl", "Skipped (" & g_strDisableCOM & ")"1515 PrintResultMsg "Midl", "Skipped (" & g_strDisableCOM & ")" 1281 1516 exit sub 1282 1517 end if … … 1614 1849 ' Skip if no COM/ATL. 1615 1850 if g_blnDisableCOM then 1616 PrintResult "libxml2", "Skipped (" & g_strDisableCOM & ")"1851 PrintResultMsg "libxml2", "Skipped (" & g_strDisableCOM & ")" 1617 1852 exit sub 1618 1853 end if … … 1636 1871 ' Ignore failure if we're in 'internal' mode. 1637 1872 if (strPathXml2 = "") and g_blnInternalMode then 1638 PrintResult "libxml2", "ignored (internal mode)"1873 PrintResultMsg "libxml2", "ignored (internal mode)" 1639 1874 exit sub 1640 1875 end if … … 1686 1921 ' Skip if no COM/ATL. 1687 1922 if g_blnDisableCOM then 1688 PrintResult "libxslt", "Skipped (" & g_strDisableCOM & ")"1923 PrintResultMsg "libxslt", "Skipped (" & g_strDisableCOM & ")" 1689 1924 exit sub 1690 1925 end if … … 1716 1951 ' Ignore failure if we're in 'internal' mode. 1717 1952 if (strPathXslt = "") and g_blnInternalMode then 1718 PrintResult "libxslt", "ignored (internal mode)"1953 PrintResultMsg "libxslt", "ignored (internal mode)" 1719 1954 exit sub 1720 1955 end if … … 1785 2020 ' Ignore failure if we're in 'internal' mode. 1786 2021 if (strPathSsl = "") and g_blnInternalMode then 1787 PrintResult "openssl", "ignored (internal mode)"2022 PrintResultMsg "openssl", "ignored (internal mode)" 1788 2023 exit sub 1789 2024 end if … … 1848 2083 ' Ignore failure if we're in 'internal' mode. 1849 2084 if (strPathCurl = "") and g_blnInternalMode then 1850 PrintResult "curl", "ignored (internal mode)"2085 PrintResultMsg "curl", "ignored (internal mode)" 1851 2086 exit sub 1852 2087 end if … … 1907 2142 if strPathQt4 = "" then 1908 2143 CfgPrint "VBOX_WITH_QT4GUI=" 1909 PrintResult "Qt4", "not found"2144 PrintResultMsg "Qt4", "not found" 1910 2145 else 1911 2146 CfgPrint "PATH_SDK_QT4 := " & strPathQt4 … … 2118 2353 CheckSourcePath 2119 2354 CheckForkBuild strOptkBuild 2355 CheckForWin2k3DDK strOptDDK 2120 2356 CheckForVisualCPP strOptVC, strOptVCCommon, blnOptVCExpressEdition 2121 2357 CheckForPlatformSDK strOptSDK 2122 CheckForWin2k3DDK strOptDDK2123 2358 CheckForMidl 2124 2359 CheckForDirectXSDK strOptDXSDK
Note:
See TracChangeset
for help on using the changeset viewer.