@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%" "bin/Debug/net6.0-windows/update/version.txt" set /p _scratch="%version_number%" "bin/Debug/net6.0-windows/version.txt" >NUL mkdir "bin/Debug/net6.0-windows/update" echo Getting Release Notes... curl.exe -s "https://prsdigital.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 Compiling License Installer... powershell -Command "(gc ../prs.licensing/prslicensing.iss) -replace '#define MyAppVersion ""[^\""]*""', '#define MyAppVersion """%version_number%"""' | Out-File -encoding ASCII ../prs.licensing/prslicensing.iss" powershell -Command "(gc ../prs.licensing/prslicensing.iss) -replace 'OutputDir=[^\""]*', 'OutputDir=%~dp0bin\Debug\net6.0-windows\update' | Out-File -encoding ASCII ../prs.licensing/prslicensing.iss" powershell -Command "(gc ../prs.licensing/prslicensing.iss) -replace 'SourceDir=[^\""]*', 'SourceDir=%~dp0..\prs.licensing\' | Out-File -encoding ASCII ../prs.licensing/prslicensing.iss" "C:\Program Files (x86)\Inno Setup 6\iscc.exe" /Q /O"." /F"PRSLicensing" ../prs.licensing/prslicensing.iss echo. echo All Done! PRS v%version_number% Installer can be found at %~dp0PRSSetup.exe