diff options
| author | Egor Tensin <egor@tensin.name> | 2026-06-14 19:57:26 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-06-14 19:57:26 +0200 |
| commit | f91361fb116068a46db6eb40c48933a3fd0d067a (patch) | |
| tree | ff2e6513c96f49ec51a69466c41c3016e5859615 | |
| parent | appveyor: remove the target OS parameter from build.ps1 (diff) | |
| download | windows7-drivers-f91361fb116068a46db6eb40c48933a3fd0d067a.tar.gz windows7-drivers-f91361fb116068a46db6eb40c48933a3fd0d067a.zip | |
build.ps1: refactoring
| -rw-r--r-- | .appveyor/build.ps1 | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/.appveyor/build.ps1 b/.appveyor/build.ps1 index 72d62e2..a68caad 100644 --- a/.appveyor/build.ps1 +++ b/.appveyor/build.ps1 @@ -55,42 +55,27 @@ function Get-DriverSolutionPath { function Build-Driver { param( [Parameter(Mandatory=$true)] - [string] $InstallDir, - [Parameter(Mandatory=$true)] - [string] $DriverName, - [Parameter(Mandatory=$true)] - [string] $Platform, - [Parameter(Mandatory=$true)] - [string] $Configuration + [string] $DriverName ) $build_dir = Get-DriverBuildDir -DriverName $DriverName $solution_path = Get-DriverSolutionPath -DriverName $DriverName - $msbuild_params = "/p:Platform=$Platform;Configuration=$Configuration;SignMode=TestSign;OutDir=$InstallDir\lib" + $msbuild_params = @() + $msbuild_params += "/p:Platform=$script:Platform" + $msbuild_params += "/p:Configuration=$script:Configuration" + $msbuild_params += "/p:SignMode=TestSign" + $msbuild_params += "/p:OutDir=$InstallDir\lib" cd $build_dir Invoke-Exe { msbuild.exe $msbuild_params $solution_path } } function Build-ProjectKernelMode { - param( - [Parameter(Mandatory=$true)] - [string] $InstallDir, - [Parameter(Mandatory=$true)] - [string] $Platform, - [Parameter(Mandatory=$true)] - [string] $Configuration - ) - $drivers = 'minimal', 'simple', 'nt_namespace' foreach ($driver in $drivers) { - Build-Driver ` - -InstallDir $InstallDir ` - -DriverName $driver ` - -Platform $Platform ` - -Configuration $Configuration + Build-Driver -DriverName $driver } } @@ -102,10 +87,7 @@ function Build-Project { $script:InstallDir = (Resolve-Path $script:InstallDir).Path try { - Build-ProjectKernelMode ` - -InstallDir $script:InstallDir ` - -Platform $script:Platform ` - -Configuration $script:Configuration + Build-ProjectKernelMode } finally { if (Test-AppVeyor) { cd $appveyor_cwd |
