Repository: incubator-trafodion
Updated Branches:
  refs/heads/master cc915f3ff -> 196e6f496


TRAFODION-1893
Remove vcredist from win-odbc build


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/78139dde
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/78139dde
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/78139dde

Branch: refs/heads/master
Commit: 78139ddedfbf943178aa2a57136eb65bea5681c5
Parents: ea16d38
Author: rwbzx <xiang.zh...@esgyn.cn>
Authored: Fri Oct 14 17:33:02 2016 +0800
Committer: rwbzx <xiang.zh...@esgyn.cn>
Committed: Fri Oct 14 17:33:02 2016 +0800

----------------------------------------------------------------------
 .../Install/win64_installer/installer.iss       | 45 +++++++++++++++-----
 1 file changed, 34 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/78139dde/win-odbc64/Install/win64_installer/installer.iss
----------------------------------------------------------------------
diff --git a/win-odbc64/Install/win64_installer/installer.iss 
b/win-odbc64/Install/win64_installer/installer.iss
index 2f7c952..90a1610 100644
--- a/win-odbc64/Install/win64_installer/installer.iss
+++ b/win-odbc64/Install/win64_installer/installer.iss
@@ -24,7 +24,6 @@
 #define MyAppURL ""
 #define MyDriverName "TRAF ODBC 1.0"
 #define BUILDDIR  GetEnv('BUILDDIR')
-#define VCREDISTDIR GetEnv('VC_REDIST_DIR')
 
 [Setup]
 ; NOTE: The value of AppId uniquely identifies this application.
@@ -49,7 +48,6 @@ UninstallDisplayName={#MyAppName}
 ArchitecturesAllowed=x64
 SetupLogging=yes
 
-
 [Languages]
 Name: "english"; MessagesFile: "compiler:Default.isl"
 
@@ -76,15 +74,6 @@ Root: HKLM; SubKey: 
Software\ODBC\ODBCINST.INI\{#MyDriverName}; ValueType: strin
 Root: HKLM; SubKey: Software\ODBC\ODBCINST.INI\{#MyDriverName}; ValueType: 
string; ValueName: CertificateDir; ValueData: SYSTEM_DEFAULT ;Flags: 
uninsdeletekey
 Root: HKLM; SubKey: Software\ODBC\ODBCINST.INI\{#MyDriverName}; ValueType: 
string; ValueName: CPTimeout; ValueData: 60 ;Flags: uninsdeletekey
 
-[Code]
-[Files]
-Source: "{#VCREDISTDIR}\vcredist_x64.exe"; DestDir: {tmp}; Flags: 
deleteafterinstall
-
-[Run]
-; add the Parameters, WorkingDir and StatusMsg as you wish, just keep here
-; the conditional installation Check
-Filename: "{tmp}\vcredist_x64.exe"; Check: VCRedistNeedsInstall
-
 [UninstallDelete]
 Type: filesandordirs; Name: "{app}"
 
@@ -152,6 +141,40 @@ begin
   Result := (GetUninstallString() <> '');
 end;
 
+procedure CurStepChanged(CurStep: TSetupStep);
+var
+  bRedistNeedsInstall: Boolean;
+  sDefaultBrowserName: String;
+  sDefaultBrowserReg: String;
+  sDefaultBrowserValue: String;
+  iQuotePos: Integer;
+  lLength: Longint;
+  iRetCode: Integer;
+begin
+  if CurStep=ssPostInstall then
+  begin
+    bRedistNeedsInstall := VCRedistNeedsInstall();
+    if bRedistNeedsInstall=True then
+    begin
+      MsgBox('Install of Visual C++ Redistributable Packages for Visual Studio 
2013 is not dectected.'+ #13#10#13#10 + 'Please download vcredist_x64.exe from 
Microsoft Download Centre and install it.', mbInformation, MB_OK);
+      if 
RegQueryStringValue(HKCU,'Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice','Progid',sDefaultBrowserName)
 then
+      begin
+        sDefaultBrowserReg := sDefaultBrowserName + '\shell\open\command';
+        if 
RegQueryStringValue(HKCR,sDefaultBrowserReg,'',sDefaultBrowserValue) then
+        begin
+          iQuotePos := Pos('"',sDefaultBrowserValue);
+          Delete(sDefaultBrowserValue,iQuotePos,1);
+          lLength := Length(sDefaultBrowserValue);
+          iQuotePos := Pos('"',sDefaultBrowserValue);
+          Delete(sDefaultBrowserValue,iQuotePos,lLength);
+          Exec(sDefaultBrowserValue, 
'http://www.microsoft.com/en-us/download/details.aspx?id=40784', '', SW_SHOW, 
ewNoWait, iRetCode)
+        end
+      end
+    end
+  end
+end;   
+
+
 function InitializeSetup: Boolean;
 var
   V: Integer;

Reply via email to