-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBuildRelease.ps1
41 lines (35 loc) · 1.84 KB
/
BuildRelease.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Script for building and packaging releases of this project.
# Run from "Developer PowerShell for VS 2022"
# stop script on first error
$ErrorActionPreference = "Stop"
### Build solution in x64|Release and ARM64|Release
msbuild /nologo /verbosity:minimal /property:Configuration="Release"`;Platform="x64" IntelliMouse.sln
if ($LastExitCode -ne 0) {
throw "msbuild failure"
}
msbuild /nologo /verbosity:minimal /property:Configuration="Release"`;Platform="ARM64" IntelliMouse.sln
if ($LastExitCode -ne 0) {
throw "msbuild failure"
}
### Package drivers, test-utilities and scripts
New-Item -Name dist -ItemType "directory"
# Compress MouseMirror driver
Compress-Archive -Path x64\Release\MouseMirror -DestinationPath dist\MouseMirror_x64.zip
Compress-Archive -Path ARM64\Release\MouseMirror -DestinationPath dist\MouseMirror_arm64.zip
# Compress TailLight driver
Compress-Archive -Path x64\Release\TailLight -DestinationPath dist\TailLight_x64.zip
Compress-Archive -Path ARM64\Release\TailLight -DestinationPath dist\TailLight_arm64.zip
# Compress VirtualMouse driver
Compress-Archive -Path x64\Release\VirtualMouse -DestinationPath dist\VirtualMouse_x64.zip
Compress-Archive -Path ARM64\Release\VirtualMouse -DestinationPath dist\VirtualMouse_arm64.zip
# Copy flicker utility
Copy-Item -Path x64\Release\flicker.exe -Destination dist\flicker_x64.exe
Copy-Item -Path arm64\Release\flicker.exe -Destination dist\flicker_arm64.exe
# Copy HidUtil utility
Copy-Item -Path x64\Release\HidUtil.exe -Destination dist\HidUtil_x64.exe
Copy-Item -Path arm64\Release\HidUtil.exe -Destination dist\HidUtil_arm64.exe
# Copy MouseMove utility
Copy-Item -Path x64\Release\MouseMove.exe -Destination dist\MouseMove_x64.exe
Copy-Item -Path arm64\Release\MouseMove.exe -Destination dist\MouseMove_arm64.exe
# Copy test scripts
Copy-Item -Path x64\Release\*.ps1 -Destination dist