prsdesktop.iss 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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 Desktop"
  8. #define MyAppVersion "8.52"
  9. #define MyAppPublisher "PRS Digital"
  10. #define MyAppURL "https://www.prs-software.com.au"
  11. #define MyAppExeName "PRSDesktop.exe"
  12. #define MyOldAppExeName "Comal.Desktop.exe"
  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={{89C5E297-7CED-493D-B066-9E95A911470B}
  18. AppName={#MyAppName}
  19. AppVersion={#MyAppVersion}
  20. AppVerName={#MyAppName} {#MyAppVersion}
  21. AppPublisher={#MyAppPublisher}
  22. AppPublisherURL={#MyAppURL}
  23. AppSupportURL={#MyAppURL}
  24. AppUpdatesURL={#MyAppURL}
  25. DefaultDirName={userpf}\{#MyAppName}
  26. DisableProgramGroupPage=yes
  27. OutputDir=C:\Development\prs\prs.server\bin\Debug\net8.0-windows\update
  28. SourceDir=C:\Development\prs\prs.server\..\prs.desktop\
  29. OutputBaseFilename=PRSDesktopSetup
  30. Compression=lzma2
  31. LZMANumBlockThreads=8
  32. SolidCompression=yes
  33. UsePreviousAppDir=no
  34. PrivilegesRequired=lowest
  35. UsePreviousPrivileges=no
  36. ArchitecturesInstallIn64BitMode=x64compatible
  37. [InstallDelete]
  38. Type: files; Name: {app}\Comal*.*
  39. Type: files; Name: {app}\*.dll
  40. Type: files; Name: {userappdata}\PRSDesktop\version.txt
  41. [Tasks]
  42. Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}";
  43. [Files]
  44. Source: "{#Dependency_Path_NetCoreCheck}netcorecheck.exe"; Flags: dontcopy noencryption
  45. Source: "{#Dependency_Path_NetCoreCheck}netcorecheck_x64.exe"; Flags: dontcopy noencryption
  46. Source: "bin\Debug\net8.0-windows\*"; DestDir: "{app}"; Excludes: "version.txt"; Flags: ignoreversion recursesubdirs createallsubdirs; AfterInstall: UpdateVersionNumber
  47. Source: "..\prs.logikal\bin\Debug\*"; DestDir: "{app}\PRSLogikal"; Flags: ignoreversion recursesubdirs createallsubdirs;
  48. Source: "..\PRS.Avalonia\PRS.Avalonia.Desktop\bin\x64\Debug\net8.0-windows10.0.26100.0\*"; DestDir: "{app}\PRSAvalonia"; Flags: ignoreversion recursesubdirs createallsubdirs;
  49. Source: "..\PRS.DigitalKey\Prs.DigitalKey.Desktop\bin\x64\Debug\net9.0-windows10.0.26100.0\*"; DestDir: "{app}\PRSDigitalKey"; Flags: ignoreversion recursesubdirs createallsubdirs;
  50. [Dirs]
  51. Name: "{userappdata}\PRSDesktop"; Flags:
  52. [Icons]
  53. Name: "{userprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
  54. Name: "{userdesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
  55. [Run]
  56. Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
  57. [Setup]
  58. UninstallFilesDir={app}\Installer
  59. [Code]
  60. var
  61. versionupdated : Boolean;
  62. function InitializeSetup: Boolean;
  63. begin
  64. Dependency_AddDotNet80Desktop;
  65. Result := True;
  66. end;
  67. procedure UpdateVersionNumber();
  68. var
  69. version : AnsiString;
  70. filename : String;
  71. begin
  72. if (versionupdated = False) then
  73. begin
  74. version := '{#MyAppVersion}';
  75. filename := ExpandConstant('{app}\version.txt');
  76. SaveStringToFile(filename,version,false);
  77. versionupdated := true;
  78. end;
  79. end;