[ros-diffs] [cfinck] 40878: RosBE-Windows spring cleaning: - Rewrite most of the RosBE-Windows CMD scripts resulting in more compact and cleaner code - Remove the Standard MinGW Build Environment. We don't need it any longer since we have a new GCC - Get rid of the GCC 3.4.5-specific hacks: A properly compiled GCC 3.4.5 shouldn't need them. I've uploaded two GCC 3.4.5 packages for testing to http://reactos.colinfinck.de/. Testers, who often dig into old revisions, shall please try whether the current scripts can compile those old builds with one of these packages. - Get rid of the experimental ARM and PPC compiler support: It simply won't work that way and we can readd that later, when we have proper compilers - Use setlocal wherever possible, so that we don't need to unload the used variables explicitly - Make the coding style more consistent Testers, please try the new scripts on a RosBE 1.4.2 installation. If you compile for AMD64, you will also need to rename RosBE's "x86_64" directory to "amd64".

cfinck at svn.reactos.org cfinck at svn.reactos.org
Sun May 10 20:47:11 CEST 2009


Author: cfinck
Date: Sun May 10 22:47:10 2009
New Revision: 40878

URL: http://svn.reactos.org/svn/reactos?rev=40878&view=rev
Log:
RosBE-Windows spring cleaning:
- Rewrite most of the RosBE-Windows CMD scripts resulting in more compact and cleaner code
- Remove the Standard MinGW Build Environment. We don't need it any longer since we have a new GCC
- Get rid of the GCC 3.4.5-specific hacks: A properly compiled GCC 3.4.5 shouldn't need them.
  I've uploaded two GCC 3.4.5 packages for testing to http://reactos.colinfinck.de/. Testers, who often dig into old revisions, shall please try whether the current scripts can compile those old builds with one of these packages.
- Get rid of the experimental ARM and PPC compiler support: It simply won't work that way and we can readd that later, when we have proper compilers
- Use setlocal wherever possible, so that we don't need to unload the used variables explicitly
- Make the coding style more consistent

Testers, please try the new scripts on a RosBE 1.4.2 installation.
If you compile for AMD64, you will also need to rename RosBE's "x86_64" directory to "amd64".

Added:
    trunk/tools/RosBE/RosBE-Windows/Root/TranslateOptions.cmd   (with props)
Removed:
    trunk/tools/RosBE/RosBE-Windows/Root/MinGW.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/MinGW.mac
Modified:
    trunk/tools/RosBE/RosBE-Windows/Root/Build.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/Clean.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/Config.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/Help.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/TimeDate.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/charch.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/chdefdir.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/chdefgcc.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/options.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/reladdr2line.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/sSVN.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/scut.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/update.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/version.cmd

Modified: trunk/tools/RosBE/RosBE-Windows/Root/Build.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Build.cmd?rev=40878&r1=40877&r2=40878&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/Build.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/Build.cmd [iso-8859-1] Sun May 10 22:47:10 2009
@@ -4,21 +4,20 @@
 :: FILE:        Root/Build.cmd
 :: PURPOSE:     Perform the build of ReactOS.
 :: COPYRIGHT:   Copyright 2009 Daniel Reimer <reimer.daniel at freenet.de>
-::                             Colin Finck <mail at colinfinck.de>
+::                             Colin Finck <colin at reactos.org>
 ::                             Peter Ward <dralnix at gmail.com>
 ::
-::
+
 @echo off
 if not defined _ROSBE_DEBUG set _ROSBE_DEBUG=0
 if %_ROSBE_DEBUG% == 1 (
     @echo on
 )
 
-::
+setlocal enabledelayedexpansion
+
 :: Check if config.template.rbuild is newer than config.rbuild, if it is then
 :: abort the build and inform the user.
-::
-setlocal enabledelayedexpansion
 if exist .\config.rbuild (
     "%_ROSBE_BASEDIR%\Tools\chknewer.exe" .\config.template.rbuild .\config.rbuild
     if !errorlevel! == 1 (
@@ -27,184 +26,53 @@
         echo *** aborting build. Please check for changes and       ***
         echo *** update your config.rbuild.                         ***
         echo.
-        endlocal
-        goto :EOC
-    )
-)
-endlocal
-
-::
-:: Check if strip, no Debug Symbols or ccache are being used and set the appropriate options.
-::
-if "%_ROSBE_NOSTRIP%" == "1" (
-    set ROS_BUILDNOSTRIP=yes
-) else (
-    set ROS_BUILDNOSTRIP=no
-)
-
-if "%_ROSBE_STRIP%" == "1" (
-    set ROS_LEAN_AND_MEAN=yes
-) else (
-    set ROS_LEAN_AND_MEAN=no
-)
-
-:: Small Security Check to prevent useless apps.
-if "%ROS_LEAN_AND_MEAN%" == "yes" (
-    if "%ROS_BUILDNOSTRIP%" == "yes" (
-        cls
-        echo Selecting Stripping and removing Debug Symbols together will most likely cause useless apps. Please deselect one of them.
         goto :EOC
     )
 )
 
+call "%_ROSBE_BASEDIR%\TranslateOptions.cmd"
+
 if "%_ROSBE_USECCACHE%" == "1" (
-    set CCACHE_DIR=%APPDATA%\RosBE\.ccache
     set _ROSBE_CCACHE=ccache 
+) else (
+    set _ROSBE_CCACHE=
 )
-
-:: Target defaults to host(i386)
 
 set HOST_CC=%_ROSBE_CCACHE%gcc
 set HOST_CPP=%_ROSBE_CCACHE%g++
+set TARGET_CC=%_ROSBE_CCACHE%%ROS_PREFIX%gcc
+set TARGET_CPP=%_ROSBE_CCACHE%%ROS_PREFIX%g++
 
-set TARGET_CC=%_ROSBE_CCACHE%gcc
-set TARGET_CPP=%_ROSBE_CCACHE%g++
+:: Get the current date and time for use in in our build log's file name.
+call "%_ROSBE_BASEDIR%\TimeDate.cmd"
 
