From b6e4dc49d0fc473e6488967208e774e87f8dc4bf Mon Sep 17 00:00:00 2001 From: Patrick von Reth Date: Mon, 20 Jul 2015 19:17:30 +0200 Subject: [PATCH] more ci fixes --- ci/appveyor.ps1 | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/ci/appveyor.ps1 b/ci/appveyor.ps1 index 1036396..002a4a4 100644 --- a/ci/appveyor.ps1 +++ b/ci/appveyor.ps1 @@ -3,7 +3,7 @@ function batCall([string] $path, [string] $arg) { Write-Host "Calling `"$path`" `"$arg`"" - cmd /c "`"$path`" `"$arg`" & set" | + cmd /c "$path" "$arg" `& set | foreach { if ($_ -match "=") { $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 "\\", "/" 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 -cmake -G $CMAKE_GENERATOR $env:APPVEYOR_BUILD_FOLDER -DWITH_SNORE_DAEMON=ON -DWITH_FRONTENDS=ON -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_ROOT" -& $MAKE install DESTDIR=$env:APPVEYOR_BUILD_FOLDER\work\image \ No newline at end of file +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" +fixCmakeDestDir $CMAKE_INSTALL_ROOT "$env:APPVEYOR_BUILD_FOLDER\work\image" \ No newline at end of file