VirtualBox

Changeset 85812 in vbox


Ignore:
Timestamp:
Aug 18, 2020 9:40:57 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
139969
Message:

configure.vbs: reorg

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.vbs

    r85811 r85812  
    624624end sub
    625625
    626 '' Class we use for detecting VisualC++
     626
     627''
     628' Checks for Visual C++ version 16 (2019), 15 (2017), 14 (2015), 12 (2013), 11 (2012) or 10 (2010).
     629'
     630sub CheckForVisualCPP(strOptVC, strOptVCCommon)
     631   PrintHdr "Visual C++"
     632
     633   '
     634   ' Try find it...
     635   '
     636   dim objState, strProgFiles
     637   set objState = new VisualCPPState
     638   objState.check strOptVC, strOptVCCommon
     639   if g_blnInternalFirst = True then objState.checkInternal
     640   objState.checkProgItems "2019"
     641   objState.checkProgFiles "Microsoft Visual Studio\2019\BuildTools\VC"
     642   objState.checkProgFiles "Microsoft Visual Studio\2019\Professional\VC"
     643   objState.checkProgFiles "Microsoft Visual Studio\2019\Community\VC"
     644   objState.checkRegistry "Microsoft\VisualStudio\SxS\VS7\16.0",             "VC", ""        ' doesn't work.
     645   objState.checkProgItems "2017"
     646   objState.checkProgFiles "Microsoft Visual Studio\2017\BuildTools\VC"
     647   objState.checkProgFiles "Microsoft Visual Studio\2017\Professional\VC"
     648   objState.checkProgFiles "Microsoft Visual Studio\2017\Community\VC"
     649   objState.checkProgFiles "Microsoft Visual Studio\2017\Express\VC"
     650   objState.checkRegistry "Microsoft\VisualStudio\SxS\VS7\15.0",             "VC", ""
     651   objState.checkRegistry "Microsoft\VisualStudio\SxS\VS7\14.0",             "VC", "Common7"
     652   objState.checkRegistry "Microsoft\VisualStudio\SxS\VS7\12.0",             "VC", "Common7" '?
     653   objState.checkRegistry "Microsoft\VisualStudio\SxS\VS7\11.0",             "VC", "Common7" '?
     654   objState.checkProg "cl.exe"
     655   objState.checkRegistry "Microsoft\VisualStudio\10.0\Setup\VS\ProductDir", "VC", "Common7"
     656   if g_blnInternalFirst = False then objState.checkInternal
     657
     658   if objState.m_blnFound = False then
     659      MsgError "Cannot find cl.exe (Visual C++) anywhere on your system. Check the build requirements."
     660      exit sub
     661   end if
     662   g_strPathVCC = objState.m_strPathVC
     663   g_strVCCVersion = objState.m_strVersion
     664
     665   '
     666   ' Ok, emit build config variables.
     667   '
     668   CfgPrintAssign "VBOX_VCC_TOOL_STEM", objState.m_strVersion
     669   CfgPrintAssign "PATH_TOOL_" & objState.m_strVersion, g_strPathVCC
     670   CfgPrintAssign "PATH_TOOL_" & objState.m_strVersion & "X86",   "$(PATH_TOOL_" & objState.m_strVersion & ")"
     671   CfgPrintAssign "PATH_TOOL_" & objState.m_strVersion & "AMD64", "$(PATH_TOOL_" & objState.m_strVersion & ")"
     672
     673   if   objState.m_strVersion = "VCC100" _
     674     or objState.m_strVersion = "VCC110" _
     675     or objState.m_strVersion = "VCC120" _
     676     or objState.m_strVersion = "VCC140" _
     677   then
     678      CfgPrintAssign "VBOX_WITH_NEW_VCC", "" '?? for VCC110+
     679   else
     680      CfgPrintAssign "VBOX_WITH_NEW_VCC", "1"
     681   end if
     682   PrintResult "Visual C++ " & objState.m_strVersion, g_strPathVCC
     683
     684   ' And the env.bat path fix.
     685   if objState.m_strPathVCCommon <> "" then
     686      EnvPrintAppend "PATH", DosSlashes(objState.m_strPathVCCommon) & "\IDE", ";"
     687   end if
     688end sub
     689
     690'' Class we use for detecting Visual C++
    627691class VisualCPPState
    628692   public m_blnFound
     
    836900end class
    837901
     902' See checkProgItems()
    838903function VisualCPPCallback(ByRef arrStrings, cStrings, ByRef strVersionYear)
    839904   VisualCPPCallback = ""
     
    858923
    859924''
    860 ' Checks for Visual C++ version 16 (2019), 15 (2017), 14 (2015), 12 (2013), 11 (2012) or 10 (2010).
     925' Checks for a platform SDK that works with the compiler
    861926'
    862 sub CheckForVisualCPP(strOptVC, strOptVCCommon)
    863    PrintHdr "Visual C++"
    864 
    865    '
    866    ' Try find it...
    867    '
    868    dim objState, strProgFiles
    869    set objState = new VisualCPPState
    870    objState.check strOptVC, strOptVCCommon
    871    if g_blnInternalFirst = True then objState.checkInternal
    872    objState.checkProgItems "2019"
    873    objState.checkProgFiles "Microsoft Visual Studio\2019\BuildTools\VC"
    874    objState.checkProgFiles "Microsoft Visual Studio\2019\Professional\VC"
    875    objState.checkProgFiles "Microsoft Visual Studio\2019\Community\VC"
    876    objState.checkRegistry "Microsoft\VisualStudio\SxS\VS7\16.0",             "VC", ""        ' doesn't work.
    877    objState.checkProgItems "2017"
    878    objState.checkProgFiles "Microsoft Visual Studio\2017\BuildTools\VC"
    879    objState.checkProgFiles "Microsoft Visual Studio\2017\Professional\VC"
    880    objState.checkProgFiles "Microsoft Visual Studio\2017\Community\VC"
    881    objState.checkProgFiles "Microsoft Visual Studio\2017\Express\VC"
    882    objState.checkRegistry "Microsoft\VisualStudio\SxS\VS7\15.0",             "VC", ""
    883    objState.checkRegistry "Microsoft\VisualStudio\SxS\VS7\14.0",             "VC", "Common7"
    884    objState.checkRegistry "Microsoft\VisualStudio\SxS\VS7\12.0",             "VC", "Common7" '?
    885    objState.checkRegistry "Microsoft\VisualStudio\SxS\VS7\11.0",             "VC", "Common7" '?
    886    objState.checkProg "cl.exe"
    887    objState.checkRegistry "Microsoft\VisualStudio\10.0\Setup\VS\ProductDir", "VC", "Common7"
    888    if g_blnInternalFirst = False then objState.checkInternal
    889 
    890    if objState.m_blnFound = False then
    891       MsgError "Cannot find cl.exe (Visual C++) anywhere on your system. Check the build requirements."
    892       exit sub
    893    end if
    894    g_strPathVCC = objState.m_strPathVC
    895    g_strVCCVersion = objState.m_strVersion
    896 
    897    '
    898    ' Ok, emit build config variables.
    899    '
    900    CfgPrintAssign "VBOX_VCC_TOOL_STEM", objState.m_strVersion
    901    CfgPrintAssign "PATH_TOOL_" & objState.m_strVersion, g_strPathVCC
    902    CfgPrintAssign "PATH_TOOL_" & objState.m_strVersion & "X86",   "$(PATH_TOOL_" & objState.m_strVersion & ")"
    903    CfgPrintAssign "PATH_TOOL_" & objState.m_strVersion & "AMD64", "$(PATH_TOOL_" & objState.m_strVersion & ")"
    904 
    905    if   objState.m_strVersion = "VCC100" _
    906      or objState.m_strVersion = "VCC110" _
    907      or objState.m_strVersion = "VCC120" _
    908      or objState.m_strVersion = "VCC140" _
    909    then
    910       CfgPrintAssign "VBOX_WITH_NEW_VCC", "" '?? for VCC110+
    911    else
    912       CfgPrintAssign "VBOX_WITH_NEW_VCC", "1"
    913    end if
    914    PrintResult "Visual C++ " & objState.m_strVersion, g_strPathVCC
    915 
    916    ' And the env.bat path fix.
    917    if objState.m_strPathVCCommon <> "" then
    918       EnvPrintAppend "PATH", DosSlashes(objState.m_strPathVCCommon) & "\IDE", ";"
    919    end if
    920 end sub
    921 
    922 '' Checks for a platform SDK that works with the compiler
    923927sub CheckForPlatformSDK(strOptSDK)
    924928   dim strPathPSDK, str
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