VirtualBox

Changeset 85811 in vbox


Ignore:
Timestamp:
Aug 18, 2020 9:39:10 AM (4 years ago)
Author:
vboxsync
Message:

configure.vbs: Use start menu items for locating VS 2019 and 2017. The former doesn't seem to have any good registry entries, so this could be good help.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.vbs

    r85809 r85811  
    816816   end function
    817817
     818   public function checkProgItems(strVersionYear)
     819      if m_blnFound = False then
     820         dim strCandidate
     821         for each strCandidate in CollectFromProgramItemLinks(GetRef("VisualCPPCallback"), strVersionYear)
     822            check strCandidate, ""
     823         next
     824      end if
     825      checkProgItems = m_blnFound
     826   end function
     827
    818828   public function checkInternal
    819829      check g_strPathDev & "/win.amd64/vcc/v14.2",  ""
     
    826836end class
    827837
     838function VisualCPPCallback(ByRef arrStrings, cStrings, ByRef strVersionYear)
     839   VisualCPPCallback = ""
     840   ' We're looking for items with three strings like this:
     841   '   C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2019\Visual Studio Tools\VC\x64 Native Tools Command Prompt for VS 2019.lnk
     842   '   C:\Windows\system32\cmd.exe
     843   '   /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat"
     844   if cStrings >= 3 then
     845      if InStr(1, arrStrings(0), strVersionYear) > 0 then
     846         dim strTail : strTail = "\Auxiliary\Build\vcvars64.bat"""
     847         dim str     : str     = arrStrings(UBound(arrStrings))
     848         if StrComp(Right(str, Len(strTail)), strTail, vbTextCompare) = 0 then
     849            dim offColon : offColon = InStr(1, str, ":")
     850            if offColon > 1 then
     851               VisualCPPCallback = Mid(str, offColon - 1, Len(str) - (offColon - 2) - Len(strTail))
     852            end if
     853         end if
     854      end if
     855   end if
     856end function
     857
    828858
    829859''
     
    840870   objState.check strOptVC, strOptVCCommon
    841871   if g_blnInternalFirst = True then objState.checkInternal
     872   objState.checkProgItems "2019"
    842873   objState.checkProgFiles "Microsoft Visual Studio\2019\BuildTools\VC"
    843874   objState.checkProgFiles "Microsoft Visual Studio\2019\Professional\VC"
    844875   objState.checkProgFiles "Microsoft Visual Studio\2019\Community\VC"
    845876   objState.checkRegistry "Microsoft\VisualStudio\SxS\VS7\16.0",             "VC", ""        ' doesn't work.
     877   objState.checkProgItems "2017"
    846878   objState.checkProgFiles "Microsoft Visual Studio\2017\BuildTools\VC"
    847879   objState.checkProgFiles "Microsoft Visual Studio\2017\Professional\VC"
     
    20622094   CheckForQt           strOptQt5, strOptQt5Infix
    20632095   CheckForPython       strOptPython
    2064 
    20652096   CfgPrintAssign "VBOX_WITH_LIBVPX",  "" '' @todo look for libvpx 1.1.0+
    20662097   CfgPrintAssign "VBOX_WITH_LIBOPUS", "" '' @todo look for libopus 1.2.1+
    20672098                                          '' @todo look for yasm
     2099                                          '' @todo look for nasm
     2100
    20682101   EnvPrintAppend "PATH", DosSlashes(g_strPath & "\tools\win." & g_strHostArch & "\bin"), ";"
    20692102   if g_strHostArch = "amd64" then
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