forked from KitchenPC/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuildShell.ps1
62 lines (51 loc) · 1.51 KB
/
BuildShell.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# KitchenPC Dev Shell setup
# To use, add the following programs to your system path:
# msbuild.exe (Provided with the .NET Framework)
# nunit-console.exe (Available at http://nunit.org/)
# Optionally, add the following shortcut to your quick launch or start menu:
# %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -noexit -file "c:\KitchenPC\BuildShell.ps1" "C:\KitchenPC"
# You can substitute C:\KitchenPC with the path to your KitchenPC enlistment.
param([String]$enlistment="C:\KitchenPC\")
Write-Host "Initializing KitchenPC Dev Shell, Please Wait..." -NoNewLine
$host.ui.RawUI.WindowTitle = "KitchenPC Dev Shell"
New-PSDrive -name kpc -PSProvider FileSystem -root $enlistment >$null
Set-Alias vs "kpc:\src\KitchenPC.sln"
function cd..
{
Set-Location ..
}
function cd\
{
Set-Location \
}
function Guid
{
Write-Host ([System.Guid]::NewGuid().ToString())
}
function Test
{
$testpath = Convert-Path('kpc:\src\UnitTests\bin\Debug\')
nunit-console.exe ($testpath + "KitchenPC.UnitTests.dll")
}
function Build
{
if ($args.Count -gt 0)
{
switch ($args[0].ToUpper())
{
"DEBUG" { msbuild .\build.xml /t:Build /p:Configuration=Debug /verbosity:minimal }
"RELEASE" { msbuild .\build.xml /t:Build /p:Configuration=Release /verbosity:minimal }
}
}
else
{
msbuild .\build.xml /t:Build /p:Configuration=Debug /verbosity:minimal
}
}
function Clean
{
msbuild .\build.xml /t:Clean
}
#Set default location
Set-Location kpc:\src\
Write-Host " Done.`n`n"