12345678910111213141516171819202122232425262728293031323334353637 |
- @echo off
- echo ###################################################################################
- echo (Frank: 29/12/22) I made some tweaks to streamline the install process:
- echo - The script now explicitly sets the SourceDir and OutputDir of the InnoSetup Scripts
- echo - Directories are set relative to the drive and path of the install.bat file
- echo - Output from PRSDesktopSetup is piped directly into the PRSServer update folder
- echo This removes the need for the intermediate c:\development\syncthing folder,
- echo as well as allowing the script to run off other drives (ie E: instead of C:)
- echo ###################################################################################
- echo.
- set /p version_number="Enter Version Number: "
- echo Updating Version Number...
- set /p _scratch="%version_number%" <nul > "bin/Debug/net6.0-windows/update/version.txt"
- set /p _scratch="%version_number%" <nul > "bin/Debug/net6.0-windows/version.txt"
- >NUL mkdir "bin/Debug/net6.0-windows/update"
- echo Getting Release Notes...
- curl.exe -s "https://prs-software.com.au/updates/prs/Release%%20Notes.txt" > "bin/Debug/net6.0-windows/update/Release Notes.txt"
- echo Compiling Desktop Installer...
- powershell -Command "(gc ../prs.desktop/prsdesktop.iss) -replace '#define MyAppVersion ""[^\""]*""', '#define MyAppVersion """%version_number%"""' | Out-File -encoding ASCII ../prs.desktop/prsdesktop.iss"
- powershell -Command "(gc ../prs.desktop/prsdesktop.iss) -replace 'OutputDir=[^\""]*', 'OutputDir=%~dp0bin\Debug\net6.0-windows\update' | Out-File -encoding ASCII ../prs.desktop/prsdesktop.iss"
- powershell -Command "(gc ../prs.desktop/prsdesktop.iss) -replace 'SourceDir=[^\""]*', 'SourceDir=%~dp0..\prs.desktop\' | Out-File -encoding ASCII ../prs.desktop/prsdesktop.iss"
- "C:\Program Files (x86)\Inno Setup 6\iscc.exe" /Q /O"bin\Debug\net6.0-windows\update" ../prs.desktop/prsdesktop.iss
- echo Compiling Server Installer...
- powershell -Command "(gc PRSServer.iss) -replace '#define MyAppVersion ""[^\""]*""', '#define MyAppVersion """%version_number%"""' | Out-File -encoding ASCII PRSServer.iss"
- powershell -Command "(gc PRSServer.iss) -replace 'OutputDir=[^\""]*', 'OutputDir=%~dp0' | Out-File -encoding ASCII PRSServer.iss"
- powershell -Command "(gc PRSServer.iss) -replace 'SourceDir=[^\""]*', 'SourceDir=%~dp0' | Out-File -encoding ASCII PRSServer.iss"
- "C:\Program Files (x86)\Inno Setup 6\iscc.exe" /Q /O"." /F"PRSSetup" PRSServer.iss
- echo.
- echo All Done! PRS v%version_number% Installer can be found at %~dp0PRSSetup.exe
|