aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.appveyor
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2019-08-22 16:34:11 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2019-08-22 21:59:51 +0300
commitaa2fcc354bf070bcabbcd173e75ec9b2f69d925c (patch)
tree8262915e04a44e307dea4e224b641106d3ff6cbc /.appveyor
parentREADME: add AppVeyor badge (diff)
downloadwindows7-drivers-aa2fcc354bf070bcabbcd173e75ec9b2f69d925c.tar.gz
windows7-drivers-aa2fcc354bf070bcabbcd173e75ec9b2f69d925c.zip
AppVeyor: build km/
Diffstat (limited to '')
-rw-r--r--.appveyor/build.ps198
1 files changed, 97 insertions, 1 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