Author: dreimer
Date: Thu May 1 11:54:22 2008
New Revision: 33218
URL:
http://svn.reactos.org/svn/reactos?rev=33218&view=rev
Log:
Build Process works
BaseDir is set properly
Modified:
trunk/tools/RosBE/RosBE-Windows/Powershell/Build.ps1
trunk/tools/RosBE/RosBE-Windows/Powershell/RosBE.ps1
trunk/tools/RosBE/RosBE-Windows/Powershell/rosbe-gcc-env.ps1
trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd
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] Thu May 1 11:54:22
2008
@@ -83,21 +83,25 @@
#
if ($_ROSBE_WRITELOG -eq 1) {
if (!(Test-Path "$_ROSBE_LOGDIR")) {
- New-Item -path "$_ROSBE_ROSSOURCEDIR" -name "RosBE-Logs"
-type directory
+ $null = (New-Item -path "$_ROSBE_ROSSOURCEDIR" -name
"RosBE-Logs" -type directory)
}
}
function BUILD {
if ($_ROSBE_SHOWTIME -eq 1) {
if ($_ROSBE_WRITELOG -eq 1) {
- New-Item -path "$_ROSBE_LOGDIR" -name
"BuildLog-$_ROSBE_GCCVERSION-$DATENAME-$TIMENAME.txt" -type file
+ if (!(Test-Path
"$_ROSBE_LOGDIR\BuildLog-$_ROSBE_GCCVERSION-$DATENAME-$TIMENAME.txt")) {
+ $null = (New-Item -path "$_ROSBE_LOGDIR" -name
"BuildLog-$_ROSBE_GCCVERSION-$DATENAME-$TIMENAME.txt" -type file)
+ }
& "$_ROSBE_BASEDIR\Tools\buildtime.exe"
"$_ROSBE_MINGWMAKE" $($args) 2>&1 | tee-object -filepath
"$_ROSBE_LOGDIR\BuildLog-$_ROSBE_GCCVERSION-$DATENAME-$TIMENAME.txt"
} else {
& "$_ROSBE_BASEDIR\Tools\buildtime.exe"
"$_ROSBE_MINGWMAKE" $($args)
}
} else {
if ($_ROSBE_WRITELOG -eq 1) {
- New-Item -path "$_ROSBE_LOGDIR" -name
"BuildLog-$_ROSBE_GCCVERSION-$DATENAME-$TIMENAME.txt" -type file
+ if (!(Test-Path
"$_ROSBE_LOGDIR\BuildLog-$_ROSBE_GCCVERSION-$DATENAME-$TIMENAME.txt")) {
+ $null = (New-Item -path "$_ROSBE_LOGDIR" -name
"BuildLog-$_ROSBE_GCCVERSION-$DATENAME-$TIMENAME.txt" -type file)
+ }
& "$_ROSBE_MINGWMAKE" $($args) 2>&1 | tee-object
-filepath "$_ROSBE_LOGDIR\BuildLog-$_ROSBE_GCCVERSION-$DATENAME-$TIMENAME.txt"
} else {
& "$_ROSBE_MINGWMAKE" $($args)
@@ -114,21 +118,25 @@
# -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
+$CPUCOUNT= &"$_ROSBE_BASEDIR\Tools\cpucount.exe" -x1
if ($_ROSBE_SHOWTIME -eq 1) {
if ($_ROSBE_WRITELOG -eq 1) {
-# New-Item -path "$_ROSBE_LOGDIR" -name
"BuildLog-$_ROSBE_GCCVERSION-$DATENAME-$TIMENAME.txt" -type file
-# & "$_ROSBE_BASEDIR\Tools\buildtime.exe"
"$_ROSBE_MINGWMAKE" -j $CPUCOUNT $($args) 2>&1 | tee-object -filepath
"$_ROSBE_LOGDIR\BuildLog-$_ROSBE_GCCVERSION-$DATENAME-$TIMENAME.txt"
+ if (!(Test-Path
"$_ROSBE_LOGDIR\BuildLog-$_ROSBE_GCCVERSION-$DATENAME-$TIMENAME.txt")) {
+ $null = (New-Item -path "$_ROSBE_LOGDIR" -name
"BuildLog-$_ROSBE_GCCVERSION-$DATENAME-$TIMENAME.txt" -type file)
+ }
+ & "$_ROSBE_BASEDIR\Tools\buildtime.exe"
"$_ROSBE_MINGWMAKE" -j $CPUCOUNT $($args) 2>&1 | tee-object -filepath
"$_ROSBE_LOGDIR\BuildLog-$_ROSBE_GCCVERSION-$DATENAME-$TIMENAME.txt"
} else {
-# & "$_ROSBE_BASEDIR\Tools\buildtime.exe"
"$_ROSBE_MINGWMAKE" -j $CPUCOUNT $($args)
+ & "$_ROSBE_BASEDIR\Tools\buildtime.exe"
"$_ROSBE_MINGWMAKE" -j $CPUCOUNT $($args)
}
} else {
if ($_ROSBE_WRITELOG -eq 1) {
-# New-Item -path "$_ROSBE_LOGDIR" -name
"BuildLog-$_ROSBE_GCCVERSION-$DATENAME-$TIMENAME.txt" -type file
-# & "$_ROSBE_MINGWMAKE" -j $CPUCOUNT $($args) 2>&1 |
tee-object -filepath
"$_ROSBE_LOGDIR\BuildLog-$_ROSBE_GCCVERSION-$DATENAME-$TIMENAME.txt"
+ if (!(Test-Path
"$_ROSBE_LOGDIR\BuildLog-$_ROSBE_GCCVERSION-$DATENAME-$TIMENAME.txt")) {
+ $null = (New-Item -path "$_ROSBE_LOGDIR" -name
"BuildLog-$_ROSBE_GCCVERSION-$DATENAME-$TIMENAME.txt" -type file)
+ }
+ & "$_ROSBE_MINGWMAKE" -j $CPUCOUNT $($args) 2>&1 |
tee-object -filepath
"$_ROSBE_LOGDIR\BuildLog-$_ROSBE_GCCVERSION-$DATENAME-$TIMENAME.txt"
} else {
-# & "$_ROSBE_MINGWMAKE" -j $CPUCOUNT $($args)
+ & "$_ROSBE_MINGWMAKE" -j $CPUCOUNT $($args)
}
}
}
@@ -139,7 +147,7 @@
if ($args.count -gt 1) {
if ($args[0] -eq "multi") {
if ($args[1] -ne "") {
- $host.ui.RawUI.WindowTitle = "makex $args[1] parallel build started:
$TIMERAW"
+ $host.ui.RawUI.WindowTitle = "makex $args parallel build started:
$TIMERAW"
} else {
$host.ui.RawUI.WindowTitle = "makex parallel build started: $TIMERAW"
}
@@ -148,7 +156,7 @@
} else {
if ($args.count -gt 0) {
if ($args[0] -ne "") {
- $host.ui.RawUI.WindowTitle = "make $args[1] build started: $TIMERAW"
+ $host.ui.RawUI.WindowTitle = "make $args build started: $TIMERAW"
} else {
$host.ui.RawUI.WindowTitle = "make build started: $TIMERAW"
}
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] Thu May 1 11:54:22
2008
@@ -18,7 +18,8 @@
if ($APPDATA.Length -lt 1) {$APPDATA = $ENV:USERPROFILE}
$global:PATH = "$ENV:SystemRoot\system32;$ENV:SystemRoot"
$global:_ROSBE_VERSION = 1.2
-$global:_ROSBE_BASEDIR = "C:\Programme\RosBE" #NOCH FALSCH
+$global:0 = $myInvocation.MyCommand.Definition
+$global:_ROSBE_BASEDIR = [System.IO.Path]::GetDirectoryName($0)
$global:_ROSBE_MODE = "RosBE"
$global:_ROSBE_ROSSOURCEDIR = "$pwd"
$global:_ROSBE_ORIGINALPATH = "$PATH"
@@ -101,7 +102,7 @@
#
# Check if RosBE data directory exists, if not, create it.
#
-if (!(Test-Path "$APPDATA\RosBE")) {mkdir $APPDATA\RosBE}
+if (!(Test-Path "$APPDATA\RosBE")) {New-Item -path "$APPDATA" -name
"RosBE" -type directory}
#
# Check if the user has used the options utility and
@@ -119,17 +120,16 @@
#
if ($args.count -gt 0) {
if ($args[0] = "oldmode") {
-# cls
+ cls
$_ROSBE_MODE = "MinGW"
} else {
-# cls
+ cls
"Unknown parameter specified. Exiting."
exit
}
}
RosBE4
-#cls
#
# Load the base directory from srclist.txt and set it as the
@@ -157,8 +157,7 @@
# inform the user and mention 'ssvn create' (only if ssvn is installed).
#
if (!(Test-Path "$_ROSBE_BASEDIR\sSVN.ps1")) {
-# dir /b $_ROSBE_ROSSOURCEDIR 2>nul | findstr "." >nul
- if ($errorlevel = 1) {
+ if ((get-childitem $_ROSBE_ROSSOURCEDIR).Count -le 0) {
"No ReactOS source detected. Please use ""ssvn create""
to download it."
}
}
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] Thu May 1
11:54:22 2008
@@ -11,7 +11,7 @@
# Check if we are running within the RosBE, and if not
# initialize GCC for the current directory.
#
-if ($ENV:_ROSBE_MINGWPATH = $null) {
+if ($ENV:_ROSBE_MINGWPATH -eq $null) {
$ENV:_ROSBE_MODE = "MinGW"
$ENV:_ROSBE_MINGWPATH = "$pwd"
$ENV:_ROSBE_ORIGINALPATH = "$PATH"
@@ -23,11 +23,11 @@
$ENV:PATH = "$_ROSBE_MINGWPATH\bin;$_ROSBE_ORIGINALPATH"
$global:_ROSBE_GCCVERSION = $null
$global:_ROSBE_GCCTARGET = $null
-#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
+$global:_ROSBE_GCCVERSION = (& gcc -v 2>&1 | select-string "gcc
version") -replace ".*version ((\d|\.)+).*",'$1'
+$global:_ROSBE_GCCTARGET = (& gcc -v 2>&1 | select-string
"target=") -replace ".*--target=(.+?)\b.*",'$1'
$ENV:PATH =
"$_ROSBE_MINGWPATH\bin;$_ROSBE_MINGWPATH\libexec\gcc\$_ROSBE_GCCTARGET\$_ROSBE_GCCVERSION;$_ROSBE_ORIGINALPATH"
$global:_ROSBE_MINGWMAKE = "$_ROSBE_MINGWPATH\bin\mingw32-make.exe"
-if ($_ROSBE_MODE = "MinGW") {
+if ($_ROSBE_MODE -eq "MinGW") {
$ENV:C_INCLUDE_PATH =
"$_ROSBE_MINGWPATH\include;$_ROSBE_MINGWPATH\lib\gcc\$_ROSBE_GCCTARGET\$_ROSBE_GCCVERSION\include"
$ENV:CPLUS_INCLUDE_PATH =
"$_ROSBE_MINGWPATH\include;$_ROSBE_MINGWPATH\include\c++\$_ROSBE_GCCVERSION;$_ROSBE_MINGWPATH\include\c++\$_ROSBE_GCCVERSION\$_ROSBE_GCCTARGET;$_ROSBE_MINGWPATH\lib\gcc\$_ROSBE_GCCTARGET\$_ROSBE_GCCVERSION\include"
} else {
@@ -39,28 +39,29 @@
#
# Display the current version of GCC, NASM, ld and make.
#
-gcc -v 2>&1 | find "gcc version"
+& gcc -v 2>&1 | select-string "gcc version"
"gcc target - $_ROSBE_GCCTARGET"
-ld -v
+& ld -v
if (Test-Path "$_ROSBE_MINGWPATH\bin\nasm.exe") {
- nasm -v
+ & nasm -v
} else {
- if ($_ROSBE_MODE = "RosBE") {
+ if ($_ROSBE_MODE -eq "RosBE") {
"ERROR: NASM is required to build ReactOS, none found in the current
MinGW/GCC."
}
}
if (Test-Path "$_ROSBE_MINGWPATH\bin\bison.exe") {
- bison --version | find "GNU Bison"
+ & bison --version | find "GNU Bison"
} else {
- if ($_ROSBE_MODE = "RosBE") {
+ if ($_ROSBE_MODE -eq "RosBE") {
"WARNING: Bison will soon be required to build ReactOS, none found in the
current MinGW/GCC."
}
}
if (Test-Path "$_ROSBE_MINGWPATH\bin\flex.exe") {
- flex --version
+$fver = (& flex --version) -replace ".*version ((\d|\.)+).*",'$1'
+ "flex $fver"
} else {
- if ($_ROSBE_MODE = "RosBE") {
+ if ($_ROSBE_MODE -eq "RosBE") {
"WARNING: Flex will soon be required to build ReactOS, none found in the
current MinGW/GCC."
}
}
-mingw32-make -v | find "GNU Make"
+& mingw32-make -v | & find "GNU Make"
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 May 1 11:54:22 2008
@@ -40,7 +40,7 @@
:: Check if RosBE data directory exists, if not, create it.
::
if not exist "%APPDATA%\RosBE\." (
- mkdir "%APPDATA%\RosBE"
+ mkdir "%APPDATA%\RosBE" 1> NUL 2> NUL
)
::