- Timestamp:
- Mar 27, 2008 10:47:35 AM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 29082
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.vbs
r6081 r7589 519 519 LogPrint "Testing '" & strPath & "': " & strPattern & " not found" 520 520 LogFindFile = "" 521 end if 522 end function 523 524 525 '' 526 ' Finds the first directory matching the pattern. 527 ' If no directory is found, log the failure, 528 ' else return the complete path to the found directory. 529 function LogFindDir(strPath, strPattern) 530 dim str 531 532 ' 533 ' Yes, there are some facy database kinda interface to the filesystem 534 ' however, breaking down the path and constructing a usable query is 535 ' too much hassle. So, we'll do it the unix way... 536 ' 537 538 ' List the alphabetically last names as first entries (with /O-N). 539 if Shell("dir /B /AD /O-N """ & DosSlashes(strPath) & "\" & DosSlashes(strPattern) & """", True) = 0 _ 540 And InStr(1, g_strShellOutput, Chr(13)) > 1 _ 541 then 542 ' return the first word. 543 LogFindDir = strPath & "/" & Left(g_strShellOutput, InStr(1, g_strShellOutput, Chr(13)) - 1) 544 else 545 LogPrint "Testing '" & strPath & "': " & strPattern & " not found" 546 LogFindDir = "" 521 547 end if 522 548 end function … … 1771 1797 end function 1772 1798 1773 1774 dim g_strQtVer 1799 dim g_strQtVer ' Global version number of Qt (3, 333, 338 for example) 1775 1800 g_strQtVer = "" 1801 1802 dim g_strQtLib ' Full path to Qt .lib found 1803 g_strQtLib = "" 1804 1805 dim g_strQtDll ' Full path to Qt .dll found 1806 g_strQtDll = "" 1776 1807 1777 1808 '' … … 1783 1814 1784 1815 ' 1785 ' Try find the Qt installation .1816 ' Try find the Qt installation (user specified path with --with-qt=). 1786 1817 ' 1787 1818 strPathQt = "" 1788 1819 bQtWinFree = False 1820 1821 LogPrint "Checking for user specified path of Qt ..." 1789 1822 if (strPathQt = "") And (strOptQt <> "") then 1823 strOptQt = UnixSlashes(strOptQt) 1790 1824 if CheckForQtSub(strOptQt) then strPathQt = strOptQt 1791 end if 1792 1825 1826 if (strPathQt = "") And (strOptQt <> "") then 1827 LogPrint "Checking for user specified path of Qt/free ..." 1828 if CheckForQtWinFreeSub(strOptQt) then 1829 strPathQt = strOptQt 1830 bQtWinFree = True 1831 end if 1832 end if 1833 1834 end if 1835 1836 ' 1837 ' Search for any 3.x version 1838 ' 1839 LogPrint "Checking for licensed version of Qt ..." 1793 1840 if strPathQt = "" then 1794 str = g_strPathDev & "/win.x86/qt/v3.3.3" 1795 if CheckForQtSub(str) then strPathQt = str 1841 str = LogFindDir(g_strPathDev & "/win.x86/qt", "v3.*") 1842 if (str <> "") then 1843 if CheckForQtSub(str) then strPathQt = str 1844 end if 1845 end if 1846 1847 ' 1848 ' Try to find the Open Source project "qtwin" Qt/free, 1849 ' located at http://qtwin.sf.net 1850 ' 1851 if strPathQt = "" then 1852 LogPrint "Checking for Qt/free ..." 1853 str = LogFindDir(g_strPathDev & "/win.x86/qt", "v3.*") 1854 if (str <> "") then 1855 if CheckForQtWinFreeSub(str) then 1856 strPathQt = str 1857 bQtWinFree = True 1858 end if 1859 end if 1796 1860 end if 1797 1861 … … 1802 1866 CfgPrint "VBOX_WITH_QTGUI=" 1803 1867 PrintResult "Qt", "not found" 1804 else 1868 else 1805 1869 CfgPrint "VBOX_PATH_QT := " & strPathQt 1806 1870 CfgPrint "QTDIR = $(VBOX_PATH_QT)" 1807 CfgPrint "LIB_QT = $(VBOX_PATH_QT)/lib/dynamic/qt-mt" & g_strQtVer & ".lib" 1808 CfgPrint "VBOX_DLL_QT = $(VBOX_PATH_QT)/bin/qt-mt" & g_strQtVer & ".dll" 1809 PrintResult "Qt (" & g_strQtVer & ")", strPathQt 1810 end if 1811 end sub 1871 1872 if bQtWinFree = True then ' The "qtwin" 1873 PrintResult "Qt (v" & g_strQtVer & ", QtWin/Free)", strPathQt 1874 else ' Licensed from Trolltech 1875 PrintResult "Qt (v" & g_strQtVer & ")", strPathQt 1876 end if 1877 1878 CfgPrint "LIB_QT = " & g_strQtLib 1879 CfgPrint "VBOX_DLL_QT = " & g_strQtDll 1880 end if 1881 end sub 1882 1812 1883 1813 1884 '' … … 1817 1888 CheckForQtSub = False 1818 1889 LogPrint "trying: strPathQt=" & strPathQt 1890 1891 ' For Qt 3.3.3 1892 dim str 1819 1893 if LogFileExists(strPathQt, "bin/moc.exe") _ 1820 1894 And LogFileExists(strPathQt, "bin/uic.exe") _ … … 1825 1899 And LogFileExists(strPathQt, "lib/dynamic/qtmain.lib") _ 1826 1900 then 1827 dim str1828 1901 1829 1902 ' This check might need improving. … … 1832 1905 g_strQtVer = Mid(str, Len("qt-mt") + 1, Len(str) - Len("qt-mt.lib")) 1833 1906 if LogFileExists(strPathQt, "bin/qt-mt" & g_strQtVer & ".dll") then 1907 g_strQtLib = strPathQt & "/lib/dynamic/" & str 1908 g_strQtDll = strPathQt & "/bin/qt-mt" & g_strQtVer & ".dll" 1834 1909 CheckForQtSub = True 1910 end if 1911 end if 1912 end if 1913 1914 ' For >= Qt 3.3.8 (no "dynamic" folder, VBoxQt338.lib /.dll instead of qt-mt33*.lib /.dll) 1915 str = "" 1916 if LogFileExists(strPathQt, "bin/moc.exe") _ 1917 And LogFileExists(strPathQt, "bin/uic.exe") _ 1918 And LogFileExists(strPathQt, "include/qvbox.h") _ 1919 And LogFileExists(strPathQt, "include/qt_windows.h") _ 1920 And LogFileExists(strPathQt, "include/qapplication.h") _ 1921 And LogFileExists(strPathQt, "include/qtextedit.h") _ 1922 And LogFileExists(strPathQt, "lib/qtmain.lib") _ 1923 then 1924 1925 ' This check might need improving. 1926 str = LogFindFile(strPathQt, "lib/VBoxQt3*.lib") 1927 if str <> "" then 1928 g_strQtVer = Mid(str, Len("VBoxQt") + 1, Len(str) - Len("VBoxQt.lib")) 1929 if LogFileExists(strPathQt, "bin/VBoxQt" & g_strQtVer & ".dll") then 1930 g_strQtLib = strPathQt & "/lib/" & str 1931 g_strQtDll = strPathQt & "/bin/VBoxQt" & g_strQtVer & ".dll" 1932 CheckForQtSub = True 1933 end if 1934 end if 1935 end if 1936 1937 end function 1938 1939 1940 '' 1941 ' Checks if the specified path points to an usable "qtwin" Qt/Free install or not. 1942 ' "qtwin" is an Open Source project located at http://qtwin.sf.net and builds Qt 3.x.x sources 1943 ' of the official GPL'ed Qt 4.x sources from Trolltech. 1944 function CheckForQtWinFreeSub(strPathQt) 1945 1946 CheckForQtWinFreeSub = False 1947 LogPrint "trying: strPathQt=" & strPathQt 1948 if LogFileExists(strPathQt, "bin/moc.exe") _ 1949 And LogFileExists(strPathQt, "bin/uic.exe") _ 1950 And LogFileExists(strPathQt, "include/qvbox.h") _ 1951 And LogFileExists(strPathQt, "include/qt_windows.h") _ 1952 And LogFileExists(strPathQt, "include/qapplication.h") _ 1953 And LogFileExists(strPathQt, "include/qtextedit.h") _ 1954 And LogFileExists(strPathQt, "lib/qtmain.lib") _ 1955 then 1956 dim str 1957 1958 ' This check might need improving. 1959 str = LogFindFile(strPathQt, "lib/qt-mt3.lib") 1960 if str <> "" then 1961 g_strQtVer = Mid(str, Len("qt-mt") + 1, Len(str) - Len("qt-mt.lib")) 1962 if LogFileExists(strPathQt, "bin/qt-mt" & g_strQtVer & ".dll") then 1963 g_strQtLib = strPathQt & "/lib/" & str 1964 g_strQtDll = strPathQt & "/bin/qt-mt" & g_strQtVer & ".dll" 1965 CheckForQtWinFreeSub = True 1835 1966 end if 1836 1967 end if
Note:
See TracChangeset
for help on using the changeset viewer.