Author: dreimer
Date: Thu Jul 23 17:54:27 2009
New Revision: 42157
URL:
http://svn.reactos.org/svn/reactos?rev=42157&view=rev
Log:
Fixed config in batch and ps + loading of the flags on startup in batch. Testers would be
very appreciated.
tbd more testing, fix small bug in the updater
Modified:
trunk/tools/RosBE/RosBE-Windows/Powershell/Config.ps1
trunk/tools/RosBE/RosBE-Windows/Root/Config.cmd
trunk/tools/RosBE/RosBE-Windows/Root/RosBE.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] Thu Jul 23 17:54:27
2009
@@ -9,8 +9,8 @@
$host.ui.RawUI.WindowTitle = "ReactOS Build Configurator"
-if (!(Test-Path "%APPDATA%\RosBE\RBUILDFLAGS.FLG")) {
- $RBUILDFLAGS > "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
+if (!(Test-Path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG")) {
+ "-da" > "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
}
function settitle {
@@ -22,7 +22,7 @@
"Be verbose."
"Default is: no"
""
- $VERBOSE_B = (select-string -path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
"-v")
+ $VERBOSE_B = (select-string -path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
-pattern "-v")
if ("$VERBOSE_B" -eq "") {
$VERBOSE_B = "no"
} else {
@@ -41,7 +41,7 @@
"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")
+ $CLEAN_B = (select-string -path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
-pattern "-c")
if ("$CLEAN_B" -eq "") {
$CLEAN_B = "no"
} else {
@@ -60,8 +60,8 @@
"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")
+ $DEPENDS_B = (select-string -path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
-pattern "-df")
+ $DEPENDS_B2 = (select-string -path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
-pattern "-dd")
if (!("$DEPENDS_B" -eq "")) {
$DEPENDS_B = "full"
} elseif (!("$DEPENDS_B2" -eq "")) {
@@ -86,7 +86,7 @@
"Use precompiled headers."
"Default is: yes"
""
- $PRECHEADER_B = (select-string -path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
"-hd")
+ $PRECHEADER_B = (select-string -path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
-pattern "-hd")
if ("$PRECHEADER_B" -eq "") {
$PRECHEADER_B = "yes"
} else {
@@ -106,7 +106,7 @@
"the directories."
"Default is: no"
""
- $MAKEDIR_B = (select-string -path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
"-mi")
+ $MAKEDIR_B = (select-string -path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
-pattern "-mi")
if ("$MAKEDIR_B" -eq "") {
$MAKEDIR_B = "no"
} else {
@@ -125,7 +125,7 @@
"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")
+ $PROXYMAKE_B = (select-string -path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
-pattern "-ps")
if ("$PROXYMAKE_B" -eq "") {
$PROXYMAKE_B = "no"
} else {
@@ -144,7 +144,7 @@
"Use compilation units."
"Default is: yes"
""
- $COMPUNITS_B = (select-string -path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
"-ud")
+ $COMPUNITS_B = (select-string -path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
-pattern "-ud")
if ("$COMPUNITS_B" -eq "") {
$COMPUNITS_B = "yes"
} else {
@@ -163,7 +163,7 @@
"Input XML."
"Default is: no"
""
- $XML_B = (select-string -path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
"-r")
+ $XML_B = (select-string -path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG" -pattern
"-r")
if ("$XML_B" -eq "") {
$XML_B = "no"
} else {
@@ -178,7 +178,7 @@
$RBUILDFLAGS = "$RBUILDFLAGS" + " -r"
}
clear-host
- $RBUILDFLAGS > "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
+ "$RBUILDFLAGS" > "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
$ENV:ROS_RBUILDFLAGS = $RBUILDFLAGS
}
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] Thu Jul 23 17:54:27 2009
@@ -15,8 +15,8 @@
setlocal enabledelayedexpansion
title ReactOS Build Configurator
-if not exists "%APPDATA%\RosBE\RBUILDFLAGS.FLG" (
- echo %RBUILDFLAGS% > "%APPDATA%\RosBE\RBUILDFLAGS.FLG"
+if not exist "%APPDATA%\RosBE\RBUILDFLAGS.FLG" (
+ echo -da> "%APPDATA%\RosBE\RBUILDFLAGS.FLG"
)
:: Receive the first Parameter and decide what to do.
@@ -74,18 +74,18 @@
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%" == "" (
+ for /f "usebackq tokens=* delims= " %%i in (`"echo %ROS_RBUILDFLAGS% |
find "-v""`) do set VERBOSE_B=%%i
+ if "!VERBOSE_B!" == "" (
set VERBOSE_B=no
) else (
set VERBOSE_B=yes
)
- echo Right now: %VERBOSE_B%
+ echo Right now: !VERBOSE_B!
set /p VERBOSE="(yes), (no)"
- if "%VERBOSE%" == "" (
- set VERBOSE=%VERBOSE_B%
- )
- if "%VERBOSE%" == "yes" (
+ if "!VERBOSE!" == "" (
+ set VERBOSE=!VERBOSE_B!
+ )
+ if "!VERBOSE!" == "yes" (
set RBUILDFLAGS=-v
)
cls
@@ -93,63 +93,62 @@
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%" == "" (
+ for /f "usebackq tokens=* delims= " %%i in (`"echo %ROS_RBUILDFLAGS% |
find "-c""`) do set CLEAN_B=%%i
+ if "!CLEAN_B!" == "" (
set CLEAN_B=no
) else (
set CLEAN_B=yes
)
- echo Right now: %CLEAN_B%
+ echo Right now: !CLEAN_B!
set /p CLEAN="(yes), (no)"
- if "%CLEAN%" == "" (
- set CLEAN=%CLEAN_B%
- )
- if "%CLEAN%" == "yes" (
- set RBUILDFLAGS=%RBUILDFLAGS% -c
+ 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%" == "" (
+ for /f "usebackq tokens=* delims= " %%i in (`"echo %ROS_RBUILDFLAGS% |
find "-df""`) do set DEPENDS_B=%%i
+ for /f "usebackq tokens=* delims= " %%i in (`"echo %ROS_RBUILDFLAGS% |
find "-dd""`) do set DEPENDS_B2=%%i
+ if not "!DEPENDS_B!" == "" (
set DEPENDS_B=full
- ) else if not "%DEPENDS_B2%" == "" (
+ ) else if not "!DEPENDS_B2!" == "" (
set DEPENDS_B=no
) else (
set DEPENDS_B=yes
)
- echo Right now: %DEPENDS_B%
+ 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
+ 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%" == "" (
+ for /f "usebackq tokens=* delims= " %%i in (`"echo %ROS_RBUILDFLAGS% |
find "-hd""`) do set PRECHEADER_B=%%i
+ if "!PRECHEADER_B!" == "" (
set PRECHEADER_B=yes
) else (
set PRECHEADER_B=no
)
- echo Right now: %PRECHEADER_B%
+ echo Right now: !PRECHEADER_B!
set /p PRECHEADER="(yes), (no)"
- if "%PRECHEADER%" == "" (
- set PRECHEADER=%PRECHEADER_B%
- )
- if "%PRECHEADER%" == "no" (
- set RBUILDFLAGS=%RBUILDFLAGS% -hd
+ if "!PRECHEADER!" == "" (
+ set PRECHEADER=!PRECHEADER_B!
+ )
+ if "!PRECHEADER!" == "no" (
+ set RBUILDFLAGS=!RBUILDFLAGS! -hd
)
cls
@@ -157,80 +156,80 @@
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%" == "" (
+ for /f "usebackq tokens=* delims= " %%i in (`"echo %ROS_RBUILDFLAGS% |
find "-mi""`) do set MAKEDIR_B=%%i
+ if "!MAKEDIR_B!" == "" (
set MAKEDIR_B=no
) else (
set MAKEDIR_B=yes
)
- echo Right now: %MAKEDIR_B%
+ echo Right now: !MAKEDIR_B!
set /p MAKEDIR="(yes), (no)"
- if "%MAKEDIR%" == "" (
- set MAKEDIR=%MAKEDIR_B%
- )
- if "%MAKEDIR%" == "yes" (
- set RBUILDFLAGS=%RBUILDFLAGS% -mi
+ 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%" == "" (
+ for /f "usebackq tokens=* delims= " %%i in (`"echo %ROS_RBUILDFLAGS% |
find "-ps""`) do set PROXYMAKE_B=%%i
+ if "!PROXYMAKE_B!" == "" (
set PROXYMAKE_B=no
) else (
set PROXYMAKE_B=yes
)
- echo Right now: %PROXYMAKE_B%
+ echo Right now: !PROXYMAKE_B!
set /p PROXYMAKE="(yes), (no)"
- if "%PROXYMAKE%" == "" (
- set PROXYMAKE=%PROXYMAKE_B%
- )
- if "%PROXYMAKE%" == "yes" (
- set RBUILDFLAGS=%RBUILDFLAGS% -ps
+ 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%" == "" (
+ for /f "usebackq tokens=* delims= " %%i in (`"echo %ROS_RBUILDFLAGS% |
find "-ud""`) do set COMPUNITS_B=%%i
+ if "!COMPUNITS_B!" == "" (
set COMPUNITS_B=yes
) else (
set COMPUNITS_B=no
)
- echo Right now: %COMPUNITS_B%
+ echo Right now: !COMPUNITS_B!
set /p COMPUNITS="(yes), (no)"
- if "%COMPUNITS%" == "" (
- set COMPUNITS=%COMPUNITS_B%
- )
- if "%COMPUNITS%" == "no" (
- set RBUILDFLAGS=%RBUILDFLAGS% -ud
+ 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%" == "" (
+ for /f "usebackq tokens=* delims= " %%i in (`"echo %ROS_RBUILDFLAGS% |
find "-r""`) do set XML_B=%%i
+ if "!XML_B!" == "" (
set XML_B=no
) else (
set XML_B=yes
)
- echo Right now: %XML_B%
+ 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%
+ if "!XML!" == "" (
+ set XML=!XML_B!
+ )
+ if "!XML!" == "yes" (
+ set RBUILDFLAGS=!RBUILDFLAGS! -r
+ )
+ cls
+ echo !RBUILDFLAGS! > "%APPDATA%\RosBE\RBUILDFLAGS.FLG"
+ set ROS_RBUILDFLAGS=!RBUILDFLAGS!
goto :NOK
)
@@ -460,4 +459,4 @@
:NOK
title ReactOS Build Environment %_ROSBE_VERSION%
-endlocal
+endlocal & set ROS_RBUILDFLAGS=%RBUILDFLAGS%
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] Thu Jul 23 17:54:27 2009
@@ -70,7 +70,7 @@
)
if exist "%APPDATA%\RosBE\RBUILDFLAGS.FLG" (
- for /f "usebackq" %%i in (`"type
"%APPDATA%\RosBE\RBUILDFLAGS.FLG""`) do set ROS_RBUILDFLAGS=%%i
+ for /f "usebackq tokens=* delims= " %%i in (`"type
"%APPDATA%\RosBE\RBUILDFLAGS.FLG""`) do set ROS_RBUILDFLAGS=%%i
)
:: Check if RosBE data directory exists, if not, create it.