Author: dreimer
Date: Fri May 2 18:54:47 2008
New Revision: 33253
URL:
http://svn.reactos.org/svn/reactos?rev=33253&view=rev
Log:
Finish Basic RosBE for PowerShell. Please Report Bugs
Added:
trunk/tools/RosBE/RosBE-Windows/Powershell/Clean.ps1 (with props)
trunk/tools/RosBE/RosBE-Windows/Powershell/Help.ps1 (with props)
trunk/tools/RosBE/RosBE-Windows/Powershell/MinGW.ps1 (with props)
Modified:
trunk/tools/RosBE/RosBE-Windows/Powershell/Build.ps1
trunk/tools/RosBE/RosBE-Windows/Powershell/RosBE.ps1
trunk/tools/RosBE/RosBE-Windows/Root/Help.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] Fri May 2 18:54:47
2008
@@ -52,7 +52,7 @@
# it accordingly.
#
if ($_ROSBE_OBJPATH -ne $null) {
- if ( Test-Path "$_ROSBE_OBJPATH\.") {
+ if ( Test-Path "$_ROSBE_OBJPATH") {
"ERROR: The path specified doesn't seem to exist."
exit
} else {
@@ -60,7 +60,7 @@
}
}
if ($_ROSBE_OUTPATH -ne $null) {
- if (Test-Path "$_ROSBE_OUTPATH\.") {
+ if (Test-Path "$_ROSBE_OUTPATH") {
"ERROR: The path specified doesn't seem to exist."
exit
} else {
@@ -120,12 +120,6 @@
function BUILDMULTI {
#
# Get the number of CPUs in the system so we know how many jobs to execute.
- # To modify the number used alter the options used with cpucount:
- # No Option - Number of CPUs.
- # -x1 - Number of CPUs, plus 1.
- # -x2 - Number of CPUs, doubled.
- # -a - Determine the cpu count based on the inherited process affinity mask.
- #
$CPUCOUNT= (gwmi win32_processor).numberofcores + 1
if ($_ROSBE_SHOWTIME -eq 1) {
Added: 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 (added)
+++ trunk/tools/RosBE/RosBE-Windows/Powershell/Clean.ps1 [iso-8859-1] Fri May 2 18:54:47
2008
@@ -1,0 +1,76 @@
+#
+# PROJECT: RosBE - ReactOS Build Environment for Windows
+# LICENSE: GNU General Public License v2. (see LICENSE.txt)
+# FILE: Root/Clean.cmd
+# PURPOSE: Clean the ReactOS source directory.
+# COPYRIGHT: Copyright 2007 Daniel Reimer <reimer.daniel(a)freenet.de>
+# Peter Ward <dralnix(a)gmail.com>
+#
+#
+
+$host.ui.RawUI.WindowTitle = "Cleaning..."
+
+function remlog {
+ #
+ # Check if we have any logs to clean, if so, clean them.
+ #
+ if (Test-Path "$_ROSBE_LOGDIR") {
+ "Cleaning build logs..."
+ $null = (Remove-Item -path "$_ROSBE_LOGDIR\*.txt" -force)
+ "Done cleaning build logs."
+ } else {
+ "ERROR: There are no logs to clean."
+ }
+}
+
+function rembin {
+ #
+ # Check if we have something to clean, if so, clean it.
+ #
+ if (Test-Path "obj-i386") {
+ "Cleaning ReactOS source directory..."
+ #
+ # Remove directories/makefile.auto created by the build.
+ #
+ if (Test-Path "obj-i386") {
+ $null = (Remove-Item "obj-i386" -recurse -force)
+ }
+ if (Test-Path "output-i386") {
+ $null = (Remove-Item "output-i386" -recurse -force)
+ }
+ if (Test-Path "reactos") {
+ $null = (Remove-Item "reactos" -recurse -force)
+ }
+ if (Test-Path "makefile.auto") {
+ $null = (Remove-Item "makefile.auto" -force)
+ }
+ "Done cleaning ReactOS source directory."
+ } else {
+ "ERROR: There is no compiler output to clean."
+ }
+}
+
+function end {
+ $host.ui.RawUI.WindowTitle = "ReactOS Build Environment $_ROSBE_VERSION"
+ exit
+}
+
+if ("$args" -eq "") {
+ rembin
+ end
+}
+if ("$args" -eq "logs") {
+ remlog
+ end
+}
+if ("$args" -eq "all") {
+ rembin
+ remlog
+ end
+}
+if ("$args" -ne "") {
+ "Unknown parameter specified. Try ''help [COMMAND]''."
+ end
+}
+
+
Propchange: trunk/tools/RosBE/RosBE-Windows/Powershell/Clean.ps1
------------------------------------------------------------------------------
svn:eol-style = native
Added: 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 (added)
+++ trunk/tools/RosBE/RosBE-Windows/Powershell/Help.ps1 [iso-8859-1] Fri May 2 18:54:47
2008
@@ -1,0 +1,196 @@
+#
+# PROJECT: RosBE - ReactOS Build Environment for Windows
+# LICENSE: GNU General Public License v2. (see LICENSE.txt)
+# FILE: Root/Help.ps1
+# PURPOSE: Display help for the commands included with the ReactOS Build
Environment.
+# COPYRIGHT: Copyright 2007 Daniel Reimer <reimer.daniel(a)freenet.de>
+#
+#
+
+#
+# Check if we are displaying help on all commands, if so, display it.
+#
+if ("$args" -eq "") {
+ ""
+ "Available Commands:"
+ " make [OPTIONS] - Without options it does a standard build of"
+ " ReactOS. OPTIONS are the standard ReactOS
build"
+ " options ie. ""bootcd"""
+ " makex [OPTIONS] - Same as 'make' but automatically determines
the"
+ " number of CPU Cores in the system and uses -j"
+ " with the appropriate number."
+ " basedir - Switch back to the ReactOS source directory."
+
+ if (Test-Path "$_ROSBE_BASEDIR\charch.ps1") {
+ " charch [OPTIONS] - Change the Architecture to build for for
the"
+ " current RosBE session."
+ }
+
+ if (Test-Path "$_ROSBE_BASEDIR\chdefdir.ps1") {
+ " chdefdir [OPTIONS] - Change the ReactOS source directory for
the"
+ " current RosBE session."
+ }
+
+ if (Test-Path "$_ROSBE_BASEDIR\chdefgcc.ps1") {
+ " chdefgcc [PATH] - Change the MinGW/GCC directory for the"
+ " current RosBE session."
+ }
+
+ " clean [OPTIONS] - Fully clean the ReactOS source directory
and/or"
+ " the RosBE build logs."
+
+ if (Test-Path "$_ROSBE_BASEDIR\Config.ps1") {
+ " config [OPTIONS] - Configures the way, ReactOS will be
built."
+ }
+
+ " help [COMMAND] - Display the available commands or help on a"
+ " specific command."
+
+ if (Test-Path "$_ROSBE_BASEDIR\reladdr2line.ps1") {
+ " raddr2line [OPTIONS] - Translates program addresses into file names
and"
+ " line numbers to assist developers with
finding"
+ " specific bugs in ReactOS."
+ }
+
+ if (Test-Path "$_ROSBE_BASEDIR\scut.ps1") {
+ " scut [OPTIONS] - List, add, edit, remove, switch and default
to"
+ " shortcutted ReactOS source directories."
+ }
+
+ if (Test-Path "$_ROSBE_BASEDIR\sSVN.ps1") {
+ " ssvn [OPTIONS] - Create, update or clean-up your ReactOS
source"
+ " tree or show the revision number of the
local"
+ " and online trees."
+ }
+
+ if (Test-Path "$_ROSBE_BASEDIR\options.ps1") {
+ " options - Starts the RosBE configurator."
+ }
+
+ ""
+ exit
+}
+
+#
+# Now check if we are displaying help on individual commands, if so,
+# display the help for that command.
+#
+if ("$args" -eq "make") {
+ " Usage: make [OPTIONS]"
+ " Without options it does a standard build of ReactOS. OPTIONS are the"
+ " standard ReactOS build options ie. ""bootcd"",
""livecd"", etc."
+ exit
+}
+if ("$args" -eq "makex") {
+ " Usage: makex [OPTIONS]"
+ " Same as 'make' but automatically determines the number of CPU Cores
in"
+ " the system and uses ""make -j x"" with the appropriate
number."
+ " NOTE: The number makex uses can be modified by editing Build.ps1"
+ " located in the RosBE directory, instructions for doing so are"
+ " contained within the file."
+ exit
+}
+if ("$args" -eq "basedir") {
+ " Usage: basedir"
+ " Switches back to the ReactOS source directory."
+ exit
+}
+if (Test-Path "$_ROSBE_BASEDIR\charch.ps1") {
+ if ("$args" -eq "charch") {
+ " Usage: charch [OPTIONS]"
+ " Change the ReactOS source directory for the current RosBE session."
+ " Possible Architectures are: x86, ppc, arm."
+ ""
+ exit
+ }
+}
+if (Test-Path "$_ROSBE_BASEDIR\chdefdir.ps1") {
+ if ("$args" -eq "chdefdir") {
+ " Usage: chdefdir [OPTIONS]"
+ " Change the ReactOS source directory for the current RosBE session."
+ ""
+ " previous - Switch to the previous ReactOS source directory."
+ exit
+ }
+}
+if (Test-Path "$_ROSBE_BASEDIR\chdefgcc.ps1") {
+ if ("$args" -eq "chdefgcc") {
+ " Usage: chdefgcc [PATH]"
+ " Change the MinGW/GCC directory for the current RosBE session."
+ ""
+ exit
+ }
+}
+if ("$args" -eq "clean") {
+ " Usage: clean [logs]"
+ " Fully clean the ReactOS source directory."
+ ""
+ " all - Removes build logs and compiler output in the RosBE-Logs
directory."
+ " logs - Removes all build logs in the RosBE-Logs directory."
+ exit
+}
+if (Test-Path "$_ROSBE_BASEDIR\Config.ps1") {
+ if ("$args" -eq "config") {
+ " Usage: config [OPTIONS]"
+ " Creates a configuration file, which tells RosBE how to build the
tree."
+ ""
+ " delete - Deletes the created configuration file and so sets back"
+ " to default settings."
+ " update - Deletes the old created configuration file and updates"
+ " it with a new, default one."
+ exit
+ }
+}
+if ("$args" -eq "help") {
+ " Usage: help [COMMAND]"
+ " Shows help for the specified command or lists all available commands."
+ exit
+}
+if (Test-Path "$_ROSBE_BASEDIR\reladdr2line.ps1") {
+ if ("$args" -eq "raddr2line") {
+ " Usage: raddr2line [FILE] [ADDRESS]"
+ " Translates program addresses into file names and line numbers to"
+ " assist developers with finding specific bugs in ReactOS. If"
+ " either of the options is not given you will be prompted for it."
+ ""
+ " FILE - This can be either a fully specified path or just the"
+ " file name [you can use a partial name ie. ntdll*] of"
+ " the executable to be analyzed. When using just a file"
+ " the current directory and all sub-directories are"
+ " searched."
+ " ADDRESS - The address to be translated."
+ ""
+ exit
+ }
+}
+if (Test-Path "$_ROSBE_BASEDIR\scut.ps1") {
+ if ("$args" -eq "scut") {
+ IEX "&'$_ROSBE_BASEDIR\Tools\scut.exe' --help"
+ exit
+ }
+}
+if (Test-Path "$_ROSBE_BASEDIR\sSVN.ps1") {
+ if ("$args" -eq "ssvn") {
+ " Usage: ssvn [OPTIONS]"
+ " Creates, updates or cleans up your ReactOS source tree or shows the"
+ " revision number of the local and online trees."
+ ""
+ " update - Updates to HEAD revision or to a specific one when"
+ " second parameter specifies one."
+ " create - Creates a new ReactOS source tree."
+ " cleanup - Cleans up and fixes errors in the source tree."
+ " status - Show the current local and online revision numbers."
+ exit
+ }
+}
+if (Test-Path "$_ROSBE_BASEDIR\options.ps1") {
+ if ("$args" -eq "options") {
+ " Usage: options"
+ " Starts the RosBE configurator."
+ exit
+ }
+}
+if ("$args" -ne $null) {
+ " Unknown command specified. No help available for $args."
+ exit
+}
Propchange: trunk/tools/RosBE/RosBE-Windows/Powershell/Help.ps1
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/tools/RosBE/RosBE-Windows/Powershell/MinGW.ps1
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Powershell/MinGW.ps1 (added)
+++ trunk/tools/RosBE/RosBE-Windows/Powershell/MinGW.ps1 [iso-8859-1] Fri May 2 18:54:47
2008
@@ -1,0 +1,43 @@
+#
+# PROJECT: RosBE - ReactOS Build Environment for Windows
+# LICENSE: GNU General Public License v2. (see LICENSE.txt)
+# FILE: Root/MinGW.ps1
+# PURPOSE: This script provides/sets up a standard MinGW build environment.
+# COPYRIGHT: Copyright 2007 Daniel Reimer <reimer.daniel(a)freenet.de>
+#
+#
+
+if ($args -ne "") {
+ cls
+ "Unknown parameter specified. Exiting."
+ exit
+}
+
+(Get-Host).UI.RawUI.ForegroundColor = "Green"
+(Get-Host).UI.RawUI.BackgroundColor = "Black"
+cls
+$ENV:PATH = "$ENV:SystemRoot\system32;$ENV:SystemRoot"
+$global:0 = $myInvocation.MyCommand.Definition
+$global:_ROSBE_BASEDIR = [System.IO.Path]::GetDirectoryName($0)
+$global:_ROSBE_MODE = "MinGW"
+$global:_ROSBE_ORIGINALPATH = "$ENV:PATH"
+$global:_ROSBE_MINGWPATH = "$_ROSBE_BASEDIR\4.1.3"
+
+""
+""
+& "$_ROSBE_BASEDIR\rosbe-gcc-env.ps1"
+""
+""
+
+#
+# Get the number of CPUs in the system so we know how many jobs to execute.
+$CPUCOUNT= (gwmi win32_processor).numberofcores + 1
+
+if (Test-Path "$_ROSBE_BASEDIR\chdefgcc.ps1") {
+ set-alias CHDEFGCC "$_ROSBE_BASEDIR\chdefgcc.ps1" -scope Global
+}
+set-alias MAKE "$_ROSBE_BASEDIR\Build.ps1" -scope Global
+set-alias MAKEX "$_ROSBE_BASEDIR\Build.ps1 multi" -scope Global
+if (Test-Path "$_ROSBE_BASEDIR\scut.ps1") {
+ set-alias SCUT "$_ROSBE_BASEDIR\scut.ps1" -scope Global
+}
Propchange: trunk/tools/RosBE/RosBE-Windows/Powershell/MinGW.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] Fri May 2 18:54:47
2008
@@ -38,7 +38,7 @@
# Display the banner and set up the environment for the GCC 4.x.x build
# environment.
#
-function RosBE4 {
+function RosBE {
"*******************************************************************************"
"*
*"
"* ReactOS Build Environment $_ROSBE_VERSION
*"
@@ -58,7 +58,10 @@
# that are not actually present.
#
-function LOADDOSKEYMACROS {
+function LoadAliases {
+ function global:BASEDIR {
+ cd "$_ROSBE_ROSSOURCEDIR"
+ }
if (Test-Path "$_ROSBE_BASEDIR\chdefdir.ps1") {
set-alias CHDEFDIR "$_ROSBE_BASEDIR\chdefdir.ps1" -scope Global
}
@@ -119,7 +122,7 @@
# Check if we are using oldmode or if any unknown parameters were specified.
#
if ($args.count -gt 0) {
- if ($args[0] = "oldmode") {
+ if ($args -eq "oldmode") {
cls
$_ROSBE_MODE = "MinGW"
@@ -129,7 +132,7 @@
exit
}
}
-RosBE4
+RosBE
#
# Load the base directory from srclist.txt and set it as the new source
@@ -150,7 +153,7 @@
#
# Load the doskey macros that serve as our commands.
#
-LOADDOSKEYMACROS
+LoadAliases
#
# Look if the ReactOS source directory is empty. If so, inform the user and
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] Fri May 2 18:54:47 2008
@@ -28,7 +28,7 @@
echo basedir - Switch back to the ReactOS source directory.
if exist "%_ROSBE_BASEDIR%\charch.cmd" (
- echo chdefdir [OPTIONS] - Change the Architecture to build for for the
+ echo charch [OPTIONS] - Change the Architecture to build for for the
echo current RosBE session.
)