more ci fixes

This commit is contained in:
Patrick von Reth 2015-07-20 19:17:30 +02:00
parent 7f93ee1848
commit b6e4dc49d0
1 changed files with 19 additions and 3 deletions

View File

@ -3,7 +3,7 @@
function batCall([string] $path, [string] $arg) function batCall([string] $path, [string] $arg)
{ {
Write-Host "Calling `"$path`" `"$arg`"" Write-Host "Calling `"$path`" `"$arg`""
cmd /c "`"$path`" `"$arg`" & set" | cmd /c "$path" "$arg" `& set |
foreach { foreach {
if ($_ -match "=") { if ($_ -match "=") {
$v = $_.split("=") $v = $_.split("=")
@ -12,6 +12,21 @@ function batCall([string] $path, [string] $arg)
} }
} }
} }
function fixCmakeDestDir([string] $prefix, [string] $destDir)
{
$prefix=$prefix -replace "/", "\\"
$destDir=$destDir -replace "/", "\\"
if( $prefix.substring(1,1) -eq ":")
{
$prefix=$prefix.substring(3)
}
Write-Host "move $destDir\$prefix to $destDir"
mv "$destDir\$prefix\*" "$destDir"
$rootLeftOver = $prefix.substring(0, $prefix.indexOf("\\"))
Write-Host "rm $destDir\$rootLeftOver"
rm -Recurse "$destDir\$rootLeftOver"
}
$CMAKE_INSTALL_ROOT="$env:APPVEYOR_BUILD_FOLDER/work/install" -replace "\\", "/" $CMAKE_INSTALL_ROOT="$env:APPVEYOR_BUILD_FOLDER/work/install" -replace "\\", "/"
if ( $env:COMPILER -eq "MINGW" ) if ( $env:COMPILER -eq "MINGW" )
@ -53,5 +68,6 @@ if ( !(Test-Path "$env:APPVEYOR_BUILD_FOLDER\work\install" ) )
cd $env:APPVEYOR_BUILD_FOLDER\work\build\snorenotify cd $env:APPVEYOR_BUILD_FOLDER\work\build\snorenotify
cmake -G $CMAKE_GENERATOR $env:APPVEYOR_BUILD_FOLDER -DWITH_SNORE_DAEMON=ON -DWITH_FRONTENDS=ON -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_ROOT" cmake -G $CMAKE_GENERATOR $env:APPVEYOR_BUILD_FOLDER -DCMAKE_BUILD_TYPE=Release -DWITH_SNORE_DAEMON=ON -DWITH_FRONTENDS=ON -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_ROOT"
& $MAKE install DESTDIR=$env:APPVEYOR_BUILD_FOLDER\work\image & $MAKE install DESTDIR="$env:APPVEYOR_BUILD_FOLDER\work\image"
fixCmakeDestDir $CMAKE_INSTALL_ROOT "$env:APPVEYOR_BUILD_FOLDER\work\image"