- Timestamp:
- Sep 25, 2023 4:45:59 PM (19 months ago)
- svn:sync-xref-src-repo-rev:
- 159239
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.vbs
r98254 r101256 1757 1757 1758 1758 '' 1759 ' Checks for any Qt 5binaries.1760 ' 1761 sub CheckForQt(strOptQt 5, strOptInfix)1762 dim strPathQt 5, strInfixQt5, arrFolders, arrVccInfixes, strVccInfix, strPathDev1763 PrintHdr "Qt 5"1764 1765 ' 1766 ' Try to find the Qt 5 installation (user specified path with --with-qt5)1767 ' 1768 LogPrint "Checking for user specified path of Qt 5... "1769 strPathQt 5 = CheckForQt5Sub(UnixSlashes(strOptQt5), strOptInfix, strInfixQt5)1770 if strPathQt 5 = "" and g_blnInternalFirst = true then strPathQt5 = CheckForQt5Internal(strOptInfix, strInfixQt5)1771 if strPathQt 5= "" then1759 ' Checks for any Qt binaries. 1760 ' 1761 sub CheckForQt(strOptQt, strOptInfix) 1762 dim strPathQt, strInfixQt, arrFolders, arrVccInfixes, strVccInfix, strPathDev 1763 PrintHdr "Qt" 1764 1765 ' 1766 ' Try to find the Qt installation (user specified path with --with-qt) 1767 ' 1768 LogPrint "Checking for user specified path of Qt ... " 1769 strPathQt = CheckForQtSub(UnixSlashes(strOptQt), strOptInfix, strInfixQt) 1770 if strPathQt = "" and g_blnInternalFirst = true then strPathQt = CheckForQtInternal(strOptInfix, strInfixQt) 1771 if strPathQt = "" then 1772 1772 ' 1773 1773 ' Collect links from "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\UFH\SHC" 1774 1774 ' 1775 1775 ' Typical string list: 1776 ' C:\Users\someuser\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Qt\ 5.x.y\MSVC 20zz (64-bit)\Qt 5.x.y (MSVC 20zz 64-bit).lnk1776 ' C:\Users\someuser\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Qt\6.x.y\MSVC 20zz (64-bit)\Qt 6.x.y (MSVC 20zz 64-bit).lnk 1777 1777 ' C:\Windows\System32\cmd.exe 1778 ' /A /Q /K E:\qt\installed\ 5.x.y\msvc20zz_64\bin\qtenv2.bat1778 ' /A /Q /K E:\qt\installed\6.x.y\msvc20zz_64\bin\qtenv2.bat 1779 1779 ' 1780 1780 dim arrCandidates, strCandidate 1781 arrCandidates = CollectFromProgramItemLinks(GetRef("Qt 5ProgramItemCallback"), strPathQt5)1781 arrCandidates = CollectFromProgramItemLinks(GetRef("QtProgramItemCallback"), strPathQt) 1782 1782 LogPrint "Testing qtenv2.bat links (" & ArraySize(arrCandidates) & ") ..." 1783 1783 … … 1785 1785 if g_strVCCVersion = "VCC142" or g_strVCCVersion = "" then 1786 1786 arrVccInfixes = Array("msvc2019_64", "msvc2017_64", "msvc2015_64") 1787 elseif g_strVCCVersion = "VCC141" then1788 arrVccInfixes = Array("msvc2017_64", "msvc2015_64", "msvc2019_64")1789 elseif g_strVCCVersion = "VCC140" then1790 arrVccInfixes = Array("msvc2015_64", "msvc2017_64", "msvc2019_64")1791 elseif g_strVCCVersion = "VCC120" then1792 arrVccInfixes = Array("msvc2013_64")1793 elseif g_strVCCVersion = "VCC110" then1794 arrVccInfixes = Array("msvc2012_64")1795 elseif g_strVCCVersion = "VCC100" then1796 arrVccInfixes = Array("msvc2010_64")1797 1787 else 1798 1788 MsgFatal "Unexpected VC version: " & g_strVCCVersion … … 1802 1792 for each strCandidate in arrCandidates 1803 1793 if InStr(1, LCase(strCandidate), strVccInfix) > 0 then 1804 strPathQt 5 = CheckForQt5Sub(strCandidate, strOptInfix, strInfixQt5)1805 if strPathQt 5<> "" then exit for1794 strPathQt = CheckForQtSub(strCandidate, strOptInfix, strInfixQt) 1795 if strPathQt <> "" then exit for 1806 1796 end if 1807 1797 next 1808 if strPathQt 5<> "" then exit for1798 if strPathQt <> "" then exit for 1809 1799 next 1810 1800 end if 1811 1801 1812 1802 ' Check the dev tools - prefer ones matching the compiler. 1813 if strPathQt 5 = "" and g_blnInternalFirst = false then strPathQt5 = CheckForQt5Internal(strOptInfix, strInfixQt5)1803 if strPathQt = "" and g_blnInternalFirst = false then strPathQt = CheckForQtInternal(strOptInfix, strInfixQt) 1814 1804 1815 1805 ' 1816 1806 ' Display the result and output the config. 1817 1807 ' 1818 if strPathQt 5<> "" then1819 PrintResult "Qt 5", strPathQt51820 PrintResultMsg "Qt 5 infix", strInfixQt51821 CfgPrintAssign "PATH_SDK_QT 5", strPathQt51822 CfgPrintAssign "PATH_TOOL_QT 5", "$(PATH_SDK_QT5)"1823 CfgPrintAssign "VBOX_PATH_QT", "$(PATH_SDK_QT 5)"1824 CfgPrintAssign "VBOX_QT_INFIX", strInfixQt 51808 if strPathQt <> "" then 1809 PrintResult "Qt", strPathQt 1810 PrintResultMsg "Qt infix", strInfixQt 1811 CfgPrintAssign "PATH_SDK_QT6", strPathQt 1812 CfgPrintAssign "PATH_TOOL_QT6", "$(PATH_SDK_QT6)" 1813 CfgPrintAssign "VBOX_PATH_QT", "$(PATH_SDK_QT6)" 1814 CfgPrintAssign "VBOX_QT_INFIX", strInfixQt 1825 1815 CfgPrintAssign "VBOX_WITH_QT_PAYLOAD", "1" 1826 1816 else 1827 PrintResultMsg "Qt 5", "not found"1817 PrintResultMsg "Qt", "not found" 1828 1818 CfgPrintAssign "VBOX_WITH_QTGUI", "" 1829 1819 end if 1830 1820 end sub 1831 1821 1832 function CheckForQt 5Internal(strOptInfix, ByRef strInfixQt5)1822 function CheckForQtInternal(strOptInfix, ByRef strInfixQt) 1833 1823 dim strPathDev, arrFolders, arrVccInfixes, strVccInfix, i 1834 CheckForQt 5Internal = ""1824 CheckForQtInternal = "" 1835 1825 for each strPathDev in g_arrPathDev 1836 LogPrint "Testing tools dir (" & strPathDev & "/win." & g_strTargetArch & "/qt/v 5*) ..."1837 arrFolders = GetSubdirsStartingWithVerSorted(strPathDev & "/win." & g_strTargetArch & "/qt", "v 5")1826 LogPrint "Testing tools dir (" & strPathDev & "/win." & g_strTargetArch & "/qt/v6*) ..." 1827 arrFolders = GetSubdirsStartingWithVerSorted(strPathDev & "/win." & g_strTargetArch & "/qt", "v6") 1838 1828 arrVccInfixes = Array(LCase(g_strVCCVersion), Left(LCase(g_strVCCVersion), Len(g_strVCCVersion) - 1), "") 1839 1829 for each strVccInfix in arrVccInfixes … … 1841 1831 if strVccInfix = "" or InStr(1, LCase(arrFolders(i)), strVccInfix) > 0 then 1842 1832 LogPrint "i="&i&" strVccInfix="&strVccInfix 1843 strPathQt 5 = CheckForQt5Sub(strPathDev & "/win." & g_strTargetArch & "/qt/" & arrFolders(i), strOptInfix, strInfixQt5)1844 if strPathQt 5<> "" then1845 CheckForQt 5Internal = strPathQt51833 strPathQt = CheckForQtSub(strPathDev & "/win." & g_strTargetArch & "/qt/" & arrFolders(i), strOptInfix, strInfixQt) 1834 if strPathQt <> "" then 1835 CheckForQtInternal = strPathQt 1846 1836 exit function 1847 1837 end if … … 1852 1842 end function 1853 1843 1854 function Qt 5ProgramItemCallback(ByRef arrStrings, cStrings, ByRef strUnused)1844 function QtProgramItemCallback(ByRef arrStrings, cStrings, ByRef strUnused) 1855 1845 dim str, off 1856 Qt 5ProgramItemCallback = ""1846 QtProgramItemCallback = "" 1857 1847 if cStrings >= 3 then 1858 1848 str = Trim(arrStrings(UBound(arrStrings))) … … 1862 1852 then 1863 1853 off = InStr(1, str, ":") - 1 1864 Qt 5ProgramItemCallback = Mid(str, off, Len(str) - off - Len("\bin\qtenv2.bat") + 1)1865 end if 1866 end if 1867 end function 1868 1869 function CheckForQt 5Sub(strPathQt5, strOptInfix, ByRef strInfixQt5)1870 CheckForQt 5Sub = ""1871 if strPathQt 5<> "" then1872 LogPrint "Trying: strPathQt 5=" & strPathQt51873 1874 if LogFileExists(strPathQt 5, "bin/moc.exe") _1875 and LogFileExists(strPathQt 5, "bin/uic.exe") _1876 and LogFileExists(strPathQt 5, "include/QtWidgets/qwidget.h") _1877 and LogFileExists(strPathQt 5, "include/QtWidgets/QApplication") _1878 and LogFileExists(strPathQt 5, "include/QtGui/QImage") _1879 and LogFileExists(strPathQt 5, "include/QtNetwork/QHostAddress") _1854 QtProgramItemCallback = Mid(str, off, Len(str) - off - Len("\bin\qtenv2.bat") + 1) 1855 end if 1856 end if 1857 end function 1858 1859 function CheckForQtSub(strPathQt, strOptInfix, ByRef strInfixQt) 1860 CheckForQtSub = "" 1861 if strPathQt <> "" then 1862 LogPrint "Trying: strPathQt=" & strPathQt 1863 1864 if LogFileExists(strPathQt, "bin/moc.exe") _ 1865 and LogFileExists(strPathQt, "bin/uic.exe") _ 1866 and LogFileExists(strPathQt, "include/QtWidgets/qwidget.h") _ 1867 and LogFileExists(strPathQt, "include/QtWidgets/QApplication") _ 1868 and LogFileExists(strPathQt, "include/QtGui/QImage") _ 1869 and LogFileExists(strPathQt, "include/QtNetwork/QHostAddress") _ 1880 1870 then 1881 1871 ' Infix testing. 1882 if LogFileExists(strPathQt 5, "lib/Qt5Core.lib") _1883 and LogFileExists(strPathQt 5, "lib/Qt5Network.lib") then1872 if LogFileExists(strPathQt, "lib/Qt6Core.lib") _ 1873 and LogFileExists(strPathQt, "lib/Qt6Network.lib") then 1884 1874 LogPrint "found it w/o infix" 1885 strInfixQt 5= ""1886 CheckForQt 5Sub = UnixSlashes(PathAbs(strPathQt5))1887 elseif LogFileExists(strPathQt 5, "lib/Qt5Core" & strOptInfix & ".lib") _1888 and LogFileExists(strPathQt 5, "lib/Qt5Network" & strOptInfix & ".lib") then1875 strInfixQt = "" 1876 CheckForQtSub = UnixSlashes(PathAbs(strPathQt)) 1877 elseif LogFileExists(strPathQt, "lib/Qt6Core" & strOptInfix & ".lib") _ 1878 and LogFileExists(strPathQt, "lib/Qt6Network" & strOptInfix & ".lib") then 1889 1879 LogPrint "found it w/ infix: " & strOptInfix & " (option)" 1890 strInfixQt 5= strOptInfix1891 CheckForQt 5Sub = UnixSlashes(PathAbs(strPathQt5))1892 elseif LogFileExists(strPathQt 5, "lib/Qt5CoreVBox.lib") _1893 and LogFileExists(strPathQt 5, "lib/Qt5NetworkVBox.lib") then1880 strInfixQt = strOptInfix 1881 CheckForQtSub = UnixSlashes(PathAbs(strPathQt)) 1882 elseif LogFileExists(strPathQt, "lib/Qt6CoreVBox.lib") _ 1883 and LogFileExists(strPathQt, "lib/Qt6NetworkVBox.lib") then 1894 1884 LogPrint "found it w/ infix: VBox" 1895 strInfixQt 5= "VBox"1896 CheckForQt 5Sub = UnixSlashes(PathAbs(strPathQt5))1885 strInfixQt = "VBox" 1886 CheckForQtSub = UnixSlashes(PathAbs(strPathQt)) 1897 1887 end if 1898 1888 end if … … 1971 1961 Print " --with-kBuild=PATH Where kBuild is to be found." 1972 1962 Print " --with-libSDL=PATH Where libSDL is to be found." 1973 Print " --with-Qt 5=PATH Where Qt5is to be found (optional)."1963 Print " --with-Qt=PATH Where Qt is to be found (optional)." 1974 1964 Print " --with-DDK=PATH Where the WDK is to be found." 1975 1965 Print " --with-SDK=PATH Where the Windows SDK is to be found." … … 2022 2012 strOptkBuild = "" 2023 2013 strOptlibSDL = "" 2024 strOptQt 5= ""2025 strOptQt 5Infix = ""2014 strOptQt = "" 2015 strOptQtInfix = "" 2026 2016 strOptSDK10 = "" 2027 2017 strOptSDK10Version = "" … … 2070 2060 case "--with-mingw-w64" 2071 2061 ' ignore 2072 case "--with-qt 5"2073 strOptQt 5= strPath2074 case "--with-qt 5-infix"2075 strOptQt 5Infix = strPath2062 case "--with-qt" 2063 strOptQt = strPath 2064 case "--with-qt-infix" 2065 strOptQtInfix = strPath 2076 2066 case "--with-sdk" 2077 2067 MsgWarning "Ignoring --with-sdk (the legacy Platform SDK is no longer required)." … … 2219 2209 CheckForCurl strOptCurl32, True 2220 2210 end if 2221 CheckForQt strOptQt 5, strOptQt5Infix2211 CheckForQt strOptQt, strOptQtInfix 2222 2212 CheckForPython strOptPython 2223 2213 CfgPrintAssign "VBOX_WITH_LIBVPX", "" '' @todo look for libvpx 1.1.0+
Note:
See TracChangeset
for help on using the changeset viewer.