Skip to content

Commit

Permalink
Add build script
Browse files Browse the repository at this point in the history
  • Loading branch information
GieltjE committed Apr 13, 2021
1 parent cf81f87 commit 9e560ce
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
$bindir="C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin"

& $bindir\MSBuild.exe /nr:True .\MSM.sln /target:Clean /p:Platform=x64 /p:Configuration=Release
& $bindir\MSBuild.exe /nr:True .\MSM.sln /target:Restore /p:Platform=x64 /p:Configuration=Release
& $bindir\MSBuild.exe /nr:True .\MSM.sln /target:Rebuild /p:Platform=x64 /p:Configuration=Release

& $bindir\MSBuild.exe /nr:True .\MSM.sln /target:Clean /p:Platform=x86 /p:Configuration=Release
& $bindir\MSBuild.exe /nr:True .\MSM.sln /target:Restore /p:Platform=x86 /p:Configuration=Release
& $bindir\MSBuild.exe /nr:True .\MSM.sln /target:Rebuild /p:Platform=x86 /p:Configuration=Release

$version = (get-item -Path 'bin\x64\Release\MSM.exe').VersionInfo.ProductVersion

Remove-Item Release -Recurse -Force
New-Item -Path "." -Name "Release" -ItemType "directory"

$sevenzipdir="C:\Program Files\7-Zip"
& $sevenzipdir\7z.exe a -t7z ".\Release\v$version-x64.7z" ".\bin\x64\Release\*" -mx9 -y
& $sevenzipdir\7z.exe a -t7z ".\Release\v$version-x86.7z" ".\bin\x64\Release\*" -mx9 -y

& $sevenzipdir\7z.exe a -tzip ".\Release\v$version-x64.zip" ".\bin\x86\Release\*" -mx9 -y
& $sevenzipdir\7z.exe a -tzip ".\Release\v$version-x86.zip" ".\bin\x86\Release\*" -mx9 -y

0 comments on commit 9e560ce

Please sign in to comment.