Browse Source

升级VC版本

tags/对接微服务前
张剑 3 years ago
parent
commit
d921b04c38
3 changed files with 90 additions and 103 deletions
  1. 2
    2
      XHWK.WKTool/App.config
  2. 43
    50
      星火微课/星火微课-正式.iss
  3. 45
    51
      星火微课/星火微课-测试.iss

+ 2
- 2
XHWK.WKTool/App.config View File

9
     <!--参数是否加密 0不加密 1加密-->
9
     <!--参数是否加密 0不加密 1加密-->
10
     <add key="IsParameterEncryption" value="0" />
10
     <add key="IsParameterEncryption" value="0" />
11
     <!--版本号-->
11
     <!--版本号-->
12
-    <add key="VersionCode" value="106" />
13
-    <add key="VersionName" value="3.1.12" />
12
+    <add key="VersionCode" value="107" />
13
+    <add key="VersionName" value="3.1.13" />
14
     <!--皮肤样式 0白 1蓝 2黑色 -->
14
     <!--皮肤样式 0白 1蓝 2黑色 -->
15
     <add key="SkinStyle" value="0" />
15
     <add key="SkinStyle" value="0" />
16
     <!--是否输出视频记录日志:0否-->
16
     <!--是否输出视频记录日志:0否-->

+ 43
- 50
星火微课/星火微课-正式.iss View File

3
 
3
 
4
 #define MyAppName "星火微课"  
4
 #define MyAppName "星火微课"  
5
 #define MyAppDir "xhwk"
5
 #define MyAppDir "xhwk"
6
-#define MyAppVersion "3.1.12"
6
+#define MyAppVersion "3.1.13"
7
 #define MyAppPublisher "河南星火燎原软件科技有限公司"
7
 #define MyAppPublisher "河南星火燎原软件科技有限公司"
8
 #define MyAppURL "http://www.xhkjedu.com/"
8
 #define MyAppURL "http://www.xhkjedu.com/"
9
 #define MySourcePath "D:\Project\CSharp\xhwkclient\XHWK.WKTool\bin\x86\Debug\"
9
 #define MySourcePath "D:\Project\CSharp\xhwkclient\XHWK.WKTool\bin\x86\Debug\"
56
 Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
56
 Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
57
 
57
 
58
 [Code]  
58
 [Code]  
59
-
60
 // 自定义函数,判断软件是否运行,参数为需要判断的软件的exe名称
59
 // 自定义函数,判断软件是否运行,参数为需要判断的软件的exe名称
61
-function KDetectSoft(strExeName: String): Boolean;
60
+function CheckSoftRun(strExeName: String): Boolean;
62
 // 变量定义
61
 // 变量定义
63
 var ErrorCode: Integer;
62
 var ErrorCode: Integer;
64
 var bRes: Boolean;
63
 var bRes: Boolean;
100
 function NextButtonClick(CurPageID: Integer): Boolean;
99
 function NextButtonClick(CurPageID: Integer): Boolean;
101
 begin
100
 begin
102
   if 1=CurPageID then begin
101
   if 1=CurPageID then begin
103
-      Result := KDetectSoft('{#MyAppExeName}');
102
+      Result := CheckSoftRun('{#MyAppExeName}');
104
       Exit;
103
       Exit;
105
   end; 
104
   end; 
106
   Result:= true;
105
   Result:= true;
109
 // 卸载时关闭软件
108
 // 卸载时关闭软件
110
 function InitializeUninstall(): Boolean;
109
 function InitializeUninstall(): Boolean;
111
 begin
110
 begin
