AgentSetupScript.iss 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. #define SetupAppName "Agent assistant"
  2. #define SetupAppPublisher "VINNO Technology (Suzhou) Co., Ltd ."
  3. #define SetupAppURL "http://www.ichaorenhui.com"
  4. #define SetupAppExeName "vCloud.Agent.exe"
  5. #define CopyRight "Copyright ©2015 VINNO Corporation. All rights reserved."
  6. ;#define SetupAppVersion "1.0.0.0"
  7. ;#define ProjectFolder "E:\NewCode\vCloudRefactor"
  8. [Setup]
  9. ; NOTE: The value of AppId uniquely identifies this application.
  10. ; Do not use the same AppId value in installers for other applications.
  11. ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
  12. AppId={{45B8661D-B5CF-70B5-B8EA-26676A22AA79}
  13. AppName={cm:MyAppName}
  14. AppVersion={#SetupAppVersion}
  15. AppVerName={cm:MyAppName} {#SetupAppVersion}
  16. AppPublisher={#SetupAppPublisher}
  17. AppPublisherURL={#SetupAppURL}
  18. AppSupportURL={#SetupAppURL}
  19. AppUpdatesURL={#SetupAppURL}
  20. DefaultDirName={pf}\{cm:MyAppName}
  21. DefaultGroupName={cm:MyAppName}
  22. OutputDir={#ProjectFolder}\Distribution
  23. OutputBaseFilename=AgentSetup_{#SetupAppVersion}
  24. SetupIconFile={#ProjectFolder}\Build\Agent.ico
  25. WizardSmallImageFile={#ProjectFolder}\Build\Agent_Small.bmp
  26. ;WizardImageFile={#ProjectFolder}\Build\WizardSetup.bmp
  27. ArchitecturesInstallIn64BitMode=x64
  28. Compression=lzma
  29. SolidCompression=yes
  30. PrivilegesRequired=admin
  31. UninstallDisplayIcon={app}\{#SetupAppExeName}
  32. UninstallDisplayName={cm:MyAppName}
  33. VersionInfoVersion={#SetupAppVersion}
  34. VersionInfoCompany={#SetupAppPublisher}
  35. VersionInfoCopyright={#CopyRight}
  36. VersionInfoDescription={#SetupAppName}
  37. VersionInfoProductName={#SetupAppName}
  38. DisableWelcomePage=no
  39. [Languages]
  40. Name: "english"; MessagesFile: "compiler:Default.isl"
  41. Name: "chinese"; MessagesFile: "{#ProjectFolder}\Build\Chinese.isl"
  42. [CustomMessages]
  43. english.MyAppName=Flyinsono Agent assistant
  44. chinese.MyAppName=杏聆荟代理助手
  45. [Tasks]
  46. Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
  47. [Files]
  48. Source: "{#ProjectFolder}\Distribution\Agent\Accord.dll"; DestDir: "{app}"; Flags: ignoreversion
  49. Source: "{#ProjectFolder}\Distribution\Agent\Accord.Video.dll"; DestDir: "{app}"; Flags: ignoreversion
  50. Source: "{#ProjectFolder}\Distribution\Agent\Accord.Video.DirectShow.dll"; DestDir: "{app}"; Flags: ignoreversion
  51. Source: "{#ProjectFolder}\Distribution\Agent\Dicom.Core.dll"; DestDir: "{app}"; Flags: ignoreversion
  52. Source: "{#ProjectFolder}\Distribution\Agent\Dicom.Native.dll"; DestDir: "{app}"; Flags: ignoreversion
  53. Source: "{#ProjectFolder}\Distribution\Agent\Dicom.Native64.dll"; DestDir: "{app}"; Flags: ignoreversion
  54. Source: "{#ProjectFolder}\Distribution\Agent\System.Windows.Interactivity.dll"; DestDir: "{app}"; Flags: ignoreversion
  55. Source: "{#ProjectFolder}\Distribution\Agent\Vinno.vCloud.Terminal.dll"; DestDir: "{app}"; Flags: ignoreversion
  56. Source: "{#ProjectFolder}\Distribution\Agent\Vinno.vCloud.Base.dll"; DestDir: "{app}"; Flags: ignoreversion
  57. Source: "{#ProjectFolder}\Distribution\Agent\SQLite.Net.dll"; DestDir: "{app}"; Flags: ignoreversion
  58. Source: "{#ProjectFolder}\Distribution\Agent\SQLite.Net.Platform.Win32.dll"; DestDir: "{app}"; Flags: ignoreversion
  59. Source: "{#ProjectFolder}\Distribution\Agent\x86\SQLite.Interop.dll"; DestDir: "{app}\x86"; Flags: ignoreversion
  60. Source: "{#ProjectFolder}\Distribution\Agent\x64\SQLite.Interop.dll"; DestDir: "{app}\x64"; Flags: ignoreversion
  61. Source: "{#ProjectFolder}\Distribution\Agent\Newtonsoft.Json.dll"; DestDir: "{app}"; Flags: ignoreversion
  62. Source: "{#ProjectFolder}\Distribution\Agent\vCloud.Agent.exe"; DestDir: "{app}"; Flags: ignoreversion
  63. Source: "{#ProjectFolder}\Distribution\Agent\Newtonsoft.Json.dll"; DestDir: "{app}"; Flags: ignoreversion
  64. Source: "{#ProjectFolder}\Distribution\Agent\Settings\Agent\*"; DestDir: "{app}\Settings\Agent"; Flags: ignoreversion recursesubdirs createallsubdirs
  65. Source: "{#ProjectFolder}\Distribution\Agent\vCloudPusher\*"; DestDir: "{app}\vCloudPusher"; Flags: ignoreversion
  66. Source: "{#ProjectFolder}\Distribution\Agent\vCloudPusher\x86\*"; DestDir: "{app}\vCloudPusher\x86"; Flags: ignoreversion recursesubdirs createallsubdirs
  67. Source: "{#ProjectFolder}\Distribution\Agent\vCloudPusher\x64\*"; DestDir: "{app}\vCloudPusher\x64"; Flags: ignoreversion recursesubdirs createallsubdirs
  68. Source: "{#ProjectFolder}\Distribution\Agent\UploadVidTags.conf"; DestDir: "{app}"; Flags: ignoreversion
  69. [Icons]
  70. Name: "{group}\{cm:MyAppName}"; Filename: "{app}\{#SetupAppExeName}"
  71. Name: "{commondesktop}\{cm:MyAppName}"; Filename: "{app}\{#SetupAppExeName}"; Tasks: desktopicon
  72. [Run]
  73. Filename: "{app}\{#SetupAppExeName}"; Description: "{cm:LaunchProgram,{cm:MyAppName}}"; Flags:runascurrentuser nowait postinstall skipifsilent
  74. Filename: "{app}\{#SetupAppExeName}"; Description: "{cm:LaunchProgram,{cm:MyAppName}}"; Flags:runascurrentuser nowait; Check:WizardSilent
  75. [Code]
  76. procedure KillAgent();
  77. var
  78. ResultCode: Integer;
  79. ExePath: String;
  80. begin
  81. begin
  82. Exec('TASKKILL', '/IM vCloud.Agent.exe /F', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
  83. Exec('TASKKILL', '/IM PushApp.exe /F', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
  84. end;
  85. end;
  86. procedure CurStepChanged(CurStep: TSetupStep);
  87. begin
  88. if CurStep = ssinstall then
  89. begin
  90. KillAgent();
  91. end;
  92. end;