Remove The tools folder from Path and edit all calls to these tools. This prevents that another tool which might be directly accessable thx to the Path var cause any problems.

svn path=/trunk/tools/RosBE-Windows/; revision=483
This commit is contained in:
Daniel Reimer 2007-11-01 20:43:47 +00:00
parent 52d2275933
commit b9d29bd946
7 changed files with 39 additions and 40 deletions

View File

@ -18,7 +18,7 @@ title Building...
::
setlocal enabledelayedexpansion
if exist .\config.rbuild (
chknewer .\config.template.rbuild .\config.rbuild
"%_ROSBE_BASEDIR%\Tools\chknewer.exe" .\config.template.rbuild .\config.rbuild
if !errorlevel! == 1 (
echo.
echo *** config.template.rbuild is newer than config.rbuild ***
@ -107,13 +107,13 @@ if "%1" == "multi" (
:BUILD
if %_ROSBE_SHOWTIME% == 1 (
if %_ROSBE_WRITELOG% == 1 (
buildtime "%_ROSBE_MINGWMAKE%" %* 2>&1 | tee "%_ROSBE_LOGDIR%\BuildLog-%_ROSBE_GCCVERSION%-%DATENAME%-%TIMENAME%.txt"
"%_ROSBE_BASEDIR%\Tools\buildtime.exe" "%_ROSBE_MINGWMAKE%" %* 2>&1 | "%_ROSBE_BASEDIR%\Tools\tee.exe" "%_ROSBE_LOGDIR%\BuildLog-%_ROSBE_GCCVERSION%-%DATENAME%-%TIMENAME%.txt"
) else (
buildtime "%_ROSBE_MINGWMAKE%" %*
"%_ROSBE_BASEDIR%\Tools\buildtime.exe" "%_ROSBE_MINGWMAKE%" %*
)
) else (
if %_ROSBE_WRITELOG% == 1 (
"%_ROSBE_MINGWMAKE%" %* 2>&1 | tee "%_ROSBE_LOGDIR%\BuildLog-%_ROSBE_GCCVERSION%-%DATENAME%-%TIMENAME%.txt"
"%_ROSBE_MINGWMAKE%" %* 2>&1 | "%_ROSBE_BASEDIR%\Tools\tee.exe" "%_ROSBE_LOGDIR%\BuildLog-%_ROSBE_GCCVERSION%-%DATENAME%-%TIMENAME%.txt"
) else (
"%_ROSBE_MINGWMAKE%" %*
)
@ -129,17 +129,17 @@ goto :EOC
:: -x2 - Number of CPUs, doubled.
::
set CPUCOUNT=
for /f "usebackq" %%i in (`cpucount -x1`) do set CPUCOUNT=%%i
for /f "usebackq" %%i in (`"%_ROSBE_BASEDIR%\Tools\cpucount.exe" -x1`) do set CPUCOUNT=%%i
if %_ROSBE_SHOWTIME% == 1 (
if %_ROSBE_WRITELOG% == 1 (
buildtime "%_ROSBE_MINGWMAKE%" -j %CPUCOUNT% %2 %3 %4 %5 %6 %7 %8 %9 2>&1 | tee "%_ROSBE_LOGDIR%\BuildLog-%_ROSBE_GCCVERSION%-%DATENAME%-%TIMENAME%.txt"
"%_ROSBE_BASEDIR%\Tools\buildtime.exe" "%_ROSBE_MINGWMAKE%" -j %CPUCOUNT% %2 %3 %4 %5 %6 %7 %8 %9 2>&1 | "%_ROSBE_BASEDIR%\Tools\tee.exe" "%_ROSBE_LOGDIR%\BuildLog-%_ROSBE_GCCVERSION%-%DATENAME%-%TIMENAME%.txt"
) else (
buildtime "%_ROSBE_MINGWMAKE%" -j %CPUCOUNT% %2 %3 %4 %5 %6 %7 %8 %9
"%_ROSBE_BASEDIR%\Tools\buildtime.exe" "%_ROSBE_MINGWMAKE%" -j %CPUCOUNT% %2 %3 %4 %5 %6 %7 %8 %9
)
) else (
if %_ROSBE_WRITELOG% == 1 (
"%_ROSBE_MINGWMAKE%" -j %CPUCOUNT% %2 %3 %4 %5 %6 %7 %8 %9 2>&1 | tee "%_ROSBE_LOGDIR%\BuildLog-%_ROSBE_GCCVERSION%-%DATENAME%-%TIMENAME%.txt"
"%_ROSBE_MINGWMAKE%" -j %CPUCOUNT% %2 %3 %4 %5 %6 %7 %8 %9 2>&1 | "%_ROSBE_BASEDIR%\Tools\tee.exe" "%_ROSBE_LOGDIR%\BuildLog-%_ROSBE_GCCVERSION%-%DATENAME%-%TIMENAME%.txt"
) else (
"%_ROSBE_MINGWMAKE%" -j %CPUCOUNT% %2 %3 %4 %5 %6 %7 %8 %9
)
@ -149,7 +149,7 @@ if %_ROSBE_SHOWTIME% == 1 (
::
:: Highlight the fact that building has ended.
::
flash
"%_ROSBE_BASEDIR%\Tools\flash.exe"
title ReactOS Build Environment %_ROSBE_VERSION%

View File

@ -28,8 +28,8 @@ if /i "%1" == "delete" (
) else (
echo Main Configuration File was not found in ReactOS Source Tree.
)
if exist "%_ROSBE_BASEDIR%\config.rbuild" (
del "%_ROSBE_BASEDIR%\config.rbuild"
if exist "%APPDATA%\RosBE\config.rbuild" (
del "%APPDATA%\RosBE\config.rbuild"
echo Working Configuration File was found and deleted.
) else (
echo Working Configuration File was not found in ReactOS Source Tree.
@ -46,7 +46,7 @@ if /i "%1" == "update" (
:CONT2
del "%_ROSBE_BASEDIR%\*.rbuild"
del "config.rbuild"
copy "config.template.rbuild" "%_ROSBE_BASEDIR%\config.rbuild"
copy "config.template.rbuild" "%APPDATA%\RosBE\config.rbuild"
echo Successfully Updated.
goto :NOK
)
@ -58,8 +58,8 @@ if not "%1" == "" (
::
:: Check if config.rbuild already exists. If not, get a working copy.
::
if not exist "%_ROSBE_BASEDIR%\config.rbuild" (
copy "config.template.rbuild" "%_ROSBE_BASEDIR%\config.rbuild"
if not exist "%APPDATA%\RosBE\config.rbuild" (
copy "config.template.rbuild" "%APPDATA%\RosBE\config.rbuild"
)
::
@ -86,7 +86,7 @@ goto :NOK
::
setlocal enabledelayedexpansion
if exist ".\config.rbuild" (
chknewer ".\config.template.rbuild" ".\config.rbuild"
"%_ROSBE_BASEDIR%\Tools\chknewer.exe" ".\config.template.rbuild" ".\config.rbuild"
if !errorlevel! == 1 (
echo.
echo *** config.template.rbuild is newer than working config.rbuild ***
@ -95,7 +95,7 @@ if exist ".\config.rbuild" (
echo *** previously made settings. ***
echo.
set /p YESNO="(yes), (no)"
if /i "%YESNO%"=="yes" del "%_ROSBE_BASEDIR%\*.rbuild" | del "config.rbuild" | copy "config.template.rbuild" "%_ROSBE_BASEDIR%\config.rbuild" | goto :OK
if /i "%YESNO%"=="yes" del "%APPDATA%\RosBE\*.rbuild" | del "config.rbuild" | copy "config.template.rbuild" "%APPDATA%\RosBE\config.rbuild" | goto :OK
if /i "%YESNO%"=="no" goto :NOK
goto :NOK
)
@ -108,7 +108,7 @@ endlocal
echo Sub-Architecture to build for.
echo Default is: none
echo.
for /f "usebackq tokens=3" %%i in (`"type "%_ROSBE_BASEDIR%\config.rbuild" | find "SARCH" | find "property name""`) do set SARCH=%%i
for /f "usebackq tokens=3" %%i in (`"type "%APPDATA%\RosBE\config.rbuild" | find "SARCH" | find "property name""`) do set SARCH=%%i
set SARCH=%SARCH:~7,-1%
echo Right now: %SARCH%
set /p SARCH_CH="(), (xbox)"
@ -121,7 +121,7 @@ echo athlon-xp, athlon-mp, k6-2
echo See GCC manual for more CPU names and which CPUs GCC can optimize for.
echo Default is: pentium
echo.
for /f "usebackq tokens=3" %%i in (`"type "%_ROSBE_BASEDIR%\config.rbuild" | find "OARCH" | find "property name""`) do set OARCH=%%i
for /f "usebackq tokens=3" %%i in (`"type "%APPDATA%\RosBE\config.rbuild" | find "OARCH" | find "property name""`) do set OARCH=%%i
set OARCH=%OARCH:~7,-1%
echo Right now: %OARCH%
set /p OARCH_CH=
@ -137,7 +137,7 @@ echo 1 = Normal compiling. Recommended. It is the default setting in
echo official release builds and debug builds.
echo warning : 2,3,4,5 is not tested on ReactOS. Change at own risk.
echo.
for /f "usebackq tokens=3" %%i in (`"type "%_ROSBE_BASEDIR%\config.rbuild" | find "OPTIMIZE" | find "property name""`) do set OPTIMIZE=%%i
for /f "usebackq tokens=3" %%i in (`"type "%APPDATA%\RosBE\config.rbuild" | find "OPTIMIZE" | find "property name""`) do set OPTIMIZE=%%i
set OPTIMIZE=%OPTIMIZE:~7,-1%
echo Right now: %OPTIMIZE%
set /p OPTIMIZE_CH="(0), (1), (2), (3), (4), (5)"
@ -149,7 +149,7 @@ cls
echo Whether to compile for an uniprocessor or multiprocessor machine.
echo Default is: 0
echo.
for /f "usebackq tokens=3" %%i in (`"type "%_ROSBE_BASEDIR%\config.rbuild" | find "MP" | find "property name""`) do set MP=%%i
for /f "usebackq tokens=3" %%i in (`"type "%APPDATA%\RosBE\config.rbuild" | find "MP" | find "property name""`) do set MP=%%i
set MP=%MP:~7,-1%
echo Right now: %MP%
set /p MP_CH="(0), (1)"
@ -161,7 +161,7 @@ cls
echo Whether to compile in the integrated kernel debugger.
echo Default is: 0
echo.
for /f "usebackq tokens=3" %%i in (`"type "%_ROSBE_BASEDIR%\config.rbuild" | find "KDBG" | find "property name""`) do set KDBG=%%i
for /f "usebackq tokens=3" %%i in (`"type "%APPDATA%\RosBE\config.rbuild" | find "KDBG" | find "property name""`) do set KDBG=%%i
set KDBG=%KDBG:~7,-1%
echo Right now: %KDBG%
set /p KDBG_CH="(0), (1)"
@ -174,7 +174,7 @@ echo Whether to compile for debugging. No compiler optimizations will be
echo performed.
echo Default is: 1
echo.
for /f "usebackq tokens=3" %%i in (`"type "%_ROSBE_BASEDIR%\config.rbuild" | find "DBG" | find "property name" | find /V "KDBG""`) do set DBG=%%i
for /f "usebackq tokens=3" %%i in (`"type "%APPDATA%\RosBE\config.rbuild" | find "DBG" | find "property name" | find /V "KDBG""`) do set DBG=%%i
set DBG=%DBG:~7,-1%
echo Right now: %DBG%
set /p DBG_CH="(0), (1)"
@ -187,7 +187,7 @@ echo Whether to compile for debugging with GDB. If you don't use GDB,
echo don't enable this.
echo Default is: 0
echo.
for /f "usebackq tokens=3" %%i in (`"type "%_ROSBE_BASEDIR%\config.rbuild" | find "GDB" | find "property name""`) do set GDB=%%i
for /f "usebackq tokens=3" %%i in (`"type "%APPDATA%\RosBE\config.rbuild" | find "GDB" | find "property name""`) do set GDB=%%i
set GDB=%GDB:~7,-1%
echo Right now: %GDB%
set /p GDB_CH="(0), (1)"
@ -202,7 +202,7 @@ echo valid/apply, don't enable this (except they/you purchased a license
echo from the patent owner).
echo Default is: 0
echo.
for /f "usebackq tokens=3" %%i in (`"type "%_ROSBE_BASEDIR%\config.rbuild" | find "NSWPAT" | find "property name""`) do set NSWPAT=%%i
for /f "usebackq tokens=3" %%i in (`"type "%APPDATA%\RosBE\config.rbuild" | find "NSWPAT" | find "property name""`) do set NSWPAT=%%i
set NSWPAT=%NSWPAT:~7,-1%
echo Right now: %NSWPAT%
set /p NSWPAT_CH="(0), (1)"
@ -219,7 +219,7 @@ echo enabled will result in a failure to enter GUI mode. Do not enable
echo unless you know what you're doing.
echo Default is: 0
echo.
for /f "usebackq tokens=3" %%i in (`"type "%_ROSBE_BASEDIR%\config.rbuild" | find "_WINKD_" | find "property name""`) do set WINKD=%%i
for /f "usebackq tokens=3" %%i in (`"type "%APPDATA%\RosBE\config.rbuild" | find "_WINKD_" | find "property name""`) do set WINKD=%%i
set WINKD=%WINKD:~7,-1%
echo Right now: %WINKD%
set /p WINKD_CH="(0), (1)"
@ -245,9 +245,9 @@ echo ^<property name="NSWPAT" value="%NSWPAT_CH%" /^>>>%TEMP%\config.tmp
echo ^<property name="_WINKD_" value="%WINKD_CH%" /^>>>%TEMP%\config.tmp
echo ^</group^>>>%TEMP%\config.tmp
copy "%TEMP%\config.tmp" "%_ROSBE_BASEDIR%\config.rbuild"
copy "%TEMP%\config.tmp" "%APPDATA%\RosBE\config.rbuild" >NUL
del %TEMP%\config.tmp
copy "%_ROSBE_BASEDIR%\config.rbuild" "config.rbuild"
copy "%APPDATA%\RosBE\config.rbuild" "config.rbuild" >NUL
goto :NOK

View File

@ -19,7 +19,6 @@ set _ROSBE_VERSION=1.0
set _ROSBE_BASEDIR=%~dp0
set _ROSBE_BASEDIR=%_ROSBE_BASEDIR:~0,-1%
set _ROSBE_ROSSOURCEDIR=%CD%
set PATH=%_ROSBE_BASEDIR%\Tools;%PATH%
set _ROSBE_ORIGINALPATH=%PATH%
set _ROSBE_SHOWTIME=1
set _ROSBE_WRITELOG=1

View File

@ -20,7 +20,7 @@ set TIMENAME=
::
:: Get the raw date and time.
::
for /f "usebackq tokens=1" %%u in (`getdate`) do set DATERAW=%%u
for /f "usebackq tokens=1" %%u in (`"%_ROSBE_BASEDIR%\Tools\getdate.exe"`) do set DATERAW=%%u
for /f "usebackq tokens=1" %%u in (`time /t`) do set TIMERAW=%%u
::

View File

@ -52,11 +52,11 @@ if not exist "%_1%\." (
echo %_1%
for /f "tokens=2" %%i in ('"objdump -p %_1% 2>NUL | findstr ImageBase"') do set baseaddr=0x%%i
if %%i lss %_2% (
raddr2line "%_1%" "%_2%"
"%_ROSBE_BASEDIR%\Tools\raddr2line.exe" "%_1%" "%_2%"
) else (
set /a baseaddr+=0x%_2%
for /f %%i in ('"echoh %baseaddr%"') do set relbase=%%i
raddr2line "%_1%" "%relbase%"
for /f %%i in ('""%_ROSBE_BASEDIR%\Tools\echoh.exe" %baseaddr%"') do set relbase=%%i
"%_ROSBE_BASEDIR%\Tools\raddr2line.exe" "%_1%" "%relbase%"
)
goto :EOC
@ -83,7 +83,7 @@ goto :EOF
:: sub-directories.
::
:CHECKPATH
chkslash %_1%
"%_ROSBE_BASEDIR%\Tools\chkslash.exe" %_1%
if errorlevel 2 (
for /f "usebackq" %%i in (`"dir /a:-d /s /b %_1% 2>NUL | findstr "%_1%""`) do set _1=%%i
)

View File

@ -21,15 +21,15 @@ if "%1" == "" (
if /i "%1" == "update" (
title Updating...
if not "%2" == "" (
svn update -r %2
"%_ROSBE_BASEDIR%\Tools\svn.exe" update -r %2
) else (
svn update
"%_ROSBE_BASEDIR%\Tools\svn.exe" update
)
goto :EOC
)
if /i "%1" == "cleanup" (
title Cleaning...
svn cleanup
"%_ROSBE_BASEDIR%\Tools\svn.exe" cleanup
goto :EOC
)
::
@ -44,7 +44,7 @@ if /i "%1" == "create" (
)
dir /b 2>nul | findstr "." >nul
if errorlevel 1 (
svn checkout svn://svn.reactos.org/reactos/trunk/reactos .
"%_ROSBE_BASEDIR%\Tools\svn.exe" checkout svn://svn.reactos.org/reactos/trunk/reactos .
) else (
echo ERROR: Folder is not empty. Continuing is dangerous and can cause errors. ABORTED
)
@ -56,8 +56,8 @@ if /i "%1" == "create" (
::
if /i "%1" == "status" (
title Status
for /f "usebackq tokens=2" %%i in (`"svn info | find "Revision:""`) do set OFFSVN=%%i
for /f "usebackq tokens=2" %%j in (`"svn info svn://svn.reactos.org/reactos/trunk/reactos | find "Revision:""`) do set ONSVN=%%j
for /f "usebackq tokens=2" %%i in (`""%_ROSBE_BASEDIR%\Tools\svn.exe" info | find "Revision:""`) do set OFFSVN=%%i
for /f "usebackq tokens=2" %%j in (`""%_ROSBE_BASEDIR%\Tools\svn.exe" info svn://svn.reactos.org/reactos/trunk/reactos | find "Revision:""`) do set ONSVN=%%j
call :UP
goto :EOC
)

View File

@ -38,7 +38,7 @@ if /i "%1" == "list" (
goto :EOC
)
if not "%1" == "" (
for /f "usebackq tokens=*" %%i in (`""%_ROSBE_BASEDIR%\Tools Test\scut.exe" %*"`) do (
for /f "usebackq tokens=*" %%i in (`""%_ROSBE_BASEDIR%\Tools\scut.exe" %*"`) do (
if /i not "%%i" == "Default" (
cd /d %%i
set _ROSBE_ROSSOURCEDIR=%%i