Author: peterw Date: Sat Oct 20 07:54:28 2007 New Revision: 29696
URL: http://svn.reactos.org/svn/reactos?rev=29696&view=rev Log: - Make variable names more consistent and continue with a bit more cleanup, unfinished.
Modified: trunk/tools/RosBE-Windows/Root/Build.cmd trunk/tools/RosBE-Windows/Root/Clean.cmd trunk/tools/RosBE-Windows/Root/Config.cmd trunk/tools/RosBE-Windows/Root/Help.cmd trunk/tools/RosBE-Windows/Root/RosBE.cmd trunk/tools/RosBE-Windows/Root/TimeDate.cmd trunk/tools/RosBE-Windows/Root/reladdr2line.cmd trunk/tools/RosBE-Windows/Root/sSVN.cmd trunk/tools/RosBE-Windows/Root/scut.cmd trunk/tools/RosBE-Windows/Tools/config/options.c
Modified: trunk/tools/RosBE-Windows/Root/Build.cmd URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Root/Build.cmd?... ============================================================================== --- trunk/tools/RosBE-Windows/Root/Build.cmd (original) +++ trunk/tools/RosBE-Windows/Root/Build.cmd Sat Oct 20 07:54:28 2007 @@ -1,6 +1,6 @@ :: :: PROJECT: RosBE - ReactOS Build Environment for Windows -:: LICENSE: GPL - See COPYING in the top level directory +:: LICENSE: GPL - See LICENSE.txt in the top level directory. :: FILE: Root/Build.cmd :: PURPOSE: Perform the build of ReactOS. :: COPYRIGHT: Copyright 2007 Daniel Reimer reimer.daniel@freenet.de @@ -16,8 +16,8 @@ :: Check if the user has used the options utility and :: if so, load their options. :: -if exist %ROSBEBASEDIR%\options.cmd ( - call %ROSBEBASEDIR%\options.cmd +if exist %_ROSBE_BASEDIR%\options.cmd ( + call %_ROSBE_BASEDIR%\options.cmd )
:: @@ -37,31 +37,17 @@ )
:: -:: Clear variables before use. -:: -set CPUCOUNT= - -:: -:: Get the number of CPUs in the system so we know how many jobs to execute. -:: To modify the number used alter the options used with cpucount: -:: No Option - Number of CPUs. -:: -x1 - Number of CPUs, Plus 1. -:: -x2 - Number of CPUs, Doubled. -:: -for /f "usebackq" %%i in (`cpucount -x1`) do set CPUCOUNT=%%i - -:: :: Check if strip or ccache are being used and set the appropriate options. :: -if defined ROSBE_STRIP ( - if %ROSBE_STRIP% == 1 ( +if defined _ROSBE_STRIP ( + if %_ROSBE_STRIP% == 1 ( set ROS_LEAN_AND_MEAN=yes ) else ( set ROS_LEAN_AND_MEAN=no ) ) -if defined ROSBE_USECCACHE ( - if %ROSBE_USECCACHE% == 1 ( +if defined _ROSBE_USECCACHE ( + if %_ROSBE_USECCACHE% == 1 ( set HOST_CC=ccache gcc set HOST_CPP=ccache g++ set TARGET_CC=ccache gcc @@ -77,21 +63,21 @@ :: :: Get the current date and time for use in in our build log's file name. :: -call "%ROSBEBASEDIR%\TimeDate.cmd" +call "%_ROSBE_BASEDIR%\TimeDate.cmd"
:: :: Check if writing logs is enabled, if so check if our log directory :: exists, if it doesn't, create it, finally if creating the :: directory fails then fall back on the current directory. :: -if %ROSBE_WRITELOG% == 1 ( - if not exist "_ROSBELOGDIR." ( - mkdir "%_ROSBELOGDIR%" 1> NUL 2> NUL +if %_ROSBE_WRITELOG% == 1 ( + if not exist "_ROSBE_LOGDIR." ( + mkdir "%_ROSBE_LOGDIR%" 1> NUL 2> NUL if errorlevel 1 ( echo *** Error - Writing logs requested, but log directory doesn't *** echo *** exist and can't be created. Logs will be created in the *** echo *** current directory as a fallback. *** - set _ROSBELOGDIR=%CD% + set _ROSBE_LOGDIR=%CD% ) ) ) @@ -99,42 +85,51 @@ :: :: Check if we are using -j or not. :: +title Started: %TIMERAW%, Building... if "%1" == "multi" ( - title Started: %TIMERAW%, Building... goto :BUILDMULTI ) else ( - title Started: %TIMERAW%, Building... goto :BUILD )
:BUILD -if %ROSBE_SHOWTIME% == 1 ( - if %ROSBE_WRITELOG% == 1 ( - buildtime "%_MINGWMAKE%" %* 2>&1 | tee "%_ROSBELOGDIR%\BuildLog-%_MINGWVERSION%-%DATENAME%-%TIMENAME%.txt" +if %_ROSBE_SHOWTIME% == 1 ( + if %_ROSBE_WRITELOG% == 1 ( + buildtime "%_ROSBE_MINGWMAKE%" %* 2>&1 | tee "%_ROSBE_LOGDIR%\BuildLog-%_ROSBE_GCCVERSION%-%DATENAME%-%TIMENAME%.txt" ) else ( - buildtime "%_MINGWMAKE%" %* + buildtime "%_ROSBE_MINGWMAKE%" %* ) ) else ( - if %ROSBE_WRITELOG% == 1 ( - "%_MINGWMAKE%" %* 2>&1 | tee "%_ROSBELOGDIR%\BuildLog-%_MINGWVERSION%-%DATENAME%-%TIMENAME%.txt" + if %_ROSBE_WRITELOG% == 1 ( + "%_ROSBE_MINGWMAKE%" %* 2>&1 | tee "%_ROSBE_LOGDIR%\BuildLog-%_ROSBE_GCCVERSION%-%DATENAME%-%TIMENAME%.txt" ) else ( - "%_MINGWMAKE%" %* + "%_ROSBE_MINGWMAKE%" %* ) ) goto :EOB
:BUILDMULTI -if %ROSBE_SHOWTIME% == 1 ( - if %ROSBE_WRITELOG% == 1 ( - buildtime "%_MINGWMAKE%" -j %CPUCOUNT% %2 %3 %4 %5 %6 %7 %8 %9 2>&1 | tee "%_ROSBELOGDIR%\BuildLog-%_MINGWVERSION%-%DATENAME%-%TIMENAME%.txt" +:: +:: Get the number of CPUs in the system so we know how many jobs to execute. +:: To modify the number used alter the options used with cpucount: +:: No Option - Number of CPUs. +:: -x1 - Number of CPUs, Plus 1. +:: -x2 - Number of CPUs, Doubled. +:: +set CPUCOUNT= +for /f "usebackq" %%i in (`cpucount -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" ) else ( - buildtime "%_MINGWMAKE%" -j %CPUCOUNT% %2 %3 %4 %5 %6 %7 %8 %9 + buildtime "%_ROSBE_MINGWMAKE%" -j %CPUCOUNT% %2 %3 %4 %5 %6 %7 %8 %9 ) ) else ( - if %ROSBE_WRITELOG% == 1 ( - "%_MINGWMAKE%" -j %CPUCOUNT% %2 %3 %4 %5 %6 %7 %8 %9 2>&1 | tee "%_ROSBELOGDIR%\BuildLog-%_MINGWVERSION%-%DATENAME%-%TIMENAME%.txt" + 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" ) else ( - "%_MINGWMAKE%" -j %CPUCOUNT% %2 %3 %4 %5 %6 %7 %8 %9 + "%_ROSBE_MINGWMAKE%" -j %CPUCOUNT% %2 %3 %4 %5 %6 %7 %8 %9 ) )
@@ -144,4 +139,4 @@ :: flash
-title ReactOS Build Environment %_VER% +title ReactOS Build Environment %_ROSBE_VERSION%
Modified: trunk/tools/RosBE-Windows/Root/Clean.cmd URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Root/Clean.cmd?... ============================================================================== --- trunk/tools/RosBE-Windows/Root/Clean.cmd (original) +++ trunk/tools/RosBE-Windows/Root/Clean.cmd Sat Oct 20 07:54:28 2007 @@ -1,6 +1,6 @@ :: :: PROJECT: RosBE - ReactOS Build Environment for Windows -:: LICENSE: GPL - See COPYING in the top level directory +:: LICENSE: GPL - See LICENSE.txt in the top level directory. :: FILE: Root/Clean.cmd :: PURPOSE: Clean the ReactOS source directory. :: COPYRIGHT: Copyright 2007 Daniel Reimer reimer.daniel@freenet.de @@ -103,17 +103,17 @@ ) else ( echo There is nothing to clean. ) - title ReactOS Build Environment %_VER% + title ReactOS Build Environment %_ROSBE_VERSION% goto :EOC ) if "%1" == "logs" ( :: : Check if we have any logs to clean, if so, clean them. :: - if exist "%_ROSBELOGDIR%*.txt" ( + if exist "%_ROSBE_LOGDIR%*.txt" ( echo Cleaning build logs...
- del /f "%_ROSBELOGDIR%*.txt" 1> NUL 2> NUL + del /f "%_ROSBE_LOGDIR%*.txt" 1> NUL 2> NUL
echo Done cleaning build logs. ) else ( @@ -127,4 +127,4 @@ )
:EOC -title ReactOS Build Environment %_VER% +title ReactOS Build Environment %_ROSBE_VERSION%
Modified: trunk/tools/RosBE-Windows/Root/Config.cmd URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Root/Config.cmd... ============================================================================== --- trunk/tools/RosBE-Windows/Root/Config.cmd (original) +++ trunk/tools/RosBE-Windows/Root/Config.cmd Sat Oct 20 07:54:28 2007 @@ -1,6 +1,6 @@ :: :: PROJECT: RosBE - ReactOS Build Environment for Windows -:: LICENSE: GPL - See COPYING in the top level directory +:: LICENSE: GPL - See LICENSE.txt in the top level directory. :: FILE: Root/Config.cmd :: PURPOSE: A Basic Config.rbuild Creator for ReactOS. :: COPYRIGHT: Copyright 2007 Daniel Reimer reimer.daniel@freenet.de @@ -28,8 +28,8 @@ ) else ( echo Main Configuration File was not found in ReactOS Source Tree. ) - if exist "%ROSBEBASEDIR%\config.rbuild" ( - del "%ROSBEBASEDIR%\config.rbuild" + if exist "%_ROSBE_BASEDIR%\config.rbuild" ( + del "%_ROSBE_BASEDIR%\config.rbuild" echo Working Configuration File was found and deleted. ) else ( echo Working Configuration File was not found in ReactOS Source Tree. @@ -44,9 +44,9 @@ if /I "%XY%"=="yes" goto :CONT2 if /I "%XY%"=="no" goto :NOK :CONT2 - del "%ROSBEBASEDIR%*.rbuild" + del "%_ROSBE_BASEDIR%*.rbuild" del "config.rbuild" - copy "config.template.rbuild" "%ROSBEBASEDIR%\config.rbuild" + copy "config.template.rbuild" "%_ROSBE_BASEDIR%\config.rbuild" echo Updated. goto :NOK ) @@ -58,8 +58,8 @@ :: :: Check if config.rbuild already exists. If not, get a working copy. :: -if not exist "%ROSBEBASEDIR%\config.rbuild" ( - copy "config.template.rbuild" "%ROSBEBASEDIR%\config.rbuild" +if not exist "%_ROSBE_BASEDIR%\config.rbuild" ( + copy "config.template.rbuild" "%_ROSBE_BASEDIR%\config.rbuild" )
:: @@ -83,8 +83,8 @@ :: Check if config.template.rbuild is newer than config.rbuild, if it is then :: inform the user and offer an update. :: -if exist "%ROSBEBASEDIR%\config.rbuild" ( - test "config.template.rbuild" -nt "%ROSBEBASEDIR%\config.rbuild" +if exist "%_ROSBE_BASEDIR%\config.rbuild" ( + test "config.template.rbuild" -nt "%_ROSBE_BASEDIR%\config.rbuild" if not errorlevel 1 ( echo. echo *** config.template.rbuild is newer than working config.rbuild *** @@ -93,7 +93,7 @@ echo *** previously made settings. *** echo. SET /P XY="(yes), (no)" - if /I "%XY%"=="yes" del "%ROSBEBASEDIR%*.rbuild" | del "config.rbuild" | copy "config.template.rbuild" "%ROSBEBASEDIR%\config.rbuild" | goto :OK + if /I "%XY%"=="yes" del "%_ROSBE_BASEDIR%*.rbuild" | del "config.rbuild" | copy "config.template.rbuild" "%_ROSBE_BASEDIR%\config.rbuild" | goto :OK if /I "%XY%"=="no" goto :NOK goto :NOK ) @@ -106,9 +106,9 @@ echo Default is: none echo. echo Right now -grep "SARCH" "%ROSBEBASEDIR%\config.rbuild"|cut -d """ -f 4 +grep "SARCH" "%_ROSBE_BASEDIR%\config.rbuild"|cut -d """ -f 4 SET /P X="(), (xbox)" -sed "s/"SARCH" value=""/"SARCH" value="%X%"/g;s/"SARCH" value="xbox"/"SARCH" value="%X%"/g" "%ROSBEBASEDIR%\config.rbuild" > "%ROSBEBASEDIR%\config2.rbuild" +sed "s/"SARCH" value=""/"SARCH" value="%X%"/g;s/"SARCH" value="xbox"/"SARCH" value="%X%"/g" "%_ROSBE_BASEDIR%\config.rbuild" > "%_ROSBE_BASEDIR%\config2.rbuild" cls
echo Which CPU ReactOS should be optimized for. @@ -119,12 +119,12 @@ echo Default is: pentium echo. echo Right now -grep "OARCH" "%ROSBEBASEDIR%\config.rbuild"|cut -d """ -f 4 +grep "OARCH" "%_ROSBE_BASEDIR%\config.rbuild"|cut -d """ -f 4 SET /P XX= if "%XX%" == "" ( SET XX=pentium ) -sed "s/"OARCH" value=".*"/"OARCH" value="%XX%"/g" "%ROSBEBASEDIR%\config2.rbuild" > "%ROSBEBASEDIR%\config3.rbuild" +sed "s/"OARCH" value=".*"/"OARCH" value="%XX%"/g" "%_ROSBE_BASEDIR%\config2.rbuild" > "%_ROSBE_BASEDIR%\config3.rbuild" cls
echo What level do you want ReactOS to be optimized at. @@ -135,36 +135,36 @@ echo warning : 2,3,4,5 is not tested on ReactOS. Change at own risk. echo. echo Right now -grep "OPTIMIZE" "%ROSBEBASEDIR%\config.rbuild"|cut -d """ -f 4 +grep "OPTIMIZE" "%_ROSBE_BASEDIR%\config.rbuild"|cut -d """ -f 4 SET /P Y="(0), (1), (2), (3), (4), (5)" if "%Y%" == "" ( SET Y=1 ) -sed "s/"OPTIMIZE" value="[0-5]"/"OPTIMIZE" value="%Y%"/g" "%ROSBEBASEDIR%\config3.rbuild" > "%ROSBEBASEDIR%\config4.rbuild" +sed "s/"OPTIMIZE" value="[0-5]"/"OPTIMIZE" value="%Y%"/g" "%_ROSBE_BASEDIR%\config3.rbuild" > "%_ROSBE_BASEDIR%\config4.rbuild" cls
echo Whether to compile for an uniprocessor or multiprocessor machine. echo Default is: 0 echo. echo Right now -grep "MP" "%ROSBEBASEDIR%\config.rbuild"|cut -d """ -f 4 +grep "MP" "%_ROSBE_BASEDIR%\config.rbuild"|cut -d """ -f 4 SET /P Z="(0), (1)" if "%Z%" == "" ( SET Z=0 ) -sed "s/"MP" value="[0-1]"/"MP" value="%Z%"/g" "%ROSBEBASEDIR%\config4.rbuild" > "%ROSBEBASEDIR%\config5.rbuild" +sed "s/"MP" value="[0-1]"/"MP" value="%Z%"/g" "%_ROSBE_BASEDIR%\config4.rbuild" > "%_ROSBE_BASEDIR%\config5.rbuild" cls
echo Whether to compile in the integrated kernel debugger. echo Default is: 0 echo. echo Right now -grep "KDBG" "%ROSBEBASEDIR%\config.rbuild"|cut -d """ -f 4 +grep "KDBG" "%_ROSBE_BASEDIR%\config.rbuild"|cut -d """ -f 4 SET /P A="(0), (1)" if "%A%" == "" ( SET A=0 ) -sed "s/"KDBG" value="[0-1]"/"KDBG" value="%A%"/g" "%ROSBEBASEDIR%\config5.rbuild" > "%ROSBEBASEDIR%\config6.rbuild" +sed "s/"KDBG" value="[0-1]"/"KDBG" value="%A%"/g" "%_ROSBE_BASEDIR%\config5.rbuild" > "%_ROSBE_BASEDIR%\config6.rbuild" cls
echo Whether to compile for debugging. No compiler optimizations will be @@ -172,12 +172,12 @@ echo Default is: 1 echo. echo Right now -grep "DBG" "%ROSBEBASEDIR%\config.rbuild"|cut -d """ -f 4 +grep "DBG" "%_ROSBE_BASEDIR%\config.rbuild"|cut -d """ -f 4 SET /P B="(0), (1)" if "%B%" == "" ( SET B=1 ) -sed "s/"DBG" value="[0-1]"/"DBG" value="%B%"/g" "%ROSBEBASEDIR%\config6.rbuild" > "%ROSBEBASEDIR%\config7.rbuild" +sed "s/"DBG" value="[0-1]"/"DBG" value="%B%"/g" "%_ROSBE_BASEDIR%\config6.rbuild" > "%_ROSBE_BASEDIR%\config7.rbuild" cls
echo Whether to compile for debugging with GDB. If you don't use GDB, @@ -185,12 +185,12 @@ echo Default is: 0 echo. echo Right now -grep "GDB" "%ROSBEBASEDIR%\config.rbuild"|cut -d """ -f 4 +grep "GDB" "%_ROSBE_BASEDIR%\config.rbuild"|cut -d """ -f 4 SET /P C="(0), (1)" if "%C%" == "" ( SET C=0 ) -sed "s/"GDB" value="[0-1]"/"GDB" value="%C%"/g" "%ROSBEBASEDIR%\config7.rbuild" > "%ROSBEBASEDIR%\config8.rbuild" +sed "s/"GDB" value="[0-1]"/"GDB" value="%C%"/g" "%_ROSBE_BASEDIR%\config7.rbuild" > "%_ROSBE_BASEDIR%\config8.rbuild" cls
echo Whether to compile apps/libs with features covered software patents @@ -200,12 +200,12 @@ echo Default is: 0 echo. echo Right now -grep "NSWPAT" "%ROSBEBASEDIR%\config.rbuild"|cut -d """ -f 4 +grep "NSWPAT" "%_ROSBE_BASEDIR%\config.rbuild"|cut -d """ -f 4 SET /P D="(0), (1)" if "%D%" == "" ( SET D=0 ) -sed "s/"NSWPAT" value="[0-1]"/"NSWPAT" value="%D%"/g" "%ROSBEBASEDIR%\config8.rbuild" > "%ROSBEBASEDIR%\config9.rbuild" +sed "s/"NSWPAT" value="[0-1]"/"NSWPAT" value="%D%"/g" "%_ROSBE_BASEDIR%\config8.rbuild" > "%_ROSBE_BASEDIR%\config9.rbuild" cls
echo Whether to compile with the KD protocol. This will disable support for @@ -217,22 +217,22 @@ echo Default is: 0 echo. echo Right now -grep "_WINKD_" "%ROSBEBASEDIR%\config.rbuild"|cut -d """ -f 4 +grep "_WINKD_" "%_ROSBE_BASEDIR%\config.rbuild"|cut -d """ -f 4 SET /P F="(0), (1)" if "%F%" == "" ( SET F=0 ) -sed "s/"_WINKD_" value="[0-1]"/"_WINKD_" value="%F%"/g" "%ROSBEBASEDIR%\config9.rbuild" > "%ROSBEBASEDIR%\config10.rbuild" +sed "s/"_WINKD_" value="[0-1]"/"_WINKD_" value="%F%"/g" "%_ROSBE_BASEDIR%\config9.rbuild" > "%_ROSBE_BASEDIR%\config10.rbuild"
:: :: Generate a config.rbuild, copy it to the Source Tree and delete temp files. :: -copy "%ROSBEBASEDIR%\config10.rbuild" "%ROSBEBASEDIR%\config.tmp" -del "%ROSBEBASEDIR%*.rbuild" -ren "%ROSBEBASEDIR%\config.tmp" "config.rbuild" -copy "%ROSBEBASEDIR%\config.rbuild" "config.rbuild" +copy "%_ROSBE_BASEDIR%\config10.rbuild" "%_ROSBE_BASEDIR%\config.tmp" +del "%_ROSBE_BASEDIR%*.rbuild" +ren "%_ROSBE_BASEDIR%\config.tmp" "config.rbuild" +copy "%_ROSBE_BASEDIR%\config.rbuild" "config.rbuild"
goto :NOK
:NOK -title ReactOS Build Environment %_VER% +title ReactOS Build Environment %_ROSBE_VERSION%
Modified: trunk/tools/RosBE-Windows/Root/Help.cmd URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Root/Help.cmd?r... ============================================================================== --- trunk/tools/RosBE-Windows/Root/Help.cmd (original) +++ trunk/tools/RosBE-Windows/Root/Help.cmd Sat Oct 20 07:54:28 2007 @@ -1,6 +1,6 @@ :: :: PROJECT: RosBE - ReactOS Build Environment for Windows -:: LICENSE: GPL - See COPYING in the top level directory +:: LICENSE: GPL - See LICENSE.txt in the top level directory. :: FILE: Root/Help.cmd :: PURPOSE: Display help for the commands included with the ReactOS Build Environment. :: COPYRIGHT: Copyright 2007 Daniel Reimer reimer.daniel@freenet.de @@ -9,7 +9,7 @@ :: @echo off
-title ReactOS Build Environment %_VER% +title ReactOS Build Environment %_ROSBE_VERSION%
:: :: Receive the first Parameter and decide what to do.
Modified: trunk/tools/RosBE-Windows/Root/RosBE.cmd URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Root/RosBE.cmd?... ============================================================================== --- trunk/tools/RosBE-Windows/Root/RosBE.cmd (original) +++ trunk/tools/RosBE-Windows/Root/RosBE.cmd Sat Oct 20 07:54:28 2007 @@ -1,9 +1,9 @@ :: :: PROJECT: RosBE - ReactOS Build Environment for Windows -:: LICENSE: GPL - See COPYING in the top level directory +:: LICENSE: GPL - See LICENSE.txt in the top level directory. :: FILE: Root/RosBE.cmd :: PURPOSE: This script provides/sets up various build environments for -:: ReactOS. Currently it provides GCC 4.1.3 build environments. +:: ReactOS. Currently it provides a GCC 4.1.3 build environment. :: COPYRIGHT: Copyright 2007 Daniel Reimer reimer.daniel@freenet.de :: Peter Ward dralnix@gmail.com :: @@ -11,38 +11,37 @@ @echo off
:: -:: Set Defaults to work with and override them if edited by -:: Config Tool. +:: Set defaults to work with and override them if edited by +:: the options utility. :: color 0A -set _VER=0.X.X.X -set ROSBEBASEDIR=%~dp0 -for /f "usebackq" %%i in (`"echo %ROSBEBASEDIR%|%ROSBEBASEDIR%Tools\sed s/.$//g"`) do @SET ROSBEBASEDIR=%%i -set _ROSSOURCEDIR=%CD% -set ROSBE_SHOWTIME=1 -set ROSBE_WRITELOG=1 -set ROSBE_USECCACHE=0 -set ROSBE_STRIP=0 -set ROSBE_MINGWPATH=%ROSBEBASEDIR%\4.1.3 -set _ROSBELOGDIR=%CD%\RosBE-Logs +set _ROSBE_VERSION=0.X.X.X +set _ROSBE_BASEDIR=%~dp0 +for /f "usebackq" %%i in (`"echo %_ROSBE_BASEDIR%|%_ROSBE_BASEDIR%Tools\sed s/.$//g"`) do @SET _ROSBE_BASEDIR=%%i +set _ROSBE_ROSSOURCEDIR=%CD% +set _ROSBE_SHOWTIME=1 +set _ROSBE_WRITELOG=1 +set _ROSBE_USECCACHE=0 +set _ROSBE_STRIP=0 +set _ROSBE_MINGWPATH=%_ROSBE_BASEDIR%\4.1.3 +set _ROSBE_LOGDIR=%CD%\RosBE-Logs
:: :: Check if the user has used the options utility and :: if so, load their options. :: -if exist %ROSBEBASEDIR%\options.cmd ( - call %ROSBEBASEDIR%\options.cmd +if exist %_ROSBE_BASEDIR%\options.cmd ( + call %_ROSBE_BASEDIR%\options.cmd )
-title ReactOS Build Environment %_VER% +title ReactOS Build Environment %_ROSBE_VERSION%
:: :: Make sure RosBE was initialized right. :: if "%1" == "oldmode" ( cls - set C_INCLUDE_PATH=%ROSBE_MINGWPATH%\include;%ROSBE_MINGWPATH%\lib\gcc\mingw32\4.1.3\include - set CPLUS_INCLUDE_PATH=%ROSBE_MINGWPATH%\include;%ROSBE_MINGWPATH%\include\c++\4.1.3;%ROSBE_MINGWPATH%\include\c++\4.1.3\mingw32;%ROSBE_MINGWPATH%\lib\gcc\mingw32\4.1.3\include + set _ROSBE_OLDMODE= call :RosBE4 goto :EndCommandParse ) @@ -50,6 +49,10 @@ cls echo Unknown parameter specified. Exiting. goto :ExitRosBE +) else ( + cls + call :RosBE4 + goto :EndCommandParse )
:EndCommandParse @@ -58,8 +61,8 @@ :: Load the Base Directory from the Shortcut-XML and set it as new :: Source Directory and add PATH for Tools Folder. :: -set PATH=%ROSBEBASEDIR%\Tools;%PATH% -for /f "usebackq" %%i in (`"grep base= "%ROSBEBASEDIR%\srclist.xml"|cutz main"`) do @SET scut=%%i +set PATH=%_ROSBE_BASEDIR%\Tools;%PATH% +for /f "usebackq" %%i in (`"grep base= "%_ROSBE_BASEDIR%\srclist.xml"|cutz main"`) do @SET scut=%%i echo Used Shortcut: %scut% echo.
@@ -81,19 +84,19 @@ :: :: Load the doskey macros that serve as our commands. :: -doskey /macrofile="%ROSBEBASEDIR%\RosBE.mac" +doskey /macrofile="%_ROSBE_BASEDIR%\RosBE.mac"
:: :: Set new source directory, if needed. :: if not "%scut%" == "Default" ( - call %ROSBEBASEDIR%\scut %scut% + call %_ROSBE_BASEDIR%\scut %scut% )
:: :: Look if the Source Folder is empty. If so, ask for using "svn create". :: -dir /b "%_ROSSOURCEDIR%" 2>nul|findstr "." >nul +dir /b "%_ROSBE_ROSSOURCEDIR%" 2>nul|findstr "." >nul if errorlevel 1 ( echo No ReactOS Source detected. Please use "ssvn create" to download it. ) @@ -108,16 +111,20 @@ :: :: Set the correct path for the build tools and set the MinGW make. :: - set PATH=%ROSBE_MINGWPATH%\bin;%ROSBE_MINGWPATH%\libexec\gcc\mingw32\4.1.3;%PATH% - set _MINGWMAKE=%ROSBE_MINGWPATH%\bin\mingw32-make.exe - set _MINGWVERSION=4.1.3 - set HOST_CFLAGS=-I"%ROSBE_MINGWPATH%\include" -I"%ROSBE_MINGWPATH%\lib\gcc\mingw32\4.1.3\include" - set HOST_CPPFLAGS=-I"%ROSBE_MINGWPATH%\include" -I"%ROSBE_MINGWPATH%\include\c++\4.1.3" -I"%ROSBE_MINGWPATH%\include\c++\4.1.3\mingw32" -I"%ROSBE_MINGWPATH%\lib\gcc\mingw32\4.1.3\include" - set LIBRARY_PATH=%ROSBE_MINGWPATH%\lib;%ROSBE_MINGWPATH%\lib\gcc\mingw32\4.1.3 + set _ROSBE_GCCVERSION=4.1.3 + set PATH=%_ROSBE_MINGWPATH%\bin;%_ROSBE_MINGWPATH%\libexec\gcc\mingw32\4.1.3;%PATH% + set _ROSBE_MINGWMAKE=%_ROSBE_MINGWPATH%\bin\mingw32-make.exe + if defined _ROSBE_OLDEMODE ( + set C_INCLUDE_PATH=%_ROSBE_MINGWPATH%\include;%_ROSBE_MINGWPATH%\lib\gcc\mingw32\4.1.3\include + set CPLUS_INCLUDE_PATH=%_ROSBE_MINGWPATH%\include;%_ROSBE_MINGWPATH%\include\c++\4.1.3;%_ROSBE_MINGWPATH%\include\c++\4.1.3\mingw32;%_ROSBE_MINGWPATH%\lib\gcc\mingw32\4.1.3\include + ) + set HOST_CFLAGS=-I"%_ROSBE_MINGWPATH%\include" -I"%_ROSBE_MINGWPATH%\lib\gcc\mingw32\4.1.3\include" + set HOST_CPPFLAGS=-I"%_ROSBE_MINGWPATH%\include" -I"%_ROSBE_MINGWPATH%\include\c++\4.1.3" -I"%_ROSBE_MINGWPATH%\include\c++\4.1.3\mingw32" -I"%_ROSBE_MINGWPATH%\lib\gcc\mingw32\4.1.3\include" + set LIBRARY_PATH=%_ROSBE_MINGWPATH%\lib;%_ROSBE_MINGWPATH%\lib\gcc\mingw32\4.1.3
echo ******************************************************************************* echo * * - echo * ReactOS Build Environment %_VER%-4.1.3-20070703 (prerelease) * + echo * ReactOS Build Environment %_ROSBE_VERSION%-4.1.3-20070703 (prerelease) * echo * * echo ******************************************************************************* echo.
Modified: trunk/tools/RosBE-Windows/Root/TimeDate.cmd URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Root/TimeDate.c... ============================================================================== --- trunk/tools/RosBE-Windows/Root/TimeDate.cmd (original) +++ trunk/tools/RosBE-Windows/Root/TimeDate.cmd Sat Oct 20 07:54:28 2007 @@ -1,6 +1,6 @@ :: :: PROJECT: RosBE - ReactOS Build Environment for Windows -:: LICENSE: GPL - See COPYING in the top level directory +:: LICENSE: GPL - See LICENSE.txt in the top level directory. :: FILE: Root/TimeDate.cmd :: PURPOSE: Get the current date and time for use in our build log's file name. :: COPYRIGHT: Copyright 2007 Daniel Reimer reimer.daniel@freenet.de
Modified: trunk/tools/RosBE-Windows/Root/reladdr2line.cmd URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Root/reladdr2li... ============================================================================== --- trunk/tools/RosBE-Windows/Root/reladdr2line.cmd (original) +++ trunk/tools/RosBE-Windows/Root/reladdr2line.cmd Sat Oct 20 07:54:28 2007 @@ -1,6 +1,6 @@ :: :: PROJECT: RosBE - ReactOS Build Environment for Windows -:: LICENSE: GPL - See COPYING in the top level directory +:: LICENSE: GPL - See LICENSE.txt in the top level directory. :: FILE: Root/reladdr2line.cmd :: PURPOSE: Converts a value to hex and displays it. :: COPYRIGHT: Copyright 2007 Christoph von Wittich Christoph_vW@reactos.org @@ -53,4 +53,4 @@ for /f %%i in ('"echoh %baseaddr%"') do set relbase=%%i raddr2line "%_1%" "%relbase%" 2>NUL ) -title ReactOS Build Environment %_VER% +title ReactOS Build Environment %_ROSBE_VERSION%
Modified: trunk/tools/RosBE-Windows/Root/sSVN.cmd URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Root/sSVN.cmd?r... ============================================================================== --- trunk/tools/RosBE-Windows/Root/sSVN.cmd (original) +++ trunk/tools/RosBE-Windows/Root/sSVN.cmd Sat Oct 20 07:54:28 2007 @@ -1,6 +1,6 @@ :: :: PROJECT: RosBE - ReactOS Build Environment for Windows -:: LICENSE: GPL - See COPYING in the top level directory +:: LICENSE: GPL - See LICENSE.txt in the top level directory. :: FILE: Root/SVN.cmd :: PURPOSE: Integrated SVN Client. :: COPYRIGHT: Copyright 2007 Daniel Reimer reimer.daniel@freenet.de @@ -82,8 +82,8 @@
:UP2 SET /P XY="(yes), (no)" -if /I "%XY%"=="yes" %ROSBEBASEDIR%\ssvn update +if /I "%XY%"=="yes" %_ROSBE_BASEDIR%\ssvn update if /I "%XY%"=="no" goto :ExitSVN
:ExitSVN -title ReactOS Build Environment %_VER% +title ReactOS Build Environment %_ROSBE_VERSION%
Modified: trunk/tools/RosBE-Windows/Root/scut.cmd URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Root/scut.cmd?r... ============================================================================== --- trunk/tools/RosBE-Windows/Root/scut.cmd (original) +++ trunk/tools/RosBE-Windows/Root/scut.cmd Sat Oct 20 07:54:28 2007 @@ -1,6 +1,6 @@ :: :: PROJECT: RosBE - ReactOS Build Environment for Windows -:: LICENSE: GPL - See COPYING in the top level directory +:: LICENSE: GPL - See LICENSE.txt in the top level directory. :: FILE: Root/scut.cmd :: PURPOSE: Shortcut Creator, Remover and Switcher. :: COPYRIGHT: Copyright 2007 Daniel Reimer reimer.daniel@freenet.de @@ -37,16 +37,16 @@ echo Choose your Source Folder: SET /P XY= :RUN -grep name="%XY%" "%ROSBEBASEDIR%\srclist.xml"|cutz dir > "%ROSBEBASEDIR%\aaa.tmp" -test -s "%ROSBEBASEDIR%\aaa.tmp" +grep name="%XY%" "%_ROSBE_BASEDIR%\srclist.xml"|cutz dir > "%_ROSBE_BASEDIR%\aaa.tmp" +test -s "%_ROSBE_BASEDIR%\aaa.tmp" if errorlevel 1 ( echo Shortcut with that name does not exist. - del "%ROSBEBASEDIR%\aaa.tmp" + del "%_ROSBE_BASEDIR%\aaa.tmp" goto :END ) else ( - set /P dir=<"%ROSBEBASEDIR%\aaa.tmp" + set /P dir=<"%_ROSBE_BASEDIR%\aaa.tmp" call cd /D %dir% - del "%ROSBEBASEDIR%\aaa.tmp" + del "%_ROSBE_BASEDIR%\aaa.tmp" goto :END )
@@ -74,11 +74,11 @@ echo Choose your Source Folder: SET /P DIR= :ADD23 -echo ^<property name="%CUT%" value="%DIR%" /^> > "%ROSBEBASEDIR%\aaa.tmp" -copy "%ROSBEBASEDIR%\srclist.xml" + "%ROSBEBASEDIR%\aaa.tmp" "%ROSBEBASEDIR%\srclist2.xml" -del "%ROSBEBASEDIR%\srclist.xml" -ren "%ROSBEBASEDIR%\srclist2.xml" srclist.xml -del "%ROSBEBASEDIR%\aaa.tmp" +echo ^<property name="%CUT%" value="%DIR%" /^> > "%_ROSBE_BASEDIR%\aaa.tmp" +copy "%_ROSBE_BASEDIR%\srclist.xml" + "%_ROSBE_BASEDIR%\aaa.tmp" "%_ROSBE_BASEDIR%\srclist2.xml" +del "%_ROSBE_BASEDIR%\srclist.xml" +ren "%_ROSBE_BASEDIR%\srclist2.xml" srclist.xml +del "%_ROSBE_BASEDIR%\aaa.tmp" goto :END
:: @@ -92,17 +92,17 @@ echo Choose your Shortcut: SET /P CUTREM= :REM1 -grep name="%CUTREM%" "%ROSBEBASEDIR%\srclist.xml"|cutz dir > "%ROSBEBASEDIR%\aaa.tmp" -test -s "%ROSBEBASEDIR%\aaa.tmp" +grep name="%CUTREM%" "%_ROSBE_BASEDIR%\srclist.xml"|cutz dir > "%_ROSBE_BASEDIR%\aaa.tmp" +test -s "%_ROSBE_BASEDIR%\aaa.tmp" if errorlevel 1 ( echo Shortcut with that name does not exist. - del "%ROSBEBASEDIR%\aaa.tmp" + del "%_ROSBE_BASEDIR%\aaa.tmp" goto :END ) else ( - grep -v name="%CUTREM%" "%ROSBEBASEDIR%\srclist.xml" > "%ROSBEBASEDIR%\srclist2.xml" - del "%ROSBEBASEDIR%\srclist.xml" - ren "%ROSBEBASEDIR%\srclist2.xml" srclist.xml - del "%ROSBEBASEDIR%\aaa.tmp" + grep -v name="%CUTREM%" "%_ROSBE_BASEDIR%\srclist.xml" > "%_ROSBE_BASEDIR%\srclist2.xml" + del "%_ROSBE_BASEDIR%\srclist.xml" + ren "%_ROSBE_BASEDIR%\srclist2.xml" srclist.xml + del "%_ROSBE_BASEDIR%\aaa.tmp" goto :END )
@@ -117,22 +117,22 @@ echo Choose your new Default Shortcut: SET /P DEF= :DEF1 -grep name="%DEF%" "%ROSBEBASEDIR%\srclist.xml"|cutz dir > "%ROSBEBASEDIR%\aaa.tmp" -test -s "%ROSBEBASEDIR%\aaa.tmp" +grep name="%DEF%" "%_ROSBE_BASEDIR%\srclist.xml"|cutz dir > "%_ROSBE_BASEDIR%\aaa.tmp" +test -s "%_ROSBE_BASEDIR%\aaa.tmp" if errorlevel 1 ( echo Shortcut with that name does not exist. - del "%ROSBEBASEDIR%\aaa.tmp" + del "%_ROSBE_BASEDIR%\aaa.tmp" goto :END ) else ( - sed "s/base=".*"/base="%DEF%"/g" "%ROSBEBASEDIR%\srclist.xml" > "%ROSBEBASEDIR%\srclist2.xml" - del "%ROSBEBASEDIR%\srclist.xml" - ren "%ROSBEBASEDIR%\srclist2.xml" srclist.xml - del "%ROSBEBASEDIR%\aaa.tmp" + sed "s/base=".*"/base="%DEF%"/g" "%_ROSBE_BASEDIR%\srclist.xml" > "%_ROSBE_BASEDIR%\srclist2.xml" + del "%_ROSBE_BASEDIR%\srclist.xml" + ren "%_ROSBE_BASEDIR%\srclist2.xml" srclist.xml + del "%_ROSBE_BASEDIR%\aaa.tmp" goto :PREEND )
:PREEND -call "%ROSBEBASEDIR%\RosBE.cmd" +call "%_ROSBE_BASEDIR%\RosBE.cmd"
:END -title ReactOS Build Environment %_VER% +title ReactOS Build Environment %_ROSBE_VERSION%
Modified: trunk/tools/RosBE-Windows/Tools/config/options.c URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Tools/config/op... ============================================================================== --- trunk/tools/RosBE-Windows/Tools/config/options.c (original) +++ trunk/tools/RosBE-Windows/Tools/config/options.c Sat Oct 20 07:54:28 2007 @@ -99,12 +99,12 @@ { fprintf(pFile, "REM This file has been automatically created by RosBE Options Dialog\n\n"); fprintf(pFile, "color %X%X\n", background, foreground); - fprintf(pFile, "set ROSBE_SHOWTIME=%d\n", showtime); - fprintf(pFile, "set ROSBE_USECCACHE=%d\n", useccache); - fprintf(pFile, "set ROSBE_STRIP=%d\n", strip); - fprintf(pFile, "set ROSBE_WRITELOG=%d\n", writelog); - fprintf(pFile, "set ROSBE_LOGPATH=%S\n", logpath); - fprintf(pFile, "set ROSBE_MINGWPATH=%S\n", mingwpath); + fprintf(pFile, "set _ROSBE_SHOWTIME=%d\n", showtime); + fprintf(pFile, "set _ROSBE_USECCACHE=%d\n", useccache); + fprintf(pFile, "set _ROSBE_STRIP=%d\n", strip); + fprintf(pFile, "set _ROSBE_WRITELOG=%d\n", writelog); + fprintf(pFile, "set _ROSBE_LOGPATH=%S\n", logpath); + fprintf(pFile, "set _ROSBE_MINGWPATH=%S\n", mingwpath); fclose(pFile); return TRUE; }