mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
OP-305: update sh.cmd to make easier to add more tools to the PATH
This commit is contained in:
parent
f88d3f19f7
commit
69f2f75d8b
@ -29,15 +29,23 @@ rem To build the OpenPilot software we need few tools in the PATH.
|
||||
rem Here we attempt to guess tools location using PATH or set them
|
||||
rem directly using hard-coded locations, if not found in PATH.
|
||||
rem You may want to update paths according to your installation.
|
||||
rem
|
||||
rem Also you can add any paths below just by adding extra call :which
|
||||
rem lines with the following parameters:
|
||||
rem - environment variable which will be set to the path found (or empty)
|
||||
rem - expected directory which will be tried if not found in the current PATH
|
||||
rem - any executable file which is expected to be found in PATH or directory
|
||||
rem All they will be added to the PATH in order of appearance.
|
||||
rem --------------------------------------------------------------------------
|
||||
|
||||
set NOT_FOUND=
|
||||
set PATH_DIRS=
|
||||
|
||||
call :which PYTHON "C:\Python27" python.exe
|
||||
call :which CODESOURCERY "C:\CodeSourcery\bin" cs-make.exe
|
||||
call :which QTSDK "C:\Qt\2010.05\qt\bin" qmake.exe
|
||||
call :which QTMINGW "C:\Qt\2010.05\mingw\bin" mingw32-make.exe
|
||||
call :which MSYSGIT "%ProgramFiles%\Git\bin" git.exe
|
||||
call :which QTMINGW "C:\Qt\2010.05\mingw\bin" mingw32-make.exe
|
||||
call :which QTSDK "C:\Qt\2010.05\qt\bin" qmake.exe
|
||||
call :which CODESOURCERY "C:\CodeSourcery\bin" cs-make.exe
|
||||
call :which PYTHON "C:\Python27" python.exe
|
||||
call :which UNSIS "%ProgramFiles%\NSIS\Unicode" makensis.exe
|
||||
|
||||
if "%NOT_FOUND%" == "" goto set_path
|
||||
@ -55,7 +63,7 @@ rem --------------------------------------------------------------------------
|
||||
|
||||
:set_path
|
||||
set PATH=%SYSTEMROOT%\system32;%SYSTEMROOT%
|
||||
set PATH=%MSYSGIT%;%QTMINGW%;%QTSDK%;%CODESOURCERY%;%PYTHON%;%UNSIS%;%PATH%
|
||||
set PATH=%PATH_DIRS%;%PATH%
|
||||
rem echo PATH: %PATH%
|
||||
|
||||
rem --------------------------------------------------------------------------
|
||||
@ -104,4 +112,7 @@ rem echo %3: found at: %FP%
|
||||
rem set results regardless of was it found or not
|
||||
set %1=%FP%
|
||||
rem echo %1=%FP%
|
||||
if "%FP%" == "" goto :eof
|
||||
if not "%PATH_DIRS%" == "" set PATH_DIRS=%PATH_DIRS%;
|
||||
set PATH_DIRS=%PATH_DIRS%%FP%
|
||||
goto :eof
|
||||
|
Loading…
x
Reference in New Issue
Block a user