Author: dreimer
Date: Thu Jul 29 17:58:22 2010
New Revision: 48363
URL:
http://svn.reactos.org/svn/reactos?rev=48363&view=rev
Log:
Revert moving the cmake build folders into output-%arch%
Add PS Version of CMake support which does half the job and then does not find the
toolchain-mingw32.cmake because it looks for a toolchain-mingw32 file O_o
Added:
trunk/tools/RosBE/RosBE-Windows/Powershell/CBuild.ps1 (with props)
Modified:
trunk/tools/RosBE/RosBE-Windows/Powershell/RosBE.ps1
trunk/tools/RosBE/RosBE-Windows/Root/CMake-Shared.cmd
Added: trunk/tools/RosBE/RosBE-Windows/Powershell/CBuild.ps1
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Powershell/CBuild.ps1 (added)
+++ trunk/tools/RosBE/RosBE-Windows/Powershell/CBuild.ps1 [iso-8859-1] Thu Jul 29 17:58:22
2010
@@ -1,0 +1,90 @@
+#
+# PROJECT: RosBE - ReactOS Build Environment for Windows
+# LICENSE: GNU General Public License v2. (see LICENSE.txt)
+# FILE: Root/CBuild.ps1
+# PURPOSE: Perform the CMake build of ReactOS.
+# COPYRIGHT: Copyright 2010 Daniel Reimer <reimer.daniel(a)freenet.de>
+#
+
+if ($_ROSBE_WRITELOG -eq 1) {
+ if (!(Test-Path "$_ROSBE_LOGDIR")) {
+ New-Item -path "$_ROSBE_LOGDIR" -type directory
+ }
+ $file1 =
"$_ROSBE_LOGDIR\BuildToolLog-$ENV:ROS_ARCH-$DATENAME-$TIMENAME.txt"
+ $file2 =
"$_ROSBE_LOGDIR\BuildROSLog-$ENV:ROS_ARCH-$DATENAME-$TIMENAME.txt"
+}
+
+# Get the current date and time for use in in our build log's file name.
+$TIMERAW = get-date -f t
+$DATENAME = get-date -f dMMyyyy
+$TIMENAME = get-date -f Hms
+
+# Check whether we were called as "makex" or "make"
+if ("$($args[0])" -eq "multi") {
+ $args.setvalue($null, 0)
+ $MAKE_JOBS = "$_ROSBE_MAKEX_JOBS"
+ $TITLE_COMMAND = "makex $($args)"
+} else {
+ $MAKE_JOBS = 1
+ $TITLE_COMMAND = "make $($args)"
+}
+
+$host.ui.RawUI.WindowTitle = "'$TITLE_COMMAND' cmake build started: $TIMERAW
($ENV:ROS_ARCH)"
+
+# Do the actual building
+if ($_ROSBE_SHOWTIME -eq 1) {
+ [System.Diagnostics.Stopwatch] $sw;
+ $sw = New-Object System.Diagnostics.StopWatch
+ $sw.Start()
+}
+
+if (!(Test-Path "build")) {
+ New-Item -path "build" -type directory
+ }
+
+cd build
+&{IEX "&'cmake.exe' -G ""MinGW Makefiles""
..\"}
+
+if ($_ROSBE_WRITELOG -eq 1) {
+ &{IEX "&'mingw32-make.exe' -j $MAKE_JOBS $($args)"}
$($args) 2>&1 | tee-object $file1
+} else {
+ &{IEX "&'mingw32-make.exe' -j $MAKE_JOBS $($args)"}
$($args)
+}
+
+cd..
+""
+
+if (!(Test-Path "build-ros")) {
+ New-Item -path "build-ros" -type directory
+ }
+
+cd build-ros
+&{IEX "&'cmake.exe' -G ""MinGW Makefiles""
-DCMAKE_TOOLCHAIN_FILE=toolchain-mingw32.cmake ..\"}
+
+if ($_ROSBE_WRITELOG -eq 1) {
+ &{IEX "&'mingw32-make.exe' -j $MAKE_JOBS $($args)"}
$($args) 2>&1 | tee-object $file2
+} else {
+ &{IEX "&'mingw32-make.exe' -j $MAKE_JOBS $($args)"}
$($args)
+}
+
+cd..
+
+if ($_ROSBE_SHOWTIME -eq 1) {
+ $sw.Stop()
+ write-host "Total Build Time:" $sw.Elapsed.ToString()
+}
+
+# Highlight the fact that building has ended.
+FlashWindow (ps -id $pid).MainWIndowHandle $true
+
+$sound = new-Object System.Media.SoundPlayer;
+
+if ($LASTEXITCODE -ne 0) {
+ $sound.SoundLocation="$_ROSBE_BASEDIR\samples\error.wav";
+} else {
+ $sound.SoundLocation="$_ROSBE_BASEDIR\samples\notification.wav";
+}
+
+$sound.Play();
+
+$host.ui.RawUI.WindowTitle = "ReactOS Build Environment $_ROSBE_VERSION"
Propchange: trunk/tools/RosBE/RosBE-Windows/Powershell/CBuild.ps1
------------------------------------------------------------------------------
svn:eol-style = native
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 Jul 29 17:58:22
2010
@@ -64,10 +64,10 @@
$global:_ROSBE_TARGET_MINGWPATH = "$_ROSBE_BASEDIR\$ENV:ROS_ARCH"
$global:_BUILDBOT_SVNSKIPMAINTRUNK = "0"
-if ("$ENV:_ROSBE_SYSPATH" -eq "1") {
+if ("$ENV:_ROSBE_NOSYSPATH" -eq "1") {
+ $global:_ROSBE_ORIGINALPATH =
"$_ROSBE_BASEDIR;$_ROSBE_BASEDIR\Tools;$ENV:SystemRoot\system32;$ENV:SystemRoot;$ENV:SystemRoot\System32\Wbem;$ENV:SYSTEMROOT\System32\WindowsPowerShell\v1.0\"
+} else {
$global:_ROSBE_ORIGINALPATH =
"$_ROSBE_BASEDIR;$_ROSBE_BASEDIR\Tools;$ENV:PATH"
-} else {
- $global:_ROSBE_ORIGINALPATH =
"$_ROSBE_BASEDIR;$_ROSBE_BASEDIR\Tools;$ENV:SystemRoot\system32;$ENV:SystemRoot;$ENV:SystemRoot\System32\Wbem;$ENV:SYSTEMROOT\System32\WindowsPowerShell\v1.0\"
}
# Fix Bison package path (just in case RosBE is installed in a path which contains
spaces)
Modified: trunk/tools/RosBE/RosBE-Windows/Root/CMake-Shared.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/CMa…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/CMake-Shared.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/CMake-Shared.cmd [iso-8859-1] Thu Jul 29 17:58:22
2010
@@ -18,12 +18,6 @@
)
)
-if not exist "output-%ROS_ARCH%\." (
- mkdir "output-%ROS_ARCH%" 1> NUL 2> NUL
-)
-
-cd "output-%ROS_ARCH%"
-
:: Get the current date and time for use in in our build log's file name.
call "%_ROSBE_BASEDIR%\TimeDate.cmd"
@@ -40,19 +34,20 @@
mkdir "build" 1> NUL 2> NUL
)
cd build
-cmake.exe -G "MinGW Makefiles" ..\..\
+cmake.exe -G "MinGW Makefiles" ..\
if %_ROSBE_WRITELOG% == 1 (
%BUILDTIME_COMMAND% mingw32-make.exe -j %MAKE_JOBS% %* 2>&1 | tee.exe
"%_ROSBE_LOGDIR%\BuildToolLog-%ROS_ARCH%-%datename%-%timename%.txt"
) else (
%BUILDTIME_COMMAND% mingw32-make.exe -j %MAKE_JOBS% %*
)
cd..
+echo.
if not exist "build-ros\." (
mkdir "build-ros" 1> NUL 2> NUL
)
cd build-ros
-cmake.exe -G "MinGW Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain-mingw32.cmake
..\..\
+cmake.exe -G "MinGW Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain-mingw32.cmake
..\
if %_ROSBE_WRITELOG% == 1 (
%BUILDTIME_COMMAND% mingw32-make.exe -j %MAKE_JOBS% %* 2>&1 | tee.exe
"%_ROSBE_LOGDIR%\BuildROSLog-%ROS_ARCH%-%datename%-%timename%.txt"
) else (
@@ -60,7 +55,6 @@
)
cd..
-cd..
:EOC
:: Highlight the fact that building has ended.