|
275 | 275 | #define debug_str="" |
276 | 276 | #endif |
277 | 277 |
|
| 278 | +#define InstallTimeStamp GetDateTimeString('yyyymmdd-hhnnss','','') |
278 | 279 |
|
279 | 280 | [Setup] |
280 | 281 | AppName={#MyAppName} |
@@ -398,9 +399,9 @@ Name: CopyFbClientAsGds32Task; Description: {cm:CopyFbClientAsGds32Task}; Compon |
398 | 399 | [Run] |
399 | 400 | ; due to the changes required to support MSVC15 support for earlier versions is now broken. |
400 | 401 | #if Int(msvc_runtime_major_version,14) >= 14 |
401 | | -Filename: msiexec.exe; Parameters: "/qn /norestart /i ""{tmp}\vccrt{#msvc_runtime_library_version}_Win32.msi"" /L*v ""{tmp}\vccrt{#msvc_runtime_library_version}_Win32.log"" "; StatusMsg: "Installing MSVC 32-bit runtime libraries to system directory"; Check: HasWI30; Components: ClientComponent; |
| 402 | +Filename: msiexec.exe; Parameters: "/qn /norestart /i ""{tmp}\vccrt{#msvc_runtime_library_version}_Win32.msi"" /l*v ""{code:MsiexecLogDir}\vccrt{#msvc_runtime_library_version}_Win32-{#InstallTimeStamp}.log"" "; StatusMsg: "Installing MSVC 32-bit runtime libraries to system directory"; Check: InstallVCRT; Components: ClientComponent; |
402 | 403 | #if PlatformTarget == "x64" |
403 | | -Filename: msiexec.exe; Parameters: "/qn /norestart /i ""{tmp}\vccrt{#msvc_runtime_library_version}_x64.msi"" /L*v ""{tmp}\vccrt{#msvc_runtime_library_version}_x64.log"" "; StatusMsg: "Installing MSVC 64-bit runtime libraries to system directory"; Check: HasWI30; Components: ClientComponent; |
| 404 | +Filename: msiexec.exe; Parameters: "/qn /norestart /i ""{tmp}\vccrt{#msvc_runtime_library_version}_x64.msi"" /l*v ""{code:MsiexecLogDir}\vccrt{#msvc_runtime_library_version}_x64-{#InstallTimeStamp}.log"" "; StatusMsg: "Installing MSVC 64-bit runtime libraries to system directory"; Check: InstallVCRT; Components: ClientComponent; |
404 | 405 | #endif |
405 | 406 | #endif |
406 | 407 |
|
|
655 | 656 |
|
656 | 657 | init_secdb: integer; // Is set to UNDEFINED by default in InitializeSetup |
657 | 658 |
|
| 659 | + msilogdir: String; // Path to store logs from msiexec |
| 660 | +
|
| 661 | + novcrt: Boolean; // Do not install the VC runtime libs |
| 662 | +
|
658 | 663 | #ifdef setuplogging |
659 | 664 | // Not yet implemented - leave log in %TEMP% |
660 | 665 | // OkToCopyLog : Boolean; // Set when installation is complete. |
@@ -715,13 +720,17 @@ begin |
715 | 720 | if pos('FORCE',Uppercase(CommandLine)) > 0 then |
716 | 721 | ForceInstall:=True; |
717 | 722 |
|
| 723 | + if pos('NOMSVCRT', Uppercase(CommandLine) ) > 0 then |
| 724 | + novcrt := true; |
718 | 725 |
|
719 | | - cmdParams := TStringList.create; |
720 | | - for i:=0 to ParamCount do begin |
721 | | - cmdParams.add(ParamStr(i)); |
722 | | - if pos('SYSDBAPASSWORD', Uppercase(ParamStr(i)) ) > 0 then |
723 | | - SYSDBAPassword := Copy(ParamStr(i),Length('/SYSDBAPASSWORD=')+1,Length(ParamStr(i))-Length('/SYSDBAPASSWORD=') ); |
724 | | - end; |
| 726 | + cmdParams := TStringList.create; |
| 727 | + for i:=0 to ParamCount do begin |
| 728 | + cmdParams.add(ParamStr(i)); |
| 729 | + if pos('SYSDBAPASSWORD', Uppercase(ParamStr(i)) ) > 0 then |
| 730 | + SYSDBAPassword := SplitKeyValue( ParamStr(i), false ); |
| 731 | + if pos('MSILOGDIR', Uppercase( ParamStr(i) ) ) > 0 then |
| 732 | + msilogdir := SplitKeyValue( ParamStr(i), false ); |
| 733 | + end; |
725 | 734 | #ifdef iss_debug |
726 | 735 | ShowDebugDlg(cmdParams.text,''); |
727 | 736 | #endif |
@@ -1261,6 +1270,26 @@ begin |
1261 | 1270 | end; |
1262 | 1271 | end; |
1263 | 1272 |
|
| 1273 | +function MsiexecLogDir( nullstr: String ): String; |
| 1274 | +begin |
| 1275 | + if msilogdir = '' then |
| 1276 | + msilogdir := ExpandConstant('{tmp}'); |
| 1277 | + Result := msilogdir; |
| 1278 | +end; |
| 1279 | +
|
| 1280 | +function InstallVCRT: boolean; |
| 1281 | +begin |
| 1282 | + if novcrt then begin |
| 1283 | + Result := false; |
| 1284 | + exit; |
| 1285 | + end; |
| 1286 | + if HasNotWI30 then |
| 1287 | + Result := false |
| 1288 | + else |
| 1289 | + Result := true; |
| 1290 | +
|
| 1291 | +end; |
| 1292 | +
|
1264 | 1293 | begin |
1265 | 1294 | end. |
1266 | 1295 |
|
0 commit comments