mirror of
https://github.com/reactos/RosBE.git
synced 2024-11-23 11:29:44 +00:00
Further work on PS files.
Last problems left: - raddr2line fails - ssvn status fails svn path=/trunk/tools/RosBE/; revision=882
This commit is contained in:
parent
868cac697f
commit
632d748d56
@ -24,7 +24,7 @@ if ($args.count -eq 0) {
|
||||
# If Parameters were set, parse them, if not, ask the user to add them.
|
||||
#
|
||||
$_1 = Read-Host "Please enter a Architecture you want to build ReactOS for: "
|
||||
if ($_1 -eq $null) {
|
||||
if ($_1.length -eq 0) {
|
||||
"ERROR: You must enter a Architecture."
|
||||
}
|
||||
} else {
|
||||
@ -46,7 +46,7 @@ elseif ($_1 -eq "amd64") {
|
||||
$_ROSBE_ARCH = 3
|
||||
SYSPARAM
|
||||
}
|
||||
elseif ($_1 -eq $null) {
|
||||
else {
|
||||
"Unknown parameter specified. Try 'help [COMMAND]'."
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ if ($args.count -eq 0) {
|
||||
# If Parameters were set, parse them, if not, ask the user to add them.
|
||||
#
|
||||
$_1 = Read-Host "Please enter a ReactOS source directory, or 'previous': "
|
||||
if ($_1 -eq $null) {
|
||||
if ($_1.length -eq 0) {
|
||||
"ERROR: You must enter a ReactOS source directory, or 'previous'."
|
||||
}
|
||||
} else {
|
||||
|
@ -11,46 +11,47 @@ if ($_ROSBE_MODE -eq "RosBE") {
|
||||
$host.ui.RawUI.WindowTitle = "Change the current MinGW/GCC Host/Target directory..."
|
||||
}
|
||||
|
||||
function EOA {
|
||||
IEX "&'$_ROSBE_BASEDIR\rosbe-gcc-env.cmd' chdefgcc"
|
||||
function settitle {
|
||||
if ($_ROSBE_VERSION -ne $null) {
|
||||
$host.ui.RawUI.WindowTitle = "ReactOS Build Environment $_ROSBE_VERSION"
|
||||
}
|
||||
exit
|
||||
}
|
||||
|
||||
function INTERACTIVE {
|
||||
$_1 = Read-Host "Please enter a MinGW/GCC directory (don't use quotes): "
|
||||
if ($_1 -eq $null) {
|
||||
"ERROR: You must enter a MinGW/GCC directory."
|
||||
}
|
||||
$_2 = Read-Host "Please specify, if this will be the Target or Host GCC: "
|
||||
if ($_2 -eq $null) {
|
||||
"ERROR: You must enter ""target"" or ""host""."
|
||||
}
|
||||
}
|
||||
if ($_ROSBE_VERSION -ne $null) {
|
||||
$host.ui.RawUI.WindowTitle = "ReactOS Build Environment $_ROSBE_VERSION"
|
||||
function EOA {
|
||||
IEX "&'$_ROSBE_BASEDIR\rosbe-gcc-env.cmd' chdefgcc"
|
||||
settitle
|
||||
}
|
||||
|
||||
#
|
||||
# Parse the command line arguments.
|
||||
#
|
||||
$_1 = $args[0]
|
||||
"$_1"
|
||||
$_1 = IEX "& '$_ROSBE_BASEDIR\Tools\rquote.exe' '$_1'"
|
||||
$_2 = $args[1]
|
||||
if ($_1 -eq $null) {
|
||||
INTERACTIVE
|
||||
$_1 = Read-Host "Please enter a MinGW/GCC directory (don't use quotes): "
|
||||
if ($_1.length -eq 0) {
|
||||
"ERROR: You must enter a MinGW/GCC directory."
|
||||
settitle
|
||||
}
|
||||
}
|
||||
if ($_2 -eq $null) {
|
||||
INTERACTIVE
|
||||
$_2 = Read-Host "Please specify, if this will be the Target or Host GCC: "
|
||||
if ($_2.length -eq 0) {
|
||||
"ERROR: You must enter ""target"" or ""host""."
|
||||
settitle
|
||||
}
|
||||
}
|
||||
|
||||
if (Test-Path "$_ROSBE_BASEDIR\$_1\.") {
|
||||
$_1 = "$_ROSBE_BASEDIR\$_1"
|
||||
} elseif (!(Test-Path "$_1\.")) {
|
||||
"ERROR: The path specified doesn't seem to exist."
|
||||
settitle
|
||||
}
|
||||
|
||||
if (!(Test-Path "$_1\bin\*gcc.exe")) {
|
||||
"ERROR: No MinGW/GCC found in the specified path."
|
||||
settitle
|
||||
}
|
||||
|
||||
if ($_2 -eq "target") {
|
||||
@ -64,6 +65,7 @@ if ($_2 -eq "host") {
|
||||
EOA
|
||||
} else {
|
||||
"ERROR: You specified wrong parameters."
|
||||
settitle
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -13,9 +13,7 @@ $host.ui.RawUI.WindowTitle = "Options"
|
||||
# Run options.exe
|
||||
#
|
||||
if (Test-Path "$_ROSBE_BASEDIR\Tools\options.exe") {
|
||||
pushd "$_ROSBE_BASEDIR"
|
||||
& "$_ROSBE_BASEDIR\Tools\options.exe"
|
||||
popd
|
||||
& "$_ROSBE_BASEDIR\Tools\options.exe" | out-null
|
||||
if (Test-Path "$ENV:APPDATA\RosBE\rosbe-options.cmd") {
|
||||
& "$ENV:APPDATA\RosBE\rosbe-options.cmd"
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ function UP {
|
||||
"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") {
|
||||
IEX "'$_ROSBE_BASEDIR\ssvn' update"
|
||||
IEX "&'$_ROSBE_BASEDIR\ssvn' update"
|
||||
}
|
||||
}
|
||||
if ($OFFSVN -eq $ONSVN) {
|
||||
@ -38,16 +38,17 @@ elseif ($args[0] -eq "update") {
|
||||
"This might take a while, so please be patient."
|
||||
""
|
||||
if ($args[1] -ne $null) {
|
||||
IEX "'$_ROSBE_BASEDIR\Tools\svn.exe' update -r $args[1]"
|
||||
$temparg = $args[1]
|
||||
IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' update -r $temparg"
|
||||
} else {
|
||||
IEX "'$_ROSBE_BASEDIR\Tools\svn.exe' update"
|
||||
IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' update"
|
||||
}
|
||||
}
|
||||
elseif ($args[0] -eq "cleanup") {
|
||||
$host.ui.RawUI.WindowTitle = "SVN Cleaning..."
|
||||
"This might take a while, so please be patient."
|
||||
""
|
||||
IEX "'$_ROSBE_BASEDIR\Tools\svn.exe' cleanup"
|
||||
IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' cleanup"
|
||||
}
|
||||
|
||||
#
|
||||
@ -58,9 +59,9 @@ elseif ($args[0] -eq "create") {
|
||||
if (Test-Path ".svn\.") {
|
||||
"ERROR: Folder already contains a repository."
|
||||
} else {
|
||||
dir /b 2>nul | findstr "." >nul
|
||||
if (errorlevel -eq 1) {
|
||||
IEX "'$_ROSBE_BASEDIR\Tools\svn.exe' checkout svn://svn.reactos.org/reactos/trunk/reactos ."
|
||||
$dir = dir
|
||||
if ($dir -eq $null) {
|
||||
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"
|
||||
}
|
||||
@ -75,8 +76,8 @@ elseif ($args[0] -eq "status") {
|
||||
$host.ui.RawUI.WindowTitle = "SVN Status"
|
||||
"This might take a while, so please be patient."
|
||||
""
|
||||
$OFFSVN = IEX "'$_ROSBE_BASEDIR\Tools\svn.exe' info" | find "Revision:"
|
||||
$ONSVN = IEX "'$_ROSBE_BASEDIR\Tools\svn.exe' info svn://svn.reactos.org/reactos/trunk/reactos" | find "Revision:"
|
||||
$OFFSVN = IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' info" | find "Revision:"
|
||||
$ONSVN = IEX "&'$_ROSBE_BASEDIR\Tools\svn.exe' info svn://svn.reactos.org/reactos/trunk/reactos" | find "Revision:"
|
||||
UP
|
||||
}
|
||||
|
||||
@ -94,3 +95,5 @@ if ($_ROSBE_VERSION -ne $null) {
|
||||
$OFFSVN = $null
|
||||
$ONSVN = $null
|
||||
$UP = $null
|
||||
$dir = dir
|
||||
$temparg = $null
|
||||
|
@ -8,9 +8,12 @@
|
||||
# Peter Ward <dralnix@gmail.com>
|
||||
#
|
||||
|
||||
function paramcall {
|
||||
$OUT = IEX "'$_ROSBE_BASEDIR\Tools\scut.exe' $args"
|
||||
function paramcall($arg) {
|
||||
IEX "&'$_ROSBE_BASEDIR\Tools\scut.exe' $arg"
|
||||
}
|
||||
|
||||
function parse($arg) {
|
||||
$OUT = paramcall($arg)
|
||||
# It's a shortcut name, so change the directory
|
||||
|
||||
if ($OUT -ne "Default") {
|
||||
@ -22,14 +25,15 @@ function paramcall {
|
||||
}
|
||||
|
||||
# Check if the parameter is an scut parameter, which can just be forwarded to the EXE file
|
||||
if ($args[0] -eq "add") {paramcall}
|
||||
if ($args[0] -eq "rem") {paramcall}
|
||||
if ($args[0] -eq "edit") {paramcall}
|
||||
if ($args[0] -eq "def") {paramcall}
|
||||
if ($args[0] -eq "list") {paramcall}
|
||||
if ($args[0] -eq "/?") {paramcall}
|
||||
if ($args[0] -eq "-h") {paramcall}
|
||||
if ($args[0] -eq "--help") {paramcall}
|
||||
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)}
|
||||
|
||||
if ($_ROSBE_VERSION -ne $null) {
|
||||
$host.ui.RawUI.WindowTitle = "ReactOS Build Environment $_ROSBE_VERSION"
|
||||
|
Loading…
Reference in New Issue
Block a user