-if not "%ROS_ARCH%" == "" (
-    set TARGET_CC=%_ROSBE_CCACHE%%ROS_PREFIX%-gcc
-    set TARGET_CPP=%_ROSBE_CCACHE%%ROS_PREFIX%-g++
+:: Check whether we were called as "makex" or "make"
+if "%1" == "multi" (
+    shift
+    set MAKE_JOBS=%_ROSBE_MAKEX_JOBS%
+    set TITLE_COMMAND=makex %2
+) else (
+    set MAKE_JOBS=1
+    set TITLE_COMMAND=make %1
 )
 
-::
-:: Check if the user has chosen to use a different object or output path
-:: and set it accordingly.
-::
-if defined _ROSBE_OBJPATH (
-    if not exist "%_ROSBE_OBJPATH%\." (
-        echo WARNING: The Object-Path specified doesn't seem to exist. Creating...
-        if exist "makefile*.auto" (
-            echo WARNING: makefile.auto exists. Deleting...
-            call "%_ROSBE_BASEDIR%\Clean.cmd"
-        )
-    )
-    set ROS_INTERMEDIATE=%_ROSBE_OBJPATH%
-)
-if defined _ROSBE_OUTPATH (
-    if not exist "%_ROSBE_OUTPATH%\." (
-        echo WARNING: The Output-Path specified doesn't seem to exist. Creating...
-        if exist "makefile*.auto" (
-            echo WARNING: makefile.auto exists. Deleting...
-            call "%_ROSBE_BASEDIR%\Clean.cmd"
-        )
-    )
-    set ROS_OUTPUT=%_ROSBE_OUTPATH%
-    set ROS_TEMPORARY=%_ROSBE_OUTPATH%
+title '%TITLE_COMMAND%' build started: %TIMERAW%   (%ROS_ARCH%)
+
+:: Do the actual building
+if %_ROSBE_SHOWTIME% == 1 (
+    set BUILDTIME_COMMAND="%_ROSBE_BASEDIR%\Tools\buildtime.exe"
+) else (
+    set BUILDTIME_COMMAND=
 )
 
-::
-:: Get the current date and time for use in in our build log's file name.
-::
-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.
-::
 if %_ROSBE_WRITELOG% == 1 (
-    if not exist "%_ROSBE_LOGDIR%\." (
-        mkdir "%_ROSBE_LOGDIR%" 1> NUL 2> NUL
-    )
+    %BUILDTIME_COMMAND% "%_ROSBE_MINGWMAKE%" -j %MAKE_JOBS% %1 2>&1 | "%_ROSBE_BASEDIR%\Tools\tee.exe" "%_ROSBE_LOGDIR%\BuildLog-%_ROSBE_TARGET_GCCVERSION%-%datename%-%timename%.txt"
+) else (
+    %BUILDTIME_COMMAND% "%_ROSBE_MINGWMAKE%" -j %MAKE_JOBS% %1
 )
 
-::
-:: Check if we are using -j or not.
-::
-if "%1" == "multi" (
-    if not "%2" == "" (
-        title 'makex %2' parallel build started: %TIMERAW%   %ROS_ARCH%
-    ) else (
-        title 'makex' parallel build started: %TIMERAW%   %ROS_ARCH%
-    )
-    call :BUILDMULTI %*
-) else (
-    if not "%1" == "" (
-        title 'make %1' build started: %TIMERAW%   %ROS_ARCH%
-    ) else (
-        title 'make' build started: %TIMERAW%   %ROS_ARCH%
-    )
-    call :BUILD %*
-)
-goto :EOC
-
-:BUILD
-
-if %_ROSBE_SHOWTIME% == 1 (
-    if %_ROSBE_WRITELOG% == 1 (
-        "%_ROSBE_BASEDIR%\Tools\buildtime.exe" "%_ROSBE_MINGWMAKE%" %* 2>&1 | "%_ROSBE_BASEDIR%\Tools\tee.exe" "%_ROSBE_LOGDIR%\BuildLog-%_ROSBE_GCCVERSION%-%DATENAME%-%TIMENAME%.txt"
-    ) else (
-        "%_ROSBE_BASEDIR%\Tools\buildtime.exe" "%_ROSBE_MINGWMAKE%" %*
-    )
-) else (
-    if %_ROSBE_WRITELOG% == 1 (
-        "%_ROSBE_MINGWMAKE%" %* 2>&1 | "%_ROSBE_BASEDIR%\Tools\tee.exe" "%_ROSBE_LOGDIR%\BuildLog-%_ROSBE_GCCVERSION%-%DATENAME%-%TIMENAME%.txt"
-    ) else (
-        "%_ROSBE_MINGWMAKE%" %*
-    )
-)
-goto :EOF
-
-::
-:: 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.
-:: -a        - Determine the cpu count based on the inherited process affinity mask.
-::
-
-:BUILDMULTI
-
-for /f "usebackq" %%i in (`"%_ROSBE_BASEDIR%\Tools\cpucount.exe" -x1`) do set CPUCOUNT=%%i
-
-if %_ROSBE_SHOWTIME% == 1 (
-    if %_ROSBE_WRITELOG% == 1 (
-        "%_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 (
-        "%_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 | "%_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
-    )
-)
-goto :EOF
-
-::
+:EOC
 :: Highlight the fact that building has ended.
-::
-
-:EOC
-
 "%_ROSBE_BASEDIR%\Tools\flash.exe"
-
-if defined _ROSBE_VERSION (
-    title ReactOS Build Environment %_ROSBE_VERSION%
-)
-
-::
-:: Unload all used Vars.
-::
-set ROS_BUILDNOSTRIP=
-set ROS_LEAN_AND_MEAN=
-set HOST_CC=
-set HOST_CPP=
-set TARGET_CC=
-set TARGET_CPP=
-set ROS_INTERMEDIATE=
-set ROS_OUTPUT=
-set ROS_TEMPORARY=
-set CPUCOUNT=
-set CCACHE_DIR=
-set _ROSBE_CCACHE=
+title ReactOS Build Environment %_ROSBE_VERSION%
+endlocal

Modified: trunk/tools/RosBE/RosBE-Windows/Root/Clean.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Clean.cmd?rev=40878&r1=40877&r2=40878&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/Clean.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/Clean.cmd [iso-8859-1] Sun May 10 22:47:10 2009
@@ -5,40 +5,36 @@
 :: PURPOSE:     Clean the ReactOS source directory.
 :: COPYRIGHT:   Copyright 2009 Daniel Reimer <reimer.daniel at freenet.de>
 ::                             Peter Ward <dralnix at gmail.com>
+::                             Colin Finck <colin at reactos.org>
 ::
-::
+
 @echo off
 if not defined _ROSBE_DEBUG set _ROSBE_DEBUG=0
 if %_ROSBE_DEBUG% == 1 (
     @echo on
 )
 
+setlocal enabledelayedexpansion
 title Cleaning...
 
 if "%1" == "" (
     call :DEL
     goto :EOC
-)
-if /i "%1" == "logs" (
+) else if /i "%1" == "logs" (
     call :LOG
     goto :EOC
-)
-if /i "%1" == "all" (
+) else if /i "%1" == "all" (
     call :DEL
     call :LOG
     goto :EOC
-)
-if not "%1" == "" (
+) else (
     "%_ROSBE_BASEDIR%\Build.cmd" %1_clean
     goto :EOC
 )
 
-::
+
 :: Check if we have any logs to clean, if so, clean them.
-::
-
 :LOG
-
 if exist "%_ROSBE_LOGDIR%\*.txt" (
     echo Cleaning build logs...
     del /f "%_ROSBE_LOGDIR%\*.txt" 1> NUL 2> NUL
@@ -48,75 +44,56 @@
 )
 goto :EOF
 
-::
+
 :: Check if we have something to clean, if so, clean it.
-::
-
 :DEL
 
-::
 :: Apply modified obj and out paths for deletion.
-::
-
-if "%ROS_ARCH%" == "" (
-    set ROS_ARCH=i386
-)
-
 if "%_ROSBE_OBJPATH%" == "" (
-    set _ROSBE_OBJCLEANPATH=%_ROSBE_ROSSOURCEDIR%\obj-%ROS_ARCH%
+    set OBJCLEANPATH=%_ROSBE_ROSSOURCEDIR%\obj-%ROS_ARCH%
 ) else (
-    set _ROSBE_OBJCLEANPATH=%_ROSBE_OBJPATH%
+    set OBJCLEANPATH=%_ROSBE_OBJPATH%
 )
 
 if "%_ROSBE_OUTPATH%" == "" (
-    set _ROSBE_OUTCLEANPATH=%_ROSBE_ROSSOURCEDIR%\output-%ROS_ARCH%
+    set OUTCLEANPATH=%_ROSBE_ROSSOURCEDIR%\output-%ROS_ARCH%
 ) else (
-    set _ROSBE_OUTCLEANPATH=%_ROSBE_OUTPATH%
+    set OUTCLEANPATH=%_ROSBE_OUTPATH%
 )
 
 if "%ROS_ARCH%" == "i386" (
-    set _ROSBE_MAKEFILE=%_ROSBE_ROSSOURCEDIR%\makefile.auto
+    set MAKEFILE=%_ROSBE_ROSSOURCEDIR%\makefile.auto
 ) else (
-    set _ROSBE_MAKEFILE=%_ROSBE_ROSSOURCEDIR%\makefile-%ROS_ARCH%.auto
+    set MAKEFILE=%_ROSBE_ROSSOURCEDIR%\makefile-%ROS_ARCH%.auto
 )
 
-if exist "%_ROSBE_MAKEFILE%" (
-    del "%_ROSBE_MAKEFILE%" 1> NUL 2> NUL
+if exist "%MAKEFILE%" (
+    del "%MAKEFILE%" 1> NUL 2> NUL
 )
 
-if exist "%_ROSBE_OBJCLEANPATH%\." (
+if exist "%OBJCLEANPATH%\." (
     echo Cleaning ReactOS %ROS_ARCH% source directory...
-    if exist "%_ROSBE_OBJCLEANPATH%\." (
-        rd /s /q "%_ROSBE_OBJCLEANPATH%" 1> NUL 2> NUL
+    
+    if exist "%OBJCLEANPATH%\." (
+        rd /s /q "%OBJCLEANPATH%" 1> NUL 2> NUL
     )
-    if exist "%_ROSBE_OUTCLEANPATH%\." (
-        rd /s /q "%_ROSBE_OUTCLEANPATH%" 1> NUL 2> NUL
+    
+    if exist "%OUTCLEANPATH%\." (
+        rd /s /q "%OUTCLEANPATH%" 1> NUL 2> NUL
     )
+    
     echo Done cleaning ReactOS %ROS_ARCH% source directory.
 ) else (
     echo ERROR: There is no %ROS_ARCH% compiler output to clean.
 )
 
-if "%ROS_ARCH%" == "i386" (
-    set ROS_ARCH=
-)
-
-:ROS
-
 if exist "%_ROSBE_ROSSOURCEDIR%\reactos\." (
     rd /s /q "%_ROSBE_ROSSOURCEDIR%\reactos" 1> NUL 2> NUL
 )
+
 goto :EOF
 
+
 :EOC
-
-if defined _ROSBE_VERSION (
-    title ReactOS Build Environment %_ROSBE_VERSION%
-)
-
-::
-:: Unload all used Vars.
-::
-set _ROSBE_OBJCLEANPATH=
-set _ROSBE_OUTCLEANPATH=
-set _ROSBE_MAKEFILE=
+title ReactOS Build Environment %_ROSBE_VERSION%
+endlocal

Modified: trunk/tools/RosBE/RosBE-Windows/Root/Config.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Config.cmd?rev=40878&r1=40877&r2=40878&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/Config.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/Config.cmd [iso-8859-1] Sun May 10 22:47:10 2009
@@ -5,7 +5,7 @@
 :: PURPOSE:     A Basic Config.rbuild Creator for ReactOS.
 :: COPYRIGHT:   Copyright 2009 Daniel Reimer <reimer.daniel at freenet.de>
 ::
-::
+
 @echo off
 if not defined _ROSBE_DEBUG set _ROSBE_DEBUG=0
 if %_ROSBE_DEBUG% == 1 (
@@ -13,12 +13,9 @@
 )
 
 setlocal enabledelayedexpansion
-
 title ReactOS Build Configurator
 
-::
 :: Receive the first Parameter and decide what to do.
-::
 if /i "%1" == "delete" (
     echo config.rbuild will be permanently deleted. All your settings will be gone.
     echo Continue?
@@ -34,14 +31,17 @@
     ) else (
         echo Main Configuration File was not found in ReactOS Source Tree.
     )
+    
     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.
     )
-goto :NOK
-)
+    
+    goto :NOK
+)
+
 if /i "%1" == "update" (
     echo old config.rbuild will be deleted and will be updated with a recent,
     echo default one. You will need to reconfigure it to your wishes later.
@@ -58,21 +58,18 @@
     echo Successfully Updated.
     goto :NOK
 )
+
 if not "%1" == "" (
     echo Unknown parameter specified. Try 'help [COMMAND]'.
     goto :NOK
 )
 
-::
 :: Check if config.rbuild already exists. If not, get a working copy.
-::
 if not exist "%APPDATA%\RosBE\config.rbuild" (
     copy "config.template.rbuild" "%APPDATA%\RosBE\config.rbuild"
 )
 
-::
 :: Help prevent non-useful bug reports/questions.
-::
 echo.
 echo *** Configurations other than release/debug are not useful for ***
 echo *** posting bug reports, and generally not very useful for     ***
@@ -86,11 +83,8 @@
 goto :NOK
 
 :OK
-
-::
 :: Check if config.template.rbuild is newer than config.rbuild, if it is then
 :: inform the user and offer an update.
-::
 if exist ".\config.rbuild" (
     "%_ROSBE_BASEDIR%\Tools\chknewer.exe" ".\config.template.rbuild" ".\config.rbuild"
     if !errorlevel! == 1 (
@@ -109,13 +103,11 @@
         del "config.rbuild"
         copy "config.template.rbuild" "%APPDATA%\RosBE\config.rbuild"
         goto :OK
-        endlocal
     )
 )
 
-::
+
 :: Start with reading settings from config.rbuild and let the user edit them.
-::
 echo Sub-Architecture to build for.
 echo Default is: none
 echo.
@@ -270,9 +262,7 @@
 )
 cls
 
-::
 :: Generate a config.rbuild, copy it to the Source Tree and delete temp files.
-::
 echo ^<?xml version="1.0"?^>>%TEMP%\config.tmp
 echo ^<!DOCTYPE group SYSTEM "tools/rbuild/project.dtd"^>>%TEMP%\config.tmp
 echo ^<group^>>%TEMP%\config.tmp
@@ -293,38 +283,6 @@
 del %TEMP%\config.tmp
 copy "%APPDATA%\RosBE\config.rbuild" "config.rbuild" >NUL
 
-goto :NOK
-
 :NOK
-
-if defined _ROSBE_VERSION (
-    title ReactOS Build Environment %_ROSBE_VERSION%
-)
-
-::
-:: Unload all used Vars.
-::
-set YESNO=
-set BUILD_MP=
-set BUILD_MP_CH=
-set TUNE=
-set TUNE_CH=
-set SARCH_CH=
-set OARCH_CH=
-set OPTIMIZE_CH=
-set KDBG_CH=
-set DBG_CH=
-set GDB_CH=
-set NSWPAT_CH=
-set WINKD_CH=
-set ELF_CH=
-set SARCH=
-set OARCH=
-set OPTIMIZE=
-set KDBG=
-set DBG=
-set GDB=
-set NSWPAT=
-set WINKD=
-set ELF=
-endlocal
+title ReactOS Build Environment %_ROSBE_VERSION%
+endlocal

Modified: trunk/tools/RosBE/RosBE-Windows/Root/Help.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Help.cmd?rev=40878&r1=40877&r2=40878&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/Help.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/Help.cmd [iso-8859-1] Sun May 10 22:47:10 2009
@@ -5,17 +5,18 @@
 :: PURPOSE:     Display help for the commands included with the ReactOS Build Environment.
 :: COPYRIGHT:   Copyright 2009 Daniel Reimer <reimer.daniel at freenet.de>
 ::                             Peter Ward <dralnix at gmail.com>
+::                             Colin Finck <colin at reactos.org>
 ::
-::
+
 @echo off
 if not defined _ROSBE_DEBUG set _ROSBE_DEBUG=0
 if %_ROSBE_DEBUG% == 1 (
     @echo on
 )
 
-::
 :: Check if we are displaying help on all commands, if so, display it.
-::
+:: Otherwise check if we are displaying help on individual commands, if so,
+:: display the help for that command.
 if "%1" == "" (
     echo.
     echo Available Commands:
@@ -78,14 +79,7 @@
     )
 
     echo.
-    goto :EOC
-)
-
-::
-:: Now check if we are displaying help on individual commands, if so,
-:: display the help for that command.
-::
-if /i "%1" == "make" (
+) else if /i "%1" == "make" (
     echo Usage: make [OPTIONS]
     echo Make does a standard build of ReactOS. OPTIONS are the standard ReactOS build
     echo options:
@@ -106,9 +100,7 @@
         echo                       and generates a new makefile. This will take a while.
         echo    "module"-depends - Does a dependency check for one module with the
         echo                       appropiate name.
-    goto :EOC
-)
-if /i "%1" == "makex" (
+) else if /i "%1" == "makex" (
     echo Usage: makex [OPTIONS]
     echo Same as 'make' but automatically determines the number of CPU Cores in the
     echo system and uses "make -j x" with the appropriate number. OPTIONS are the
@@ -133,42 +125,32 @@
     echo NOTE: The number makex uses can be modified by editing Build.cmd
     echo       located in the RosBE directory, instructions for doing so are
     echo       contained within the file.
-    goto :EOC
-)
-if /i "%1" == "basedir" (
+) else if /i "%1" == "basedir" (
     echo Usage: basedir
     echo Switches back to the ReactOS source directory.
-    goto :EOC
-)
-if exist "%_ROSBE_BASEDIR%\charch.cmd" (
-    if /i "%1" == "charch" (
+) else if /i "%1" == "charch" (
+    if exist "%_ROSBE_BASEDIR%\charch.cmd" (
         echo Usage: charch [OPTIONS]
         echo Change the Architecture to build ReactOS for, for the current RosBE session.
         echo Possible Architectures are: i386, ppc, arm, amd64.
         echo.
-        goto :EOC
-    )
-)
-if exist "%_ROSBE_BASEDIR%\chdefdir.cmd" (
-    if /i "%1" == "chdefdir" (
+    )
+) else if /i "%1" == "chdefdir" (
+    if exist "%_ROSBE_BASEDIR%\chdefdir.cmd" (
         echo Usage: chdefdir [OPTIONS]
         echo Change the ReactOS source directory for the current RosBE session.
         echo.
         echo    previous - Switch to the previous ReactOS source directory.
-        goto :EOC
-    )
-)
-if exist "%_ROSBE_BASEDIR%\chdefgcc.cmd" (
-    if /i "%1" == "chdefgcc" (
+    )
+) else if /i "%1" == "chdefgcc" (
+    if exist "%_ROSBE_BASEDIR%\chdefgcc.cmd" (
         echo Usage: chdefgcc [OPTIONS]
         echo Change the MinGW/GCC Target/Host directory for the current RosBE session.
         echo.
         echo    "Path" - Path to set the Host or Target GCC to.
         echo    "Type" - Set it to "target" or "host"
-        goto :EOC
-    )
-)
-if /i "%1" == "clean" (
+    )
+) else if /i "%1" == "clean" (
     echo Usage: clean [logs]
     echo Fully clean the ReactOS source directory.
     echo.
@@ -176,10 +158,8 @@
     echo    logs - Removes all build logs in the RosBE-Logs directory.
     echo    All other commands will be parsed as "make COMMAND_clean" and cleans the
     echo    specific command.
-    goto :EOC
-)
-if exist "%_ROSBE_BASEDIR%\Config.cmd" (
-    if /i "%1" == "config" (
+) else if /i "%1" == "config" (
+    if exist "%_ROSBE_BASEDIR%\Config.cmd" (
         echo Usage: config [OPTIONS]
         echo Creates a configuration file, which tells RosBE how to build the tree.
         echo.
@@ -187,16 +167,12 @@
         echo             settings.
         echo    update - Deletes the old created configuration file and updates it with a
         echo             new, default one.
-        goto :EOC
-    )
-)
-if /i "%1" == "help" (
+    )
+) else if /i "%1" == "help" (
     echo Usage: help [COMMAND]
     echo Shows help for the specified command or lists all available commands.
-    goto :EOC
-)
-if exist "%_ROSBE_BASEDIR%\reladdr2line.cmd" (
-    if /i "%1" == "raddr2line" (
+) else if /i "%1" == "raddr2line" (
+    if exist "%_ROSBE_BASEDIR%\reladdr2line.cmd" (
         echo Usage: raddr2line [FILE] [ADDRESS]
         echo Translates program addresses into file names and line numbers to assist
         echo developers with finding specific bugs in ReactOS. If either of the options
@@ -208,17 +184,13 @@
         echo           sub-directories are searched.
         echo ADDRESS - The address to be translated.
         echo.
-        goto :EOC
-    )
-)
-if exist "%_ROSBE_BASEDIR%\scut.cmd" (
-    if /i "%1" == "scut" (
+    )
+) else if /i "%1" == "scut" (
+    if exist "%_ROSBE_BASEDIR%\scut.cmd" (
         "%_ROSBE_BASEDIR%\Tools\scut.exe" --help
-        goto :EOC
-    )
-)
-if exist "%_ROSBE_BASEDIR%\sSVN.cmd" (
-    if /i "%1" == "ssvn" (
+    )
+) else if /i "%1" == "ssvn" (
+    if exist "%_ROSBE_BASEDIR%\sSVN.cmd" (
         echo Usage: ssvn [OPTIONS]
         echo Creates, updates or cleans up your ReactOS source tree or shows the revision
         echo number of the local and online trees.
@@ -228,19 +200,15 @@
         echo    create  - Creates a new ReactOS source tree.
         echo    cleanup - Cleans up and fixes errors in the source tree.
         echo    status  - Show the current local and online revision numbers.
-        goto :EOC
-    )
-)
-if exist "%_ROSBE_BASEDIR%\options.cmd" (
-    if /i "%1" == "options" (
+    )
+) else if /i "%1" == "options" (
+    if exist "%_ROSBE_BASEDIR%\options.cmd" (
         echo Usage: options
         echo Starts the RosBE configurator and sets the changes active in the current
         echo RosBE session.
-        goto :EOC
-    )
-)
-if exist "%_ROSBE_BASEDIR%\update.cmd" (
-    if /i "%1" == "update" (
+    )
+) else if /i "%1" == "update" (
+    if exist "%_ROSBE_BASEDIR%\update.cmd" (
         echo Usage: update [OPTIONS]
         echo Updates all files of RosBE to the most recent files.
         echo.
@@ -249,16 +217,9 @@
         echo    nr X     - Re/Installs Update Nr X.
         echo    reset    - Removes the Updates Cache. Not recommended.
         echo    status   - Shows the recent status of available, non installed updates.
-        goto :EOC
-    )
+    )
+) else (
+    echo Unknown command specified. No help available for %1.
 )
-if not "%1" == "" (
-    echo Unknown command specified. No help available for %1.
-    goto :EOC
-)
-
-:EOC
-
-if defined _ROSBE_VERSION (
-    title ReactOS Build Environment %_ROSBE_VERSION%
-)
+
+title ReactOS Build Environment %_ROSBE_VERSION%

Removed: trunk/tools/RosBE/RosBE-Windows/Root/MinGW.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/MinGW.cmd?rev=40877&view=auto
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/MinGW.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/MinGW.cmd (removed)
@@ -1,46 +1,0 @@
-::
-:: PROJECT:     RosBE - ReactOS Build Environment for Windows
-:: LICENSE:     GNU General Public License v2. (see LICENSE.txt)
-:: FILE:        Root/MinGW.cmd
-:: PURPOSE:     This script provides/sets up a standard MinGW build environment.
-:: COPYRIGHT:   Copyright 2009 Daniel Reimer <reimer.daniel at freenet.de>
-::                             Peter Ward <dralnix at gmail.com>
-::
-::
- at echo off
-if not defined _ROSBE_DEBUG set _ROSBE_DEBUG=0
-if %_ROSBE_DEBUG% == 1 (
-    @echo on
-)
-
-if not "%1" == "" (
-    cls
-    echo Unknown parameter specified. Exiting.
-    goto :EOF
-)
-
-color 0A
-set PATH=%SystemRoot%\system32;%SystemRoot%
-set _ROSBE_BASEDIR=%~dp0
-set _ROSBE_BASEDIR=%_ROSBE_BASEDIR:~0,-1%
-set _ROSBE_MODE=MinGW
-set _ROSBE_ORIGINALPATH=%PATH%
-set _ROSBE_HOST_MINGWPATH=%_ROSBE_BASEDIR%\i386
-set _ROSBE_TARGET_MINGWPATH=%_ROSBE_BASEDIR%\i386
-
-call "%_ROSBE_BASEDIR%\rosbe-gcc-env.cmd"
-call "%_ROSBE_BASEDIR%\version.cmd"
-
-::
-:: 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.
-:: -a        - Determine the cpu count based on the inherited process affinity mask.
-::
-for /f "usebackq" %%i in (`"%_ROSBE_BASEDIR%\Tools\cpucount.exe" -x1`) do set CPUCOUNT=%%i
-
-doskey /macrofile="%_ROSBE_BASEDIR%\MinGW.mac"
-
-if not exist "%_ROSBE_BASEDIR%\scut.cmd" ( doskey SCUT= )

Removed: trunk/tools/RosBE/RosBE-Windows/Root/MinGW.mac
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/MinGW.mac?rev=40877&view=auto
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/MinGW.mac [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/MinGW.mac (removed)
@@ -1,4 +1,0 @@
-CHDEFGCC   = "%_ROSBE_BASEDIR%\chdefgcc.cmd" $*
-MAKE       = "%_ROSBE_MINGWMAKE%" $*
-MAKEX      = "%_ROSBE_MINGWMAKE%" -j %CPUCOUNT% $*
-SCUT       = "%_ROSBE_BASEDIR%\scut.cmd" $*

Modified: trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd?rev=40878&r1=40877&r2=40878&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd [iso-8859-1] Sun May 10 22:47:10 2009
@@ -6,7 +6,7 @@
 ::              ReactOS. Currently it provides a GCC 4.1.3 build environment.
 :: COPYRIGHT:   Copyright 2009 Daniel Reimer <reimer.daniel at freenet.de>
 ::                             Peter Ward <dralnix at gmail.com>
-::
+::                             Colin Finck <colin at reactos.org>
 ::
 
 @echo off
@@ -15,132 +15,68 @@
     @echo on
 )
 
-::
+title ReactOS Build Environment %_ROSBE_VERSION%
+
+:: For NT4 compatibility
+if not defined APPDATA set APPDATA=%USERPROFILE%
+
 :: Set defaults to work with and override them if edited by
 :: the options utility.
-::
-if not defined APPDATA set APPDATA=%USERPROFILE%
-set _ROSBE_VERSION=1.4.2
+if "%ROS_ARCH%" == "" (
+    set ROS_ARCH=i386
+) else (
+    set ROS_ARCH=%1
+)
+
 set _ROSBE_BASEDIR=%~dp0
 set _ROSBE_BASEDIR=%_ROSBE_BASEDIR:~0,-1%
-set _ROSBE_MODE=RosBE
+set _ROSBE_VERSION=1.4.2
 set _ROSBE_ROSSOURCEDIR=%CD%
-set _ROSBE_ORIGINALPATH=%PATH%
 set _ROSBE_SHOWTIME=1
 set _ROSBE_WRITELOG=1
 set _ROSBE_USECCACHE=0
 set _ROSBE_STRIP=0
 set _ROSBE_NOSTRIP=0
-set _ROSBE_HOST_MINGWPATH=%_ROSBE_BASEDIR%\i386
-set _ROSBE_TARGET_MINGWPATH=%_ROSBE_BASEDIR%\i386
 set _ROSBE_LOGDIR=%CD%\RosBE-Logs
 set _ROSBE_OBJPATH=
 set _ROSBE_OUTPATH=
+set _ROSBE_HOST_MINGWPATH=%_ROSBE_BASEDIR%\i386
+set _ROSBE_TARGET_MINGWPATH=%_ROSBE_BASEDIR%\%ROS_ARCH%
+set _ROSBE_ORIGINALPATH=%_ROSBE_HOST_MINGWPATH%\bin;%PATH%
+set _ROSBE_MINGWMAKE=%_ROSBE_HOST_MINGWPATH%\bin\mingw32-make.exe
 
-::
+:: Get the number of CPUs in the system so we know how many jobs to execute.
+:: To modify the number used, see the cpucount usage for getting to know about the possible options
+for /f "usebackq" %%i in (`"%_ROSBE_BASEDIR%\Tools\cpucount.exe" -x1`) do set _ROSBE_MAKEX_JOBS=%%i
+
+set CCACHE_DIR=%APPDATA%\RosBE\.ccache
+set C_INCLUDE_PATH=
+set CPLUS_INCLUDE_PATH=
+set LIBRARY_PATH=
+
+:: Load the user's options if any
+if exist "%APPDATA%\RosBE\rosbe-options.cmd" (
+    call "%APPDATA%\RosBE\rosbe-options.cmd"
+)
+
+if exist "%APPDATA%\RosBE\rosbe-options-%1.cmd" (
+    call "%APPDATA%\RosBE\rosbe-options-%1.cmd"
+)
+
 :: Check if RosBE data directory exists, if not, create it.
-::
 if not exist "%APPDATA%\RosBE\." (
     mkdir "%APPDATA%\RosBE" 1> NUL 2> NUL
 )
 
-::
-:: Check if the user has used the options utility and
-:: if so, load their options.
-::
-if exist "%APPDATA%\RosBE\rosbe-options.cmd" (
-    call "%APPDATA%\RosBE\rosbe-options.cmd"
+:: Check if writing logs is enabled, if so check if our log directory
+:: exists, if it doesn't, create it.
+if %_ROSBE_WRITELOG% == 1 (
+    if not exist "%_ROSBE_LOGDIR%\." (
+        mkdir "%_ROSBE_LOGDIR%" 1> NUL 2> NUL
+    )
 )
 
-:: arch specific settings.
-if exist "%APPDATA%\RosBE\rosbe-options-%1.cmd" (
-    call "%APPDATA%\RosBE\rosbe-options-%1.cmd"
-)
-
-title ReactOS Build Environment %_ROSBE_VERSION%
-
-::
-:: Check if we are using oldmode or if any unknown parameters
-:: were specified.
-::
-if /i "%1" == "oldmode" (
-    cls
-    set _ROSBE_MODE=MinGW
-    call :RosBE4
-    goto :EndCommandParse
-) else (
-    cls
-    set ROS_ARCH=%1
-    call :RosBE4
-)
-::
-:: Load the base directory from srclist.txt and set it as the
-:: new source directory.
-::
-
-:EndCommandParse
-
-if exist "%_ROSBE_BASEDIR%\scut.cmd" (
-    call "%_ROSBE_BASEDIR%\scut.cmd"
-)
-
-::
-:: Tell how to display the available commands.
-::
-echo.
-echo For a list of all included commands, type: "help"
-echo -------------------------------------------------
-echo.
-REM "%_ROSBE_BASEDIR%\sSVN.cmd" status
-REM echo.
-
-::
-:: Load the doskey macros that serve as our commands.
-::
-call :LOADDOSKEYMACROS
-
-::
-:: Look if the ReactOS source directory is empty. If so,
-:: inform the user and mention 'ssvn create' (only if ssvn is installed).
-::
-setlocal enabledelayedexpansion
-if exist "%_ROSBE_BASEDIR%\sSVN.cmd" (
-    dir /b "%_ROSBE_ROSSOURCEDIR%" 2>nul | findstr "." >nul
-    if !errorlevel! == 1 (
-        echo No ReactOS source detected. Please use "ssvn create" to download it.
-    )
-)
-endlocal
-
-goto :EOF
-
-::
-:: Display the banner and set up the environment for the GCC 4.x.x build
-:: environment.
-::
-
-:RosBE4
-
-echo *******************************************************************************
-echo *                                                                             *
-echo *                        ReactOS Build Environment %_ROSBE_VERSION%                      *
-echo *                                                                             *
-echo *******************************************************************************
-echo.
-
-::
-:: Set the correct path for the build tools and set the MinGW make.
-::
-call "%_ROSBE_BASEDIR%\rosbe-gcc-env.cmd"
-goto :EOF
-
-::
-:: Load the doskey macros and delete any macros for components
-:: that are not actually present.
-::
-
-:LOADDOSKEYMACROS
-
+:: Load the DOSKEY macros and remove non-existent ones
 doskey /macrofile="%_ROSBE_BASEDIR%\RosBE.mac"
 
 if not exist "%_ROSBE_BASEDIR%\chdefdir.cmd" ( doskey CHDEFDIR= )
@@ -153,4 +89,36 @@
 if not exist "%_ROSBE_BASEDIR%\sSVN.cmd" ( doskey SVN= )
 if not exist "%_ROSBE_BASEDIR%\update.cmd" ( doskey UPDATE= )
 if not exist "%_ROSBE_BASEDIR%\options.cmd" ( doskey OPTIONS= )
-goto :EOF
+
+call "%_ROSBE_BASEDIR%\rosbe-gcc-env.cmd"
+
+cls
+echo *******************************************************************************
+echo *                                                                             *
+echo *                        ReactOS Build Environment %_ROSBE_VERSION%                      *
+echo *                                                                             *
+echo *******************************************************************************
+echo.
+
+:: Load the base directory from srclist.txt and set it as the
+:: new source directory.
+if exist "%_ROSBE_BASEDIR%\scut.cmd" (
+    call "%_ROSBE_BASEDIR%\scut.cmd"
+)
+
+:: Tell how to display the available commands.
+echo.
+echo For a list of all included commands, type: "help"
+echo -------------------------------------------------
+echo.
+
+:: Look if the ReactOS source directory is empty. If so,
+:: inform the user and mention 'ssvn create' (only if ssvn is installed).
+setlocal enabledelayedexpansion
+if exist "%_ROSBE_BASEDIR%\sSVN.cmd" (
+    dir /b "%_ROSBE_ROSSOURCEDIR%" 2>nul | findstr "." >nul
+    if !errorlevel! == 1 (
+        echo No ReactOS source detected. Please use "ssvn create" to download it.
+    )
+)
+endlocal

Modified: trunk/tools/RosBE/RosBE-Windows/Root/TimeDate.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/TimeDate.cmd?rev=40878&r1=40877&r2=40878&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/TimeDate.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/TimeDate.cmd [iso-8859-1] Sun May 10 22:47:10 2009
@@ -5,37 +5,24 @@
 :: PURPOSE:     Get the current date and time for use in our build log's file name.
 :: COPYRIGHT:   Copyright 2009 Daniel Reimer <reimer.daniel at freenet.de>
 ::                             Peter Ward <dralnix at gmail.com>
+::                             Colin Finck <colin at reactos.org>
 ::
-::
+
 @echo off
 if not defined _ROSBE_DEBUG set _ROSBE_DEBUG=0
 if %_ROSBE_DEBUG% == 1 (
     @echo on
 )
 
-::
-:: Clear variables before use.
-::
-set DATERAW=
-set TIMERAW=
-set DATENAME=
-set TIMENAME=
-
-::
 :: Get the raw date and time.
-::
 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
 
-::
 :: Check if we need to pad the time with a zero.
-::
 if "%TIMERAW:~1,1%" == ":" (
     set TIMERAW=0%TIMERAW%
 )
 
-::
 :: Format the date and time for use in a file name.
-::
 set DATENAME=%DATERAW:~6, 4%%DATERAW:~3, 2%%DATERAW:~0, 2%
 set TIMENAME=%TIMERAW:~0, 2%%TIMERAW:~3, 2%

Added: trunk/tools/RosBE/RosBE-Windows/Root/TranslateOptions.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/TranslateOptions.cmd?rev=40878&view=auto
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/TranslateOptions.cmd (added)
+++ trunk/tools/RosBE/RosBE-Windows/Root/TranslateOptions.cmd [iso-8859-1] Sun May 10 22:47:10 2009
@@ -1,0 +1,30 @@
+:: This file is entirely a HACK!!!
+:: The ROS_* variables set here should later be set by the Options utility, so we can drop the translations from _ROSBE_* variables here
+
+if "%_ROSBE_NOSTRIP%" == "1" (
+    set ROS_BUILDNOSTRIP=yes
+) else (
+    set ROS_BUILDNOSTRIP=no
+)
+
+if "%_ROSBE_STRIP%" == "1" (
+    set ROS_LEAN_AND_MEAN=yes
+) else (
+    set ROS_LEAN_AND_MEAN=no
+)
+
+:: Check if the user has chosen to use a different object or output path
+:: and set it accordingly.
+if defined _ROSBE_OBJPATH (
+    if not exist "%_ROSBE_OBJPATH%\." (
+        echo WARNING: The Object-Path specified doesn't seem to exist. Creating...
+    )
+    set ROS_INTERMEDIATE=%_ROSBE_OBJPATH%
+    set ROS_TEMPORARY=%_ROSBE_OBJPATH%
+)
+if defined _ROSBE_OUTPATH (
+    if not exist "%_ROSBE_OUTPATH%\." (
+        echo WARNING: The Output-Path specified doesn't seem to exist. Creating...
+    )
+    set ROS_OUTPUT=%_ROSBE_OUTPATH%
+)

Propchange: trunk/tools/RosBE/RosBE-Windows/Root/TranslateOptions.cmd
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: trunk/tools/RosBE/RosBE-Windows/Root/charch.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/charch.cmd?rev=40878&r1=40877&r2=40878&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/charch.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/charch.cmd [iso-8859-1] Sun May 10 22:47:10 2009
@@ -4,68 +4,39 @@
 :: FILE:        Root/charch.cmd
 :: PURPOSE:     Tool to change the current Arch to build ROS for in RosBE.
 :: COPYRIGHT:   Copyright 2009 Daniel Reimer <reimer.daniel at freenet.de>
+::                             Colin Finck <colin at reactos.org>
 ::
+
 @echo off
 if not defined _ROSBE_DEBUG set _ROSBE_DEBUG=0
 if %_ROSBE_DEBUG% == 1 (
     @echo on
 )
 
+setlocal enabledelayedexpansion
 title Change the Architecture to build for...
 
-::
 :: Parse the command line arguments.
-:: ROSBE_ARCH: Default is i386, can be set to amd64, ppc or arm.
-::
+if "%1" == "" (
+    set /p ARCH="Please enter an Architecture you want to build ReactOS for: "
+    
+    if "!ARCH!" == "" (
+        echo ERROR: You must enter an Architecture.
+        goto :EOC
+    )
+) else (
+    set ARCH=%1
+)
 
-if "%1" == "" (
-    call :INTERACTIVE
-) else (
-    set _1=%1
-)
-if /i "%_1%" == "i386" (
-    set ROS_ARCH=
-) else (
-    set ROS_ARCH=%_1%
-)
-goto :EOA
+:: Modify ROS_ARCH for the current environment
+endlocal & set ROS_ARCH=%ARCH%
 
-::
 :: Refresh all needed Params by recalling the main Path setting CMD File.
-::
-
-:EOA
-
-:: arch specific settings.
 if exist "%APPDATA%\RosBE\rosbe-options-%ROS_ARCH%.cmd" (
     call "%APPDATA%\RosBE\rosbe-options-%ROS_ARCH%.cmd"
 )
 
-call "%_ROSBE_BASEDIR%\rosbe-gcc-env.cmd"
-
-"%_ROSBE_BASEDIR%\version.cmd"
-goto :EOC
-
-::
-:: If Parameters were set, parse them, if not, ask the user to add them.
-::
-
-:INTERACTIVE
-
-set /p _1="Please enter a Architecture you want to build ReactOS for: "
-if "%_1%" == "" (
-    echo ERROR: You must enter a Architecture.
-    goto :EOC
-)
-goto :EOF
+call "%_ROSBE_BASEDIR%\chdefgcc.cmd" %ROS_ARCH% target
 
 :EOC
-
-if defined _ROSBE_VERSION (
-    title ReactOS Build Environment %_ROSBE_VERSION%
-)
-
-::
-:: Unload all used Vars.
-::
-set _1=
+title ReactOS Build Environment %_ROSBE_VERSION%

Modified: trunk/tools/RosBE/RosBE-Windows/Root/chdefdir.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/chdefdir.cmd?rev=40878&r1=40877&r2=40878&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/chdefdir.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/chdefdir.cmd [iso-8859-1] Sun May 10 22:47:10 2009
@@ -6,56 +6,42 @@
 ::              in RosBE.
 :: COPYRIGHT:   Copyright 2009 Daniel Reimer <reimer.daniel at freenet.de>
 ::                             Peter Ward <dralnix at gmail.com>
+::                             Colin Finck <colin at reactos.org>
 ::
-::
+
 @echo off
 if not defined _ROSBE_DEBUG set _ROSBE_DEBUG=0
 if %_ROSBE_DEBUG% == 1 (
     @echo on
 )
 
+setlocal enabledelayedexpansion
 title Change the current working ReactOS source directory...
 
-::
 :: Parse the command line arguments.
-::
 if "%1" == "" (
-    call :INTERACTIVE
+    set /p SOURCEDIR="Please enter a ReactOS source directory, or 'previous': "
+    
+    if "!SOURCEDIR!" == "" (
+        echo ERROR: You must enter a ReactOS source directory, or 'previous'.
+        goto :EOC
+    )
 ) else (
-    set _1=%1
+    set SOURCEDIR=%1
 )
-if /i "%_1%" == "previous" (
+
+if /i "%SOURCEDIR%" == "previous" (
     popd
 ) else (
-    if not exist "%_1%\." (
+    if not exist "%SOURCEDIR%\." (
         echo ERROR: The path specified doesn't seem to exist.
         goto :EOC
     )
-    pushd %_1%
+    
+    pushd %SOURCEDIR%
 )
-set _ROSBE_ROSSOURCEDIR=%CD%
-goto :EOC
-
-::
-:: If Parameters were set, parse them, if not, ask the user to add them.
-::
-
-:INTERACTIVE
-
-set /p _1="Please enter a ReactOS source directory, or 'previous': "
-if "%_1%" == "" (
-    echo ERROR: You must enter a ReactOS source directory, or 'previous'.
-    goto :EOC
-)
-goto :EOF
 
 :EOC
-
-if defined _ROSBE_VERSION (
-    title ReactOS Build Environment %_ROSBE_VERSION%
-)
-
-::
-:: Unload all used Vars.
-::
-set _1=
+set _ROSBE_ROSSOURCEDIR=%CD%
+title ReactOS Build Environment %_ROSBE_VERSION%
+endlocal

Modified: trunk/tools/RosBE/RosBE-Windows/Root/chdefgcc.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/chdefgcc.cmd?rev=40878&r1=40877&r2=40878&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/chdefgcc.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/chdefgcc.cmd [iso-8859-1] Sun May 10 22:47:10 2009
@@ -5,86 +5,69 @@
 :: PURPOSE:     Tool to change the current gcc in RosBE.
 :: COPYRIGHT:   Copyright 2009 Daniel Reimer <reimer.daniel at freenet.de>
 ::                             Peter Ward <dralnix at gmail.com>
+::                             Colin Finck <colin at reactos.org>
 ::
+
 @echo off
 if not defined _ROSBE_DEBUG set _ROSBE_DEBUG=0
 if %_ROSBE_DEBUG% == 1 (
     @echo on
 )
 
-if "%_ROSBE_MODE%" == "RosBE" (
-    title Change the current MinGW/GCC Host/Target directory...
+setlocal enabledelayedexpansion
+title Change the current MinGW/GCC Host/Target directory...
+
+:: Parse the command line arguments. Ask the user if certain parameters are missing.
+if "%1" == "" (
+    set /p TOOLPATH="Please enter a MinGW/GCC directory (don't use quotes): "
+    
+    if "!TOOLPATH!" == "" (
+        echo ERROR: You must enter a MinGW/GCC directory.
+        goto :EOC
+    )
+) else (
+    for /f "usebackq tokens=*" %%i in (`""%_ROSBE_BASEDIR%\Tools\rquote.exe" %1"`) do set TOOLPATH=%%i
 )
 
-::
-:: Parse the command line arguments.
-::
-for /f "usebackq tokens=*" %%i in (`""%_ROSBE_BASEDIR%\Tools\rquote.exe" %1"`) do set _1=%%i
-set _2=%2
-if "%_1%" == "" (
-    call :INTERACTIVE
-)
-if "%_2%" == "" (
-    call :INTERACTIVE2
+if "%2" == "" (
+    set /p TOOLMODE="Please specify, if this will be the Target or Host GCC: "
+    
+    if "!TOOLMODE!" == "" (
+        echo ERROR: You must enter "target" or "host".
+        goto :EOC
+    )
+) else (
+    set TOOLMODE=%2
 )
 
-if exist "%_ROSBE_BASEDIR%\%_1%\." (
-    set _1="%_ROSBE_BASEDIR%\%_1%"
-) else if not exist "%_1%\." (
+:: Verify the entered values
+if exist "%_ROSBE_BASEDIR%\%TOOLPATH%\." (
+    set TOOLPATH=%_ROSBE_BASEDIR%\%TOOLPATH%
+) else if not exist "%TOOLPATH%\." (
     echo ERROR: The path specified doesn't seem to exist.
     goto :EOC
 )
 
-if not exist "%_1%\bin\*gcc.exe" (
+if not exist "%TOOLPATH%\bin\*gcc.exe" (
     echo ERROR: No MinGW/GCC found in the specified path.
     goto :EOC
 )
 
-if /i "%_2%" == "target" (
-    set _ROSBE_TARGET_MINGWPATH=%_1%
-    echo Target Location: %_ROSBE_TARGET_MINGWPATH%
-    goto :EOA
-)
-if /i "%_2%" == "host" (
-    set _ROSBE_HOST_MINGWPATH=%_1%
-    echo Host Location: %_ROSBE_HOST_MINGWPATH%
-    goto :EOA
+:: Set the values
+if /i "%TOOLMODE%" == "target" (
+    echo Target Location: %TOOLPATH%
+    endlocal & set _ROSBE_TARGET_MINGWPATH=%TOOLPATH%
+) else if /i "%TOOLMODE%" == "host" (
+    echo Host Location: %TOOLPATH%
+    endlocal & set _ROSBE_HOST_MINGWPATH=%TOOLPATH%
 ) else (
     echo ERROR: You specified wrong parameters.
+    endlocal
     goto :EOC
 )
 
-:EOA
-
-call "%_ROSBE_BASEDIR%\rosbe-gcc-env.cmd" chdefgcc
-"%_ROSBE_BASEDIR%\version.cmd"
-goto :EOC
-
-:INTERACTIVE
-
-set /p _1="Please enter a MinGW/GCC directory (don't use quotes): "
-if "%_1%" == "" (
-    echo ERROR: You must enter a MinGW/GCC directory.
-    goto :EOC
-)
-
-:INTERACTIVE2
-
-set /p _2="Please specify, if this will be the Target or Host GCC: "
-if "%_2%" == "" (
-    echo ERROR: You must enter "target" or "host".
-    goto :EOC
-)
-goto :EOF
+call "%_ROSBE_BASEDIR%\rosbe-gcc-env.cmd"
+call "%_ROSBE_BASEDIR%\version.cmd"
 
 :EOC
-
-if defined _ROSBE_VERSION (
-    title ReactOS Build Environment %_ROSBE_VERSION%
-)
-
-::
-:: Unload all used Vars.
-::
-set _1=
-set _2=
+title ReactOS Build Environment %_ROSBE_VERSION%

Modified: trunk/tools/RosBE/RosBE-Windows/Root/options.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/options.cmd?rev=40878&r1=40877&r2=40878&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/options.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/options.cmd [iso-8859-1] Sun May 10 22:47:10 2009
@@ -5,30 +5,30 @@
 :: PURPOSE:     Starts options.exe and restarts RosBE afterwards.
 :: COPYRIGHT:   Copyright 2009 Daniel Reimer <reimer.daniel at freenet.de>
 ::
-::
+
 @echo off
 if not defined _ROSBE_DEBUG set _ROSBE_DEBUG=0
 if %_ROSBE_DEBUG% == 1 (
     @echo on
 )
 
+setlocal enabledelayedexpansion
 title Options
 
 if "%ROS_ARCH%" == "amd64" (
     set options=%_ROSBE_BASEDIR%\Tools\options64.exe
     set cfgfile=%APPDATA%\RosBE\rosbe-options-amd64.cmd
-else
+) else (
     set options=%_ROSBE_BASEDIR%\Tools\options.exe
     set cfgfile=%APPDATA%\RosBE\rosbe-options.cmd
 )
 
-::
 :: Run options.exe
-::
 if exist "%options%" (
     pushd "%_ROSBE_BASEDIR%"
     call "%options%"
     popd
+    
     if exist "%cfgfile%" (
         call "%cfgfile%"
     )
@@ -36,9 +36,5 @@
     echo ERROR: options executable was not found.
 )
 
-if defined _ROSBE_VERSION (
-    title ReactOS Build Environment %_ROSBE_VERSION%
-)
-
-set options=
-set cfgfile=
+title ReactOS Build Environment %_ROSBE_VERSION%
+endlocal

Modified: trunk/tools/RosBE/RosBE-Windows/Root/reladdr2line.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/reladdr2line.cmd?rev=40878&r1=40877&r2=40878&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/reladdr2line.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/reladdr2line.cmd [iso-8859-1] Sun May 10 22:47:10 2009
@@ -6,97 +6,71 @@
 :: COPYRIGHT:   Copyright 2009 Christoph von Wittich <Christoph_vW at reactos.org>
 ::                             Daniel Reimer <reimer.daniel at freenet.de>
 ::                             Peter Ward <dralnix at gmail.com>
+::                             Colin Finck <colin at reactos.org>
 ::
-::
+
 @echo off
 if not defined _ROSBE_DEBUG set _ROSBE_DEBUG=0
 if %_ROSBE_DEBUG% == 1 (
     @echo on
 )
 
+setlocal enabledelayedexpansion
 title reladdr2line...
 
-::
-:: Receive the Parameters and decide what to do.
-::
 if not "%3" == "" (
     echo ERROR: Too many parameters specified.
     goto :EOC
 )
-if not "%1" == "" (
-    set _1=%1
-    call :CHECKPATH
+
+:: Receive all parameters
+if "%1" == "" (
+    set /p FILEPATH="Please enter the path/file to be examined: "
+) else (
+    set FILEPATH=%1
 )
-if not "%2" == "" (
-    set _2=%2
+
+if "%2" == "" (
+    set /p ADDRESS="Please enter the address you would like to analyze: "
+) else (
+    set ADDRESS=%2
 )
-call :INTERACTIVE
 
-::
+:: Check if parameters were really given
+if "%FILEPATH%" == "" (
+    echo ERROR: You must specify a path/file to examine.
+    goto :EOC
+)
+if "%ADDRESS%" == "" (
+    echo ERROR: You must specify a address to analyze.
+    goto :EOC
+)
+
+:: Check if the user supplied a path, if they didn't look for
+:: the specified file in the current directory and any
+:: sub-directories.
+"%_ROSBE_BASEDIR%\Tools\chkslash.exe" %FILEPATH%
+if errorlevel 2 (
+    for /f "usebackq" %%i in (`"dir /a:-d /s /b %FILEPATH% 2>NUL | findstr "%FILEPATH%""`) do set FILEPATH=%%i
+)
+
 :: First get the ImageBase of the File. If its smaller than the given
 :: Parameter, everything is ok, because it was already added onto the
 :: adress and can be given directly to raddr2line. If not, add it and
 :: give the result to raddr2line.
-::
+echo %FILEPATH%
 
-if "%_1%" == "" (
-    echo ERROR: You must specify a path/file to examine.
-    goto :EOC
+for /f "tokens=2" %%i in ('"objdump -p %FILEPATH% 2>NUL | findstr ImageBase"') do set BASEADDRESS=0x%%i
+
+if %%i lss %ADDRESS% (
+    "%_ROSBE_BASEDIR%\Tools\raddr2line.exe" "%FILEPATH%" "%ADDRESS%"
+) else (
+    set /a BASEADDRESS+=0x%ADDRESS%
+    
+    for /f %%i in ('""%_ROSBE_BASEDIR%\Tools\echoh.exe" !BASEADDRESS!"') do set RELBASE=%%i
+    "%_ROSBE_BASEDIR%\Tools\raddr2line.exe" "!FILEPATH!" "!RELBASE!"
 )
-if "%_2%" == "" (
-    echo ERROR: You must specify a address to analyze.
-    goto :EOC
-)
-echo %_1%
-for /f "tokens=2" %%i in ('"objdump -p %_1% 2>NUL | findstr ImageBase"') do set baseaddr=0x%%i
-if %%i lss %_2% (
-    "%_ROSBE_BASEDIR%\Tools\raddr2line.exe" "%_1%" "%_2%"
-) else (
-    set /a baseaddr+=0x%_2%
-    for /f %%i in ('""%_ROSBE_BASEDIR%\Tools\echoh.exe" %baseaddr%"') do set relbase=%%i
-    "%_ROSBE_BASEDIR%\Tools\raddr2line.exe" "%_1%" "%relbase%"
-)
-goto :EOC
-
-::
-:: If Parameters were set, parse them, if not, ask the user to add them.
-::
-
-:INTERACTIVE
-
-if "%_1%" == "" (
-    set /p _1="Please enter the path/file to be examined: "
-    call :CHECKPATH
-)
-if "%_2%" == "" (
-    set /p _2="Please enter the address you would like to analyze: "
-)
-goto :EOF
-
-::
-:: Check if the user supplied a path, if they didn't look for
-:: the specified file in the current directory and any
-:: sub-directories.
-::
-
-:CHECKPATH
-
-"%_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
-)
-goto :EOF
 
 :EOC
-
-if defined _ROSBE_VERSION (
-    title ReactOS Build Environment %_ROSBE_VERSION%
-)
-
-::
-:: Unload all used Vars.
-::
-set _1=
-set _2=
-set baseaddr=
-set relbase=
+title ReactOS Build Environment %_ROSBE_VERSION%
+endlocal

Modified: trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd?rev=40878&r1=40877&r2=40878&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd [iso-8859-1] Sun May 10 22:47:10 2009
@@ -2,113 +2,33 @@
 :: PROJECT:     RosBE - ReactOS Build Environment for Windows
 :: LICENSE:     GNU General Public License v2. (see LICENSE.txt)
 :: FILE:        Root/rosbe-gcc-env.cmd
-:: PURPOSE:     Set up the GCC 4.x.x build environment.
+:: PURPOSE:     Set up toolchain-specific settings when initializing RosBE and when using "charch" or "chdefgcc"
 :: COPYRIGHT:   Copyright 2009 Daniel Reimer <reimer.daniel at freenet.de>
 ::                             Peter Ward <dralnix at gmail.com>
+::                             Colin Finck <colin at reactos.org>
 ::
-::
+
 @echo off
 if not defined _ROSBE_DEBUG set _ROSBE_DEBUG=0
 if %_ROSBE_DEBUG% == 1 (
     @echo on
 )
 
-::
-:: Check if we are running within the RosBE, and if not
-:: initialize GCC for the current directory.
-::
-if not defined _ROSBE_HOST_MINGWPATH (
-    set _ROSBE_MODE=MinGW
-    set _ROSBE_HOST_MINGWPATH=%CD%
-    set _ROSBE_ORIGINALPATH=%PATH%
+:: Check if we're switching to the AMD64 architecture
+if "%ROS_ARCH%" == "amd64" (
+    set ROS_PREFIX=x86_64-pc-mingw32-
+) else (
+    set ROS_PREFIX=
 )
 
-if "%1" == "chdefgcc" (
-    goto :main
-)
+set PATH=%_ROSBE_TARGET_MINGWPATH%\bin;%_ROSBE_ORIGINALPATH%
 
-set _ROSBE_OBJPATH=%_ROSBE_i386_OBJPATH%
-set _ROSBE_OUTPATH=%_ROSBE_i386_OUTPATH%
-
-if not "%ROS_ARCH%" == "" (
-    set ROS_PREFIX=%ROS_ARCH%-pc-mingw32
-    set _ROSBE_TARGET_MINGWPATH=%_ROSBE_BASEDIR%\%ROS_ARCH%
-
-    if "%ROS_ARCH%" == "arm" (
-        set _ROSBE_OBJPATH=%_ROSBE_ARM_OBJPATH%
-        set _ROSBE_OUTPATH=%_ROSBE_ARM_OUTPATH%
-    )
-    if "%ROS_ARCH%" == "ppc" (
-        set _ROSBE_OBJPATH=%_ROSBE_PPC_OBJPATH%
-        set _ROSBE_OUTPATH=%_ROSBE_PPC_OUTPATH%
-    )
-    if "%ROS_ARCH%" == "amd64" (
-        set _ROSBE_OBJPATH=%_ROSBE_AMD64_OBJPATH%
-        set _ROSBE_OUTPATH=%_ROSBE_AMD64_OUTPATH%
-        set ROS_PREFIX=x86_64-pc-mingw32
-        set _ROSBE_TARGET_MINGWPATH=%_ROSBE_BASEDIR%\x86_64
-    )
-)
-
-REM Check if existant arch
-
-if not exist "%_ROSBE_TARGET_MINGWPATH%\." (   
-    echo Unsupported arch specified. Fallback to Default.
-    pause
-    set _ROSBE_OBJPATH=%_ROSBE_i386_OBJPATH%
-    set _ROSBE_OUTPATH=%_ROSBE_i386_OUTPATH%
-    set ROS_ARCH=
-    set ROS_PREFIX=
-    set _ROSBE_TARGET_MINGWPATH=%_ROSBE_HOST_MINGWPATH%
-)
-
-REM HAXX
-
-::
-:: Set up the GCC 4.x.x build environment.
-::
-
-:main
-
-set PATH=%_ROSBE_HOST_MINGWPATH%\bin;%_ROSBE_TARGET_MINGWPATH%\bin;%_ROSBE_ORIGINALPATH%
-set _ROSBE_MINGWMAKE=%_ROSBE_HOST_MINGWPATH%\bin\mingw32-make.exe
-
-if not .%ROS_ARCH%. == .. (
-for /f "usebackq tokens=3" %%i in (`"%ROS_PREFIX%-gcc -v 2>&1 | find "gcc version""`) do set _ROSBE_GCCVERSION=%%i
-for /f "usebackq tokens=2" %%i in (`"%ROS_PREFIX%-gcc -v 2>&1 | find "Target""`) do set _ROSBE_GCCTARGET=%%i
-) else (
-for /f "usebackq tokens=3" %%i in (`"gcc -v 2>&1 | find "gcc version""`) do set _ROSBE_GCCVERSION=%%i
-for /f "usebackq tokens=2" %%i in (`"gcc -v 2>&1 | find "Target""`) do set _ROSBE_GCCTARGET=%%i
-)
-
+for /f "usebackq tokens=3" %%i in (`"%ROS_PREFIX%gcc -v 2>&1 | find "gcc version""`) do set _ROSBE_TARGET_GCCVERSION=%%i
+for /f "usebackq tokens=2" %%i in (`"%ROS_PREFIX%gcc -v 2>&1 | find "Target""`) do set _ROSBE_TARGET_GCCTARGET=%%i
 for /f "usebackq tokens=3" %%i in (`"gcc -v 2>&1 | find "gcc version""`) do set _ROSBE_HOST_GCCVERSION=%%i
 for /f "usebackq tokens=2" %%i in (`"gcc -v 2>&1 | find "Target""`) do set _ROSBE_HOST_GCCTARGET=%%i
 
-if "%_ROSBE_MODE%" == "MinGW" (
-    set C_INCLUDE_PATH=%_ROSBE_HOST_MINGWPATH%\include;%_ROSBE_HOST_MINGWPATH%\lib\gcc\%_ROSBE_GCCTARGET%\%_ROSBE_GCCVERSION%\include
-    set CPLUS_INCLUDE_PATH=%_ROSBE_HOST_MINGWPATH%\include;%_ROSBE_HOST_MINGWPATH%\include\c++\%_ROSBE_GCCVERSION%;%_ROSBE_HOST_MINGWPATH%\include\c++\%_ROSBE_GCCVERSION%\%_ROSBE_GCCTARGET%;%_ROSBE_HOST_MINGWPATH%\lib\gcc\%_ROSBE_GCCTARGET%\%_ROSBE_GCCVERSION%\include
-    set ROSBE_HOST_CFLAGS=
-    set ROSBE_HOST_CXXFLAGS=
-    set ROSBE_TARGET_CFLAGS=
-    set ROSBE_TARGET_CXXFLAGS=
-
-) else (
-    set C_INCLUDE_PATH=
-    set CPLUS_INCLUDE_PATH=
-    set ROSBE_HOST_CFLAGS=-I"%_ROSBE_HOST_MINGWPATH%\include" -I"%_ROSBE_HOST_MINGWPATH%\lib\gcc\%_ROSBE_HOST_GCCTARGET%\%_ROSBE_HOST_GCCVERSION%\include"
-    set ROSBE_HOST_CXXFLAGS=-I"%_ROSBE_HOST_MINGWPATH%\include" -I"%_ROSBE_HOST_MINGWPATH%\include\c++\%_ROSBE_HOST_GCCVERSION%" -I"%_ROSBE_HOST_MINGWPATH%\include\c++\%_ROSBE_HOST_GCCVERSION%\%_ROSBE_HOST_GCCTARGET%" -I"%_ROSBE_HOST_MINGWPATH%\lib\gcc\%_ROSBE_HOST_GCCTARGET%\%_ROSBE_HOST_GCCVERSION%\include"
-    set ROSBE_TARGET_CFLAGS=-I"%_ROSBE_TARGET_MINGWPATH%\include" -I"%_ROSBE_TARGET_MINGWPATH%\lib\gcc\%_ROSBE_GCCTARGET%\%_ROSBE_GCCVERSION%\include"
-    set ROSBE_TARGET_CXXFLAGS=-I"%_ROSBE_TARGET_MINGWPATH%\include" -I"%_ROSBE_TARGET_MINGWPATH%\include\c++\%_ROSBE_GCCVERSION%" -I"%_ROSBE_TARGET_MINGWPATH%\include\c++\%_ROSBE_GCCVERSION%\%_ROSBE_GCCTARGET%" -I"%_ROSBE_TARGET_MINGWPATH%\lib\gcc\%_ROSBE_GCCTARGET%\%_ROSBE_GCCVERSION%\include"
-)
-if "%_ROSBE_HOST_GCCVERSION%" == "3.4.5" (
-    set PATH=%_ROSBE_BASEDIR%\3.4.5\bin;%_ROSBE_BASEDIR%\3.4.5\libexec\gcc\mingw32\3.4.5;%PATH%
-    set _ROSBE_MINGWMAKE=%_ROSBE_BASEDIR%\3.4.5\bin\mingw32-make.exe
-    :: Set all paths (needed by Windows Vista)
-    set C_INCLUDE_PATH=%_ROSBE_BASEDIR%\3.4.5\include;%_ROSBE_BASEDIR%\3.4.5\lib\gcc\mingw32\3.4.5\include
-    set CPLUS_INCLUDE_PATH=%_ROSBE_BASEDIR%\3.4.5\include;%_ROSBE_BASEDIR%\3.4.5\include\c++\3.4.5;%_ROSBE_BASEDIR%\3.4.5\include\c++\3.4.5\mingw32;%_ROSBE_BASEDIR%\3.4.5\lib\gcc\mingw32\3.4.5\include
-    set LIBRARY_PATH=%_ROSBE_BASEDIR%\3.4.5\lib;%_ROSBE_BASEDIR%\3.4.5\lib\gcc\mingw32\3.4.5
-    set ROSBE_HOST_CFLAGS=
-    set ROSBE_HOST_CXXFLAGS=
-    set ROSBE_TARGET_CFLAGS=
-    set ROSBE_TARGET_CXXFLAGS=
-)
+set ROSBE_HOST_CFLAGS=-I"%_ROSBE_HOST_MINGWPATH%\include" -I"%_ROSBE_HOST_MINGWPATH%\lib\gcc\%_ROSBE_HOST_GCCTARGET%\%_ROSBE_HOST_GCCVERSION%\include"
+set ROSBE_HOST_CXXFLAGS=-I"%_ROSBE_HOST_MINGWPATH%\include" -I"%_ROSBE_HOST_MINGWPATH%\include\c++\%_ROSBE_HOST_GCCVERSION%" -I"%_ROSBE_HOST_MINGWPATH%\include\c++\%_ROSBE_HOST_GCCVERSION%\%_ROSBE_HOST_GCCTARGET%" -I"%_ROSBE_HOST_MINGWPATH%\lib\gcc\%_ROSBE_HOST_GCCTARGET%\%_ROSBE_HOST_GCCVERSION%\include"
+set ROSBE_TARGET_CFLAGS=-I"%_ROSBE_TARGET_MINGWPATH%\include" -I"%_ROSBE_TARGET_MINGWPATH%\lib\gcc\%_ROSBE_TARGET_GCCTARGET%\%_ROSBE_TARGET_GCCVERSION%\include"
+set ROSBE_TARGET_CXXFLAGS=-I"%_ROSBE_TARGET_MINGWPATH%\include" -I"%_ROSBE_TARGET_MINGWPATH%\include\c++\%_ROSBE_TARGET_GCCVERSION%" -I"%_ROSBE_TARGET_MINGWPATH%\include\c++\%_ROSBE_TARGET_GCCVERSION%\%_ROSBE_TARGET_GCCTARGET%" -I"%_ROSBE_TARGET_MINGWPATH%\lib\gcc\%_ROSBE_TARGET_GCCTARGET%\%_ROSBE_TARGET_GCCVERSION%\include"

Modified: trunk/tools/RosBE/RosBE-Windows/Root/sSVN.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/sSVN.cmd?rev=40878&r1=40877&r2=40878&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/sSVN.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/sSVN.cmd [iso-8859-1] Sun May 10 22:47:10 2009
@@ -5,110 +5,97 @@
 :: PURPOSE:     Integrated SVN Client.
 :: COPYRIGHT:   Copyright 2009 Daniel Reimer <reimer.daniel at freenet.de>
 ::
-::
+
 @echo off
 if not defined _ROSBE_DEBUG set _ROSBE_DEBUG=0
 if %_ROSBE_DEBUG% == 1 (
     @echo on
 )
 
-::
+setlocal enabledelayedexpansion
+
 :: Receive the first parameter and decide what to do.
-::
 if "%1" == "" (
     echo No parameter specified. Try 'help [COMMAND]'.
     goto :EOC
 )
 
-::
 :: These two are directly parsed to svn.
-::
 if /i "%1" == "update" (
     title SVN Updating...
     echo This might take a while, so please be patient.
     echo.
+    
     if not "%2" == "" (
         "%_ROSBE_BASEDIR%\Tools\svn.exe" update -r %2
     ) else (
         "%_ROSBE_BASEDIR%\Tools\svn.exe" update
     )
+    
     goto :EOC
 )
+
 if /i "%1" == "cleanup" (
     title SVN Cleaning...
     echo This might take a while, so please be patient.
     echo.
+    
     "%_ROSBE_BASEDIR%\Tools\svn.exe" cleanup
+    
     goto :EOC
 )
 
-::
 :: Check if the folder is empty. If not, output an error.
-::
 if /i "%1" == "create" (
     title SVN Creating...
     if exist ".svn\." (
         echo ERROR: Folder already contains a repository.
         goto :EOC
     )
+    
     dir /b 2>nul | findstr "." >nul
     if errorlevel 1 (
         "%_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
     )
+    
     goto :EOC
 )
 
-::
 :: Output the revision of the local and online trees and tell the user if
 :: its up to date or not.
-::
 if /i "%1" == "status" (
     title SVN Status
     echo This might take a while, so please be patient.
     echo.
+    
     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
+    
+    echo Local Revision: !OFFSVN!
+    echo Online HEAD Revision: !ONSVN!
+    echo.
+
+    if !OFFSVN! lss !ONSVN! (
+        echo Your tree is not up to date. Do you want to update it?
+        
+        set /p UP="Please enter 'yes' or 'no': "
+        if /i "!UP!"=="yes" "%_ROSBE_BASEDIR%\ssvn" update
+        if /i "!UP!"=="y" "%_ROSBE_BASEDIR%\ssvn" update
+    )
+
+    if !OFFSVN! equ !ONSVN! (
+        echo Your tree is up to date.
+    )
+    
     goto :EOC
 )
 
 if not "%1" == "" (
     echo Unknown parameter specified. Try 'help ssvn'.
-    goto :EOC
 )
 
-:UP
-
-echo Local Revision: %OFFSVN%
-echo Online HEAD Revision: %ONSVN%
-echo.
-if %OFFSVN% lss %ONSVN% (
-    echo Your tree is not up to date. Do you want to update it?
-    goto :UP2
-)
-if %OFFSVN% equ %ONSVN% (
-    echo Your tree is up to date.
-    goto :EOF
-)
-
-:UP2
-
-set /p UP="Please enter 'yes' or 'no': "
-if /i "%UP%"=="yes" "%_ROSBE_BASEDIR%\ssvn" update
-if /i "%UP%"=="y" "%_ROSBE_BASEDIR%\ssvn" update
-goto :EOF
-
 :EOC
-
-if defined _ROSBE_VERSION (
-    title ReactOS Build Environment %_ROSBE_VERSION%
-)
-
-::
-:: Unload all used Vars.
-::
-set OFFSVN=
-set ONSVN=
-set UP=
+title ReactOS Build Environment %_ROSBE_VERSION%
+endlocal

Modified: trunk/tools/RosBE/RosBE-Windows/Root/scut.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/scut.cmd?rev=40878&r1=40877&r2=40878&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/scut.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/scut.cmd [iso-8859-1] Sun May 10 22:47:10 2009
@@ -7,6 +7,7 @@
 ::                             Daniel Reimer <reimer.daniel at freenet.de>
 ::                             Peter Ward <dralnix at gmail.com>
 ::
+
 @echo off
 if not defined _ROSBE_DEBUG set _ROSBE_DEBUG=0
 if %_ROSBE_DEBUG% == 1 (
@@ -35,11 +36,7 @@
 goto :EOC
 
 :paramcall
-
 call "%_ROSBE_BASEDIR%\Tools\scut.exe" "%1" %2 %3
 
 :EOC
-
-if defined _ROSBE_VERSION (
-    title ReactOS Build Environment %_ROSBE_VERSION%
-)
+title ReactOS Build Environment %_ROSBE_VERSION%

Modified: trunk/tools/RosBE/RosBE-Windows/Root/update.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/update.cmd?rev=40878&r1=40877&r2=40878&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/update.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/update.cmd [iso-8859-1] Sun May 10 22:47:10 2009
@@ -5,7 +5,7 @@
 :: PURPOSE:     RosBE Updater.
 :: COPYRIGHT:   Copyright 2009 Daniel Reimer <reimer.daniel at freenet.de>
 ::
-::
+
 @echo off
 
 if not defined _ROSBE_DEBUG set _ROSBE_DEBUG=0
@@ -13,19 +13,13 @@
     @echo on
 )
 
-::
-:: Set Title
-::
+setlocal enabledelayedexpansion
 title Updating...
 
-::
 :: The Update Server.
-::
-set _ROSBE_URL=http://danielreimer.5x.to/rosbe
+set _ROSBE_URL=http://dreimer.dr.funpic.org/rosbe
 
-::
 :: Save the recent dir to cd back there at the end.
-::
 set _ROSBE_OPATH=%CD%
 
 if not exist "%_ROSBE_BASEDIR%\Tools\7z.exe" (
@@ -36,10 +30,7 @@
 
 cd /d %_ROSBE_BASEDIR%
 
-::
 :: First check for a new Updater
-::
-setlocal enabledelayedexpansion
 for %%F in (update.cmd) do set _ROSBE_UPDDATE=%%~tF
 "Tools\wget.exe" -N --ignore-length --no-verbose %_ROSBE_URL%/update.cmd 1> NUL 2> NUL
 for %%F in (update.cmd) do set _ROSBE_UPDDATE2=%%~tF
@@ -48,17 +39,12 @@
     echo Updater got updated and needs to be restarted.
     goto :EOC
 )
-endlocal
 
-::
 :: Get to the Updates Subfolder.
-::
 if not exist "%APPDATA%\RosBE\Updates" mkdir "%APPDATA%\RosBE\Updates" 1> NUL 2> NUL
 cd /d "%APPDATA%\RosBE\Updates"
 
-::
 :: Parse the args.
-::
 if "%1" == "" (
     set _ROSBE_MULTIUPD=1
     set _ROSBE_STATCOUNT=1
@@ -79,30 +65,20 @@
     call :UPDCHECK
     set /a _ROSBE_STATCOUNT+=1
     call :UPDCHECK
-    goto :EOC
-)
-if /i "%1" == "reset" (
+) else if /i "%1" == "reset" (
     del /F /Q "%APPDATA%\RosBE\Updates\*.*" 1> NUL 2> NUL
     del /F /Q "%APPDATA%\RosBE\Updates\tmp\*.*" 1> NUL 2> NUL
-    goto :EOC
-)
-if /i "%1" == "nr" (
+) else if /i "%1" == "nr" (
     set _ROSBE_STATCOUNT=%2
     call :UPDCHECK
-    goto :EOC
-)
-if /i "%1" == "delete" (
+) else if /i "%1" == "delete" (
     set _ROSBE_STATCOUNT=%2
     del /F /Q "%APPDATA%\RosBE\Updates\%_ROSBE_VERSION%-%_ROSBE_STATCOUNT%.*" 1> NUL 2> NUL
     del /F /Q "%APPDATA%\RosBE\Updates\tmp\%_ROSBE_VERSION%-%_ROSBE_STATCOUNT%.*" 1> NUL 2> NUL
-    goto :EOC
-)
-if /i "%1" == "info" (
+) else if /i "%1" == "info" (
     set _ROSBE_STATCOUNT=%2
     call :UPDINFO
-    goto :EOC
-)
-if /i "%1" == "status" (
+) else if /i "%1" == "status" (
     if not exist "tmp" mkdir tmp 1> NUL 2> NUL
     copy *.txt .\tmp\. 1> NUL 2> NUL
     set _ROSBE_STATCOUNT=1
@@ -124,15 +100,12 @@
     set /a _ROSBE_STATCOUNT+=1
     call :STATUS
     call :UPDFIN
-    goto :EOC
+) else (
+    echo Unknown parameter specified. Try 'help update'.
 )
-if not "%1" == "" (
-    echo Unknown parameter specified. Try 'help update'.
-    goto :EOC
-)
+goto :EOC
 
 :STATUS
-
 cd tmp
 if not exist "%_ROSBE_VERSION%-%_ROSBE_STATCOUNT%.txt" (
     "%_ROSBE_BASEDIR%\Tools\wget.exe" -N --ignore-length --no-verbose %_ROSBE_URL%/%_ROSBE_VERSION%-%_ROSBE_STATCOUNT%.txt 1> NUL 2> NUL
@@ -144,7 +117,6 @@
 goto :EOF
 
 :UPDINFO
-
 cd tmp
 if not exist "%_ROSBE_VERSION%-%_ROSBE_STATCOUNT%.txt" (
     "%_ROSBE_BASEDIR%\Tools\wget.exe" -N --ignore-length --no-verbose %_ROSBE_URL%/%_ROSBE_VERSION%-%_ROSBE_STATCOUNT%.txt 1> NUL 2> NUL
@@ -160,7 +132,6 @@
 goto :EOF
 
 :UPDFIN
-
 del /F /Q tmp\*.* 1> NUL 2> NUL
 if not "%_ROSBE_UPDATES%" == "" (
     echo Following Updates available: %_ROSBE_UPDATES%
@@ -170,20 +141,20 @@
 goto :EOF
 
 :UPDCHECK
-
 cd /d "%APPDATA%\RosBE\Updates"
 
 if exist "%_ROSBE_VERSION%-%_ROSBE_STATCOUNT%.txt" (
     goto :EOF
 )
+
 if not exist "%_ROSBE_VERSION%-%_ROSBE_STATCOUNT%.txt" (
     "%_ROSBE_BASEDIR%\Tools\wget.exe" -N --ignore-length --no-verbose %_ROSBE_URL%/%_ROSBE_VERSION%-%_ROSBE_STATCOUNT%.txt 1> NUL 2> NUL
 )
+
 if exist "%_ROSBE_VERSION%-%_ROSBE_STATCOUNT%.txt" (
     type "%_ROSBE_VERSION%-%_ROSBE_STATCOUNT%.txt"
     echo.
     echo Install?
-    setlocal enabledelayedexpansion
     set /p YESNO="(yes), (no)"
     if /i "!YESNO!"=="yes" goto :updyes
     if /i "!YESNO!"=="y" goto :updyes
@@ -213,7 +184,6 @@
         del "%_ROSBE_VERSION%-%_ROSBE_STATCOUNT%.txt" 1> NUL 2> NUL
         goto :EOF
     )
-    endlocal
 ) else (
     if not "%_ROSBE_MULTIUPD%" == "1" (
         echo ERROR: This Update does not seem to exist or the Internet connection is not working correctly.
@@ -223,16 +193,6 @@
 goto :EOF
 
 :EOC
-
 cd /d "%_ROSBE_OPATH%"
-if defined _ROSBE_VERSION (
-    title ReactOS Build Environment %_ROSBE_VERSION%
-)
-
-set _ROSBE_UPDFINISH=
-set _ROSBE_OPATH=
-set _ROSBE_UPDDATE=
-set _ROSBE_UPDATES=
-set _ROSBE_UPDDATE2=
-set _ROSBE_MULTIUPD=
-set _ROSBE_STATCOUNT=
+title ReactOS Build Environment %_ROSBE_VERSION%
+endlocal

Modified: trunk/tools/RosBE/RosBE-Windows/Root/version.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/version.cmd?rev=40878&r1=40877&r2=40878&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/version.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/version.cmd [iso-8859-1] Sun May 10 22:47:10 2009
@@ -4,8 +4,9 @@
 :: FILE:        Root/version.cmd
 :: PURPOSE:     Display the current version of GCC, NASM, ld and make.
 :: COPYRIGHT:   Copyright 2009 Daniel Reimer <reimer.daniel at freenet.de>
+::                             Colin Finck <colin at reactos.org>
 ::
-::
+
 @echo off
 if not defined _ROSBE_DEBUG set _ROSBE_DEBUG=0
 if %_ROSBE_DEBUG% == 1 (
@@ -14,47 +15,21 @@
 
 ver
 
-if not "%ROS_ARCH%" == "" (
-    "%_ROSBE_TARGET_MINGWPATH%\bin\%ROS_PREFIX%-gcc" -v 2>&1 | find "gcc version"
-    if "%ROS_PREFIX%" == "" (
-        echo gcc target^: %_ROSBE_GCCTARGET%
-    ) else (
-        echo gcc target^: %ROS_PREFIX:~0,-11%
-    )
-    "%_ROSBE_TARGET_MINGWPATH%\bin\%ROS_PREFIX%-ld" -v
-) else (
-    gcc -v 2>&1 | find "gcc version"
-    if "%ROS_PREFIX%" == "" (
-        echo gcc target^: %_ROSBE_GCCTARGET%
-    ) else (
-        echo gcc target^: %ROS_PREFIX:~0,-11%
-    )
-    ld -v
-)
+:: GCC
+"%_ROSBE_TARGET_MINGWPATH%\bin\%ROS_PREFIX%gcc" -v 2>&1 | find "gcc version"
+echo gcc target^: %_ROSBE_TARGET_GCCTARGET%
 
+:: LD
+"%_ROSBE_TARGET_MINGWPATH%\bin\%ROS_PREFIX%ld" -v
+
+:: NASM or YASM
 if exist "%_ROSBE_HOST_MINGWPATH%\bin\nasm.exe" (
     nasm -v
 ) else (
-    if exist "%_ROSBE_HOST_MINGWPATH%\bin\yasm.exe" (
-        yasm --version | find "yasm 0"
-    ) else (
-        if "%_ROSBE_MODE%" == "RosBE" (
-            echo ERROR: NASM or YASM is required to build ReactOS, none was found in the current MinGW/GCC.
-        )
-    )
+    yasm --version | find "yasm 0"
 )
-if exist "%_ROSBE_HOST_MINGWPATH%\bin\bison.exe" (
-    bison --version | find "GNU Bison"
-) else (
-    if "%_ROSBE_MODE%" == "RosBE" (
-        echo WARNING: Bison will soon be required to build ReactOS, none was found in the current MinGW/GCC.
-    )
-)
-if exist "%_ROSBE_HOST_MINGWPATH%\bin\flex.exe" (
-    flex --version
-) else (
-    if "%_ROSBE_MODE%" == "RosBE" (
-        echo WARNING: Flex will soon be required to build ReactOS, none was found in the current MinGW/GCC.
-    )
-)
+
+:: Bison, Flex and Make
+bison --version | find "GNU Bison"
+flex --version
 mingw32-make -v | find "GNU Make"



More information about the Ros-diffs mailing list