PRSServer.iss 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. ; Script generated by the Inno Setup Script Wizard.
  2. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
  3. #pragma option -v+
  4. #pragma verboselevel 9
  5. #include "CodeDependencies.iss"
  6. #define public Dependency_Path_NetCoreCheck "dependencies\"
  7. #define MyAppName "PRS Server"
  8. #define MyAppVersion "8.55.3"
  9. #define MyAppPublisher "PRS Digital"
  10. #define MyAppURL "https://www.prs-software.com.au"
  11. #define MyAppExeName "PRSServer.exe"
  12. #define ReleaseType "Release"
  13. [Setup]
  14. ; NOTE: The value of AppId uniquely identifies this application.
  15. ; Do not use the same AppId value in installers for other applications.
  16. ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
  17. AppId={{832E3B50-6076-4978-B758-E570576565CF}
  18. AppName={#MyAppName}
  19. AppVersion={#MyAppVersion}
  20. AppVerName={#MyAppName} {#MyAppVersion}
  21. AppPublisher={#MyAppPublisher}
  22. AppPublisherURL={#MyAppURL}
  23. AppSupportURL={#MyAppURL}
  24. AppUpdatesURL={#MyAppURL}
  25. DefaultDirName={pf}\{#MyAppName}
  26. DisableProgramGroupPage=yes
  27. OutputDir=C:\Development\prs\prs.server\
  28. SourceDir=C:\Development\prs\prs.server\
  29. OutputBaseFilename=PRSServerSetup
  30. Compression=lzma2
  31. LZMANumBlockThreads=8
  32. SolidCompression=yes
  33. SetupLogging=yes
  34. CloseApplications=force
  35. ArchitecturesInstallIn64BitMode=x64compatible
  36. [Languages]
  37. Name: "english"; MessagesFile: "compiler:Default.isl"
  38. [Tasks]
  39. Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}";
  40. [InstallDelete]
  41. Type: files; Name: {userappdata}\PRSServer\version.txt
  42. [Files]
  43. Source: "{#Dependency_Path_NetCoreCheck}netcorecheck.exe"; Flags: dontcopy noencryption
  44. Source: "{#Dependency_Path_NetCoreCheck}netcorecheck_x64.exe"; Flags: dontcopy noencryption
  45. Source: "bin\{#ReleaseType}\net8.0-windows\*.*"; Excludes: "ServerSettings.settings, version.txt"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; AfterInstall: UpdateVersionNumber
  46. Source: "..\PRS.Recovery\bin\{#ReleaseType}\net8.0-windows\*"; DestDir: "{app}\PRSRecovery"; Flags: ignoreversion recursesubdirs createallsubdirs;
  47. [Dirs]
  48. Name: "{userappdata}\PRSServer\";
  49. [Icons]
  50. Name: "{userprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
  51. Name: "{userdesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
  52. [Run]
  53. Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
  54. [Code]
  55. var
  56. versionupdated : Boolean;
  57. function InitializeSetup: Boolean;
  58. begin
  59. Dependency_AddDotNet80Desktop;
  60. Result := True;
  61. end;
  62. procedure UpdateVersionNumber();
  63. var
  64. version : AnsiString;
  65. filename : String;
  66. filename_update : String;
  67. begin
  68. if (versionupdated = False) then
  69. begin
  70. version := '{#MyAppVersion}';
  71. filename := ExpandConstant('{app}\version.txt');
  72. SaveStringToFile(filename,version,false);
  73. filename_update := ExpandConstant('{app}\update\version.txt');
  74. SaveStringToFile(filename_update,version,false);
  75. versionupdated := true;
  76. end;
  77. end;