From 6a59fa9096946196eb6c423c662f8837b1504069 Mon Sep 17 00:00:00 2001 From: Geert Bevin Date: Tue, 9 Apr 2024 20:10:58 -0400 Subject: [PATCH] Added windows build script --- Scripts/build-windows.ps1 | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Scripts/build-windows.ps1 diff --git a/Scripts/build-windows.ps1 b/Scripts/build-windows.ps1 new file mode 100644 index 0000000..7d4b2d3 --- /dev/null +++ b/Scripts/build-windows.ps1 @@ -0,0 +1,28 @@ +param ( + [Parameter(Mandatory=$true)][string]$version + ) + +$curDir = Get-Location + +Write-Output "Setting up development environment with Visuals Studio 2022" +Import-Module "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\Microsoft.VisualStudio.DevShell.dll" +Enter-VsDevShell -VsInstallPath "C:\Program Files\Microsoft Visual Studio\2022\Community\" + +$Env:RELEASE_VERSION = "$version" +$Env:PATH_TO_JUCE = "$curDir\JUCE" + +Write-Output "Changing location to $curDir" +Set-Location $curDir + +$signId = "Open Source Developer, Geert Bevin" +$buildLocation = "Builds\VisualStudio2017\x64" + +Write-Output "Deleting previous build from $buildLocation" +Remove-Item -LiteralPath $buildLocation -Force -Recurse + +Write-Output "Building project" +MSBuild.exe .\Builds\VisualStudio2017\sendmidi.sln /p:Configuration=Release /p:PreferredToolArchitecture=x64 /p:Platform=x64 /clp:ErrorsOnly + +Write-Output "Codesigning all artifacts" + +& signtool sign /n "$signId" /t http://time.certum.pl/ /fd sha1 /v "$buildLocation\Release\ConsoleApp\sendmidi.exe"