-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated documentation with some bootstrap usage examples, referenced …
…psake-config.ps1, added 128x128 icon, added sample build.ps1 for shipping in the nuget package
- Loading branch information
Showing
3 changed files
with
146 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
function Get-Batchfile ($file) | ||
{ | ||
$cmd = "`"$file`" & set" | ||
cmd /c $cmd | % { | ||
$p, $v = $_.split('=') | ||
Set-Item -path env:$p -value $v | ||
} | ||
} | ||
|
||
function VsVars32($version = '10.0') | ||
{ | ||
$key = if ([intptr]::size -eq 8) | ||
{ "HKLM:SOFTWARE\Wow6432Node\Microsoft\VisualStudio\$version" } | ||
else | ||
{ "HKLM:SOFTWARE\Microsoft\VisualStudio\$version" } | ||
|
||
$VsKey = Get-ItemProperty $key | ||
$VsInstallPath = [IO.Path]::GetDirectoryName($VsKey.InstallDir) | ||
$VsToolsDir = Join-Path ([IO.Path]::GetDirectoryName($VsInstallPath)) 'Tools' | ||
$BatchFile = Join-Path $VsToolsDir 'vsvars32.bat' | ||
Get-Batchfile $BatchFile | ||
} | ||
|
||
function Get-CurrentDirectory | ||
{ | ||
$thisName = $MyInvocation.MyCommand.Name | ||
[IO.Path]::GetDirectoryName((Get-Content function:$thisName).File) | ||
} | ||
|
||
Set-Location (Get-CurrentDirectory) | ||
|
||
VsVars32 | ||
if (Test-Path 'nuget.exe') | ||
{ | ||
&.\nuget update -Self | ||
} | ||
else | ||
{ | ||
$nugetPath = Join-Path (Get-CurrentDirectory) 'nuget.exe' | ||
(New-Object Net.WebClient).DownloadFile('http://nuget.org/NuGet.exe', $nugetPath) | ||
} | ||
|
||
[Environment]::SetEnvironmentVariable('EnableNuGetPackageRestore','true') | ||
$buildPackageDir = Join-Path (Get-CurrentDirectory) 'packages' | ||
$sourcePackageDir = Join-Path (Get-CurrentDirectory) '..\src\Packages' | ||
|
||
@(@{Id = 'psake'; Version='4.2.0.1'; Dir = $buildPackageDir; NoVersion = $true }, | ||
@{Id = 'Midori'; Version='0.1.0.0'; Dir = $buildPackageDir; NoVersion = $true }, | ||
@{Id = 'DotNetZip'; Version='1.9.1.8'; Dir = $buildPackageDir; NoVersion = $true }) | | ||
% { | ||
$versionSwitch = if ($_.NoVersion) {'-ExcludeVersion'} else { '' } | ||
&.\nuget install "$($_.Id)" -v "$($_.Version)" -o `""$($_.Dir)"`" "$versionSwitch" | ||
} | ||
|
||
Remove-Module psake -erroraction silentlycontinue | ||
Import-Module (Join-Path $buildPackageDir 'psake\tools\psake.psm1') | ||
$host.UI.RawUI.BufferSize = New-Object Management.Automation.Host.Size(512,80) | ||
Invoke-psake default |