112
-  Result := KDetectSoft('{#MyAppExeName}');
111
+  Result := CheckSoftRun('{#MyAppExeName}');
112
+end;
113
+
114
+function CheckVC():boolean;
115
+var Path:string; 
116
+      ResultCode: Integer;  
117
+begin
118
+  if RegValueExists(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{01FAEC41-B3BC-44F4-B185-5E8475AEB855}', 'Version') 
119
+  or RegValueExists(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{77EB1EA9-8E1B-459D-8CDC-1984D0FF15B6}', 'Version') 
120
+  then  
121
+    begin  
122
+      Result := true;   
123
+    end  
124
+  else  
125
+  begin  
126
+    if MsgBox('系统检测到您没有安装VC++环境,是否立刻下载并安装?', mbConfirmation, MB_YESNO) = idYes then  
127
+      begin  
128
+        Path := ExpandConstant('{pf}/Internet Explorer/iexplore.exe');   
129
+        Exec(Path, 'https://xhkjedu.oss-cn-huhehaote.aliyuncs.com/runtime/vc_redist.x86.exe', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);   
130
+        MsgBox('请安装好VC++环境后,再运行本安装包程序!',mbInformation,MB_OK);   
131
+        Result := false;   
132
+      end  
133
+    else  
134
+      begin  
135
+        MsgBox('取消后请手动安装VC2015-2019环境!',mbInformation,MB_OK);   
136
+        Result := true;   
137
+      end;   
138
+  end;
113
 end;
139
 end;
114
 
140
 
115
 
141
 
116
-// Indicates whether the specified version and service pack of the .NET Framework is installed.
117
-//
118
-// version -- Specify one of these strings for the required .NET Framework version:
119
-//    'v1.1'          .NET Framework 1.1
120
-//    'v2.0'          .NET Framework 2.0
121
-//    'v3.0'          .NET Framework 3.0
122
-//    'v3.5'          .NET Framework 3.5
123
-//    'v4\Client'     .NET Framework 4.0 Client Profile
124
-//    'v4\Full'       .NET Framework 4.0 Full Installation
125
-//    'v4.5'          .NET Framework 4.5
126
-//    'v4.5.1'        .NET Framework 4.5.1
127
-//    'v4.5.2'        .NET Framework 4.5.2
128
-//    'v4.6'          .NET Framework 4.6
129
-//    'v4.6.1'        .NET Framework 4.6.1
130
-//    'v4.6.2'        .NET Framework 4.6.2
131
-//    'v4.7'          .NET Framework 4.7
132
-//    'v4.7.1'        .NET Framework 4.7.1
133
-//    'v4.7.2'        .NET Framework 4.7.2
134
-//    'v4.8'          .NET Framework 4.8
135
-//
136
-// service -- Specify any non-negative integer for the required service pack level:
137
-//    0               No service packs required
138
-//    1, 2, etc.      Service pack 1, 2, etc. required
139
-function IsDotNetDetected(version: string; service: cardinal): boolean;
142
+function IsInstallDotNet(version: string; service: cardinal): boolean;
140
 var
143
 var
141
     key, versionKey: string;
144
     key, versionKey: string;
142
     install, release, serviceCount, versionRelease: cardinal;
145
     install, release, serviceCount, versionRelease: cardinal;
196
     result := success and (install = 1) and (serviceCount >= service);
199
     result := success and (install = 1) and (serviceCount >= service);
197
 end;
200
 end;
198
 
201
 
199
-function InitializeSetup: Boolean;   
202
+// 检查.Net是否安装
203
+function CheckDotNet : Boolean;
200
 var Path:string;   
204
 var Path:string;   
201
     ResultCode: Integer;   
205
     ResultCode: Integer;   
202
 begin  
206
 begin  
203
-  if IsDotNetDetected('v4.5.2', 0) then  
207
+  if IsInstallDotNet('v4.5.2', 0) then  
204
     begin  
208
     begin  
205
-      if RegValueExists(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{01FAEC41-B3BC-44F4-B185-5E8475AEB855}', 'Version') then  
206
-        begin  
207
-          Result := true;   
208
-        end  
209
-      else  
210
-      begin  
211
-        if MsgBox('系统检测到您没有安装VC++环境,是否立刻下载并安装?', mbConfirmation, MB_YESNO) = idYes then  
212
-          begin  
213
-            Path := ExpandConstant('{pf}/Internet Explorer/iexplore.exe');   
214
-            Exec(Path, 'https://xhkjedu.oss-cn-huhehaote.aliyuncs.com/runtime/VC_redist.x86.exe', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);   
215
-            MsgBox('请安装好VC++环境后,再运行本安装包程序!',mbInformation,MB_OK);   
216
-            Result := false;   
217
-          end  
218
-        else  
219
-          begin  
220
-            MsgBox('取消后请手动安装VC2015-2019环境!',mbInformation,MB_OK);   
221
-            Result := true;   
222
-          end;   
223
-      end;
209
+        Result := true; 
224
     end  
210
     end  
225
   else  
211
   else  
226
     begin  
212
     begin  
239
     end;
225
     end;
240
 end;
226
 end;
241
 
227
 
228
+function InitializeSetup: Boolean;
229
+begin
230
+  Result := CheckDotNet();
231
+  Result := CheckVC();
232
+end;   
233
+
234
+
242
 [CustomMessages]
235
 [CustomMessages]
243
 chinesesimp.checkSoftTip=安装程序检测到将安装的软件正在运行!%n%n点击"确定"终止软件后继续操作,否则点击"取消"。
236
 chinesesimp.checkSoftTip=安装程序检测到将安装的软件正在运行!%n%n点击"确定"终止软件后继续操作,否则点击"取消"。

+ 45
- 51
星火微课/星火微课-测试.iss View File

3
 
3
 
4
 #define MyAppName "星火微课"  
4
 #define MyAppName "星火微课"  
5
 #define MyAppDir "xhwk"
5
 #define MyAppDir "xhwk"
6
-#define MyAppVersion "3.1.12"
6
+#define MyAppVersion "3.1.13"
7
 #define MyAppPublisher "河南星火燎原软件科技有限公司"
7
 #define MyAppPublisher "河南星火燎原软件科技有限公司"
8
 #define MyAppURL "http://www.xhkjedu.com/"
8
 #define MyAppURL "http://www.xhkjedu.com/"
9
 #define MySourcePath "D:\Project\CSharp\xhwkclient\XHWK.WKTool\bin\x86\Debug\"
9
 #define MySourcePath "D:\Project\CSharp\xhwkclient\XHWK.WKTool\bin\x86\Debug\"
55
 [Run]
55
 [Run]
56
 Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
56
 Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
57
 
57
 
58
-[Code]
58
+[Code]  
59
 // 自定义函数,判断软件是否运行,参数为需要判断的软件的exe名称
59
 // 自定义函数,判断软件是否运行,参数为需要判断的软件的exe名称
60
-function KDetectSoft(strExeName: String): Boolean;
60
+function CheckSoftRun(strExeName: String): Boolean;
61
 // 变量定义
61
 // 变量定义
62
 var ErrorCode: Integer;
62
 var ErrorCode: Integer;
63
 var bRes: Boolean;
63
 var bRes: Boolean;
99
 function NextButtonClick(CurPageID: Integer): Boolean;
99
 function NextButtonClick(CurPageID: Integer): Boolean;
100
 begin
100
 begin
101
   if 1=CurPageID then begin
101
   if 1=CurPageID then begin
102
-      Result := KDetectSoft('{#MyAppExeName}');
102
+      Result := CheckSoftRun('{#MyAppExeName}');
103
       Exit;
103
       Exit;
104
   end; 
104
   end; 
105
   Result:= true;
105
   Result:= true;
108
 // 卸载时关闭软件
108
 // 卸载时关闭软件
109
 function InitializeUninstall(): Boolean;
109
 function InitializeUninstall(): Boolean;
110
 begin
110
 begin
111
-  Result := KDetectSoft('{#MyAppExeName}');
111
+  Result := CheckSoftRun('{#MyAppExeName}');
112
 end;
112
 end;
113
 
113
 
114
-// Indicates whether the specified version and service pack of the .NET Framework is installed.
115
-//
116
-// version -- Specify one of these strings for the required .NET Framework version:
117
-//    'v1.1'          .NET Framework 1.1
118
-//    'v2.0'          .NET Framework 2.0
119
-//    'v3.0'          .NET Framework 3.0
120
-//    'v3.5'          .NET Framework 3.5
121
-//    'v4\Client'     .NET Framework 4.0 Client Profile
122
-//    'v4\Full'       .NET Framework 4.0 Full Installation
123
-//    'v4.5'          .NET Framework 4.5
124
-//    'v4.5.1'        .NET Framework 4.5.1
125
-//    'v4.5.2'        .NET Framework 4.5.2
126
-//    'v4.6'          .NET Framework 4.6
127
-//    'v4.6.1'        .NET Framework 4.6.1
128
-//    'v4.6.2'        .NET Framework 4.6.2
129
-//    'v4.7'          .NET Framework 4.7
130
-//    'v4.7.1'        .NET Framework 4.7.1
131
-//    'v4.7.2'        .NET Framework 4.7.2
132
-//    'v4.8'          .NET Framework 4.8
133
-//
134
-// service -- Specify any non-negative integer for the required service pack level:
135
-//    0               No service packs required
136
-//    1, 2, etc.      Service pack 1, 2, etc. required
137
-function IsDotNetDetected(version: string; service: cardinal): boolean;
114
+function CheckVC():boolean;
115
+var Path:string; 
116
+      ResultCode: Integer;  
117
+begin
118
+  if RegValueExists(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{01FAEC41-B3BC-44F4-B185-5E8475AEB855}', 'Version') 
119
+  or RegValueExists(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{77EB1EA9-8E1B-459D-8CDC-1984D0FF15B6}', 'Version') 
120
+  then  
121
+    begin  
122
+      Result := true;   
123
+    end  
124
+  else  
125
+  begin  
126
+    if MsgBox('系统检测到您没有安装VC++环境,是否立刻下载并安装?', mbConfirmation, MB_YESNO) = idYes then  
127
+      begin  
128
+        Path := ExpandConstant('{pf}/Internet Explorer/iexplore.exe');   
129
+        Exec(Path, 'https://xhkjedu.oss-cn-huhehaote.aliyuncs.com/runtime/vc_redist.x86.exe', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);   
130
+        MsgBox('请安装好VC++环境后,再运行本安装包程序!',mbInformation,MB_OK);   
131
+        Result := false;   
132
+      end  
133
+    else  
134
+      begin  
135
+        MsgBox('取消后请手动安装VC2015-2019环境!',mbInformation,MB_OK);   
136
+        Result := true;   
137
+      end;   
138
+  end;
139
+end;
140
+
141
+
142
+function IsInstallDotNet(version: string; service: cardinal): boolean;
138
 var
143
 var
139
     key, versionKey: string;
144
     key, versionKey: string;
140
     install, release, serviceCount, versionRelease: cardinal;
145
     install, release, serviceCount, versionRelease: cardinal;
194
     result := success and (install = 1) and (serviceCount >= service);
199
     result := success and (install = 1) and (serviceCount >= service);
195
 end;
200
 end;
196
 
201
 
197
-function InitializeSetup: Boolean;   
202
+// 检查.Net是否安装
203
+function CheckDotNet : Boolean;
198
 var Path:string;   
204
 var Path:string;   
199
     ResultCode: Integer;   
205
     ResultCode: Integer;   
200
 begin  
206
 begin  
201
-  if IsDotNetDetected('v4.5.2', 0) then  
207
+  if IsInstallDotNet('v4.5.2', 0) then  
202
     begin  
208
     begin  
203
-      if RegValueExists(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{01FAEC41-B3BC-44F4-B185-5E8475AEB855}', 'Version') then  
204
-        begin  
205
-          Result := true;   
206
-        end  
207
-      else  
208
-      begin  
209
-        if MsgBox('系统检测到您没有安装VC++环境,是否立刻下载并安装?', mbConfirmation, MB_YESNO) = idYes then  
210
-          begin  
211
-            Path := ExpandConstant('{pf}/Internet Explorer/iexplore.exe');   
212
-            Exec(Path, 'https://xhkjedu.oss-cn-huhehaote.aliyuncs.com/runtime/VC_redist.x86.exe', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);   
213
-            MsgBox('请安装好VC++环境后,再运行本安装包程序!',mbInformation,MB_OK);   
214
-            Result := false;   
215
-          end  
216
-        else  
217
-          begin  
218
-            MsgBox('取消后请手动安装VC2015-2019环境!',mbInformation,MB_OK);   
219
-            Result := true;   
220
-          end;   
221
-      end;
209
+        Result := true; 
222
     end  
210
     end  
223
   else  
211
   else  
224
     begin  
212
     begin  
237
     end;
225
     end;
238
 end;
226
 end;
239
 
227
 
228
+function InitializeSetup: Boolean;
229
+begin
230
+  Result := CheckDotNet();
231
+  Result := CheckVC();
232
+end; 
233
+
240
 
234
 
241
 [CustomMessages]
235
 [CustomMessages]
242
-chinesesimp.checkSoftTip=安装程序检测到将安装的软件正在运行!%n%n点击"确定"终止软件后继续操作,否则点击"取消"。
236
+chinesesimp.checkSoftTip=安装程序检测到将安装的软件正在运行!%n%n点击"确定"终止软件后继续操作,否则点击"取消"。

Loading…
Cancel
Save