Changeset 85721 in vbox
- Timestamp:
- Aug 12, 2020 4:49:38 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 139868
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.vbs
r85715 r85721 490 490 491 491 '' 492 ' Returns true if there are subfolders starting with the given string. 493 function HasSubdirsStartingWith(strFolder, strStartingWith) 494 HasSubdirsStartingWith = False 495 if DirExists(strFolder) then 496 dim obj 497 set obj = g_objFileSys.GetFolder(strFolder) 498 for each objSub in obj.SubFolders 499 if StrComp(Left(objSub.Name, Len(strStartingWith)), strStartingWith) = 0 Then 500 HasSubdirsStartingWith = True 501 LogPrint "# HasSubdirsStartingWith(" & strFolder & "," & strStartingWith & ") found " & objSub.Name 502 exit for 503 end if 504 next 505 end if 506 end function 507 508 509 '' 492 510 ' Executes a command in the shell catching output in g_strShellOutput 493 511 function Shell(strCommand, blnBoth) … … 521 539 522 540 '' 523 ' Try find the specified file in the path.524 function Which (strFile)541 ' Try find the specified file in the specified path variable. 542 function WhichEx(strEnvVar, strFile) 525 543 dim strPath, iStart, iEnd, str 526 544 527 545 ' the path 528 strPath = EnvGet( "Path")546 strPath = EnvGet(strEnvVar) 529 547 iStart = 1 530 548 do while iStart <= Len(strPath) … … 534 552 str = Mid(strPath, iStart, iEnd - iStart) & "/" & strFile 535 553 if FileExists(str) then 536 Which = str554 WhichEx = str 537 555 exit function 538 556 end if … … 543 561 ' registry or somewhere? 544 562 545 Which = "" 563 WhichEx = "" 564 end function 565 566 567 '' 568 ' Try find the specified file in the path. 569 function Which(strFile) 570 Which = WhichEx("Path", strFile) 546 571 end function 547 572 … … 1505 1530 ' The tools location (first). 1506 1531 if (strPathlibSDL = "") And (g_blnInternalFirst = True) Then 1507 str = g_strPathDev & "/win.x86/libsdl/v1.2.11" 1508 if CheckForlibSDLSub(str) then strPathlibSDL = str 1509 end if 1510 1511 if (strPathlibSDL = "") And (g_blnInternalFirst = True) Then 1512 str = g_strPathDev & "/win.x86/libsdl/v1.2.7-InnoTek" 1513 if CheckForlibSDLSub(str) then strPathlibSDL = str 1532 str = g_strPathDev & "/win." & g_strTargetArch & "/libsdl" 1533 if HasSubdirsStartingWith(str, "v") then 1534 PrintResult "libSDL", str & "/v* (auto)" 1535 exit sub 1536 end if 1514 1537 end if 1515 1538 1516 1539 ' Poke about in the path. 1517 str = Which("SDLmain.lib") 1518 if (strPathlibSDL = "") And (str <> "") Then 1519 str = PathParent(PathStripFilename(str)) 1520 if CheckForlibSDLSub(str) then strPathlibSDL = str 1521 end if 1522 1523 str = Which("SDL.dll") 1524 if (strPathlibSDL = "") And (str <> "") Then 1525 str = PathParent(PathStripFilename(str)) 1526 if CheckForlibSDLSub(str) then strPathlibSDL = str 1540 if strPathlibSDL = "" Then 1541 str = WhichEx("LIB", "SDLmain.lib") 1542 if str = "" Then str = Which("..\lib\SDLmain.lib") 1543 if str = "" Then str = Which("SDLmain.lib") 1544 if str <> "" Then 1545 str = PathParent(PathStripFilename(str)) 1546 if CheckForlibSDLSub(str) then strPathlibSDL = str 1547 end if 1548 end if 1549 1550 if strPathlibSDL = "" Then 1551 str = Which("SDL.dll") 1552 if str <> "" Then 1553 str = PathParent(PathStripFilename(str)) 1554 if CheckForlibSDLSub(str) then strPathlibSDL = str 1555 end if 1527 1556 end if 1528 1557 1529 1558 ' The tools location (post). 1530 1559 if (strPathlibSDL = "") And (g_blnInternalFirst = False) Then 1531 str = g_strPathDev & "/win.x86/libsdl/v1.2.11" 1532 if CheckForlibSDLSub(str) then strPathlibSDL = str 1533 end if 1534 1535 if (strPathlibSDL = "") And (g_blnInternalFirst = False) Then 1536 str = g_strPathDev & "/win.x86/libsdl/v1.2.7-InnoTek" 1537 if CheckForlibSDLSub(str) then strPathlibSDL = str 1560 str = g_strPathDev & "/win." & g_strTargetArch & "/libsdl" 1561 if HasSubdirsStartingWith(str, "v") then 1562 PrintResult "libSDL", str & "/v* (auto)" 1563 exit sub 1564 end if 1538 1565 end if 1539 1566
Note:
See TracChangeset
for help on using the changeset viewer.