VirtualBox

Changeset 30227 in vbox


Ignore:
Timestamp:
Jun 16, 2010 2:05:26 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
62713
Message:

configure.vbs: updates for VCC100 and the newer DDKs and SDKs (disabled). fixing PathAbs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.vbs

    r28800 r30227  
    5555g_blnInternalFirst = True
    5656
     57' Whether to try the new tools: Visual Studio 10.0, Windows 7 SDK and WDK.
     58dim g_blnNewTools
     59g_blnNewTools = False 'True
     60
    5761
    5862
     
    129133   end if
    130134end function
     135
     136
     137''
     138' Returns a reverse sorted array (strings).
     139function 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
     152end function
     153
     154
     155''
     156' Prints a string array.
     157sub ArrayPrintStrings(arrStrings, strPrefix)
     158   for i = LBound(arrStrings) to UBound(arrStrings)
     159      Print strPrefix & "arrStrings(" & i & ") = '" & arrStrings(i) & "'"
     160   next
     161end sub
     162
     163
     164''
     165' Returns a reverse sorted array (strings).
     166function 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
     183end function
     184
     185
     186''
     187' Returns the input array with the string appended.
     188' Note! There must be some better way of doing this...
     189function 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
     198end function
     199
    131200
    132201
     
    142211         RegTransRoot = HKEY_CURRENT_USER
    143212      case else
    144          MsgFatal "RegEnumSubKeys: Unknown root: " & strRoot
     213         MsgFatal "RegTransRoot: Unknown root: '" & strRoot & "'"
    145214         RegTransRoot = 0
    146215   end select
     
    237306
    238307''
     308' Returns an array of full path subkey strings.
     309function 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
     316end function
     317
     318
     319''
     320' Returns an rsorted array of subkey strings.
     321function RegEnumSubKeysRSort(strRoot, strKeyPath)
     322   RegEnumSubKeysRSort = ArrayRSortStrings(RegEnumSubKeys(strRoot, strKeyPath))
     323end function
     324
     325
     326''
     327' Returns an rsorted array of subkey strings.
     328function RegEnumSubKeysFullRSort(strRoot, strKeyPath)
     329   RegEnumSubKeysFullRSort = ArrayRSortStrings(RegEnumSubKeysFull(strRoot, strKeyPath))
     330end function
     331
     332
     333''
    239334' Gets the commandline used to invoke the script.
    240335function GetCommandline()
     
    308403' Get the abs path, use the short version if necessary.
    309404function 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
     446end function
     447
     448
     449''
     450' Get the abs path, use the long version.
     451function 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
    338476   end if
    339477end function
     
    416554''
    417555' Prints a success message
    418 sub PrintResult(strTest, strResult)
     556sub PrintResultMsg(strTest, strResult)
    419557   LogPrint "** " & strTest & ": " & strResult
    420558   Wscript.Echo " Found "& strTest & ": " & strResult
     559end sub
     560
     561
     562''
     563' Prints a successfully detected path
     564sub 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
    421573end sub
    422574
     
    803955
    804956''
    805 ' Checks for Visual C++ version 7 or 8.
     957' Checks for Visual C++ version 7.1, 8 or 10.
    806958sub CheckForVisualCPP(strOptVC, strOptVCCommon, blnOptVCExpressEdition)
    807959   dim strPathVC, strPathVCCommon, str, str2, blnNeedMsPDB
     
    821973
    822974   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"
    826977         if CheckForVisualCPPSub(strPathVC, "", blnOptVCExpressEdition) = False then
    827978            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
    828988         end if
    829989      end if
     
    839999         strPathVC = PathParent(PathStripFilename(str))
    8401000         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
    8411025      end if
    8421026   end if
     
    9641148
    9651149   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."
    9681153      exit sub
    9691154   end if
     
    9721157   ' Ok, emit build config variables.
    9731158   '
    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
    9751187      CfgPrint "VBOX_USE_VCC80        := 1"
    9761188      CfgPrint "PATH_TOOL_VCC80       := " & g_strPathVCC
     
    10221234       Or (    LogFileExists(strPathVC, "atlmfc/include/atlbase.h") _
    10231235           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")) _
    10241238         Then
    10251239         '' @todo figure out a way we can verify the version/build!
     
    10451259
    10461260   ' The tools location (first).
    1047    if (strPathPSDK = "") And (g_blnInternalFirst = True) then
     1261   if strPathPSDK = "" And g_blnInternalFirst then
    10481262      str = g_strPathDev & "/win.x86/sdk/200604"
    10491263      if CheckForPlatformSDKSub(str) then strPathPSDK = str
    10501264   end if
    10511265
    1052    if (strPathPSDK = "") And (g_blnInternalFirst = True) then
     1266   if strPathPSDK = "" And g_blnInternalFirst then
    10531267      str = g_strPathDev & "/win.x86/sdk/200504"
    10541268      if CheckForPlatformSDKSub(str) then strPathPSDK = str
    10551269   end if
    10561270
    1057    if (strPathPSDK = "") And (g_blnInternalFirst = True) then
     1271   if strPathPSDK = "" And g_blnInternalFirst then
    10581272      str = g_strPathDev & "/win.x86/sdk/200209"
    10591273      if CheckForPlatformSDKSub(str) then strPathPSDK = str
     
    10621276   ' Look for it in the environment
    10631277   str = EnvGet("MSSdk")
    1064    if (strPathPSDK = "") And (str <> "") then
     1278   if strPathPSDK = "" And str <> "" then
    10651279      if CheckForPlatformSDKSub(str) then strPathPSDK = str
    10661280   end if
    10671281
    10681282   str = EnvGet("Mstools")
    1069    if (strPathPSDK = "") And (str <> "") then
     1283   if strPathPSDK = "" And str <> "" then
    10701284      if CheckForPlatformSDKSub(str) then strPathPSDK = str
    10711285   end if
    10721286
    10731287   ' Check if there is one installed with the compiler.
    1074    if (strPathPSDK = "") And (str <> "") then
     1288   if strPathPSDK = "" And str <> "" then
    10751289      str = g_strPathVCC & "/PlatformSDK"
    10761290      if CheckForPlatformSDKSub(str) then strPathPSDK = str
    10771291   end if
    10781292
    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 arrSubKeys
     1293   ' 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
    10821296      str = RegGetString("HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\" & strSubKey & "\InstallationFolder")
    1083       if (strPathPSDK = "") And (str <> "") then
     1297      if strPathPSDK = "" And str <> "" then
    10841298         if CheckForPlatformSDKSub(str) then strPathPSDK = str
    10851299      end if
    10861300   Next
    1087    arrSubKeys = RegEnumSubKeys("HKCU", "SOFTWARE\Microsoft\Microsoft SDKs\Windows")
    1088    for Each strSubKey In arrSubKeys
     1301   arrSubKeys = RegEnumSubKeysRSort("HKCU", "SOFTWARE\Microsoft\Microsoft SDKs\Windows")
     1302   for each strSubKey in arrSubKeys
    10891303      str = RegGetString("HKCU\SOFTWARE\Microsoft\Microsoft SDKs\Windows\" & strSubKey & "\InstallationFolder")
    1090       if (strPathPSDK = "") And (str <> "") then
     1304      if strPathPSDK = "" And str <> "" then
    10911305         if CheckForPlatformSDKSub(str) then strPathPSDK = str
    10921306      end if
    10931307   Next
    10941308
    1095    arrSubKeys = RegEnumSubKeys("HKLM", "SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs")
    1096    for Each strSubKey In arrSubKeys
     1309   arrSubKeys = RegEnumSubKeysRSort("HKLM", "SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs")
     1310   for each strSubKey in arrSubKeys
    10971311      str = RegGetString("HKLM\SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs\" & strSubKey & "\Install Dir")
    1098       if (strPathPSDK = "") And (str <> "") then
     1312      if strPathPSDK = "" And str <> "" then
    10991313         if CheckForPlatformSDKSub(str) then strPathPSDK = str
    11001314      end if
    11011315   Next
    1102    arrSubKeys = RegEnumSubKeys("HKCU", "SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs")
    1103    for Each strSubKey In arrSubKeys
     1316   arrSubKeys = RegEnumSubKeysRSort("HKCU", "SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs")
     1317   for each strSubKey in arrSubKeys
    11041318      str = RegGetString("HKCU\SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs\" & strSubKey & "\Install Dir")
    1105       if (strPathPSDK = "") And (str <> "") then
     1319      if strPathPSDK = "" And str <> "" then
    11061320         if CheckForPlatformSDKSub(str) then strPathPSDK = str
    11071321      end if
     
    11581372
    11591373''
    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.
    11611375sub CheckForWin2k3DDK(strOptDDK)
    11621376   dim strPathDDK, str, strSubKeys
     
    11681382   strPathDDK = ""
    11691383   ' The specified path.
    1170    if (strPathDDK = "") And (strOptDDK <> "") then
     1384   if strPathDDK = "" And strOptDDK <> "" then
    11711385      if CheckForWin2k3DDKSub(strOptDDK, True) then strPathDDK = strOptDDK
    11721386   end if
    11731387
    11741388   ' The tools location (first).
    1175    if (strPathDDK = "") And (g_blnInternalFirst = True) then
     1389   if strPathDDK = "" And g_blnInternalFirst then
    11761390      str = g_strPathDev & "/win.x86/ddkwin2k3/200503"
    11771391      if CheckForWin2k3DDKSub(str, False) then strPathDDK = str
    11781392   end if
    11791393
    1180    if (strPathDDK = "") And (g_blnInternalFirst = True) then
     1394   if strPathDDK = "" And g_blnInternalFirst then
    11811395      str = g_strPathDev & "/win.x86/ddkwin2k3/2004"
    11821396      if CheckForWin2k3DDKSub(str, False) then strPathDDK = str
     
    11851399   ' Check the environment
    11861400   str = EnvGet("DDK_INC_PATH")
    1187    if (strPathDDK = "") And (str <> "") then
     1401   if strPathDDK = "" And str <> "" then
    11881402      str = PathParent(PathParent(str))
    11891403      if CheckForWin2k3DDKSub(str, True) then strPathDDK = str
     
    11911405
    11921406   str = EnvGet("BASEDIR")
    1193    if (strPathDDK = "") And (str <> "") then
     1407   if strPathDDK = "" And str <> "" then
    11941408      if CheckForWin2k3DDKSub(str, True) then strPathDDK = str
    11951409   end if
    11961410
    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
    12271451
    12281452   ' The tools location (post).
     
    12471471   '
    12481472   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
    12521481
    12531482   PrintResult "Windows 2003 DDK", strPathDDK
     
    12591488   CheckForWin2k3DDKSub = False
    12601489   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
    12631498   if   LogFileExists(strPathDDK, "inc/ddk/wnet/ntdef.h") _
    12641499    And LogFileExists(strPathDDK, "lib/wnet/i386/int64.lib") _
     
    12781513   ' Skip if no COM/ATL.
    12791514   if g_blnDisableCOM then
    1280       PrintResult "Midl", "Skipped (" & g_strDisableCOM & ")"
     1515      PrintResultMsg "Midl", "Skipped (" & g_strDisableCOM & ")"
    12811516      exit sub
    12821517   end if
     
    16141849   ' Skip if no COM/ATL.
    16151850   if g_blnDisableCOM then
    1616       PrintResult "libxml2", "Skipped (" & g_strDisableCOM & ")"
     1851      PrintResultMsg "libxml2", "Skipped (" & g_strDisableCOM & ")"
    16171852      exit sub
    16181853   end if
     
    16361871   ' Ignore failure if we're in 'internal' mode.
    16371872   if (strPathXml2 = "") and g_blnInternalMode then
    1638       PrintResult "libxml2", "ignored (internal mode)"
     1873      PrintResultMsg "libxml2", "ignored (internal mode)"
    16391874      exit sub
    16401875   end if
     
    16861921   ' Skip if no COM/ATL.
    16871922   if g_blnDisableCOM then
    1688       PrintResult "libxslt", "Skipped (" & g_strDisableCOM & ")"
     1923      PrintResultMsg "libxslt", "Skipped (" & g_strDisableCOM & ")"
    16891924      exit sub
    16901925   end if
     
    17161951   ' Ignore failure if we're in 'internal' mode.
    17171952   if (strPathXslt = "") and g_blnInternalMode then
    1718       PrintResult "libxslt", "ignored (internal mode)"
     1953      PrintResultMsg "libxslt", "ignored (internal mode)"
    17191954      exit sub
    17201955   end if
     
    17852020   ' Ignore failure if we're in 'internal' mode.
    17862021   if (strPathSsl = "") and g_blnInternalMode then
    1787       PrintResult "openssl", "ignored (internal mode)"
     2022      PrintResultMsg "openssl", "ignored (internal mode)"
    17882023      exit sub
    17892024   end if
     
    18482083   ' Ignore failure if we're in 'internal' mode.
    18492084   if (strPathCurl = "") and g_blnInternalMode then
    1850       PrintResult "curl", "ignored (internal mode)"
     2085      PrintResultMsg "curl", "ignored (internal mode)"
    18512086      exit sub
    18522087   end if
     
    19072142   if strPathQt4 = "" then
    19082143      CfgPrint "VBOX_WITH_QT4GUI="
    1909       PrintResult "Qt4", "not found"
     2144      PrintResultMsg "Qt4", "not found"
    19102145   else
    19112146      CfgPrint "PATH_SDK_QT4          := " & strPathQt4
     
    21182353   CheckSourcePath
    21192354   CheckForkBuild strOptkBuild
     2355   CheckForWin2k3DDK strOptDDK
    21202356   CheckForVisualCPP strOptVC, strOptVCCommon, blnOptVCExpressEdition
    21212357   CheckForPlatformSDK strOptSDK
    2122    CheckForWin2k3DDK strOptDDK
    21232358   CheckForMidl
    21242359   CheckForDirectXSDK strOptDXSDK
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette