2008-11-06 22:09:47 +00:00
|
|
|
#
|
|
|
|
# PROJECT: RosBE - ReactOS Build Environment for Windows
|
|
|
|
# LICENSE: GNU General Public License v2. (see LICENSE.txt)
|
2009-02-01 20:25:53 +00:00
|
|
|
# FILE: Root/options.ps1
|
2008-11-06 22:09:47 +00:00
|
|
|
# PURPOSE: Starts options.exe and restarts RosBE afterwards.
|
2018-01-28 19:08:38 +00:00
|
|
|
# COPYRIGHT: Copyright 2018 Daniel Reimer <reimer.daniel@freenet.de>
|
2008-11-06 22:09:47 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
$host.ui.RawUI.WindowTitle = "Options"
|
|
|
|
|
2009-12-15 09:25:30 +00:00
|
|
|
if ("$ENV:ROS_ARCH" -ne "i386") {
|
|
|
|
$param = "$ENV:ROS_ARCH"
|
|
|
|
$cfgfile ="$ENV:APPDATA\RosBE\rosbe-options-$ENV:ROS_ARCH.ps1"
|
2009-05-10 12:58:02 +00:00
|
|
|
} else {
|
2009-12-07 13:16:46 +00:00
|
|
|
$param = $null
|
2010-08-23 21:22:55 +00:00
|
|
|
$cfgfile="$ENV:APPDATA\RosBE\rosbe-options-$_ROSBE_VERSION.ps1"
|
2009-05-10 12:58:02 +00:00
|
|
|
}
|
2009-04-30 07:32:09 +00:00
|
|
|
|
2008-11-06 22:09:47 +00:00
|
|
|
# Run options.exe
|
2009-04-30 07:32:09 +00:00
|
|
|
|
2011-09-18 11:20:56 +00:00
|
|
|
if (Test-Path "$_ROSBE_BASEDIR\bin\options.exe") {
|
2009-01-29 18:12:18 +00:00
|
|
|
Push-Location "$_ROSBE_BASEDIR"
|
2009-12-18 08:36:53 +00:00
|
|
|
&options.exe $param | out-null
|
2009-01-29 18:12:18 +00:00
|
|
|
Pop-Location
|
2009-04-30 07:32:09 +00:00
|
|
|
if (Test-Path "$cfgfile") {
|
|
|
|
& "$cfgfile"
|
2008-11-06 22:09:47 +00:00
|
|
|
}
|
|
|
|
} else {
|
2010-05-29 11:16:38 +00:00
|
|
|
throw {"ERROR: options executable was not found."}
|
2008-11-06 22:09:47 +00:00
|
|
|
}
|
|
|
|
|
2009-05-11 00:40:11 +00:00
|
|
|
$host.ui.RawUI.WindowTitle = "ReactOS Build Environment $_ROSBE_VERSION"
|