prsdesktop.iss 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. #define MyAppName "PRS Desktop"
  6. #define MyAppVersion "6.39f"
  7. #define MyAppPublisher "PRS Digital"
  8. #define MyAppURL "https://www.prs-software.com.au"
  9. #define MyAppExeName "PRSDesktop.exe"
  10. #define MyOldAppExeName "Comal.Desktop.exe"
  11. [Setup]
  12. ; NOTE: The value of AppId uniquely identifies this application.
  13. ; Do not use the same AppId value in installers for other applications.
  14. ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
  15. AppId={{89C5E297-7CED-493D-B066-9E95A911470B}
  16. AppName={#MyAppName}
  17. AppVersion={#MyAppVersion}
  18. AppVerName={#MyAppName} {#MyAppVersion}
  19. AppPublisher={#MyAppPublisher}
  20. AppPublisherURL={#MyAppURL}
  21. AppSupportURL={#MyAppURL}
  22. AppUpdatesURL={#MyAppURL}
  23. DefaultDirName={userpf}\{#MyAppName}
  24. DisableProgramGroupPage=yes
  25. OutputDir=E:\Development\prs\prs.server\bin\Debug\net6.0-windows\update
  26. SourceDir=E:\Development\prs\prs.server\..\prs.desktop\
  27. OutputBaseFilename=PRSDesktopSetup
  28. Compression=lzma
  29. SolidCompression=yes
  30. UsePreviousAppDir=no
  31. PrivilegesRequired=lowest
  32. UsePreviousPrivileges=no
  33. [InstallDelete]
  34. Type: files; Name: {app}\Comal*.*
  35. Type: files; Name: {app}\*.dll
  36. Type: files; Name: {userappdata}\PRSDesktop\version.txt
  37. [Tasks]
  38. Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}";
  39. [Files]
  40. Source: "bin\Debug\net6.0-windows\*"; DestDir: "{app}"; Excludes: "version.txt"; Flags: ignoreversion recursesubdirs createallsubdirs; AfterInstall: UpdateVersionNumber
  41. [Dirs]
  42. Name: "{userappdata}\PRSDesktop"; Flags:
  43. [Icons]
  44. Name: "{userprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
  45. Name: "{userdesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
  46. [Run]
  47. Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
  48. [Setup]
  49. UninstallFilesDir={app}\Installer
  50. [Code]
  51. var
  52. versionupdated : Boolean;
  53. procedure UpdateVersionNumber();
  54. var
  55. version : AnsiString;
  56. filename : String;
  57. begin
  58. if (versionupdated = False) then
  59. begin
  60. version := '{#MyAppVersion}';
  61. filename := ExpandConstant('{app}\version.txt');
  62. SaveStringToFile(filename,version,false);
  63. versionupdated := true;
  64. end;
  65. end;