VirtualBox

Changeset 42292 in vbox


Ignore:
Timestamp:
Jul 20, 2012 10:10:51 PM (13 years ago)
Author:
vboxsync
Message:

configure.vbs: Updates for new toolchain.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.vbs

    r37204 r42292  
    1010
    1111'
    12 ' Copyright (C) 2006-2011 Oracle Corporation
     12' Copyright (C) 2006-2012 Oracle Corporation
    1313'
    1414' This file is part of VirtualBox Open Source Edition (OSE), as
     
    3636Set g_objFileSys = WScript.CreateObject("Scripting.FileSystemObject")
    3737
    38 dim g_strPathkBuild, g_strPathkBuildBin, g_strPathDev, g_strPathVCC, g_strPathPSDK, g_strPathDDK, g_strSubOutput
     38dim g_strPathkBuild, g_strPathkBuildBin, g_strPathDev, g_strPathVCC, g_strPathPSDK, g_strVerPSDK, g_strPathDDK, g_strSubOutput
    3939g_strPathkBuild = ""
    4040g_strPathDev = ""
     
    4343g_strPathDDK = ""
    4444
     45dim g_strTargetArch
     46g_strTargetArch = "x86"
     47
    4548dim g_blnDisableCOM, g_strDisableCOM
    4649g_blnDisableCOM = False
     
    5457dim g_blnInternalFirst
    5558g_blnInternalFirst = True
    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
    6059
    6160
     
    383382   LogPrint "EnvPrepend: " & strName & "=" & strValue & str
    384383end sub
     384
     385''
     386' Gets the first non-empty environment variable of the given two.
     387function EnvGetFirst(strName1, strName2)
     388   EnvGetFirst = g_objShell.Environment("PROCESS")(strName1)
     389   if EnvGetFirst = "" then
     390      EnvGetFirst = g_objShell.Environment("PROCESS")(strName2)
     391   end if
     392end function
    385393
    386394
     
    800808   '
    801809   ' Check if there is a 'kmk' in the path somewhere without
    802    ' any PATH_KBUILD* stuff around.
     810   ' any KBUILD_*PATH stuff around.
    803811   '
    804812   blnNeedEnvVars = True
     
    806814   g_strPathkBuildBin = ""
    807815   if   (g_strPathkBuild = "") _
    808     And (EnvGet("PATH_KBUILD") = "") _
    809     And (EnvGet("PATH_KBUILD_BIN") = "") _
     816    And (EnvGetFirst("KBUILD_PATH", "PATH_KBUILD") = "") _
     817    And (EnvGetFirst("KBUILD_BIN_PATH", "PATH_KBUILD_BIN") = "") _
    810818    And (Shell("kmk.exe --version", True) = 0) _
    811819    And (InStr(1,g_strShellOutput, "kBuild Make 0.1") > 0) _
    812     And (InStr(1,g_strShellOutput, "PATH_KBUILD") > 0) _
    813     And (InStr(1,g_strShellOutput, "PATH_KBUILD_BIN") > 0) then
    814       '' @todo Need to parse out the PATH_KBUILD and PATH_KBUILD_BIN values to complete the other tests.
     820    And (InStr(1,g_strShellOutput, "KBUILD_PATH") > 0) _
     821    And (InStr(1,g_strShellOutput, "KBUILD_BIN_PATH") > 0) then
     822      '' @todo Need to parse out the KBUILD_PATH and KBUILD_BIN_PATH values to complete the other tests.
    815823      'blnNeedEnvVars = False
    816824      MsgWarning "You've installed kBuild it seems. configure.vbs hasn't been updated to " _
     
    819827
    820828   '
    821    ' Check for the PATH_KBUILD env.var. and fall back on root/kBuild otherwise.
     829   ' Check for the KBUILD_PATH env.var. and fall back on root/kBuild otherwise.
    822830   '
    823831   if g_strPathkBuild = "" then
    824       g_strPathkBuild = EnvGet("PATH_KBUILD")
     832      g_strPathkBuild = EnvGetFirst("KBUILD_PATH", "PATH_KBUILD")
    825833      if (g_strPathkBuild <> "") and (FileExists(g_strPathkBuild & "/footer.kmk") = False) then
    826          MsgWarning "Ignoring incorrect kBuild path (PATH_KBUILD=" & g_strPathkBuild & ")"
     834         MsgWarning "Ignoring incorrect kBuild path (KBUILD_PATH=" & g_strPathkBuild & ")"
    827835         g_strPathkBuild = ""
    828836      end if
     
    836844
    837845   '
     846   ' Check for env.vars that kBuild uses (do this early to set g_strTargetArch).
     847   '
     848   str = EnvGetFirst("KBUILD_TYPE", "BUILD_TYPE")
     849   if   (str <> "") _
     850    And (InStr(1, "|release|debug|profile|kprofile", str) <= 0) then
     851      EnvPrint "set KBUILD_TYPE=release"
     852      EnvSet "KBUILD_TYPE", "release"
     853      MsgWarning "Found unknown KBUILD_TYPE value '" & str &"' in your environment. Setting it to 'release'."
     854   end if
     855
     856   str = EnvGetFirst("KBUILD_TARGET", "BUILD_TARGET")
     857   if   (str <> "") _
     858    And (InStr(1, "win|win32|win64", str) <= 0) then '' @todo later only 'win' will be valid. remember to fix this check!
     859      EnvPrint "set KBUILD_TARGET=win"
     860      EnvSet "KBUILD_TARGET", "win"
     861      MsgWarning "Found unknown KBUILD_TARGET value '" & str &"' in your environment. Setting it to 'win32'."
     862   end if
     863
     864   str = EnvGetFirst("KBUILD_TARGET_ARCH", "BUILD_TARGET_ARCH")
     865   if   (str <> "") _
     866    And (InStr(1, "x86|amd64", str) <= 0) then
     867      EnvPrint "set KBUILD_TARGET_ARCH=x86"
     868      EnvSet "KBUILD_TARGET_ARCH", "x86"
     869      MsgWarning "Found unknown KBUILD_TARGET_ARCH value '" & str &"' in your environment. Setting it to 'x86'."
     870      str = "x86"
     871   end if
     872   if str <> "" then
     873      g_strTargetArch = str
     874   elseif (EnvGet("PROCESSOR_ARCHITEW6432") = "AMD64" ) _
     875       Or (EnvGet("PROCESSOR_ARCHITECTURE") = "AMD64" ) then
     876      g_strTargetArch = "amd64"
     877   else
     878      g_strTargetArch = "x86"
     879   end if
     880
     881   str = EnvGetFirst("KBUILD_TARGET_CPU", "BUILD_TARGET_CPU")
     882    ' perhaps a bit pedantic this since this isn't clearly define nor used much...
     883   if   (str <> "") _
     884    And (InStr(1, "i386|i486|i686|i786|i868|k5|k6|k7|k8", str) <= 0) then
     885      EnvPrint "set BUILD_TARGET_CPU=i386"
     886      EnvSet "KBUILD_TARGET_CPU", "i386"
     887      MsgWarning "Found unknown KBUILD_TARGET_CPU value '" & str &"' in your environment. Setting it to 'i386'."
     888   end if
     889
     890   str = EnvGetFirst("KBUILD_HOST", "BUILD_PLATFORM")
     891   if   (str <> "") _
     892    And (InStr(1, "win|win32|win64", str) <= 0) then '' @todo later only 'win' will be valid. remember to fix this check!
     893      EnvPrint "set KBUILD_HOST=win"
     894      EnvSet "KBUILD_HOST", "win"
     895      MsgWarning "Found unknown KBUILD_HOST value '" & str &"' in your environment. Setting it to 'win32'."
     896   end if
     897
     898   str = EnvGetFirst("KBUILD_HOST_ARCH", "BUILD_PLATFORM_ARCH")
     899   if   (str <> "") _
     900    And (InStr(1, "x86|amd64", str) <= 0) then
     901      EnvPrint "set KBUILD_HOST_ARCH=x86"
     902      EnvSet "KBUILD_HOST_ARCH", "x86"
     903      MsgWarning "Found unknown KBUILD_HOST_ARCH value '" & str &"' in your environment. Setting it to 'x86'."
     904   end if
     905
     906   str = EnvGetFirst("KBUILD_HOST_CPU", "BUILD_PLATFORM_CPU")
     907    ' perhaps a bit pedantic this since this isn't clearly define nor used much...
     908   if   (str <> "") _
     909    And (InStr(1, "i386|i486|i686|i786|i868|k5|k6|k7|k8", str) <= 0) then
     910      EnvPrint "set KBUILD_HOST_CPU=i386"
     911      EnvSet "KBUILD_HOST_CPU", "i386"
     912      MsgWarning "Found unknown KBUILD_HOST_CPU value '" & str &"' in your environment. Setting it to 'i386'."
     913   end if
     914
     915   '
    838916   ' Determin the location of the kBuild binaries.
    839917   '
    840918   if g_strPathkBuildBin = "" then
    841       dim str2
    842       if EnvGet("PROCESSOR_ARCHITECTURE") = "x86" then
    843          g_strPathkBuildBin = g_strPathkBuild & "/bin/win.x86"
    844       else ' boldly assumes there is only x86 and amd64.
    845          g_strPathkBuildBin = g_strPathkBuild & "/bin/win.amd64"
    846          if FileExists(g_strPathkBuild & "/kmk.exe") = False then
    847             g_strPathkBuildBin = g_strPathkBuild & "/bin/win.x86"
    848          end if
    849       end if
     919      g_strPathkBuildBin = g_strPathkBuild & "/bin/win." & g_strTargetArch
    850920      if FileExists(g_strPathkBuild & "/kmk.exe") = False then
    851921         g_strPathkBuildBin = g_strPathkBuild & "/bin/win.x86"
     
    860930    Or (FileExists(g_strPathkBuild & "/rules.kmk") = False) then
    861931      MsgFatal "Can't find valid kBuild at '" & g_strPathkBuild & "'. Either there is an " _
    862          & "incorrect PATH_KBUILD in the environment or the checkout didn't succeed."
     932         & "incorrect KBUILD_PATH in the environment or the checkout didn't succeed."
    863933      exit sub
    864934   end if
     
    866936    Or (FileExists(g_strPathkBuildBin & "/kmk_ash.exe") = False) then
    867937      MsgFatal "Can't find valid kBuild binaries at '" & g_strPathkBuildBin & "'. Either there is an " _
    868          & "incorrect PATH_KBUILD in the environment or the checkout didn't succeed."
     938         & "incorrect KBUILD_PATH in the environment or the checkout didn't succeed."
    869939      exit sub
    870940   end if
     
    873943      MsgFatal "Can't execute '" & g_strPathkBuildBin & "/kmk.exe --version'. check configure.log for the out."
    874944      exit sub
    875    end if
    876 
    877    '
    878    ' Check for env.vars that kBuild uses.
    879    '
    880    str = EnvGet("BUILD_TYPE")
    881    if   (str <> "") _
    882     And (InStr(1, "|release|debug|profile|kprofile", str) <= 0) then
    883       EnvPrint "set BUILD_TYPE=release"
    884       EnvSet "BUILD_TYPE", "release"
    885       MsgWarning "Found unknown BUILD_TYPE value '" & str &"' in your environment. Setting it to 'release'."
    886    end if
    887 
    888    str = EnvGet("BUILD_TARGET")
    889    if   (str <> "") _
    890     And (InStr(1, "win|win32|win64", str) <= 0) then '' @todo later only 'win' will be valid. remember to fix this check!
    891       EnvPrint "set BUILD_TARGET=win"
    892       EnvSet "BUILD_TARGET", "win"
    893       MsgWarning "Found unknown BUILD_TARGET value '" & str &"' in your environment. Setting it to 'win32'."
    894    end if
    895 
    896    str = EnvGet("BUILD_TARGET_ARCH")
    897    if   (str <> "") _
    898     And (InStr(1, "x86|amd64", str) <= 0) then
    899       EnvPrint "set BUILD_TARGET_ARCH=x86"
    900       EnvSet "BUILD_TARGET_ARCH", "x86"
    901       MsgWarning "Found unknown BUILD_TARGET_ARCH value '" & str &"' in your environment. Setting it to 'x86'."
    902    end if
    903 
    904    str = EnvGet("BUILD_TARGET_CPU")
    905     ' perhaps a bit pedantic this since this isn't clearly define nor used much...
    906    if   (str <> "") _
    907     And (InStr(1, "i386|i486|i686|i786|i868|k5|k6|k7|k8", str) <= 0) then
    908       EnvPrint "set BUILD_TARGET_CPU=i386"
    909       EnvSet "BUILD_TARGET_CPU", "i386"
    910       MsgWarning "Found unknown BUILD_TARGET_CPU value '" & str &"' in your environment. Setting it to 'i386'."
    911    end if
    912 
    913    str = EnvGet("BUILD_PLATFORM")
    914    if   (str <> "") _
    915     And (InStr(1, "win|win32|win64", str) <= 0) then '' @todo later only 'win' will be valid. remember to fix this check!
    916       EnvPrint "set BUILD_PLATFORM=win"
    917       EnvSet "BUILD_PLATFORM", "win"
    918       MsgWarning "Found unknown BUILD_PLATFORM value '" & str &"' in your environment. Setting it to 'win32'."
    919    end if
    920 
    921    str = EnvGet("BUILD_PLATFORM_ARCH")
    922    if   (str <> "") _
    923     And (InStr(1, "x86|amd64", str) <= 0) then
    924       EnvPrint "set BUILD_PLATFORM_ARCH=x86"
    925       EnvSet "BUILD_PLATFORM_ARCH", "x86"
    926       MsgWarning "Found unknown BUILD_PLATFORM_ARCH value '" & str &"' in your environment. Setting it to 'x86'."
    927    end if
    928 
    929    str = EnvGet("BUILD_PLATFORM_CPU")
    930     ' perhaps a bit pedantic this since this isn't clearly define nor used much...
    931    if   (str <> "") _
    932     And (InStr(1, "i386|i486|i686|i786|i868|k5|k6|k7|k8", str) <= 0) then
    933       EnvPrint "set BUILD_PLATFORM_CPU=i386"
    934       EnvSet "BUILD_PLATFORM_CPU", "i386"
    935       MsgWarning "Found unknown BUILD_PLATFORM_CPU value '" & str &"' in your environment. Setting it to 'i386'."
    936945   end if
    937946
     
    952961
    953962   '
    954    ' Write PATH_KBUILD to the environment script if necessary.
     963   ' Write KBUILD_PATH to the environment script if necessary.
    955964   '
    956965   if blnNeedEnvVars = True then
    957       EnvPrint "set PATH_KBUILD=" & g_strPathkBuild
    958       EnvSet "PATH_KBUILD", g_strPathkBuild
     966      EnvPrint "set KBUILD_PATH=" & g_strPathkBuild
     967      EnvSet "KBUILD_PATH", g_strPathkBuild
    959968      EnvPrint "set PATH=" & g_strPathkBuildBin & ";%PATH%"
    960969      EnvPrepend "PATH", g_strPathkBuildBin & ";"
     
    967976
    968977''
    969 ' Checks for Visual C++ version 7.1, 8 or 10.
     978' Checks for Visual C++ version 10 (2010).
    970979sub CheckForVisualCPP(strOptVC, strOptVCCommon, blnOptVCExpressEdition)
    971980   dim strPathVC, strPathVCCommon, str, str2, blnNeedMsPDB
     
    985994
    986995   if (strPathVC = "") And (g_blnInternalFirst = True) Then
    987       if g_blnNewTools Then
    988          strPathVC = g_strPathDev & "/win.x86/vcc/v10"
    989          if CheckForVisualCPPSub(strPathVC, "", blnOptVCExpressEdition) = False then
    990             strPathVC = ""
    991          end if
    992       end if
    993       if strPathVC = "" then
    994          strPathVC = g_strPathDev & "/win.x86/vcc/v8"
    995          if CheckForVisualCPPSub(strPathVC, "", blnOptVCExpressEdition) = False then
    996             strPathVC = g_strPathDev & "/win.x86/vcc/v7"
    997             if CheckForVisualCPPSub(strPathVC, "", blnOptVCExpressEdition) = False then
    998                strPathVC = ""
    999             end if
    1000          end if
     996      strPathVC = g_strPathDev & "/win.x86/vcc/v10sp1"
     997      if CheckForVisualCPPSub(strPathVC, "", blnOptVCExpressEdition) = False then
     998         strPathVC = ""
    1001999      end if
    10021000   end if
     
    10141012   end if
    10151013
    1016    if (strPathVC = "") And g_blnNewTools then
     1014   if (strPathVC = "") then
    10171015      str = RegGetString("HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Setup\VS\ProductDir")
    10181016      if str <> "" Then
     
    10261024   end if
    10271025
    1028    if (strPathVC = "") And g_blnNewTools then
     1026   if (strPathVC = "") then
    10291027      str = RegGetString("HKLM\SOFTWARE\Microsoft\VisualStudio\10.0\Setup\VS\ProductDir")
    10301028      if str <> "" Then
     
    10381036   end if
    10391037
    1040    if strPathVC = "" then
    1041       str = RegGetString("HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\8.0\Setup\VS\ProductDir")
    1042       str2 = RegGetString("HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\8.0\Setup\VS\EnvironmentDirectory")
    1043       if str <> "" And str2 <> "" Then
    1044          str = str & "VC"
    1045          str2 = PathParent(str2)
    1046          if CheckForVisualCPPSub(str, str2, blnOptVCExpressEdition) then
    1047             strPathVC = str
    1048             strPathVCCommon = str2
    1049          end if
    1050       end if
    1051    end if
    1052 
    1053    if strPathVC = "" then
    1054       str = RegGetString("HKLM\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS\ProductDir")
    1055       str2 = RegGetString("HKLM\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS\EnvironmentDirectory")
    1056       if str <> "" And str2 <> "" Then
    1057          str = str & "VC"
    1058          str2 = PathParent(str2)
    1059          if CheckForVisualCPPSub(str, str2, blnOptVCExpressEdition) then
    1060             strPathVC = str
    1061             strPathVCCommon = str2
    1062          end if
    1063       end if
    1064    end if
    1065 
    1066    if strPathVC = "" then
    1067       '' @todo check what this really looks like on 7.1
    1068       str = RegGetString("HKLM\SOFTWARE\Microsoft\VisualStudio\7.1\Setup\VS\ProductDir")
    1069       str2 = RegGetString("HKLM\SOFTWARE\Microsoft\VisualStudio\7.1\Setup\VS\EnvironmentDirectory")
    1070       if str <> "" And str2 <> "" Then
    1071          str = str & "VC7"
    1072          str2 = PathParent(str2)
    1073          if CheckForVisualCPPSub(str, str2, blnOptVCExpressEdition) then
    1074             strPathVC = str
    1075             strPathVCCommon = str2
    1076          end if
    1077       end if
    1078    end if
    1079 
    1080    if strPathVC = "" then
    1081       str = RegGetString("HKLM\SOFTWARE\Microsoft\VisualStudio\7.0\Setup\VS\ProductDir")
    1082       str2 = RegGetString("HKLM\SOFTWARE\Microsoft\VisualStudio\7.0\Setup\VS\EnvironmentDirectory")
    1083       if str <> "" And str2 <> "" Then
    1084          str = str & "VC7"
    1085          str2 = PathParent(str2)
    1086          if CheckForVisualCPPSub(str, str2, blnOptVCExpressEdition) then
    1087             strPathVC = str
    1088             strPathVCCommon = str2
    1089          end if
    1090       end if
    1091    end if
    1092 
    1093    if strPathVC = "" then
    1094       str = RegGetString("HKLM\SOFTWARE\Microsoft\Wow6432Node\VisualStudio\SxS\VC7\8.0")
    1095       if str <> "" then
    1096          str2 = PathParent(str) & "/Common7"
    1097          if CheckForVisualCPPSub(str, str2, blnOptVCExpressEdition) then
    1098             strPathVC = str
    1099             strPathVCCommon = str2
    1100          end if
    1101       end if
    1102    end if
    1103 
    1104    if strPathVC = "" then
    1105       str = RegGetString("HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VC7\8.0")
    1106       if str <> "" then
    1107          str2 = PathParent(str) & "/Common7"
    1108          if CheckForVisualCPPSub(str, str2, blnOptVCExpressEdition) then
    1109             strPathVC = str
    1110             strPathVCCommon = str2
    1111          end if
    1112       end if
    1113    end if
    1114 
    1115    ' finally check for the express edition.
    1116    if strPathVC = "" then
    1117       str = RegGetString("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Visual C++ 2005 Express Edition - ENU\InstallLocation")
    1118       if str <> "" then
    1119          str2 = str & "Common7"
    1120          str = str & "VC/"
    1121          if CheckForVisualCPPSub(str, str2, blnOptVCExpressEdition) then
    1122             strPathVC = str
    1123             strPathVCCommon = str2
    1124          end if
    1125       end if
    1126    end if
    1127 
    11281038   if (strPathVC = "") And (g_blnInternalFirst = False) Then
    1129       strPathVC = g_strPathDev & "/win.x86/vcc/v8"
     1039      strPathVC = g_strPathDev & "/win.x86/vcc/v10sp1"
    11301040      if CheckForVisualCPPSub(strPathVC, "", blnOptVCExpressEdition) = False then
    1131          strPathVC = g_strPathDev & "/win.x86/vcc/v7"
    1132          if CheckForVisualCPPSub(strPathVC, "", blnOptVCExpressEdition) = False then
    1133             strPathVC = ""
    1134          end if
     1041         strPathVC = ""
    11351042      end if
    11361043   end if
     
    11591066   end if
    11601067
    1161    if   (InStr(1, g_strShellOutput, "Version 13.10") <= 0) _
    1162     And (InStr(1, g_strShellOutput, "Version 14.") <= 0) _
    1163     And (InStr(1, g_strShellOutput, "Version 16.") <= 0) then
    1164       MsgError "The Visual C++ compiler we found ('" & strPathVC & "') isn't 7.1, 8.0 or 10.0. Check the build requirements."
     1068   if   (InStr(1, g_strShellOutput, "Version 16.") <= 0) _
     1069    And (InStr(1, g_strShellOutput, "Version 17.") <= 0) then
     1070      MsgError "The Visual C++ compiler we found ('" & strPathVC & "') isn't 10.0 or 11.0. Check the build requirements."
    11651071      exit sub
    11661072   end if
     
    11701076   '
    11711077   if InStr(1, g_strShellOutput, "Version 16.") > 0 then
    1172       CfgPrint "VBOX_USE_VCC100       := 1"
    11731078      CfgPrint "PATH_TOOL_VCC100      := " & g_strPathVCC
    1174       CfgPrint "PATH_TOOL_VCC100X86    = $(PATH_TOOL_VCC100)"
    1175       CfgPrint "PATH_TOOL_VCC100AMD64  = $(PATH_TOOL_VCC100)"
     1079      CfgPrint "PATH_TOOL_VCC100X86   := $(PATH_TOOL_VCC100)"
     1080      CfgPrint "PATH_TOOL_VCC100AMD64 := $(PATH_TOOL_VCC100)"
    11761081      if LogFileExists(strPathVC, "atlmfc/include/atlbase.h") then
    11771082         PrintResult "Visual C++ v10 with ATL", g_strPathVCC
    11781083      elseif   LogFileExists(g_strPathDDK, "inc/atl71/atlbase.h") _
    11791084           And LogFileExists(g_strPathDDK, "lib/ATL/i386/atls.lib") then
    1180          CfgPrint "TOOL_VCC100X86_MT   = $(PATH_SDK_WINPSDK)/Bin/mt.exe"
    1181          CfgPrint "TOOL_VCC100AMD64_MT = $(TOOL_VCC100X86_MT)"
    11821085         CfgPrint "VBOX_WITHOUT_COMPILER_REDIST=1"
    11831086         CfgPrint "PATH_TOOL_VCC100_ATLMFC_INC       = " & g_strPathDDK & "/inc/atl71"
     
    11901093         PrintResult "Visual C++ v10 with DDK ATL", g_strPathVCC
    11911094      else
    1192          CfgPrint "TOOL_VCC100X86_MT   = $(PATH_SDK_WINPSDK)/Bin/mt.exe"
    1193          CfgPrint "TOOL_VCC100AMD64_MT = $(TOOL_VCC100X86_MT)"
    11941095         CfgPrint "VBOX_WITHOUT_COMPILER_REDIST=1"
    11951096         DisableCOM "No ATL"
    11961097         PrintResult "Visual C++ v10 (or later) without ATL", g_strPathVCC
    11971098      end if
    1198    elseif InStr(1, g_strShellOutput, "Version 14.") > 0 then
    1199       CfgPrint "VBOX_USE_VCC80        := 1"
    1200       CfgPrint "PATH_TOOL_VCC80       := " & g_strPathVCC
    1201       CfgPrint "PATH_TOOL_VCC80X86     = $(PATH_TOOL_VCC80)"
    1202       CfgPrint "PATH_TOOL_VCC80AMD64   = $(PATH_TOOL_VCC80)"
    1203       if   blnOptVCExpressEdition _
    1204        And LogFileExists(strPathVC, "atlmfc/include/atlbase.h") = False _
    1205          then
    1206          CfgPrint "TOOL_VCC80X86_MT = $(PATH_SDK_WINPSDK)/Bin/mt.exe"
    1207          CfgPrint "TOOL_VCC80AMD64_MT = $(TOOL_VCC80X86_MT)"
    1208          CfgPrint "VBOX_WITHOUT_COMPILER_REDIST=1"
    1209          DisableCOM "No ATL"
    1210          PrintResult "Visual C++ v8 (or later) without ATL", g_strPathVCC
    1211       else
    1212          PrintResult "Visual C++ v8 (or later)", g_strPathVCC
    1213       end if
     1099
     1100   elseif InStr(1, g_strShellOutput, "Version 17.") > 0 then
     1101      CfgPrint "PATH_TOOL_VCC110      := " & g_strPathVCC
     1102      CfgPrint "PATH_TOOL_VCC110X86   := $(PATH_TOOL_VCC110)"
     1103      CfgPrint "PATH_TOOL_VCC110AMD64 := $(PATH_TOOL_VCC110)"
     1104      PrintResult "Visual C++ v11", g_strPathVCC
     1105      MsgWarning "The support for Visual C++ v11 (aka 2012) is experimental"
     1106
    12141107   else
    1215       CfgPrint "PATH_TOOL_VCC70 := " & g_strPathVCC
    1216       if   blnOptVCExpressEdition _
    1217        And LogFileExists(strPathVC, "atlmfc/include/atlbase.h") = False _
    1218          then
    1219          CfgPrint "VBOX_WITHOUT_COMPILER_REDIST=1"
    1220          DisableCOM "No ATL"
    1221          PrintResult "Visual C++ v7.1 without ATL", g_strPathVCC
    1222       else
    1223          PrintResult "Visual C++ v7.1", g_strPathVCC
    1224       end if
     1108      MsgError "The Visual C++ compiler we found ('" & strPathVC & "') isn't 10.0 or 11.0. Check the build requirements."
     1109      exit sub
    12251110   end if
    12261111
     
    12721157   ' The tools location (first).
    12731158   if strPathPSDK = "" And g_blnInternalFirst then
    1274       str = g_strPathDev & "/win.x86/sdk/200604"
     1159      str = g_strPathDev & "/win.x86/sdk/v7.1"
    12751160      if CheckForPlatformSDKSub(str) then strPathPSDK = str
    12761161   end if
    12771162
    12781163   if strPathPSDK = "" And g_blnInternalFirst then
    1279       str = g_strPathDev & "/win.x86/sdk/200504"
    1280       if CheckForPlatformSDKSub(str) then strPathPSDK = str
    1281    end if
    1282 
    1283    if strPathPSDK = "" And g_blnInternalFirst then
    1284       str = g_strPathDev & "/win.x86/sdk/200209"
     1164      str = g_strPathDev & "/win.x86/sdk/v8.0"
    12851165      if CheckForPlatformSDKSub(str) then strPathPSDK = str
    12861166   end if
     
    13031183   end if
    13041184
    1305    ' Check the registry next (ASSUMES sorting). (first pair is vista, second is pre-vista)
     1185   ' Check the registry next (ASSUMES sorting).
    13061186   arrSubKeys = RegEnumSubKeysRSort("HKLM", "SOFTWARE\Microsoft\Microsoft SDKs\Windows")
    13071187   for each strSubKey in arrSubKeys
     
    13191199   Next
    13201200
    1321    arrSubKeys = RegEnumSubKeysRSort("HKLM", "SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs")
    1322    for each strSubKey in arrSubKeys
    1323       str = RegGetString("HKLM\SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs\" & strSubKey & "\Install Dir")
    1324       if strPathPSDK = "" And str <> "" then
    1325          if CheckForPlatformSDKSub(str) then strPathPSDK = str
    1326       end if
    1327    Next
    1328    arrSubKeys = RegEnumSubKeysRSort("HKCU", "SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs")
    1329    for each strSubKey in arrSubKeys
    1330       str = RegGetString("HKCU\SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs\" & strSubKey & "\Install Dir")
    1331       if strPathPSDK = "" And str <> "" then
    1332          if CheckForPlatformSDKSub(str) then strPathPSDK = str
    1333       end if
    1334    Next
    1335 
    13361201   ' The tools location (post).
    13371202   if (strPathPSDK = "") And (g_blnInternalFirst = False) then
    1338       str = g_strPathDev & "/win.x86/sdk/200604"
     1203      str = g_strPathDev & "/win.x86/sdk/v7.1"
    13391204      if CheckForPlatformSDKSub(str) then strPathPSDK = str
    13401205   end if
    13411206
    13421207   if (strPathPSDK = "") And (g_blnInternalFirst = False) then
    1343       str = g_strPathDev & "/win.x86/sdk/200504"
    1344       if CheckForPlatformSDKSub(str) then strPathPSDK = str
    1345    end if
    1346 
    1347    if (strPathPSDK = "") And (g_blnInternalFirst = False) then
    1348       str = g_strPathDev & "/win.x86/sdk/200209"
     1208      str = g_strPathDev & "/win.x86/sdk/v8.0"
    13491209      if CheckForPlatformSDKSub(str) then strPathPSDK = str
    13501210   end if
     
    13601220   '
    13611221   strPathPSDK = UnixSlashes(PathAbs(strPathPSDK))
    1362    CfgPrint "PATH_SDK_WINPSDK      := " & strPathPSDK
    1363    CfgPrint "PATH_SDK_WINPSDKINCS   = $(PATH_SDK_WINPSDK)"
    1364    CfgPrint "PATH_SDK_WIN32SDK      = $(PATH_SDK_WINPSDK)"
    1365    CfgPrint "PATH_SDK_WIN64SDK      = $(PATH_SDK_WINPSDK)"
    1366 
    1367    PrintResult "Windows Platform SDK", strPathPSDK
     1222   CfgPrint "PATH_SDK_WINPSDK" & g_strVerPSDK & "    := " & strPathPSDK
     1223   CfgPrint "VBOX_WINPSDK          := WINPSDK" & g_strVerPSDK
     1224
     1225   PrintResult "Windows Platform SDK (v" & g_strVerPSDK & ")", strPathPSDK
    13681226   g_strPathPSDK = strPathPSDK
    13691227end sub
     
    13771235    And  LogFileExists(strPathPSDK, "lib/Kernel32.Lib") _
    13781236    And  LogFileExists(strPathPSDK, "lib/User32.Lib") _
     1237    And  LogFileExists(strPathPSDK, "bin/rc.exe") _
     1238    And  Shell("""" & DosSlashes(strPathPSDK & "/bin/rc.exe") & """" , True) <> 0 _
    13791239      then
    1380       CheckForPlatformSDKSub = True
    1381    end if
    1382 end function
    1383 
    1384 
    1385 ''
    1386 ' Checks for a Windows 2003 DDK or Windows 7 Driver Kit.
    1387 sub CheckForWin2k3DDK(strOptDDK)
     1240      if InStr(1, g_strShellOutput, "Resource Compiler Version 6.2.") > 0 then
     1241         g_strVerPSDK = "80"
     1242         CheckForPlatformSDKSub = True
     1243      elseif InStr(1, g_strShellOutput, "Resource Compiler Version 6.1.") > 0 then
     1244         g_strVerPSDK = "71"
     1245         CheckForPlatformSDKSub = True
     1246      end if
     1247   end if
     1248end function
     1249
     1250
     1251''
     1252' Checks for a Windows 7 Driver Kit.
     1253sub CheckForWinDDK(strOptDDK)
    13881254   dim strPathDDK, str, strSubKeys
    1389    PrintHdr "Windows 2003 DDK, build 3790 or later"
     1255   PrintHdr "Windows DDK v7.1"
    13901256
    13911257   '
     
    13951261   ' The specified path.
    13961262   if strPathDDK = "" And strOptDDK <> "" then
    1397       if CheckForWin2k3DDKSub(strOptDDK, True) then strPathDDK = strOptDDK
     1263      if CheckForWinDDKSub(strOptDDK, True) then strPathDDK = strOptDDK
    13981264   end if
    13991265
    14001266   ' The tools location (first).
    14011267   if strPathDDK = "" And g_blnInternalFirst then
    1402       str = g_strPathDev & "/win.x86/ddkwin2k3/200503"
    1403       if CheckForWin2k3DDKSub(str, False) then strPathDDK = str
    1404    end if
    1405 
    1406    if strPathDDK = "" And g_blnInternalFirst then
    1407       str = g_strPathDev & "/win.x86/ddkwin2k3/2004"
    1408       if CheckForWin2k3DDKSub(str, False) then strPathDDK = str
     1268      str = g_strPathDev & "/win.x86/ddk/7600.16385.1"
     1269      if CheckForWinDDKSub(str, False) then strPathDDK = str
    14091270   end if
    14101271
     
    14131274   if strPathDDK = "" And str <> "" then
    14141275      str = PathParent(PathParent(str))
    1415       if CheckForWin2k3DDKSub(str, True) then strPathDDK = str
     1276      if CheckForWinDDKSub(str, True) then strPathDDK = str
    14161277   end if
    14171278
    14181279   str = EnvGet("BASEDIR")
    14191280   if strPathDDK = "" And str <> "" then
    1420       if CheckForWin2k3DDKSub(str, True) then strPathDDK = str
     1281      if CheckForWinDDKSub(str, True) then strPathDDK = str
    14211282   end if
    14221283
     
    14391300   arrLocations = ArrayRSortStrings(arrLocations)
    14401301
    1441    ' Vista WDK.
    1442    for each strRoot in arrRoots
    1443       for each strSubKey in RegEnumSubKeysFullRSort(strRoot, "SOFTWARE\Microsoft\WINDDK")
    1444          str = RegGetString(strRoot & "\" & strSubKey & "\Setup\BUILD")
    1445          if str <> "" then arrLocations = ArrayAppend(arrLocations, PathAbsLong(str))
    1446       Next
    1447    next
    1448 
    1449    ' Pre-Vista WDK?
    1450    for each strRoot in arrRoots
    1451       for each strSubKey in RegEnumSubKeysFullRSort(strRoot, "SOFTWARE\Microsoft\WINDDK")
    1452          str = RegGetString(strRoot & "\" & strSubKey & "\SFNDirectory")
    1453          if str <> "" then arrLocations = ArrayAppend(arrLocations, PathAbsLong(str))
    1454       Next
    1455    next
    1456 
    14571302   ' Check the locations we've gathered.
    14581303   for each str in arrLocations
    14591304      if strPathDDK = "" then
    1460          if CheckForWin2k3DDKSub(str, True) then strPathDDK = str
     1305         if CheckForWinDDKSub(str, True) then strPathDDK = str
    14611306      end if
    14621307   next
     
    14641309   ' The tools location (post).
    14651310   if (strPathDDK = "") And (g_blnInternalFirst = False) then
    1466       str = g_strPathDev & "/win.x86/ddkwin2k3/200503"
    1467       if CheckForWin2k3DDKSub(str, False) then strPathDDK = str
    1468    end if
    1469 
    1470    if (strPathDDK = "") And (g_blnInternalFirst = False) then
    1471       str = g_strPathDev & "/win.x86/ddkwin2k3/2004"
    1472       if CheckForWin2k3DDKSub(str, False) then strPathDDK = str
     1311      str = g_strPathDev & "/win.x86/ddk/7600.16385.1"
     1312      if CheckForWinDDKSub(str, False) then strPathDDK = str
    14731313   end if
    14741314
    14751315   ' Give up.
    14761316   if strPathDDK = "" then
    1477       MsgError "Cannot find a suitable Windows 2003 DDK. Check configure.log and the build requirements."
     1317      MsgError "Cannot find the Windows DDK v7.1. Check configure.log and the build requirements."
    14781318      exit sub
    14791319   end if
     
    14831323   '
    14841324   strPathDDK = UnixSlashes(PathAbs(strPathDDK))
    1485    if LogFileExists(strPathDDK, "inc/api/ntdef.h") then
    1486       CfgPrint "VBOX_USE_WINDDK       := 1"
    1487       CfgPrint "PATH_SDK_WINDDK       := " & strPathDDK
    1488    else
    1489       CfgPrint "PATH_SDK_W2K3DDK      := " & strPathDDK
    1490       CfgPrint "PATH_SDK_W2K3DDKX86    = $(PATH_SDK_W2K3DDK)"
    1491       CfgPrint "PATH_SDK_W2K3DDKAMD64  = $(PATH_SDK_W2K3DDK)"
    1492    end if
    1493 
    1494    PrintResult "Windows 2003 DDK", strPathDDK
     1325   CfgPrint "PATH_SDK_WINDDK71     := " & strPathDDK
     1326
     1327   PrintResult "Windows DDK v7.1", strPathDDK
    14951328   g_strPathDDK = strPathDDK
    14961329end sub
    14971330
    14981331'' Quick check if the DDK is in the specified directory or not.
    1499 function CheckForWin2k3DDKSub(strPathDDK, blnCheckBuild)
    1500    CheckForWin2k3DDKSub = False
     1332function CheckForWinDDKSub(strPathDDK, blnCheckBuild)
     1333   CheckForWinDDKSub = False
    15011334   LogPrint "trying: strPathDDK=" & strPathDDK & " blnCheckBuild=" & blnCheckBuild
    1502    if   g_blnNewTools _
    1503     And LogFileExists(strPathDDK, "inc/api/ntdef.h") _
     1335   if   LogFileExists(strPathDDK, "inc/api/ntdef.h") _
     1336    And LogFileExists(strPathDDK, "lib/win7/i386/int64.lib") _
     1337    And LogFileExists(strPathDDK, "lib/wlh/i386/int64.lib") _
    15041338    And LogFileExists(strPathDDK, "lib/wnet/i386/int64.lib") _
     1339    And LogFileExists(strPathDDK, "lib/wxp/i386/int64.lib") _
     1340    And Not LogFileExists(strPathDDK, "lib/win8/i386/int64.lib") _
     1341    And LogFileExists(strPathDDK, "bin/x86/rc.exe") _
    15051342      then
    1506       '' @todo figure out a way we can verify the version/build!
    1507       CheckForWin2k3DDKSub = True
    1508    end if
    1509 
    1510    if   LogFileExists(strPathDDK, "inc/ddk/wnet/ntdef.h") _
    1511     And LogFileExists(strPathDDK, "lib/wnet/i386/int64.lib") _
    1512       then
    1513       '' @todo figure out a way we can verify the version/build!
    1514       CheckForWin2k3DDKSub = True
     1343      if Not blnCheckBuild then
     1344         CheckForWinDDKSub = True
     1345      '' @todo Find better build check.
     1346      elseif Shell("""" & DosSlashes(strPathPSDK & "bin/x86/rc.exe") & """" , True) <> 0 _
     1347         And InStr(1, g_strShellOutput, "Resource Compiler Version 6.1.") > 0 then
     1348         CheckForWinDDKSub = True
     1349      end if
    15151350   end if
    15161351end function
     
    15441379   end if
    15451380
    1546    CfgPrint "VBOX_MAIN_IDL = " & strMidl
     1381   CfgPrint "VBOX_MAIN_IDL         := " & strMidl
    15471382   PrintResult "Midl.exe", strMidl
    15481383end sub
     
    16071442   strPathDXSDK = UnixSlashes(PathAbs(strPathDXSDK))
    16081443   CfgPrint "PATH_SDK_DXSDK        := " & strPathDXSDK
    1609    CfgPrint "PATH_SDK_DXSDKX86      = $(PATH_SDK_DXSDK)"
    1610    CfgPrint "PATH_SDK_DXSDKAMD64    = $(PATH_SDK_DXSDK)"
     1444   CfgPrint "PATH_SDK_DXSDKX86     := $(PATH_SDK_DXSDK)"
     1445   CfgPrint "PATH_SDK_DXSDKAMD64   := $(PATH_SDK_DXSDK)"
    16111446
    16121447   PrintResult "Direct X SDK", strPathDXSDK
     
    17031538   PrintResult "MinGW (GCC v" & g_strSubOutput & ")", strPathMingW
    17041539   if (strPathMingW = strPathW32API) Or strPathW32API = "" then
    1705       CfgPrint "PATH_SDK_W32API        = $(PATH_TOOL_MINGW32)"
     1540      CfgPrint "PATH_SDK_W32API       := $(PATH_TOOL_MINGW32)"
    17061541   else
    1707       CfgPrint "PATH_SDK_W32API        = " & strPathW32API
     1542      CfgPrint "PATH_SDK_W32API       := " & strPathW32API
    17081543      PrintResult "W32API", strPathW32API
    17091544   end if
     
    21351970
    21361971''
    2137 ''
    21381972' Checks for any Qt4 binaries.
    21391973sub CheckForQt4(strOptQt4)
     
    21531987   end if
    21541988
     1989   ' Check the dev tools
     1990   if (strPathQt4 = "") Then
     1991      strPathQt4 = g_strPathDev & "/win." & g_strTargetArch & "/qt/v4.7.3-vcc100"
     1992      if CheckForQt4Sub(strPathQt4) = False then strPathQt4 = ""
     1993   end if
     1994
     1995   ' Display the result.
    21551996   if strPathQt4 = "" then
    21561997      CfgPrint "VBOX_WITH_QT4GUI="
     
    21581999   else
    21592000      CfgPrint "PATH_SDK_QT4          := " & strPathQt4
    2160       CfgPrint "PATH_TOOL_QT4          = $(PATH_SDK_QT4)"
    2161       CfgPrint "VBOX_PATH_QT4          = $(PATH_SDK_QT4)"
     2001      CfgPrint "PATH_TOOL_QT4         := $(PATH_SDK_QT4)"
     2002      CfgPrint "VBOX_PATH_QT4         := $(PATH_SDK_QT4)"
    21622003      PrintResult "Qt4 ", strPathQt4
    21632004   end if
     
    21652006
    21662007
    2167 '
    2168 '
     2008''
     2009' Checks if the specified path points to an usable Qt library.
    21692010function CheckForQt4Sub(strPathQt4)
    21702011
     
    23812222   end if
    23822223   if g_strShellOutput <> "TESTING_ENVIRONMENT_INHERITANCE=This works" & CHR(13) & CHR(10)  then
    2383       MsgFatal "shell inheritance or shell execution isn't working right."
     2224      Print "Shell test Test -> '" & g_strShellOutput & "'"
     2225      MsgFatal "shell inheritance or shell execution isn't working right. Make sure you use cmd.exe."
    23842226   end if
    23852227   g_objShell.Environment("PROCESS")("TESTING_ENVIRONMENT_INHERITANCE") = ""
     
    23972239   CheckSourcePath
    23982240   CheckForkBuild strOptkBuild
    2399    CheckForWin2k3DDK strOptDDK
     2241   CheckForWinDDK strOptDDK
     2242   CfgPrint "VBOX_WITH_WDDM_W8     := " '' @todo look for WinDDKv8; Check with Misha if we _really_ need the v8 DDK...
    24002243   CheckForVisualCPP strOptVC, strOptVCCommon, blnOptVCExpressEdition
    24012244   CheckForPlatformSDK strOptSDK
Note: See TracChangeset for help on using the changeset viewer.

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