Author: dreimer
Date: Wed Jul 22 19:34:38 2009
New Revision: 42144
URL:
http://svn.reactos.org/svn/reactos?rev=42144&view=rev
Log:
- Added RBuild Flags Setting possibility into the "config" command. They will be
loaded at RosBE startup and thus behave the same way like the other settings you can set
in there.
- Made the "update" command stop when it found the last existant update online.
Theres no use in trying the full update 1-9 if theres none/one. This speeds up the status
generation process.
Both still untested. 1. Will be done later / 2. I like looking at diffs of fixes i did, so
I commit seperately :-P
Modified:
trunk/tools/RosBE/RosBE-Windows/Powershell/Config.ps1
trunk/tools/RosBE/RosBE-Windows/Powershell/Help.ps1
trunk/tools/RosBE/RosBE-Windows/Powershell/RosBE.ps1
trunk/tools/RosBE/RosBE-Windows/Powershell/update.ps1
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/update.cmd
Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/Config.ps1
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Powershell/Config.ps1 [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Powershell/Config.ps1 [iso-8859-1] Wed Jul 22 19:34:38
2009
@@ -9,9 +9,177 @@
$host.ui.RawUI.WindowTitle = "ReactOS Build Configurator"
+if (!(Test-Path "%APPDATA%\RosBE\RBUILDFLAGS.FLG")) {
+ $RBUILDFLAGS > "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
+}
+
function settitle {
$host.ui.RawUI.WindowTitle = "ReactOS Build Environment $_ROSBE_VERSION"
exit
+}
+
+function rbuild {
+ "Be verbose."
+ "Default is: no"
+ ""
+ $VERBOSE_B = (select-string -path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
"-v")
+ if ("$VERBOSE_B" -eq "") {
+ $VERBOSE_B = "no"
+ } else {
+ $VERBOSE_B = "yes"
+ }
+ "Right now: $VERBOSE_B"
+ $VERBOSE = Read-Host "(yes), (no)"
+ if ("$VERBOSE" -eq "") {
+ $VERBOSE = "$VERBOSE_B"
+ }
+ if (($VERBOSE -eq "yes") -or ($VERBOSE -eq "y")) {
+ $RBUILDFLAGS = "-v"
+ }
+ clear-host
+
+ "Delete generated files as soon as they are not needed anymore."
+ "Default is: no"
+ ""
+ $CLEAN_B = (select-string -path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
"-c")
+ if ("$CLEAN_B" -eq "") {
+ $CLEAN_B = "no"
+ } else {
+ $CLEAN_B = "yes"
+ }
+ "Right now: $CLEAN_B"
+ $CLEAN = Read-Host "(yes), (no)"
+ if ("$CLEAN" -eq "") {
+ $CLEAN = "$CLEAN_B"
+ }
+ if (($CLEAN -eq "yes") -or ($CLEAN -eq "y")) {
+ $RBUILDFLAGS = "$RBUILDFLAGS" + " -c"
+ }
+ clear-host
+
+ "Disable/Enable automatic dependencies."
+ "Default is: yes"
+ ""
+ $DEPENDS_B = (select-string -path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
"-df")
+ $DEPENDS_B2 = (select-string -path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
"-dd")
+ if (!("$DEPENDS_B" -eq "")) {
+ $DEPENDS_B = "full"
+ } elseif (!("$DEPENDS_B2" -eq "")) {
+ $DEPENDS_B = "no"
+ } else {
+ $DEPENDS_B = "yes"
+ }
+ "Right now: $DEPENDS_B"
+ $DEPENDS = Read-Host "(full), (yes), (no)"
+ if ("$DEPENDS" -eq "") {
+ $DEPENDS = "$DEPENDS_B"
+ }
+ if (($DEPENDS -eq "full") -or ($DEPENDS -eq "f")) {
+ $RBUILDFLAGS = "$RBUILDFLAGS" + " -df"
+ } elseif (($DEPENDS -eq "no") -or ($DEPENDS -eq "n")) {
+ $RBUILDFLAGS = "$RBUILDFLAGS" + " -dd"
+ } else {
+ $RBUILDFLAGS = "$RBUILDFLAGS" + " -da"
+ }
+ clear-host
+
+ "Use precompiled headers."
+ "Default is: yes"
+ ""
+ $PRECHEADER_B = (select-string -path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
"-hd")
+ if ("$PRECHEADER_B" -eq "") {
+ $PRECHEADER_B = "yes"
+ } else {
+ $PRECHEADER_B = "no"
+ }
+ "Right now: $PRECHEADER_B"
+ $PRECHEADER = Read-Host "(yes), (no)"
+ if ("$PRECHEADER" -eq "") {
+ $PRECHEADER = "$PRECHEADER_B"
+ }
+ if (($PRECHEADER -eq "no") -or ($PRECHEADER -eq "n")) {
+ $RBUILDFLAGS = "$RBUILDFLAGS" + " -hd"
+ }
+ clear-host
+
+ "Let make handle creation of install directories. Rbuild will not
generate"
+ "the directories."
+ "Default is: no"
+ ""
+ $MAKEDIR_B = (select-string -path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
"-mi")
+ if ("$MAKEDIR_B" -eq "") {
+ $MAKEDIR_B = "no"
+ } else {
+ $MAKEDIR_B = "yes"
+ }
+ "Right now: $MAKEDIR_B"
+ $MAKEDIR = Read-Host "(yes), (no)"
+ if ("$MAKEDIR" -eq "") {
+ $MAKEDIR = "$MAKEDIR_B"
+ }
+ if (($MAKEDIR -eq "yes") -or ($MAKEDIR -eq "y")) {
+ $RBUILDFLAGS = "$RBUILDFLAGS" + " -mi"
+ }
+ clear-host
+
+ "Generate proxy makefiles in source tree instead of the output tree."
+ "Default is: no"
+ ""
+ $PROXYMAKE_B = (select-string -path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
"-ps")
+ if ("$PROXYMAKE_B" -eq "") {
+ $PROXYMAKE_B = "no"
+ } else {
+ $PROXYMAKE_B = "yes"
+ }
+ "Right now: $PROXYMAKE_B"
+ $PROXYMAKE = Read-Host "(yes), (no)"
+ if ("$PROXYMAKE" -eq "") {
+ $PROXYMAKE = "$PROXYMAKE_B"
+ }
+ if (($PROXYMAKE -eq "yes") -or ($PROXYMAKE -eq "y")) {
+ $RBUILDFLAGS = "$RBUILDFLAGS" + " -ps"
+ }
+ clear-host
+
+ "Use compilation units."
+ "Default is: yes"
+ ""
+ $COMPUNITS_B = (select-string -path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
"-ud")
+ if ("$COMPUNITS_B" -eq "") {
+ $COMPUNITS_B = "yes"
+ } else {
+ $COMPUNITS_B = "no"
+ }
+ "Right now: $COMPUNITS_B"
+ $COMPUNITS = Read-Host "(yes), (no)"
+ if ("$COMPUNITS" -eq "") {
+ $COMPUNITS = "$COMPUNITS_B"
+ }
+ if (($COMPUNITS -eq "no") -or ($COMPUNITS -eq "n")) {
+ $RBUILDFLAGS = "$RBUILDFLAGS" + " -ud"
+ }
+ clear-host
+
+ "Input XML."
+ "Default is: no"
+ ""
+ $XML_B = (select-string -path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
"-r")
+ if ("$XML_B" -eq "") {
+ $XML_B = "no"
+ } else {
+ $XML_B = "yes"
+ }
+ "Right now: $XML_B"
+ $XML = Read-Host "(yes), (no)"
+ if ("$XML" -eq "") {
+ $XML = "$XML_B"
+ }
+ if (($XML -eq "yes") -or ($XML -eq "y")) {
+ $RBUILDFLAGS = "$RBUILDFLAGS" + " -r"
+ }
+ clear-host
+ $RBUILDFLAGS > "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
+ $ENV:ROS_RBUILDFLAGS = $RBUILDFLAGS
}
# Receive the first Parameter and decide what to do.
@@ -32,6 +200,12 @@
} else {
"Working Configuration File was not found in ReactOS Source Tree."
}
+ if (Test-Path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG") {
+ remove-item "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
+ "RBuild Flags File was found and deleted."
+ } else {
+ "RBuild Flags File was not found in ReactOS Source Tree."
+ }
}
settitle
}
@@ -46,6 +220,10 @@
copy-item ".\config.template.rbuild"
"$ENV:APPDATA\RosBE\config.rbuild"
"Successfully Updated."
}
+ settitle
+}
+elseif ($args[0] -eq "rbuild") {
+ rbuild
settitle
}
elseif ($args[0] -ne $null) {
Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/Help.ps1
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Powershell/Help.ps1 [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Powershell/Help.ps1 [iso-8859-1] Wed Jul 22 19:34:38
2009
@@ -159,6 +159,7 @@
""
" delete - Deletes the created configuration file and so sets back to
the"
" default settings."
+ " rbuild - Switches to RBuild Flag setting mode."
" update - Deletes the old created configuration file and updates it with
a"
" new, default one."
}
Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/RosBE.ps1
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Powershell/RosBE.ps1 [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Powershell/RosBE.ps1 [iso-8859-1] Wed Jul 22 19:34:38
2009
@@ -138,6 +138,10 @@
& "$ENV:APPDATA\RosBE\rosbe-options-$args.ps1"
}
+if (Test-Path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG") {
+ $ENV:ROS_RBUILDFLAGS = get-content "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
+}
+
# Check if writing logs is enabled, if so check if our log directory
# exists, if it doesn't, create it.
if ($_ROSBE_WRITELOG -eq 1) {
Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/update.ps1
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Powershell/update.ps1 [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Powershell/update.ps1 [iso-8859-1] Wed Jul 22 19:34:38
2009
@@ -53,8 +53,9 @@
} else {
if ($_ROSBE_MULTIUPD -ne "1") {
"ERROR: This Update does not seem to exist or the Internet connection is
not working correctly."
- return
}
+ $_ROSBE_STATCOUNT = 9
+ return
}
}
@@ -133,6 +134,8 @@
get-webfile $_ROSBE_URL/$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt
$PWD\$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt
if (Test-Path "$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt") {
$_ROSBE_UPDATES += "$_ROSBE_STATCOUNT "
+ } else {
+ $_ROSBE_STATCOUNT = 9
}
}
$_ROSBE_STATCOUNT += 1
Modified: trunk/tools/RosBE/RosBE-Windows/Root/Config.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Con…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/Config.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/Config.cmd [iso-8859-1] Wed Jul 22 19:34:38 2009
@@ -15,6 +15,10 @@
setlocal enabledelayedexpansion
title ReactOS Build Configurator
+if not exists "%APPDATA%\RosBE\RBUILDFLAGS.FLG" (
+ echo %RBUILDFLAGS% > "%APPDATA%\RosBE\RBUILDFLAGS.FLG"
+)
+
:: 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.
@@ -39,6 +43,13 @@
echo Working Configuration File was not found in ReactOS Source Tree.
)
+ if exist "%APPDATA%\RosBE\RBUILDFLAGS.FLG" (
+ del "%APPDATA%\RosBE\RBUILDFLAGS.FLG"
+ echo RBuild Flags File was found and deleted.
+ ) else (
+ echo RBuild Flags File was not found in ReactOS Source Tree.
+ )
+
goto :NOK
)
@@ -56,6 +67,170 @@
del "config.rbuild"
copy "config.template.rbuild" "%APPDATA%\RosBE\config.rbuild"
echo Successfully Updated.
+ goto :NOK
+)
+
+if /i "%1" == "rbuild" (
+ echo Be verbose.
+ echo Default is: no
+ echo.
+ for /f "usebackq tokens=3" %%i in (`"type
"%APPDATA%\RosBE\RBUILDFLAGS.FLG" | find "-v""`) do set
VERBOSE_B=%%i
+ if "%VERBOSE_B%" == "" (
+ set VERBOSE_B=no
+ ) else (
+ set VERBOSE_B=yes
+ )
+ echo Right now: %VERBOSE_B%
+ set /p VERBOSE="(yes), (no)"
+ if "%VERBOSE%" == "" (
+ set VERBOSE=%VERBOSE_B%
+ )
+ if "%VERBOSE%" == "yes" (
+ set RBUILDFLAGS=-v
+ )
+ cls
+
+ echo Delete generated files as soon as they are not needed anymore.
+ echo Default is: no
+ echo.
+ for /f "usebackq tokens=3" %%i in (`"type
"%APPDATA%\RosBE\RBUILDFLAGS.FLG" | find "-c""`) do set
CLEAN_B=%%i
+ if "%CLEAN_B%" == "" (
+ set CLEAN_B=no
+ ) else (
+ set CLEAN_B=yes
+ )
+ echo Right now: %CLEAN_B%
+ set /p CLEAN="(yes), (no)"
+ if "%CLEAN%" == "" (
+ set CLEAN=%CLEAN_B%
+ )
+ if "%CLEAN%" == "yes" (
+ set RBUILDFLAGS=%RBUILDFLAGS% -c
+ )
+ cls
+
+ echo Disable/Enable automatic dependencies.
+ echo Default is: yes
+ echo.
+ for /f "usebackq tokens=3" %%i in (`"type
"%APPDATA%\RosBE\RBUILDFLAGS.FLG" | find "-df""`) do set
DEPENDS_B=%%i
+ for /f "usebackq tokens=3" %%i in (`"type
"%APPDATA%\RosBE\RBUILDFLAGS.FLG" | find "-dd""`) do set
DEPENDS_B2=%%i
+ )
+ if not "%DEPENDS_B%" == "" (
+ set DEPENDS_B=full
+ ) else if not "%DEPENDS_B2%" == "" (
+ set DEPENDS_B=no
+ ) else (
+ set DEPENDS_B=yes
+ )
+ echo Right now: %DEPENDS_B%
+ set /p DEPENDS="(full), (yes), (no)"
+ if "%DEPENDS%" == "" (
+ set DEPENDS=%DEPENDS_B%
+ )
+ if "%DEPENDS%" == "full" (
+ set RBUILDFLAGS=%RBUILDFLAGS% -df
+ ) else if "%DEPENDS%" == "no" (
+ set RBUILDFLAGS=%RBUILDFLAGS% -dd
+ )
+ cls
+
+ echo Use precompiled headers.
+ echo Default is: yes
+ echo.
+ for /f "usebackq tokens=3" %%i in (`"type
"%APPDATA%\RosBE\RBUILDFLAGS.FLG" | find "-hd""`) do set
PRECHEADER_B=%%i
+ if "%PRECHEADER_B%" == "" (
+ set PRECHEADER_B=yes
+ ) else (
+ set PRECHEADER_B=no
+ )
+ echo Right now: %PRECHEADER_B%
+ set /p PRECHEADER="(yes), (no)"
+ if "%PRECHEADER%" == "" (
+ set PRECHEADER=%PRECHEADER_B%
+ )
+ if "%PRECHEADER%" == "no" (
+ set RBUILDFLAGS=%RBUILDFLAGS% -hd
+ )
+ cls
+
+ echo Let make handle creation of install directories. Rbuild will not generate
+ echo the directories.
+ echo Default is: no
+ echo.
+ for /f "usebackq tokens=3" %%i in (`"type
"%APPDATA%\RosBE\RBUILDFLAGS.FLG" | find "-mi""`) do set
MAKEDIR_B=%%i
+ if "%MAKEDIR_B%" == "" (
+ set MAKEDIR_B=no
+ ) else (
+ set MAKEDIR_B=yes
+ )
+ echo Right now: %MAKEDIR_B%
+ set /p MAKEDIR="(yes), (no)"
+ if "%MAKEDIR%" == "" (
+ set MAKEDIR=%MAKEDIR_B%
+ )
+ if "%MAKEDIR%" == "yes" (
+ set RBUILDFLAGS=%RBUILDFLAGS% -mi
+ )
+ cls
+
+ echo Generate proxy makefiles in source tree instead of the output tree.
+ echo Default is: no
+ echo.
+ for /f "usebackq tokens=3" %%i in (`"type
"%APPDATA%\RosBE\RBUILDFLAGS.FLG" | find "-ps""`) do set
PROXYMAKE_B=%%i
+ if "%PROXYMAKE_B%" == "" (
+ set PROXYMAKE_B=no
+ ) else (
+ set PROXYMAKE_B=yes
+ )
+ echo Right now: %PROXYMAKE_B%
+ set /p PROXYMAKE="(yes), (no)"
+ if "%PROXYMAKE%" == "" (
+ set PROXYMAKE=%PROXYMAKE_B%
+ )
+ if "%PROXYMAKE%" == "yes" (
+ set RBUILDFLAGS=%RBUILDFLAGS% -ps
+ )
+ cls
+
+ echo Use compilation units.
+ echo Default is: yes
+ echo.
+ for /f "usebackq tokens=3" %%i in (`"type
"%APPDATA%\RosBE\RBUILDFLAGS.FLG" | find "-ud""`) do set
COMPUNITS_B=%%i
+ if "%COMPUNITS_B%" == "" (
+ set COMPUNITS_B=yes
+ ) else (
+ set COMPUNITS_B=no
+ )
+ echo Right now: %COMPUNITS_B%
+ set /p COMPUNITS="(yes), (no)"
+ if "%COMPUNITS%" == "" (
+ set COMPUNITS=%COMPUNITS_B%
+ )
+ if "%COMPUNITS%" == "no" (
+ set RBUILDFLAGS=%RBUILDFLAGS% -ud
+ )
+ cls
+
+ echo Input XML.
+ echo Default is: no
+ echo.
+ for /f "usebackq tokens=3" %%i in (`"type
"%APPDATA%\RosBE\RBUILDFLAGS.FLG" | find "-r""`) do set
XML_B=%%i
+ if "%XML_B%" == "" (
+ set XML_B=no
+ ) else (
+ set XML_B=yes
+ )
+ echo Right now: %XML_B%
+ set /p XML="(yes), (no)"
+ if "%XML%" == "" (
+ set XML=%XML_B%
+ )
+ if "%XML%" == "yes" (
+ set RBUILDFLAGS=%RBUILDFLAGS% -r
+ )
+ cls
+ echo %RBUILDFLAGS% > "%APPDATA%\RosBE\RBUILDFLAGS.FLG"
+ %ROS_RBUILDFLAGS% = %RBUILDFLAGS%
goto :NOK
)
Modified: trunk/tools/RosBE/RosBE-Windows/Root/Help.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Hel…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/Help.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/Help.cmd [iso-8859-1] Wed Jul 22 19:34:38 2009
@@ -165,6 +165,7 @@
echo.
echo delete - Deletes the created configuration file and so sets back to
default
echo settings.
+ echo rbuild - Switches to RBuild Flag setting mode.
echo update - Deletes the old created configuration file and updates it with
a
echo new, default one.
)
Modified: trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Ros…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd [iso-8859-1] Wed Jul 22 19:34:38 2009
@@ -69,6 +69,10 @@
call "%APPDATA%\RosBE\rosbe-options-%1.cmd"
)
+if exist "%APPDATA%\RosBE\RBUILDFLAGS.FLG" (
+ for /f "usebackq" %%i in (`"type
"%APPDATA%\RosBE\RBUILDFLAGS.FLG""`) do set ROS_RBUILDFLAGS=%%i
+)
+
:: Check if RosBE data directory exists, if not, create it.
if not exist "%APPDATA%\RosBE\." (
mkdir "%APPDATA%\RosBE" 1> NUL 2> NUL
Modified: trunk/tools/RosBE/RosBE-Windows/Root/update.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/upd…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/update.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/update.cmd [iso-8859-1] Wed Jul 22 19:34:38 2009
@@ -136,8 +136,9 @@
) else (
if not "%_ROSBE_MULTIUPD%" == "1" (
echo ERROR: This Update does not seem to exist or the Internet connection is not
working correctly.
- goto :EOF
)
+ set _ROSBE_STATCOUNT=9
+ goto :EOF
)
goto :EOF
@@ -154,6 +155,8 @@
"%_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" (
set _ROSBE_UPDATES=!_ROSBE_UPDATES! !_ROSBE_STATCOUNT!
+ ) else (
+ set _ROSBE_STATCOUNT=9
)
)
cd..