prsdesktop.iss 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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.43e"
  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=lzma
  31. SolidCompression=yes
  32. UsePreviousAppDir=no
  33. PrivilegesRequired=lowest
  34. UsePreviousPrivileges=no
  35. ArchitecturesInstallIn64BitMode=x64compatible
  36. [InstallDelete]
  37. Type: files; Name: {app}\Comal*.*
  38. Type: files; Name: {app}\*.dll
  39. Type: files; Name: {userappdata}\PRSDesktop\version.txt
  40. [Tasks]
  41. Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}";
  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\Debug\net8.0-windows\*"; DestDir: "{app}"; Excludes: "version.txt"; Flags: ignoreversion recursesubdirs createallsubdirs; AfterInstall: UpdateVersionNumber
  46. Source: "..\prs.logikal\bin\Debug\*"; DestDir: "{app}\PRSLogikal"; Flags: ignoreversion recursesubdirs createallsubdirs;
  47. Source: "..\PRS.Avalonia\PRS.Avalonia.Desktop\bin\x64\Debug\net8.0-windows10.0.19041.0\*"; DestDir: "{app}\PRSAvalonia"; Flags: ignoreversion recursesubdirs createallsubdirs;
  48. Source: "..\PRS.DigitalKey\Prs.DigitalKey.Desktop\bin\x64\Debug\net8.0-windows10.0.19041.0\*"; DestDir: "{app}\PRSDigitalKey"; Flags: ignoreversion recursesubdirs createallsubdirs;
  49. [Dirs]
  50. Name: "{userappdata}\PRSDesktop"; Flags:
  51. [Icons]
  52. Name: "{userprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
  53. Name: "{userdesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
  54. [Run]
  55. Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
  56. [Setup]
  57. UninstallFilesDir={app}\Installer
  58. [Code]
  59. var
  60. versionupdated : Boolean;
  61. function InitializeSetup: Boolean;
  62. begin
  63. Dependency_AddDotNet80Desktop;
  64. Result := True;
  65. end;
  66. procedure UpdateVersionNumber();
  67. var
  68. version : AnsiString;
  69. filename : String;
  70. begin
  71. if (versionupdated = False) then
  72. begin
  73. version := '{#MyAppVersion}';
  74. filename := ExpandConstant('{app}\version.txt');
  75. SaveStringToFile(filename,version,false);
  76. versionupdated := true;
  77. end;
  78. end;