Author: dreimer
Date: Wed Aug 26 17:51:36 2009
New Revision: 42939
URL:
http://svn.reactos.org/svn/reactos?rev=42939&view=rev
Log:
Tidy up work. Still tbt: config, update, ssvn
Fixed the Detection of GCC 4.4.X
Modified:
trunk/tools/RosBE/RosBE-Windows/Powershell/Build.ps1
trunk/tools/RosBE/RosBE-Windows/Powershell/Clean.ps1
trunk/tools/RosBE/RosBE-Windows/Powershell/Config.ps1
trunk/tools/RosBE/RosBE-Windows/Powershell/RosBE.ps1
trunk/tools/RosBE/RosBE-Windows/Powershell/charch.ps1
trunk/tools/RosBE/RosBE-Windows/Powershell/chdefdir.ps1
trunk/tools/RosBE/RosBE-Windows/Powershell/chdefgcc.ps1
trunk/tools/RosBE/RosBE-Windows/Powershell/reladdr2line.ps1
trunk/tools/RosBE/RosBE-Windows/Powershell/rosbe-gcc-env.ps1
trunk/tools/RosBE/RosBE-Windows/Powershell/sSVN.ps1
trunk/tools/RosBE/RosBE-Windows/Powershell/scut.ps1
trunk/tools/RosBE/RosBE-Windows/Powershell/update.ps1
Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/Build.ps1
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Powershell/Build.ps1 [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Powershell/Build.ps1 [iso-8859-1] Wed Aug 26 17:51:36
2009
@@ -21,31 +21,27 @@
}
# Check if strip, no Debug Symbols or ccache are being used and set the appropriate
options.
-if ($_ROSBE_NOSTRIP -ne $null) {
- if ($_ROSBE_NOSTRIP -eq 1) {
- $ENV:ROS_BUILDNOSTRIP = "yes"
- } else {
- $ENV:ROS_BUILDNOSTRIP = "no"
- }
+if ($_ROSBE_NOSTRIP -eq 1) {
+ $ENV:ROS_BUILDNOSTRIP = "yes"
+} else {
+ $ENV:ROS_BUILDNOSTRIP = "no"
}
-if ($_ROSBE_STRIP -ne $null) {
- if ($_ROSBE_STRIP -eq 1) {
- $ENV:ROS_LEAN_AND_MEAN = "yes"
- } else {
- $ENV:ROS_LEAN_AND_MEAN = "no"
- }
+if ($_ROSBE_STRIP -eq 1) {
+ $ENV:ROS_LEAN_AND_MEAN = "yes"
+} else {
+ $ENV:ROS_LEAN_AND_MEAN = "no"
}
# Check if the user has chosen to use a different object or output path and set
# it accordingly.
-if ($_ROSBE_OBJPATH -ne $null) {
+if ("$_ROSBE_OBJPATH" -ne "") {
if (Test-Path "$_ROSBE_OBJPATH") {
"WARNING: The Object-Path specified doesn't seem to exist.
Creating..."
}
$ENV:ROS_INTERMEDIATE = "$_ROSBE_OBJPATH"
$ENV:ROS_TEMPORARY = "$_ROSBE_OBJPATH"
}
-if ($_ROSBE_OUTPATH -ne $null) {
+if ("$_ROSBE_OUTPATH" -ne "") {
if (Test-Path "$_ROSBE_OUTPATH") {
"WARNING: The Output-Path specified doesn't seem to exist.
Creating..."
}
@@ -70,7 +66,7 @@
$TIMENAME = get-date -f HHmm
# Check whether we were called as "makex" or "make"
-if ($args[0] -eq "multi") {
+if ("$($args[0])" -eq "multi") {
$args.setvalue($null, 0)
$MAKE_JOBS = "$_ROSBE_MAKEX_JOBS"
$TITLE_COMMAND = "makex $($args)"
Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/Clean.ps1
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Powershell/Clean.ps1 [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Powershell/Clean.ps1 [iso-8859-1] Wed Aug 26 17:51:36
2009
@@ -25,19 +25,19 @@
# Apply modified obj and out paths for deletion.
- if ($_ROSBE_OBJPATH -eq $null) {
+ if ("$_ROSBE_OBJPATH" -eq "") {
$OBJCLEANPATH = "$_ROSBE_ROSSOURCEDIR\obj-$ENV:ROS_ARCH"
} else {
$OBJCLEANPATH = "$_ROSBE_OBJPATH"
}
- if ($_ROSBE_OUTPATH -eq $null) {
+ if ("$_ROSBE_OUTPATH" -eq "") {
$OUTCLEANPATH = "$_ROSBE_ROSSOURCEDIR\output-$ENV:ROS_ARCH"
} else {
$OUTCLEANPATH = "$_ROSBE_OUTPATH"
}
- if ($ENV:ROS_ARCH -eq "i386") {
+ if ("$ENV:ROS_ARCH" -eq "i386") {
$MAKEFILE = "$_ROSBE_ROSSOURCEDIR\makefile.auto"
} else {
$MAKEFILE = "$_ROSBE_ROSSOURCEDIR\makefile-$ENV:ROS_ARCH.auto"
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 Aug 26 17:51:36
2009
@@ -33,7 +33,7 @@
if ("$VERBOSE" -eq "") {
$VERBOSE = "$VERBOSE_B"
}
- if (($VERBOSE -eq "yes") -or ($VERBOSE -eq "y")) {
+ if (("$VERBOSE" -eq "yes") -or ("$VERBOSE" -eq
"y")) {
$RBUILDFLAGS = "-v"
}
clear-host
@@ -52,7 +52,7 @@
if ("$CLEAN" -eq "") {
$CLEAN = "$CLEAN_B"
}
- if (($CLEAN -eq "yes") -or ($CLEAN -eq "y")) {
+ if (("$CLEAN" -eq "yes") -or ("$CLEAN" -eq
"y")) {
$RBUILDFLAGS = "$RBUILDFLAGS" + " -c"
}
clear-host
@@ -74,9 +74,9 @@
if ("$DEPENDS" -eq "") {
$DEPENDS = "$DEPENDS_B"
}
- if (($DEPENDS -eq "full") -or ($DEPENDS -eq "f")) {
+ if (("$DEPENDS" -eq "full") -or ("$DEPENDS" -eq
"f")) {
$RBUILDFLAGS = "$RBUILDFLAGS" + " -df"
- } elseif (($DEPENDS -eq "no") -or ($DEPENDS -eq "n")) {
+ } elseif (("$DEPENDS" -eq "no") -or ("$DEPENDS" -eq
"n")) {
$RBUILDFLAGS = "$RBUILDFLAGS" + " -dd"
} else {
$RBUILDFLAGS = "$RBUILDFLAGS" + " -da"
@@ -97,7 +97,7 @@
if ("$PRECHEADER" -eq "") {
$PRECHEADER = "$PRECHEADER_B"
}
- if (($PRECHEADER -eq "no") -or ($PRECHEADER -eq "n")) {
+ if (("$PRECHEADER" -eq "no") -or ("$PRECHEADER" -eq
"n")) {
$RBUILDFLAGS = "$RBUILDFLAGS" + " -hd"
}
clear-host
@@ -117,7 +117,7 @@
if ("$MAKEDIR" -eq "") {
$MAKEDIR = "$MAKEDIR_B"
}
- if (($MAKEDIR -eq "yes") -or ($MAKEDIR -eq "y")) {
+ if (("$MAKEDIR" -eq "yes") -or ("$MAKEDIR" -eq
"y")) {
$RBUILDFLAGS = "$RBUILDFLAGS" + " -mi"
}
clear-host
@@ -136,7 +136,7 @@
if ("$PROXYMAKE" -eq "") {
$PROXYMAKE = "$PROXYMAKE_B"
}
- if (($PROXYMAKE -eq "yes") -or ($PROXYMAKE -eq "y")) {
+ if (("$PROXYMAKE" -eq "yes") -or ("$PROXYMAKE" -eq
"y")) {
$RBUILDFLAGS = "$RBUILDFLAGS" + " -ps"
}
clear-host
@@ -155,7 +155,7 @@
if ("$COMPUNITS" -eq "") {
$COMPUNITS = "$COMPUNITS_B"
}
- if (($COMPUNITS -eq "no") -or ($COMPUNITS -eq "n")) {
+ if (("$COMPUNITS" -eq "no") -or ("$COMPUNITS" -eq
"n")) {
$RBUILDFLAGS = "$RBUILDFLAGS" + " -ud"
}
clear-host
@@ -174,7 +174,7 @@
if ("$XML" -eq "") {
$XML = "$XML_B"
}
- if (($XML -eq "yes") -or ($XML -eq "y")) {
+ if (("$XML" -eq "yes") -or ("$XML" -eq "y"))
{
$RBUILDFLAGS = "$RBUILDFLAGS" + " -r"
}
clear-host
@@ -183,11 +183,11 @@
}
# Receive the first Parameter and decide what to do.
-if ($args[0] -eq "delete") {
+if ("$args" -eq "delete") {
"config.rbuild will be permanently deleted. All your settings will be
gone."
"Continue?"
$YESNO = Read-Host "(yes), (no)"
- if (($YESNO -eq "yes") -or ($YESNO -eq "y")) {
+ if (("$YESNO" -eq "yes") -or ("$YESNO" -eq
"y")) {
if (Test-Path ".\config.rbuild") {
remove-item ".\config.rbuild"
"Main Configuration File was found and deleted."
@@ -202,6 +202,7 @@
}
if (Test-Path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG") {
remove-item "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG"
+ $ENV:ROS_RBUILDFLAGS = ""
"RBuild Flags File was found and deleted."
} else {
"RBuild Flags File was not found in ReactOS Source Tree."
@@ -209,12 +210,12 @@
}
settitle
}
-elseif ($args[0] -eq "update") {
+elseif ("$args" -eq "update") {
"old config.rbuild will be deleted and will be updated with a recent,"
"default one. You will need to reconfigure it to your wishes later."
"Continue?"
$YESNO = Read-Host "(yes), (no)"
- if (($YESNO -eq "yes") -or ($YESNO -eq "y")) {
+ if (("$YESNO" -eq "yes") -or ("$YESNO" -eq
"y")) {
remove-item "$_ROSBE_BASEDIR\*.rbuild"
remove-item ".\config.rbuild"
copy-item ".\config.template.rbuild"
"$ENV:APPDATA\RosBE\config.rbuild"
@@ -222,11 +223,11 @@
}
settitle
}
-elseif ($args[0] -eq "rbuild") {
+elseif ("$args" -eq "rbuild") {
rbuild
settitle
}
-elseif ($args[0] -ne $null) {
+elseif ("$args" -ne "") {
"Unknown parameter specified. Try 'help [COMMAND]'."
settitle
}
@@ -245,7 +246,7 @@
""
$YESNO = Read-Host "(yes), (no)"
-if (($YESNO -ne "yes") -and ($YESNO -ne "y")) {settitle}
+if (("$YESNO" -ne "yes") -and ("$YESNO" -ne "y"))
{settitle}
# Check if config.template.rbuild is newer than config.rbuild, if it is then
# inform the user and offer an update.
@@ -258,7 +259,7 @@
"*** previously made settings. ***"
""
$YESNO = Read-Host "(yes), (no)"
- if (($YESNO -eq "yes") -or ($YESNO -eq "y")) {remove-item
"$ENV:APPDATA\RosBE\*.rbuild" | remove-item ".\config.rbuild" |
copy-item ".\config.template.rbuild"
"$ENV:APPDATA\RosBE\config.rbuild"}
+ if (("$YESNO" -eq "yes") -or ("$YESNO" -eq
"y")) {remove-item "$ENV:APPDATA\RosBE\*.rbuild" | remove-item
".\config.rbuild" | copy-item ".\config.template.rbuild"
"$ENV:APPDATA\RosBE\config.rbuild"}
else {settitle}
}
}
@@ -289,7 +290,7 @@
$OARCH = $xml.group.property | ? { $_.Name -eq "OARCH" } | % { $_.Value}
"Right now: $OARCH"
$OARCH_CH = Read-Host
-if ($OARCH_CH -eq $null) {
+if ("$OARCH_CH" -eq "") {
$OARCH_CH = $OARCH
}
clear-host
@@ -302,7 +303,7 @@
$TUNE = $xml.group.property | ? { $_.Name -eq "TUNE" } | % { $_.Value}
"Right now: $TUNE"
$TUNE_CH = Read-Host
-if ($TUNE_CH -eq $null) {
+if ("$TUNE_CH" -eq "") {
$TUNE_CH = $TUNE
}
clear-host
@@ -317,7 +318,7 @@
$OPTIMIZE = $xml.group.property | ? { $_.Name -eq "OPTIMIZE" } | % { $_.Value}
"Right now: $OPTIMIZE"
$OPTIMIZE_CH = Read-Host "(0), (1), (2), (3), (4), (5)"
-if ($OPTIMIZE_CH -eq $null) {
+if ("$OPTIMIZE_CH" -eq "") {
$OPTIMIZE_CH = $OPTIMIZE
}
clear-host
@@ -328,7 +329,7 @@
$KDBG = $xml.group.property | ? { $_.Name -eq "KDBG" } | % { $_.Value}
"Right now: $KDBG"
$KDBG_CH = Read-Host "(0), (1)"
-if ($KDBG_CH -eq $null) {
+if ("$KDBG_CH" -eq "") {
$KDBG_CH = $KDBG
}
clear-host
@@ -340,7 +341,7 @@
$DBG = $xml.group.property | ? { $_.Name -eq "DBG" } | % { $_.Value}
"Right now: $DBG"
$DBG_CH = Read-Host "(0), (1)"
-if ($KDBG_CH -eq $null) {
+if ("$KDBG_CH" -eq "") {
$DBG_CH = $DBG
}
clear-host
@@ -352,7 +353,7 @@
$GDB = $xml.group.property | ? { $_.Name -eq "GDB" } | % { $_.Value}
"Right now: $GDB"
$GDB_CH = Read-Host "(0), (1)"
-if ($GDB_CH -eq $null) {
+if ("$GDB_CH" -eq "") {
$GDB_CH = $GDB
}
clear-host
@@ -366,7 +367,7 @@
$NSWPAT = $xml.group.property | ? { $_.Name -eq "NSWPAT" } | % { $_.Value}
"Right now: $NSWPAT"
$NSWPAT_CH = Read-Host "(0), (1)"
-if ($NSWPAT_CH -eq $null) {
+if ("$NSWPAT_CH" -eq "") {
$NSWPAT_CH = $NSWPAT
}
clear-host
@@ -382,7 +383,7 @@
$WINKD = $xml.group.property | ? { $_.Name -eq "_WINKD_" } | % { $_.Value}
"Right now: $WINKD"
$WINKD_CH = Read-Host "(0), (1)"
-if ($WINKD_CH -eq $null) {
+if ("$WINKD_CH" -eq "") {
$WINKD_CH = $WINKD
}
clear-host
@@ -394,7 +395,7 @@
$ELF = $xml.group.property | ? { $_.Name -eq "_ELF_" } | % { $_.Value}
"Right now: $ELF"
$ELF_CH = Read-Host "(0), (1)"
-if ($ELF_CH -eq $null) {
+if ("$ELF_CH" -eq "") {
$ELF_CH = $ELF
}
clear-host
@@ -405,7 +406,7 @@
$BUILD_MP = $xml.group.property | ? { $_.Name -eq "BUILD_MP" } | % { $_.Value}
"Right now: $BUILD_MP"
$BUILD_MP_CH = Read-Host "(0), (1)"
-if ($BUILD_MP_CH -eq $null) {
+if ("$BUILD_MP_CH" -eq "") {
$BUILD_MP_CH = $BUILD_MP
}
clear-host
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 Aug 26 17:51:36
2009
@@ -19,12 +19,12 @@
# Set defaults to work with and override them if edited by
# the options utility.
-if ($args[0] -eq $null) {
+if ("$args" -eq "") {
$ENV:ROS_ARCH = "i386"
} else {
$ENV:ROS_ARCH = "$($args)"
}
-if ($ENV:ROS_ARCH -eq "amd64") {
+if ("$ENV:ROS_ARCH" -eq "amd64") {
(Get-Host).UI.RawUI.ForegroundColor = 0xB
(Get-Host).UI.RawUI.BackgroundColor = 0x0
} else {
@@ -128,14 +128,14 @@
}
# Load the user's options if any
-if ($args[0] -eq $null) {
+if ("$args" -eq "") {
if (Test-Path "$ENV:APPDATA\RosBE\rosbe-options.ps1") {
& "$ENV:APPDATA\RosBE\rosbe-options.ps1"
}
}
-if (Test-Path "$ENV:APPDATA\RosBE\rosbe-options-$args.ps1") {
- & "$ENV:APPDATA\RosBE\rosbe-options-$args.ps1"
+if (Test-Path "$ENV:APPDATA\RosBE\rosbe-options-$ENV:ROS_ARCH.ps1") {
+ & "$ENV:APPDATA\RosBE\rosbe-options-$ENV:ROS_ARCH.ps1"
}
if (Test-Path "$ENV:APPDATA\RosBE\RBUILDFLAGS.FLG") {
@@ -168,7 +168,7 @@
if (Test-Path "$_ROSBE_BASEDIR\scut.ps1") {
& "$_ROSBE_BASEDIR\scut.ps1"
}
-if ($_ROSBE_SHOWVERSION -eq "1") {
+if ($_ROSBE_SHOWVERSION -eq 1) {
& "$_ROSBE_BASEDIR\version.ps1"
}
Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/charch.ps1
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Powershell/charch.ps1 [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Powershell/charch.ps1 [iso-8859-1] Wed Aug 26 17:51:36
2009
@@ -22,7 +22,7 @@
$ENV:ROS_ARCH = $ARCH
# Refresh all needed Params by recalling the main Path setting CMD File.
-if ($ENV:ROS_ARCH -eq "i386") {
+if ("$ENV:ROS_ARCH" -eq "i386") {
if (Test-Path "$ENV:APPDATA\RosBE\rosbe-options.ps1") {
IEX "& '$ENV:APPDATA\RosBE\rosbe-options.ps1'"
}
Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/chdefdir.ps1
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Powershell/chdefdir.ps1 [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Powershell/chdefdir.ps1 [iso-8859-1] Wed Aug 26
17:51:36 2009
@@ -19,7 +19,7 @@
} else {
$SOURCEDIR = $args
}
-if ($SOURCEDIR -eq "previous") {
+if ("$SOURCEDIR" -eq "previous") {
pop-location
} else {
if (!(Test-Path "$SOURCEDIR\.")) {
Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/chdefgcc.ps1
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Powershell/chdefgcc.ps1 [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Powershell/chdefgcc.ps1 [iso-8859-1] Wed Aug 26
17:51:36 2009
@@ -22,14 +22,14 @@
# Parse the command line arguments. Ask the user if certain parameters are missing.
$TOOLPATH = $args[0]
$TOOLMODE = $args[1]
-if ($TOOLPATH -eq $null) {
+if ("$TOOLPATH" -eq "") {
$TOOLPATH = Read-Host "Please enter a MinGW/GCC directory (don't use
quotes): "
if ($TOOLPATH.length -eq 0) {
"ERROR: You must enter a MinGW/GCC directory."
settitle
}
}
-if ($TOOLMODE -eq $null) {
+if ("$TOOLMODE" -eq "") {
$TOOLMODE = Read-Host "Please specify, if this will be the Target or Host GCC:
"
if ($TOOLMODE.length -eq 0) {
"ERROR: You must enter ""target"" or
""host""."
@@ -52,11 +52,11 @@
}
# Set the values
-if ($TOOLMODE -eq "target") {
+if ("$TOOLMODE" -eq "target") {
$_ROSBE_TARGET_MINGWPATH = $TOOLPATH
"Target Location: $_ROSBE_TARGET_MINGWPATH"
EOA
-} elseif ($TOOLMODE -eq "host") {
+} elseif ("$TOOLMODE" -eq "host") {
$_ROSBE_HOST_MINGWPATH = $TOOLPATH
"Host Location: $_ROSBE_HOST_MINGWPATH"
EOA
Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/reladdr2line.ps1
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Powershell/reladdr2line.ps1 [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Powershell/reladdr2line.ps1 [iso-8859-1] Wed Aug 26
17:51:36 2009
@@ -13,7 +13,7 @@
$FILEPATH = $args[0]
$ADDRESS = $args[1]
if ($args.length -lt 1) {
- if ($FILEPATH -eq $null) {
+ if ("$FILEPATH" -eq "") {
$FILEPATH = Read-Host "Please enter the path/file to be examined: "
if ($FILEPATH.Contains("\")) {
$FILEPATH = get-childitem "$FILEPATH\*" -name -recurse 2>NUL |
select-string "$FILEPATH"
@@ -21,22 +21,20 @@
}
}
elseif ($args.length -lt 2) {
- if ($ADDRESS -eq $null) {
+ if ("$ADDRESS" -eq "") {
$ADDRESS = Read-Host "Please enter the address you would like to analyze:
"
}
}
# Check if parameters were really given
-if ($FILEPATH -eq $null) {
+if ("$FILEPATH" -eq "") {
"ERROR: You must specify a path/file to examine."
}
-if ($ADDRESS -eq $null) {
+if ("$ADDRESS" -eq "") {
"ERROR: You must specify a address to analyze."
}
-
$baseaddr = (objdump -p $FILEPATH | select-string
"ImageBase").tostring().split()
$baseaddr = "0x" + ($baseaddr.get($baseaddr.length - 1))
-
if ($baseaddr -lt $ADDRESS) {
IEX "& '$_ROSBE_BASEDIR\Tools\raddr2line.exe' '$FILEPATH'
'$ADDRESS'"
} else {
Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/rosbe-gcc-env.ps1
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Powershell/rosbe-gcc-env.ps1 [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Powershell/rosbe-gcc-env.ps1 [iso-8859-1] Wed Aug 26
17:51:36 2009
@@ -24,11 +24,11 @@
$TARGETGCC = "$global:_ROSBE_PREFIX" + "gcc"
& $TARGETGCC -v 2> gcctvers.tmp
$global:_ROSBE_TARGET_GCCVERSION = (select-string -path .\gcctvers.tmp "gcc
version") -replace ".*version ((\d|\.)+).*",'$1'
-$global:_ROSBE_TARGET_GCCTARGET = (select-string -path .\gcctvers.tmp
"target=") -replace ".*--target=(.+?)\b.*",'$1'
+$global:_ROSBE_TARGET_GCCTARGET = (select-string -path .\gcctvers.tmp "Target:
") -replace ".*Target: (.+?)\b.*",'$1'
remove-item gcctvers.tmp
gcc -v 2> gcchvers.tmp
$global:_ROSBE_HOST_GCCVERSION = (select-string -path .\gcchvers.tmp "gcc
version") -replace ".*version ((\d|\.)+).*",'$1'
-$global:_ROSBE_HOST_GCCTARGET = (select-string -path .\gcchvers.tmp "target=")
-replace ".*--target=(.+?)\b.*",'$1'
+$global:_ROSBE_HOST_GCCTARGET = (select-string -path .\gcchvers.tmp "Target: ")
-replace ".*Target: (.+?)\b.*",'$1'
remove-item gcchvers.tmp
$ENV:ROSBE_HOST_CFLAGS = "-I""$_ROSBE_HOST_MINGWPATH\include""
-I""$_ROSBE_HOST_MINGWPATH\lib\gcc\$_ROSBE_HOST_GCCTARGET\$_ROSBE_HOST_GCCVERSION\include"""
Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/sSVN.ps1
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Powershell/sSVN.ps1 [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Powershell/sSVN.ps1 [iso-8859-1] Wed Aug 26 17:51:36
2009
@@ -7,7 +7,7 @@
#
#
-function UP {
+function UP($arg) {
$OFFSVN = IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' info" |
select-string "Revision:"
$OFFSVN = $OFFSVN -replace "(.*)Revision: ",''
$OFFSVN = [CONVERT]::ToInt32($OFFSVN,10)
@@ -17,27 +17,29 @@
"Local Revision: $OFFSVN"
"Online HEAD Revision: $ONSVN"
""
- if ($OFFSVN -lt $ONSVN) {
- if ($_ROSBE_SSVN_JOB -eq "status") {
+ if (($OFFSVN -lt $ONSVN) -or ("$($arg[1])" -ne "")) {
+ if ("$_ROSBE_SSVN_JOB" -eq "status") {
"Your tree is not up to date. Do you want to update it?"
$UP = Read-Host "Please enter 'yes' or 'no': "
- if (($UP -eq "yes") -or ($UP -eq "y")) {
+ if (("$UP" -eq "yes") -or ("$UP" -eq
"y")) {
$_ROSBE_SSVN_JOB = "update"
}
}
- if ($_ROSBE_SSVN_JOB -eq "update") {
- if ($args[1] -ne $null) {
- $temparg = $args[1]
+ if ("$_ROSBE_SSVN_JOB" -eq "update") {
+ if ("$($arg[1])" -ne "") {
+ $temparg = $arg[1]
IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' update -r
$temparg"
} else {
IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' update"
}
}
- "Do you want to see the changelog?"
- $CL = Read-Host "Please enter 'yes' or 'no': "
- if (($CL -eq "yes") -or ($CL -eq "y")) {
- $range = $OFFSVN + ":" + $ONSVN
- IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' log -r $range"
+ if ("$($arg[1])" -ne "") {
+ "Do you want to see the changelog?"
+ $CL = Read-Host "Please enter 'yes' or 'no': "
+ if (("$CL" -eq "yes") -or ("$CL" -eq
"y")) {
+ $range = "$OFFSVN" + ":" + "$ONSVN"
+ IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' log -r
$range"
+ }
}
}
if ($OFFSVN -eq $ONSVN) {
@@ -46,19 +48,19 @@
}
# Receive the first parameter and decide what to do.
-if ($args[0] -eq $null) {
+if ("$($args[0])" -eq "") {
"No parameter specified. Try 'help [COMMAND]'."
}
# These two are directly parsed to svn.
-elseif ($args[0] -eq "update") {
+elseif ("$($args[0])" -eq "update") {
$host.ui.RawUI.WindowTitle = "SVN Updating..."
"This might take a while, so please be patient."
""
$_ROSBE_SSVN_JOB = "update"
- UP
+ UP($args)
}
-elseif ($args[0] -eq "cleanup") {
+elseif ("$($args[0])" -eq "cleanup") {
$host.ui.RawUI.WindowTitle = "SVN Cleaning..."
"This might take a while, so please be patient."
""
@@ -66,14 +68,14 @@
}
# Check if the folder is empty. If not, output an error.
-elseif ($args[0] -eq "create") {
+elseif ("$($args[0])" -eq "create") {
$host.ui.RawUI.WindowTitle = "SVN Creating..."
if (Test-Path ".svn\.") {
"ERROR: Folder already contains a repository."
} else {
$null = (Remove-Item "$_ROSBE_LOGDIR" -recurse -force)
$dir = get-childitem
- if ($dir -eq $null) {
+ if ("$dir" -eq "") {
IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' checkout
svn://svn.reactos.org/reactos/trunk/reactos ."
} else {
"ERROR: Folder is not empty. Continuing is dangerous and can cause
errors. ABORTED"
@@ -83,15 +85,15 @@
# Output the revision of the local and online trees and tell the user if
# its up to date or not.
-elseif ($args[0] -eq "status") {
+elseif ("$($args[0])" -eq "status") {
$host.ui.RawUI.WindowTitle = "SVN Status"
"This might take a while, so please be patient."
""
$_ROSBE_SSVN_JOB = "status"
- UP
+ UP($args)
}
-elseif ($args[0] -ne $null) {
+elseif ("$($args[0])" -ne "") {
"Unknown parameter specified. Try 'help ssvn'."
}
Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/scut.ps1
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Powershell/scut.ps1 [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Powershell/scut.ps1 [iso-8859-1] Wed Aug 26 17:51:36
2009
@@ -14,7 +14,7 @@
$OUT = paramcall($arg)
# It's a shortcut name, so change the directory
- if ($OUT -ne "Default") {
+ if ("$OUT" -ne "Default") {
if (Test-Path "$OUT\.") {
set-location $OUT
$_ROSBE_ROSSOURCEDIR = $OUT
@@ -23,14 +23,14 @@
}
# Check if the parameter is an scut parameter, which can just be forwarded to the EXE
file
-if ($args[0] -eq "add") {paramcall($args)}
-elseif ($args[0] -eq "rem") {paramcall($args)}
-elseif ($args[0] -eq "edit") {paramcall($args)}
-elseif ($args[0] -eq "def") {paramcall($args)}
-elseif ($args[0] -eq "list") {paramcall($args)}
-elseif ($args[0] -eq "/?") {paramcall($args)}
-elseif ($args[0] -eq "-h") {paramcall($args)}
-elseif ($args[0] -eq "--help") {paramcall($args)}
+if ("$($args[0])" -eq "add") {paramcall($args)}
+elseif ("$($args[0])" -eq "rem") {paramcall($args)}
+elseif ("$($args[0])" -eq "edit") {paramcall($args)}
+elseif ("$($args[0])" -eq "def") {paramcall($args)}
+elseif ("$($args[0])" -eq "list") {paramcall($args)}
+elseif ("$($args[0])" -eq "/?") {paramcall($args)}
+elseif ("$($args[0])" -eq "-h") {paramcall($args)}
+elseif ("$($args[0])" -eq "--help") {paramcall($args)}
else {parse($args)}
$host.ui.RawUI.WindowTitle = "ReactOS Build Environment $_ROSBE_VERSION"
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 Aug 26 17:51:36
2009
@@ -28,7 +28,7 @@
""
"Install?"
$YESNO = Read-Host "(yes), (no)"
- if (($YESNO -eq "yes") -or ($YESNO -eq "y")) {
+ if (("$YESNO" -eq "yes") -or ("$YESNO" -eq
"y")) {
if (!(Test-Path "$_ROSBE_VERSION-$_ROSBE_STATCOUNT.7z")) {
get-webfile $_ROSBE_URL/$_ROSBE_VERSION-$_ROSBE_STATCOUNT.7z
$PWD\$_ROSBE_VERSION-$_ROSBE_STATCOUNT.7z
}
@@ -42,16 +42,16 @@
"ERROR: This Update does not seem to exist or the Internet
connection is not working correctly."
return
}
- } elseif ($YESNO -eq "no") {
+ } elseif ("$YESNO" -eq "no") {
"Do you want to be asked again to install this update?"
$YESNO = Read-Host "(yes), (no)"
- if (($YESNO -eq "yes") -or ($YESNO -eq "y")) {
+ if (("$YESNO" -eq "yes") -or ("$YESNO" -eq
"y")) {
remove-item "$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt" -force -EA
SilentlyContinue
}
return
}
} else {
- if ($_ROSBE_MULTIUPD -ne "1") {
+ if ($_ROSBE_MULTIUPD -ne 1) {
"ERROR: This Update does not seem to exist or the Internet connection is
not working correctly."
}
$_ROSBE_STATCOUNT = 9
@@ -89,11 +89,6 @@
if (!(Test-Path "$ENV:APPDATA\RosBE\Updates")) {New-Item -path
"$ENV:APPDATA\RosBE" -name "Updates" -type directory}
set-location "$ENV:APPDATA\RosBE\Updates"
-# Parse the args.
-
-$arg1 = $args[0]
-$arg2 = $args[1]
-
if ("$args" -eq "") {
$_ROSBE_MULTIUPD = 1
$_ROSBE_STATCOUNT = 1
@@ -104,17 +99,17 @@
} elseif ("$args" -eq "reset") {
remove-item "$ENV:APPDATA\RosBE\Updates\*.*" -force -recurse -EA
SilentlyContinue
remove-item "$ENV:APPDATA\RosBE\Updates\tmp\*.*" -force -recurse -EA
SilentlyContinue
-} elseif ("$arg1" -eq "nr") {
- $_ROSBE_STATCOUNT = $arg2
+} elseif ("$($args[0])" -eq "nr") {
+ $_ROSBE_STATCOUNT = $($args[1])
UPDCHECK
-} elseif ("$arg1" -eq "delete") {
- $_ROSBE_STATCOUNT = $arg2
+} elseif ("$($args[0])" -eq "delete") {
+ $_ROSBE_STATCOUNT = $($args[1])
remove-item
"$ENV:APPDATA\RosBE\Updates\$_ROSBE_VERSION-$_ROSBE_STATCOUNT.*" -force -recurse
-EA SilentlyContinue
remove-item
"$ENV:APPDATA\RosBE\Updates\tmp\$_ROSBE_VERSION-$_ROSBE_STATCOUNT.*" -force
-recurse -EA SilentlyContinue
-} elseif ("$arg1" -eq "info") {
- $_ROSBE_STATCOUNT = $arg2
+} elseif ("$($args[0])" -eq "info") {
+ $_ROSBE_STATCOUNT = $($args[1])
set-location tmp
- if (!(Test-path "$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt")) {
+ if (!(Test-Path "$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt")) {
get-webfile $_ROSBE_URL/$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt
$PWD\$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt
if (Test-Path "$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt") {
get-content "$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt"
@@ -129,8 +124,8 @@
if (!(test-path "tmp")) {New-Item -name "tmp" -type directory}
copy-item *.txt .\tmp\.
set-location tmp
- while($_ROSBE_STATCOUNT -lt 10) {
- if (!(Test-path "$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt")) {
+ while ($_ROSBE_STATCOUNT -lt 10) {
+ if (!(Test-Path "$_ROSBE_VERSION-$_ROSBE_STATCOUNT.txt")) {
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 "
@@ -142,7 +137,7 @@
}
set-location ..
remove-item "tmp\*.*" -force -EA SilentlyContinue
- if ($_ROSBE_UPDATES -ne $null) {
+ if ("$_ROSBE_UPDATES" -ne "") {
"Following Updates available: $_ROSBE_UPDATES"
} else {
"RosBE is up to Date."