PRSLicensing.iss 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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 Licensing"
  8. #define MyAppVersion "8.20b"
  9. #define MyAppPublisher "PRS Digital"
  10. #define MyAppURL "https://www.prs-software.com.au"
  11. #define MyAppExeName "PRSLicensing.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={{EC83B7F3-84A4-437C-B3DD-ADF7B30DEE2F}
  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\bin\Debug\net8.0-windows\update
  27. SourceDir=C:\Development\prs\prs.server\..\prs.licensing\
  28. OutputBaseFilename=PRSLicensingSetup
  29. Compression=lzma
  30. SolidCompression=yes
  31. SetupLogging=yes
  32. CloseApplications=force
  33. ArchitecturesInstallIn64BitMode=x64
  34. [Languages]
  35. Name: "english"; MessagesFile: "compiler:Default.isl"
  36. [Tasks]
  37. Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}";
  38. [InstallDelete]
  39. Type: files; Name: {userappdata}\PRSServer\version.txt
  40. [Files]
  41. Source: "{#Dependency_Path_NetCoreCheck}netcorecheck.exe"; Flags: dontcopy noencryption
  42. Source: "{#Dependency_Path_NetCoreCheck}netcorecheck_x64.exe"; Flags: dontcopy noencryption
  43. Source: "bin\Debug\net8.0-windows\*.*"; Excludes: "ServerSettings.settings, version.txt"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; AfterInstall: UpdateVersionNumber
  44. [Dirs]
  45. Name: "{userappdata}\PRSLicensing\";
  46. [Icons]
  47. Name: "{userprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
  48. Name: "{userdesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
  49. [Run]
  50. Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
  51. [Code]
  52. var
  53. versionupdated : Boolean;
  54. function InitializeSetup: Boolean;
  55. begin
  56. Dependency_AddDotNet80Desktop;
  57. Result := True;
  58. end;
  59. procedure UpdateVersionNumber();
  60. var
  61. version : AnsiString;
  62. filename : String;
  63. filename_update : String;
  64. begin
  65. if (versionupdated = False) then
  66. begin
  67. version := '{#MyAppVersion}';
  68. filename := ExpandConstant('{app}\version.txt');
  69. SaveStringToFile(filename,version,false);
  70. filename_update := ExpandConstant('{app}\update\version.txt');
  71. SaveStringToFile(filename_update,version,false);
  72. versionupdated := true;
  73. end;
  74. end;