StationSetupScript.iss 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. #define SetupAppName "VINNO ultrasound workstation system"
  2. #define SetupAppPublisher "VINNO Technology (Suzhou) Co., Ltd ."
  3. #define SetupAppURL "http://www.ichaorenhui.com"
  4. #define SetupAppExeName "vStation.exe"
  5. #define CopyRight "Copyright ©2015 VINNO Corporation. All rights reserved."
  6. #define SetupAppVersion "1.2" ;送检需要 将默认版本改为1.0,若需要与通用版本号一致,删除此行即可
  7. #define InstallFramework ""
  8. #define InstallingFramework ""
  9. [Setup]
  10. ; NOTE: The value of AppId uniquely identifies this application.
  11. ; Do not use the same AppId value in installers for other applications.
  12. ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
  13. AppId={{CD747020-9D2F-4022-A41C-7C4EB272F3D5}
  14. AppName={cm:MyAppName}
  15. AppVersion={#SetupAppVersion}
  16. AppVerName={cm:MyAppName} {#SetupAppVersion}
  17. AppPublisher={#SetupAppPublisher}
  18. AppPublisherURL={#SetupAppURL}
  19. AppSupportURL={#SetupAppURL}
  20. AppUpdatesURL={#SetupAppURL}
  21. DefaultDirName={pf}\{cm:MyAppName}
  22. DefaultGroupName={cm:MyAppName}
  23. OutputDir={#ProjectFolder}\Distribution
  24. OutputBaseFilename=StationSetup_{#SetupAppVersion}
  25. SetupIconFile={#ProjectFolder}\Build\Station.ico
  26. WizardSmallImageFile={#ProjectFolder}\Build\Station_Small.bmp
  27. ;WizardImageFile={#ProjectFolder}\Build\WizardSetup_Remedical.bmp
  28. ArchitecturesInstallIn64BitMode=x64
  29. Compression=lzma
  30. SolidCompression=yes
  31. PrivilegesRequired=admin
  32. UninstallDisplayIcon={app}\{#SetupAppExeName}
  33. UninstallDisplayName={cm:MyAppName}
  34. VersionInfoVersion={#SetupAppVersion}
  35. VersionInfoCompany={#SetupAppPublisher}
  36. VersionInfoCopyright={#CopyRight}
  37. VersionInfoDescription={#SetupAppName}
  38. VersionInfoProductName={#SetupAppName}
  39. DisableWelcomePage=no
  40. ShowLanguageDialog=no
  41. [InstallDelete]
  42. Type: files; Name: "{commondesktop}\飞依诺(VINNO)超声工作站系统.lnk"
  43. Type: files; Name: "{commondesktop}\VINNO ultrasound workstation system.lnk"
  44. [Languages]
  45. Name: "english"; MessagesFile: "compiler:Default.isl"
  46. Name: "chinese"; MessagesFile: "{#ProjectFolder}\Build\Chinese.isl"
  47. [CustomMessages]
  48. english.MyAppName=Ultrasonic workstation system software
  49. chinese.MyAppName=超声工作站系统软件
  50. english.InstallFramework=Install Microsoft .Net Framework
  51. chinese.InstallFramework=安装Microsoft .Net Framework
  52. english.InstallingFramework=Installing Microsoft .Net Framework...
  53. chinese.InstallingFramework=正在安装Microsoft .Net Framework...
  54. [Tasks]
  55. Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
  56. [Files]
  57. Source: "{#ProjectFolder}\Distribution\Station\vStation.exe"; DestDir: "{app}"; Flags: ignoreversion
  58. Source: "{#ProjectFolder}\Distribution\Station\vStation.exe.config"; DestDir: "{app}"; Flags: ignoreversion
  59. Source: "{#ProjectFolder}\Distribution\Station\AForge.dll"; DestDir: "{app}"; Flags: ignoreversion
  60. Source: "{#ProjectFolder}\Distribution\Station\AForge.Video.dll"; DestDir: "{app}"; Flags: ignoreversion
  61. Source: "{#ProjectFolder}\Distribution\Station\AForge.Video.DirectShow.dll"; DestDir: "{app}"; Flags: ignoreversion
  62. Source: "{#ProjectFolder}\Distribution\Station\PdfSharp.Xps.dll"; DestDir: "{app}"; Flags: ignoreversion
  63. Source: "{#ProjectFolder}\Distribution\Station\PdfSharp-WPF.dll"; DestDir: "{app}"; Flags: ignoreversion
  64. Source: "{#ProjectFolder}\Distribution\Station\sqlite3.x64.dll"; DestDir: "{app}"; Flags: ignoreversion
  65. Source: "{#ProjectFolder}\Distribution\Station\sqlite3.x86.dll"; DestDir: "{app}"; Flags: ignoreversion
  66. Source: "{#ProjectFolder}\Distribution\Station\cdll8_x64.dll"; DestDir: "{app}"; Flags: ignoreversion
  67. Source: "{#ProjectFolder}\Distribution\Station\cdll8_x86.dll"; DestDir: "{app}"; Flags: ignoreversion
  68. Source: "{#ProjectFolder}\Distribution\Station\System.Windows.Interactivity.dll"; DestDir: "{app}"; Flags: ignoreversion
  69. Source: "{#ProjectFolder}\Distribution\Station\System.ValueTuple.dll"; DestDir: "{app}"; Flags: ignoreversion
  70. Source: "{#ProjectFolder}\Distribution\Station\netstandard.dll"; DestDir: "{app}"; Flags: ignoreversion
  71. Source: "{#ProjectFolder}\Distribution\Station\Settings\Station\*"; DestDir: "{app}\Settings\Station"; Flags: ignoreversion recursesubdirs createallsubdirs
  72. Source: "{#ProjectFolder}\Distribution\Station\Sign\*"; DestDir: "{app}\Sign"; Flags: ignoreversion recursesubdirs createallsubdirs
  73. Source: "{#ProjectFolder}\Distribution\Station\vStationDiagnosticTerms\*"; DestDir: "{app}\vStationDiagnosticTerms"; Flags: ignoreversion recursesubdirs createallsubdirs
  74. Source: "{#ProjectFolder}\Distribution\Station\vStationReportTemplates\*"; DestDir: "{app}\vStationReportTemplates"; Flags: ignoreversion recursesubdirs createallsubdirs
  75. Source: "{#ProjectFolder}\Distribution\Station\Dongle.xml"; DestDir: "{app}"; Flags: ignoreversion
  76. Source: "{#ProjectFolder}\Distribution\Station\ICSharpCode.SharpZipLib.dll"; DestDir: "{app}"; Flags: ignoreversion
  77. Source: "{#ProjectFolder}\Distribution\Station\Dicom.Core.dll"; DestDir: "{app}"; Flags: ignoreversion
  78. Source: "{#ProjectFolder}\Distribution\Station\Dicom.Native.dll"; DestDir: "{app}"; Flags: ignoreversion
  79. Source: "{#ProjectFolder}\Distribution\Station\Dicom.Native64.dll"; DestDir: "{app}"; Flags: ignoreversion
  80. Source: "{#ProjectFolder}\Distribution\Station\Newtonsoft.Json.dll"; DestDir: "{app}"; Flags: ignoreversion
  81. Source: "{#ProjectFolder}\Distribution\Station\Vinno.IUS.Common.dll"; DestDir: "{app}"; Flags: ignoreversion
  82. Source: "{#ProjectFolder}\Distribution\Station\Vinno.vCloud.DiagnosisTerm.dll"; DestDir: "{app}"; Flags: ignoreversion
  83. Source: "{#ProjectFolder}\Distribution\Station\Vinno.vCloud.Dongle.dll"; DestDir: "{app}"; Flags: ignoreversion
  84. Source: "{#ProjectFolder}\Distribution\Station\Vinno.IUS.Common.Client.dll"; DestDir: "{app}"; Flags: ignoreversion
  85. Source: "{#ProjectFolder}\Distribution\Station\Vinno.IUS.Common.Setting.dll"; DestDir: "{app}"; Flags: ignoreversion
  86. Source: "{#ProjectFolder}\Distribution\Station\Vinno.IUS.Common.Network.dll"; DestDir: "{app}"; Flags: ignoreversion
  87. Source: "{#ProjectFolder}\Distribution\Station\Vinno.vCloud.Protocol.dll"; DestDir: "{app}"; Flags: ignoreversion
  88. Source: "{#ProjectFolder}\Distribution\Station\Vinno.vCloud.Common.Vid2.dll"; DestDir: "{app}"; Flags: ignoreversion
  89. Source: "{#ProjectFolder}\Distribution\Station\Vinno.vCloud.Report.dll"; DestDir: "{app}"; Flags: ignoreversion
  90. Source: "{#ProjectFolder}\Distribution\Station\Vinno.vCloud.ReportGenerator.dll"; DestDir: "{app}"; Flags: ignoreversion
  91. Source: "{#ProjectFolder}\Distribution\Station\Vinno.vCloud.ReportTemplate.ViewModel.dll"; DestDir: "{app}"; Flags: ignoreversion
  92. Source: "{#ProjectFolder}\Distribution\Station\Vinno.vCloud.vStationAgent.dll"; DestDir: "{app}"; Flags: ignoreversion
  93. Source: "{#ProjectFolder}\Distribution\Station\Syncfusion.Compression.Base.dll"; DestDir: "{app}"; Flags: ignoreversion
  94. Source: "{#ProjectFolder}\Distribution\Station\Syncfusion.DocIO.Base.dll"; DestDir: "{app}"; Flags: ignoreversion
  95. Source: "{#ProjectFolder}\Distribution\Station\Syncfusion.DocToPDFConverter.Base.dll"; DestDir: "{app}"; Flags: ignoreversion
  96. Source: "{#ProjectFolder}\Distribution\Station\Syncfusion.OfficeChart.Base.dll"; DestDir: "{app}"; Flags: ignoreversion
  97. Source: "{#ProjectFolder}\Distribution\Station\Syncfusion.Pdf.Base.dll"; DestDir: "{app}"; Flags: ignoreversion
  98. Source: "{#ProjectFolder}\Distribution\Station\Syncfusion.PdfViewer.WPF.dll"; DestDir: "{app}"; Flags: ignoreversion
  99. Source: "{#ProjectFolder}\Distribution\Station\Syncfusion.Shared.Wpf.dll"; DestDir: "{app}"; Flags: ignoreversion
  100. Source: "{#ProjectFolder}\Distribution\Station\Syncfusion.Tools.WPF.dll"; DestDir: "{app}"; Flags: ignoreversion
  101. Source: "{#ProjectFolder}\Distribution\Station\ReportTemplateDesigner.exe"; DestDir: "{app}"; Flags: ignoreversion
  102. Source: "{#ProjectFolder}\Distribution\Station\ReportTemplateDesigner.exe.config"; DestDir: "{app}"; Flags: ignoreversion
  103. Source: "{#ProjectFolder}\Distribution\Station\Icon.ico"; DestDir: "{app}"; Flags: ignoreversion
  104. Source: "{#ProjectFolder}\Distribution\Station\zh-CN\*"; DestDir: "{app}\zh-CN"; Flags: ignoreversion recursesubdirs createallsubdirs
  105. Source: "{#ProjectFolder}\Distribution\Station\Vinno.IdentificationCardApp.exe"; DestDir: "{app}"; Flags: ignoreversion
  106. Source: "{#ProjectFolder}\Distribution\Station\Vinno.IdentificationCardApp.exe.config"; DestDir: "{app}"; Flags: ignoreversion
  107. Source: "{#ProjectFolder}\Build\NDP461.exe"; DestDir: "{app}"; Flags: ignoreversion
  108. Source: "{#ProjectFolder}\Distribution\Station\sdtapi.dll"; DestDir: "{app}"; Flags: ignoreversion
  109. Source: "{#ProjectFolder}\Distribution\Station\WltRS.dll"; DestDir: "{app}"; Flags: ignoreversion
  110. Source: "{#ProjectFolder}\Distribution\Station\termb.lic"; DestDir: "{app}"; Flags: ignoreversion
  111. Source: "{#ProjectFolder}\Distribution\Station\Vinno.IDCardReader.dll"; DestDir: "{app}"; Flags: ignoreversion
  112. Source: "{#ProjectFolder}\Distribution\Station\NPOI.dll"; DestDir: "{app}"; Flags: ignoreversion
  113. Source: "{#ProjectFolder}\Distribution\Station\NPOI.OOXML.dll"; DestDir: "{app}"; Flags: ignoreversion
  114. Source: "{#ProjectFolder}\Distribution\Station\NPOI.OpenXml4Net.dll"; DestDir: "{app}"; Flags: ignoreversion
  115. Source: "{#ProjectFolder}\Distribution\Station\NPOI.OpenXmlFormats.dll"; DestDir: "{app}"; Flags: ignoreversion
  116. [Icons]
  117. Name: "{group}\{cm:MyAppName}"; Filename: "{app}\{#SetupAppExeName}"
  118. Name: "{commondesktop}\{cm:MyAppName}"; Filename: "{app}\{#SetupAppExeName}"; Tasks: desktopicon
  119. [Run]
  120. Filename: "{app}\NDP461.exe";Description:"{cm:InstallFramework}"; StatusMsg:"{cm:InstallingFramework}"; Flags: runascurrentuser; Check:not IsDotNetDetected
  121. Filename: "{app}\{#SetupAppExeName}"; Description: "{cm:LaunchProgram,{cm:MyAppName}}"; Flags:runascurrentuser nowait postinstall skipifsilent
  122. Filename: "{app}\{#SetupAppExeName}"; Description: "{cm:LaunchProgram,{cm:MyAppName}}"; Flags:runascurrentuser nowait; Check:WizardSilent
  123. [Code]
  124. function CompareVersion(version1, version2: string): Integer;
  125. var
  126. postition, n1, n2: Integer;
  127. begin
  128. result := 0;
  129. while (result = 0) and ((version1 <> '') or (version2 <> '')) do
  130. begin
  131. postition := Pos('.', version1);
  132. if postition > 0 then
  133. begin
  134. n1 := StrToInt(Copy(version1, 1, postition - 1));
  135. Delete(version1, 1, postition);
  136. end
  137. else if version1 <> '' then
  138. begin
  139. n1 := StrToInt(version1);
  140. version1 := '';
  141. end
  142. else
  143. begin
  144. n1 := 0;
  145. end;
  146. postition := Pos('.', version2);
  147. if postition > 0 then
  148. begin
  149. n2 := StrToInt(Copy(version2, 1, postition - 1));
  150. Delete(version2, 1, postition);
  151. end
  152. else
  153. if version2 <> '' then
  154. begin
  155. n2 := StrToInt(version2);
  156. version2 := '';
  157. end
  158. else
  159. begin
  160. n2 := 0;
  161. end;
  162. if n1 < n2 then result := -1
  163. else if n1 > n2 then result := 1
  164. else result := 0;
  165. end;
  166. end;
  167. function IsDotNetDetected(): boolean;
  168. var
  169. key, version: string;
  170. install, serviceCount : cardinal;
  171. success: boolean;
  172. begin
  173. // installation key group for all .NET versions
  174. key := 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full';
  175. success := RegQueryDWordValue(HKEY_LOCAL_MACHINE, key, 'Install', install);
  176. success := success and RegQueryDWordValue(HKEY_LOCAL_MACHINE, key, 'Servicing', serviceCount);
  177. success := success and RegQueryStringValue(HKEY_LOCAL_MACHINE, key, 'Version', version);
  178. result := success and (CompareVersion(version, '4.6.1')>0) and (serviceCount >= 0) and (install = 1);
  179. end;
  180. procedure KillStation();
  181. var
  182. ResultCode: Integer;
  183. begin
  184. begin
  185. Exec('TASKKILL', '/IM vStation.exe /F', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
  186. end;
  187. end;
  188. function InitializeUninstall(): Boolean;
  189. begin
  190. KillStation();
  191. Result := True;
  192. end;
  193. procedure CurStepChanged(CurStep: TSetupStep);
  194. begin
  195. if CurStep = ssinstall then
  196. begin
  197. KillStation();
  198. end;
  199. end;