123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- ; -- vCloudSetup.iss --
- ;
- ; This script will extract the installer files to temp folder and run the setup file which writen in C#
- #define SetupAppName "vCloud Setup package"
- #define SetupAppPublisher "VINNO Technology (Suzhou) Co., Ltd ."
- #define CopyRight "Copyright ©2018 VINNO Corporation. All rights reserved."
- #define SetupAppExeName "vCloudSetup.exe"
- ;#define SetupAppVersion "1.0.0.0"
- ;#define ProjectFolder "D:\Projects\vCloud_1.2_LiveTalking"
- [Setup]
- AppVersion={#SetupAppVersion}
- AppName={#SetupAppName}
- DefaultDirName="%APPDATA%"
- DefaultGroupName=
- Compression=lzma
- SolidCompression=yes
- PrivilegesRequired=admin
- VersionInfoDescription={#SetupAppName}
- VersionInfoProductName={#SetupAppName}
- VersionInfoVersion={#SetupAppVersion}
- VersionInfoCompany={#SetupAppPublisher}
- VersionInfoCopyright={#CopyRight}
- SetupIconFile={#ProjectFolder}\Build\ClientIcon.ico
- OutputDir={#ProjectFolder}\Distribution\
- OutputBaseFilename=ClientSetup_Release_{#SetupAppVersion}
- LanguageDetectionMethod=uilanguage
- ShowLanguageDialog=no
- [Files]
- Source: "{#ProjectFolder}\Distribution\Client\Windows\ClientInstallerNFX35.exe"; Flags: dontcopy noencryption
- Source: "{#ProjectFolder}\Distribution\Client\Windows\ClientInstallerNFX40.exe"; Flags: dontcopy noencryption
- Source: "{#ProjectFolder}\Distribution\Client\Windows\DotNetZip.dll"; Flags: dontcopy noencryption
- [Languages]
- Name: "english"; MessagesFile: "compiler:Default.isl"
- Name: "chinese"; MessagesFile: "{#ProjectFolder}\Build\Chinese.isl"
- [CustomMessages]
- english.NotSupportXP=Windows XP and lower version are not supported.
- chinese.NotSupportXP=杏聆荟软件无法在Windows XP安装。
- [Code]
- function IsWindowsXPOr2000: Boolean;
- var
- Version: TWindowsVersion;
- begin
- GetWindowsVersionEx(Version);
- if Version.Major = 5 then
- Result := True
- else
- Result := False;
- end;
- function IsWindows7:Boolean;
- var
- Version: TWindowsVersion;
- begin
- GetWindowsVersionEx(Version);
- if (Version.Major >=6) and (Version.Major < 10) then
- Result := True
- else
- Result := False;
- end;
- function IsWindows10:Boolean;
- var
- Version: TWindowsVersion;
- begin
- GetWindowsVersionEx(Version);
- if Version.Major >=10 then
- Result := True
- else
- Result := False;
- end;
- function InitializeSetup(): Boolean;
- var
- LoadingExeFile:String;
- SetupExeFile: String;
- NewSetupExeFile:String;
- SetupDllFile: String;
- NewSetupDllFile:String;
- SetupFileName:String;
- ErrorCode: Integer;
- begin
- if IsWindowsXPOr2000 then
- begin
- MsgBox('{cm:NotSupportXP}', mbError, MB_OK);
- end
- else
- begin
- ExtractTemporaryFile('ClientInstallerNFX35.exe');
- ExtractTemporaryFile('ClientInstallerNFX40.exe');
- ExtractTemporaryFile('DotNetZip.dll');
- SetupDllFile := ExpandConstant('{tmp}\DotNetZip.dll');
- NewSetupDllFile := GetTempDir + '\' + ExtractFileName(SetupDllFile);
- FileCopy(SetupDllFile, NewSetupDllFile,false);
- if IsWindows7 then
- begin
- SetupExeFile := ExpandConstant('{tmp}\ClientInstallerNFX35.exe');
- end
- else
- begin
- SetupExeFile := ExpandConstant('{tmp}\ClientInstallerNFX40.exe');
- end;
- NewSetupExeFile := GenerateUniqueName(GetTempDir, '.exe');
- FileCopy(SetupExeFile, NewSetupExeFile,false);
- ShellExec('', NewSetupExeFile, '/source ' + ExpandConstant('{srcexe}'), '', SW_SHOW, ewNoWait, ErrorCode);
- end;
- Result:= false;
- end;
|