PRSServer.iss 2.8 KB

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