Fix the build

This commit is contained in:
Martin Kemp
2014-08-26 23:52:49 +01:00
parent 72c045dc2d
commit de8d2d22f6
8 changed files with 23 additions and 94 deletions

View File

@ -37,8 +37,11 @@ Param(
# Path to the vendor configuration source file
[string]$sourcesPath = "..\vendor\sources.json",
# Vendor folder locaton
[string]$saveTo = "..\vendor\"
# Vendor folder location
[string]$saveTo = "..\vendor\",
# Launcher folder location
[string]$launcher = "..\launcher"
)
. "$PSScriptRoot\utils.ps1"
@ -68,4 +71,9 @@ foreach ($s in $sources) {
}
Pop-Location
Write-Verbose "All good and done!"
Push-Location -Path $launcher
msbuild CmderLauncher.vcxproj /p:configuration=Release
Pop-Location
Write-Verbose "All good and done!"

View File

@ -37,6 +37,7 @@ Param(
. "$PSScriptRoot\utils.ps1"
$ErrorActionPreference = "Stop"
Ensure-Executable "7z"
$targets = @{
"cmder.zip" = $null;

View File

@ -1,17 +1,13 @@
function Ensure-Exists ($path) {
if (-not (Test-Path $path)) {
Write-Error "Missing required $path! Ensure it is installed"
exit 1
}
return $true > $null
}
function Ensure-Executable ($command) {
try { Get-Command $command -ErrorAction Stop > $null }
catch {
if( ($command -eq "7z") -and (Ensure-Exists "$env:programfiles\7-zip\7z.exe") ){
If( ($command -eq "7z") -and (Test-Path "$env:programfiles\7-zip\7z.exe") ){
set-alias -Name "7z" -Value "$env:programfiles\7-zip\7z.exe" -Scope script
} else {
}
ElseIf( ($command -eq "7z") -and (Test-Path "$env:programw6432\7-zip\7z.exe") ) {
set-alias -Name "7z" -Value "$env:programw6432\7-zip\7z.exe" -Scope script
}
Else {
Write-Error "Missing $command! Ensure it is installed and on in the PATH"
exit 1
}