aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-06-14 19:34:57 +0200
committerEgor Tensin <egor@tensin.name>2026-06-14 19:49:25 +0200
commit09109bacd053b512775b51e8be0098c47f004aa7 (patch)
treea2f1e0b215e8cdd4d8587d5a04780f4bd271bc51
parentappveyor: get rid of ProjectDir in build.ps1 (diff)
downloadwindows7-drivers-09109bacd053b512775b51e8be0098c47f004aa7.tar.gz
windows7-drivers-09109bacd053b512775b51e8be0098c47f004aa7.zip
appveyor: remove the target OS parameter from build.ps1
-rw-r--r--.appveyor.yml16
-rw-r--r--.appveyor/build.ps162
2 files changed, 27 insertions, 51 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
index 7c05026..fe7e392 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -12,9 +12,9 @@ environment:
global:
python_exe: C:\Python36-x64\python.exe
matrix:
- - appveyor_driver_target_os: Win7
- - appveyor_driver_target_os: Win8
- - appveyor_driver_target_os: Win8.1
+ - TARGET_OS: Win7
+ - TARGET_OS: Win8
+ - TARGET_OS: Win8.1
platform:
- Win32
@@ -39,11 +39,15 @@ build_script:
- cd um\cmake
- '"%python_exe%" -m project.ci.cmake --install'
- cd ..\..
- - ps: .\.appveyor\build.ps1 -InstallDir ..\build\install
+ - ps: |
+ .\.appveyor\build.ps1 `
+ -InstallDir ..\build\install `
+ -Configuration "$Env:TARGET_OS $Env:CONFIGURATION" `
+ -Platform $Env:PLATFORM
after_build:
- - 7z.exe a "%APPVEYOR_PROJECT_NAME%-%PLATFORM%-%CONFIGURATION%-%appveyor_driver_target_os%.zip" "..\build\install\*"
- - appveyor.exe PushArtifact "%APPVEYOR_PROJECT_NAME%-%PLATFORM%-%CONFIGURATION%-%appveyor_driver_target_os%.zip"
+ - 7z.exe a "%APPVEYOR_PROJECT_NAME%-%PLATFORM%-%CONFIGURATION%-%TARGET_OS%.zip" "..\build\install\*"
+ - appveyor.exe PushArtifact "%APPVEYOR_PROJECT_NAME%-%PLATFORM%-%CONFIGURATION%-%TARGET_OS%.zip"
for:
# Build Release on master only to speed things up:
diff --git a/.appveyor/build.ps1 b/.appveyor/build.ps1
index 0a2ef5b..72d62e2 100644
--- a/.appveyor/build.ps1
+++ b/.appveyor/build.ps1
@@ -1,7 +1,9 @@
param(
[Parameter(Mandatory=$true)]
[string] $InstallDir = $null,
+ [Parameter(Mandatory=$true)]
[string] $Platform = $null,
+ [Parameter(Mandatory=$true)]
[string] $Configuration = $null
)
@@ -31,45 +33,23 @@ function Test-AppVeyor {
return Test-Path env:APPVEYOR
}
-function Set-AppVeyorDefaults {
- $script:Platform = $env:PLATFORM
- $script:Configuration = $env:CONFIGURATION
- $script:DriverTargetOS = $env:appveyor_driver_target_os
-}
-
-function Get-DriverConfiguration {
- param(
- [Parameter(Mandatory=$true)]
- [string] $Configuration,
- [Parameter(Mandatory=$true)]
- [string] $DriverTargetOS
- )
-
- if (Test-AppVeyor) {
- return "$DriverTargetOS $Configuration"
- } else {
- return $Configuration
- }
-}
-
function Get-DriverBuildDir {
param(
[Parameter(Mandatory=$true)]
- [string] $DriverSpec
+ [string] $DriverName
)
- return "$script:PSScriptRoot\..\km\build\wdk8.1update\$DriverSpec"
+ return "$script:PSScriptRoot\..\km\build\wdk8.1update\$DriverName"
}
function Get-DriverSolutionPath {
param(
[Parameter(Mandatory=$true)]
- [string] $DriverSpec
+ [string] $DriverName
)
- $build_dir = Get-DriverBuildDir -DriverSpec $DriverSpec
- $driver_name = Split-Path -Path $build_dir -Leaf -Resolve
- return "$build_dir\$driver_name.sln"
+ $build_dir = Get-DriverBuildDir -DriverName $DriverName
+ return "$build_dir\$DriverName.sln"
}
function Build-Driver {
@@ -77,19 +57,16 @@ function Build-Driver {
[Parameter(Mandatory=$true)]
[string] $InstallDir,
[Parameter(Mandatory=$true)]
- [string] $DriverSpec,
+ [string] $DriverName,
[Parameter(Mandatory=$true)]
[string] $Platform,
[Parameter(Mandatory=$true)]
- [string] $Configuration,
- [Parameter(Mandatory=$true)]
- [string] $DriverTargetOS
+ [string] $Configuration
)
- $build_dir = Get-DriverBuildDir -DriverSpec $DriverSpec
- $solution_path = Get-DriverSolutionPath -DriverSpec $DriverSpec
+ $build_dir = Get-DriverBuildDir -DriverName $DriverName
+ $solution_path = Get-DriverSolutionPath -DriverName $DriverName
- $Configuration = Get-DriverConfiguration -Configuration $Configuration -DriverTargetOS $DriverTargetOS
$msbuild_params = "/p:Platform=$Platform;Configuration=$Configuration;SignMode=TestSign;OutDir=$InstallDir\lib"
cd $build_dir
@@ -103,9 +80,7 @@ function Build-ProjectKernelMode {
[Parameter(Mandatory=$true)]
[string] $Platform,
[Parameter(Mandatory=$true)]
- [string] $Configuration,
- [Parameter(Mandatory=$true)]
- [string] $DriverTargetOS
+ [string] $Configuration
)
$drivers = 'minimal', 'simple', 'nt_namespace'
@@ -113,16 +88,14 @@ function Build-ProjectKernelMode {
foreach ($driver in $drivers) {
Build-Driver `
-InstallDir $InstallDir `
- -DriverSpec $driver `
+ -DriverName $driver `
-Platform $Platform `
- -Configuration $Configuration `
- -DriverTargetOS $DriverTargetOS
+ -Configuration $Configuration
}
}
-function Build-ProjectAppVeyor {
+function Build-Project {
if (Test-AppVeyor) {
- Set-AppVeyorDefaults
$appveyor_cwd = pwd
}
@@ -132,8 +105,7 @@ function Build-ProjectAppVeyor {
Build-ProjectKernelMode `
-InstallDir $script:InstallDir `
-Platform $script:Platform `
- -Configuration $script:Configuration `
- -DriverTargetOS $script:DriverTargetOS
+ -Configuration $script:Configuration
} finally {
if (Test-AppVeyor) {
cd $appveyor_cwd
@@ -142,4 +114,4 @@ function Build-ProjectAppVeyor {
}
}
-Build-ProjectAppVeyor
+Build-Project