Blame view

LiveChat/SDK/setup/CloudSamples.iss 5.08 KB
9f17d59e   陈明泉   no message
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
  ; Script generated by the Inno Setup Script Wizard.
  ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
  
  #define MyAppName "CloudSamples"
  #define MyAppVersion "6.8.1-rc15(04290)"
  #define MyAppPublisher "Juphoon System Software Co,Ltd"
  #define MyAppURL "http://www.juphoon.com/"
  #define MyAppIMExeName "IMSample"
  #define MyAppCallExeName "CallSample"
  #define MyAppConferenceExeName "ConferenceSample"
  
  [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={{57B581BD-5AD9-435A-8BDF-9C60988A55E0}
  AppName={#MyAppName}
  AppVersion={#MyAppVersion}
  ;AppVerName={#MyAppName} {#MyAppVersion}
  AppPublisher={#MyAppPublisher}
  AppPublisherURL={#MyAppURL}
  AppSupportURL={#MyAppURL}
  AppUpdatesURL={#MyAppURL}
  DefaultDirName={pf}\Juphoon\{#MyAppName}
  DefaultGroupName={#MyAppName}
  AllowNoIcons=yes
  OutputBaseFilename=CloudSamples
  Compression=lzma
  SolidCompression=yes
  OutputDir=.
  
  [Languages]
  Name: "english"; MessagesFile: "compiler:Default.isl"
  
  [Tasks]
  Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
  
  [Files]
  Source: "..\bin\IMSample.exe"; DestDir: "{app}"; Flags: ignoreversion
  Source: "..\bin\CallSample.exe"; DestDir: "{app}"; Flags: ignoreversion
  Source: "..\bin\ConferenceSample.exe"; DestDir: "{app}"; Flags: ignoreversion
  Source: "..\bin\mtc.dll"; DestDir: "{app}"; Flags: ignoreversion
  Source: "..\bin\mtcmanaged.dll"; DestDir: "{app}"; Flags: ignoreversion
  Source: "..\bin\hpmpdll.dll"; DestDir: "{app}"; Flags: ignoreversion
  Source: "..\bin\mtcwrap.dll"; DestDir: "{app}"; Flags: ignoreversion
  Source: "..\bin\signer.dll"; DestDir: "{app}"; Flags: ignoreversion
  Source: "..\bin\sqlite3.dll"; DestDir: "{app}"; Flags: ignoreversion
  Source: "..\bin\zmf.dll"; DestDir: "{app}"; Flags: ignoreversion
  Source: "..\bin\zmfmanaged.dll"; DestDir: "{app}"; Flags: ignoreversion
  Source: "..\bin\JusMeeting.dll"; DestDir: "{app}"; Flags: ignoreversion
  Source: "..\bin\JusDoc.dll"; DestDir: "{app}"; Flags: ignoreversion
  Source: "..\bin\dumper.dll"; DestDir: "{app}"; Flags: ignoreversion
  Source: "..\bin\count.amr"; DestDir: "{app}"; Flags: ignoreversion
  Source: "..\bin\NetOffice.dll"; DestDir: "{app}"; Flags: ignoreversion
  Source: "..\bin\OfficeApi.dll"; DestDir: "{app}"; Flags: ignoreversion
  Source: "..\bin\PowerPointApi.dll"; DestDir: "{app}"; Flags: ignoreversion
  Source: "..\bin\VBIDEApi.dll"; DestDir: "{app}"; Flags: ignoreversion
  ;Source: "ring\*"; DestDir: "{app}\ring"; Flags: ignoreversion recursesubdirs createallsubdirs
  ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
  
  [Icons]
  Name: "{group}\{#MyAppIMExeName}"; Filename: "{app}\{#MyAppIMExeName}.exe"
  Name: "{group}\{#MyAppCallExeName}"; Filename: "{app}\{#MyAppCallExeName}.exe"
  Name: "{group}\{#MyAppConferenceExeName}"; Filename: "{app}\{#MyAppConferenceExeName}.exe"
  Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
  Name: "{commondesktop}\{#MyAppIMExeName}"; Filename: "{app}\{#MyAppIMExeName}.exe"; Tasks: desktopicon
  Name: "{commondesktop}\{#MyAppCallExeName}"; Filename: "{app}\{#MyAppCallExeName}.exe"; Tasks: desktopicon
  Name: "{commondesktop}\{#MyAppConferenceExeName}"; Filename: "{app}\{#MyAppConferenceExeName}.exe"; Tasks: desktopicon
  [Run]
  ;Filename: "{app}\ConferenceSample.exe"; Flags: nowait postinstall skipifsilent; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"
  
  [CustomMessages]
  english.dotNetNeeded=Our program needs Microsoft .NET Framework 4 at least. Would you like to download and install it now?
  
  [Code]
  function IsFrameworkSatisfied: boolean;
  // Indicates whether the specified version and service pack of the .NET Framework is installed.
  //
  // version -- Specify one of these strings for the required .NET Framework version:
  //    'v1.1.4322'     .NET Framework 1.1
  //    'v2.0.50727'    .NET Framework 2.0
  //    'v3.0'          .NET Framework 3.0
  //    'v3.5'          .NET Framework 3.5
  //    'v4\Client'     .NET Framework 4.0 Client Profile
  //    'v4\Full'       .NET Framework 4.0 Full Installation
  //
  // service -- Specify any non-negative integer for the required service pack level:
  //    0               No service packs required
  //    1, 2, etc.      Service pack 1, 2, etc. required
  var
      key: string;
      install, servicePack: cardinal;
      success: boolean;
  begin                                            
      key := 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client';
      success := RegQueryDWordValue(HKLM, key, 'Install', install);        
      result := success and (install = 1);
  end;
            
  function InitializeSetup(): Boolean;
  var
      ErrorCode: Integer;
  begin
      if not IsFrameworkSatisfied() then
      begin
          if(idYes = MsgBox(ExpandConstant('{cm:dotNetNeeded}'), mbConfirmation, MB_YESNO)) then
          begin
              ShellExec('open',
              'http://www.microsoft.com/zh-cn/download/details.aspx?id=17718',
              '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
          end;
          result := false;
      end 
      else
          result := true;
  end;