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