diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2019-08-22 16:34:11 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2019-08-22 21:59:51 +0300 |
commit | aa2fcc354bf070bcabbcd173e75ec9b2f69d925c (patch) | |
tree | 8262915e04a44e307dea4e224b641106d3ff6cbc | |
parent | README: add AppVeyor badge (diff) | |
download | windows7-drivers-aa2fcc354bf070bcabbcd173e75ec9b2f69d925c.tar.gz windows7-drivers-aa2fcc354bf070bcabbcd173e75ec9b2f69d925c.zip |
AppVeyor: build km/
Diffstat (limited to '')
-rw-r--r-- | .appveyor/build.ps1 | 98 | ||||
-rw-r--r-- | appveyor.yml | 2 |
2 files changed, 98 insertions, 2 deletions
diff --git a/.appveyor/build.ps1 b/.appveyor/build.ps1 index 7c1e7eb..99caa6f 100644 --- a/.appveyor/build.ps1 +++ b/.appveyor/build.ps1 @@ -45,7 +45,7 @@ function Set-AppVeyorDefaults { $script:Configuration = $env:CONFIGURATION } -function Build-Project { +function Build-ProjectUserMode { param( [Parameter(Mandatory=$true)] [string] $ProjectDir, @@ -66,6 +66,102 @@ function Build-Project { Invoke-Exe { cmake.exe --build . --config $Configuration -- /m } } +function Get-DriverConfiguration { + param( + [Parameter(Mandatory=$true)] + [string] $Configuration + ) + + return "Win7 $Configuration" +} + +function Get-DriverBuildDir { + param( + [Parameter(Mandatory=$true)] + [string] $ProjectDir, + [Parameter(Mandatory=$true)] + [string] $DriverSpec + ) + + return "$ProjectDir\km\build\wdk8.1update\$DriverSpec" +} + +function Get-DriverSolutionPath { + param( + [Parameter(Mandatory=$true)] + [string] $ProjectDir, + [Parameter(Mandatory=$true)] + [string] $DriverSpec + ) + + $build_dir = Get-DriverBuildDir -ProjectDir $ProjectDir -DriverSpec $DriverSpec + $driver_name = Split-Path -Path $build_dir -Leaf -Resolve + return "$build_dir\$driver_name.vs12.sln" +} + +function Build-Driver { + param( + [Parameter(Mandatory=$true)] + [string] $ProjectDir, + [Parameter(Mandatory=$true)] + [string] $DriverSpec, + [Parameter(Mandatory=$true)] + [string] $Platform, + [Parameter(Mandatory=$true)] + [string] $Configuration + ) + + $build_dir = Get-DriverBuildDir -ProjectDir $ProjectDir -DriverSpec $DriverSpec + $solution_path = Get-DriverSolutionPath -ProjectDir $ProjectDir -DriverSpec $DriverSpec + + $Configuration = Get-DriverConfiguration -Configuration $Configuration + $msbuild_params = "/p:Configuration=$Configuration;Platform=$Platform" + + cd $build_dir + Invoke-Exe { msbuild.exe $msbuild_params $solution_path } +} + +function Build-ProjectKernelMode { + param( + [Parameter(Mandatory=$true)] + [string] $ProjectDir, + [Parameter(Mandatory=$true)] + [string] $Platform, + [Parameter(Mandatory=$true)] + [string] $Configuration + ) + + Build-Driver -ProjectDir $ProjectDir -Platform $Platform -Configuration $Configuration -DriverSpec 'minimal' + Build-Driver -ProjectDir $ProjectDir -Platform $Platform -Configuration $Configuration -DriverSpec 'simple' + Build-Driver -ProjectDir $ProjectDir -Platform $Platform -Configuration $Configuration -DriverSpec 'special\nt_namespace' +} + +function Build-Project { + param( + [Parameter(Mandatory=$true)] + [string] $ProjectDir, + [Parameter(Mandatory=$true)] + [string] $BuildDir, + [Parameter(Mandatory=$true)] + [string] $Generator, + [Parameter(Mandatory=$true)] + [string] $Platform, + [Parameter(Mandatory=$true)] + [string] $Configuration + ) + + Build-ProjectUserMode ` + -ProjectDir $ProjectDir ` + -BuildDir $BuildDir ` + -Generator $Generator ` + -Platform $Platform ` + -Configuration $Configuration + Build-ProjectKernelMode ` + -ProjectDir $ProjectDir ` + -Platform $Platform ` + -Configuration $Configuration +} + function Build-ProjectAppVeyor { if (Test-AppVeyor) { Set-AppVeyorDefaults diff --git a/appveyor.yml b/appveyor.yml index 2bea0dd..20ee0ef 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,5 @@ version: '{build}' -image: Visual Studio 2015 +image: Visual Studio 2013 branches: only: |