123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- #define SetupAppName "Agent assistant"
- #define SetupAppPublisher "VINNO Technology (Suzhou) Co., Ltd ."
- #define SetupAppURL "http://www.ichaorenhui.com"
- #define SetupAppExeName "vCloud.Agent.exe"
- #define CopyRight "Copyright ©2015 VINNO Corporation. All rights reserved."
- ;#define SetupAppVersion "1.0.0.0"
- ;#define ProjectFolder "E:\NewCode\vCloudRefactor"
- [Setup]
- ; NOTE: The value of AppId uniquely identifies this application.
- ; Do not use the same AppId value in installers for other applications.
- ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
- AppId={{75B8660D-F5CF-80B5-B8EA-96676A22AA79}
- AppName={cm:MyAppName}
- AppVersion={#SetupAppVersion}
- AppVerName={cm:MyAppName} {#SetupAppVersion}
- AppPublisher={#SetupAppPublisher}
- AppPublisherURL={#SetupAppURL}
- AppSupportURL={#SetupAppURL}
- AppUpdatesURL={#SetupAppURL}
- DefaultDirName={pf}\{cm:MyAppName}
- DefaultGroupName={cm:MyAppName}
- OutputDir={#ProjectFolder}\Distribution
- OutputBaseFilename=AgentSetupFull_{#SetupAppVersion}
- SetupIconFile={#ProjectFolder}\Build\Agent.ico
- WizardSmallImageFile={#ProjectFolder}\Build\Agent_Small.bmp
- ;WizardImageFile={#ProjectFolder}\Build\WizardSetup.bmp
- ArchitecturesInstallIn64BitMode=x64
- Compression=lzma
- SolidCompression=yes
- PrivilegesRequired=admin
- UninstallDisplayIcon={app}\{#SetupAppExeName}
- UninstallDisplayName={cm:MyAppName}
- VersionInfoVersion={#SetupAppVersion}
- VersionInfoCompany={#SetupAppPublisher}
- VersionInfoCopyright={#CopyRight}
- VersionInfoDescription={#SetupAppName}
- VersionInfoProductName={#SetupAppName}
- DisableWelcomePage=no
- [Languages]
- Name: "english"; MessagesFile: "compiler:Default.isl"
- Name: "chinese"; MessagesFile: "{#ProjectFolder}\Build\Chinese.isl"
- [CustomMessages]
- english.MyAppName=Flyinsono Agent assistant
- chinese.MyAppName=杏聆荟代理助手
- english.InstallFramework=Install Microsoft .Net Framework
- chinese.InstallFramework=安装 Microsoft .Net Framework
- english.InstallingFramework=Installing Microsoft .Net Framework...
- chinese.InstallingFramework=正在安装 Microsoft .Net Framework...
- [Tasks]
- Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
- [Files]
- Source: "{#ProjectFolder}\Distribution\Agent\Accord.dll"; DestDir: "{app}"; Flags: ignoreversion
- Source: "{#ProjectFolder}\Distribution\Agent\Accord.Video.dll"; DestDir: "{app}"; Flags: ignoreversion
- Source: "{#ProjectFolder}\Distribution\Agent\Accord.Video.DirectShow.dll"; DestDir: "{app}"; Flags: ignoreversion
- Source: "{#ProjectFolder}\Distribution\Agent\Dicom.Core.dll"; DestDir: "{app}"; Flags: ignoreversion
- Source: "{#ProjectFolder}\Distribution\Agent\Dicom.Native.dll"; DestDir: "{app}"; Flags: ignoreversion
- Source: "{#ProjectFolder}\Distribution\Agent\Dicom.Native64.dll"; DestDir: "{app}"; Flags: ignoreversion
- Source: "{#ProjectFolder}\Distribution\Agent\System.Windows.Interactivity.dll"; DestDir: "{app}"; Flags: ignoreversion
- Source: "{#ProjectFolder}\Distribution\Agent\Vinno.vCloud.Terminal.dll"; DestDir: "{app}"; Flags: ignoreversion
- Source: "{#ProjectFolder}\Distribution\Agent\Vinno.vCloud.Base.dll"; DestDir: "{app}"; Flags: ignoreversion
- Source: "{#ProjectFolder}\Distribution\Agent\vCloud.Agent.exe"; DestDir: "{app}"; Flags: ignoreversion
- Source: "{#ProjectFolder}\Distribution\Agent\Newtonsoft.Json.dll"; DestDir: "{app}"; Flags: ignoreversion
- Source: "{#ProjectFolder}\Distribution\Agent\Settings\Agent\*"; DestDir: "{app}\Settings\Agent"; Flags: ignoreversion recursesubdirs createallsubdirs
- Source: "{#ProjectFolder}\Build\NDP461.exe"; DestDir: "{app}"; Flags: ignoreversion
- Source: "{#ProjectFolder}\Distribution\Agent\vCloudPusher\*"; DestDir: "{app}\vCloudPusher"; Flags: ignoreversion
- Source: "{#ProjectFolder}\Distribution\Agent\vCloudPusher\x86\*"; DestDir: "{app}\vCloudPusher\x86"; Flags: ignoreversion recursesubdirs createallsubdirs
- Source: "{#ProjectFolder}\Distribution\Agent\vCloudPusher\x64\*"; DestDir: "{app}\vCloudPusher\x64"; Flags: ignoreversion recursesubdirs createallsubdirs
- Source: "{#ProjectFolder}\Distribution\Agent\UploadVidTags.conf"; DestDir: "{app}"; Flags: ignoreversion
- [Icons]
- Name: "{group}\{cm:MyAppName}"; Filename: "{app}\{#SetupAppExeName}"
- Name: "{commondesktop}\{cm:MyAppName}"; Filename: "{app}\{#SetupAppExeName}"; Tasks: desktopicon
- [Run]
- Filename: "{app}\NDP461.exe";Description:"{cm:InstallFramework}"; StatusMsg:"{cm:InstallingFramework}"; Flags: runascurrentuser; Check:not IsDotNetDetected
- Filename: "{app}\{#SetupAppExeName}"; Description: "{cm:LaunchProgram,{cm:MyAppName}}"; Flags:runascurrentuser nowait postinstall skipifsilent
- Filename: "{app}\{#SetupAppExeName}"; Description: "{cm:LaunchProgram,{cm:MyAppName}}"; Flags:runascurrentuser nowait; Check:WizardSilent
- [Code]
- function IsDotNetDetected(): boolean;
- var
- key: string;
- install, serviceCount : cardinal;
- success: boolean;
- begin
- // installation key group for all .NET versions
- key := 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full';
- success := RegQueryDWordValue(HKEY_LOCAL_MACHINE, key, 'Install', install);
- success := success and RegQueryDWordValue(HKEY_LOCAL_MACHINE, key, 'Servicing', serviceCount);
- result := success and (serviceCount >= 0) and (install = 1);
- end;
- procedure KillAgent();
- var
- ResultCode: Integer;
- ExePath: String;
- begin
- begin
- Exec('TASKKILL', '/IM vCloud.Agent.exe /F', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
- Exec('TASKKILL', '/IM PushApp.exe /F', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
- end;
- end;
- procedure CurStepChanged(CurStep: TSetupStep);
- begin
- if CurStep = ssinstall then
- begin
- KillAgent();
- end;
- end;
|