SimplePanoramaViewer/generate.ps1

20 lines
1 KiB
PowerShell

$version="1.1"
if (Test-Path dist\"SimplePanoramaViewer-$version-win64.exe")
{
Remove-Item dist\"SimplePanoramaViewer-$version-win64.exe" -Force -Recurse
}
if (Test-Path dist\SimplePanoramaViewer)
{
Remove-Item dist\SimplePanoramaViewer -Force -Recurse
}
pandoc -i LICENSE.md -s -o LICENSE.rtf
pyinstaller SimplePanoramaViewer_folder.spec
Start-Process -FilePath "C:\Program Files (x86)\Inno Setup 6\compil32.exe" -ArgumentList "/cc", "win-setup.iss" -Wait
Remove-Item dist\SimplePanoramaViewer -Force -Recurse
Get-FileHash "dist/SimplePanoramaViewer-$version-win64-setup.exe" -Algorithm SHA512 | Select-Object -ExpandProperty Hash | Out-File "dist/SimplePanoramaViewer-$version-win64-setup.exe.sha512sum"
pyinstaller SimplePanoramaViewer_file.spec
Rename-Item -Path "dist\SimplePanoramaViewer.exe" -NewName "SimplePanoramaViewer-$version-win64.exe"
Get-FileHash "dist/SimplePanoramaViewer-$version-win64.exe" -Algorithm SHA512 | Select-Object -ExpandProperty Hash | Out-File "dist/SimplePanoramaViewer-$version-win64.exe.sha512sum"