Ahora se instalan los drivers ODBC junto con el instalador

This commit is contained in:
Juan Ferrer Toribio 2016-03-18 17:39:46 +01:00
parent 765e03052f
commit cc7bc96349
3 changed files with 117 additions and 89 deletions

Binary file not shown.

BIN
deps/psqlodbc.msi vendored Normal file

Binary file not shown.

View File

@ -48,6 +48,8 @@ Source: "fonts\*"; \
DestDir: "{fonts}"; Flags: onlyifdoesntexist uninsneveruninstall DestDir: "{fonts}"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "ocx\*"; \ Source: "ocx\*"; \
DestDir: {sys}; Flags: onlyifdoesntexist regserver 32bit DestDir: {sys}; Flags: onlyifdoesntexist regserver 32bit
Source: "deps\*"; \
DestDir: {tmp}; Flags: deleteafterinstall; AfterInstall: InstallDep;
[Tasks] [Tasks]
Name: "desktopicon"; \ Name: "desktopicon"; \
@ -156,3 +158,29 @@ Name: "{commondesktop}\Laboral"; \
WorkingDir: "{app}"; \ WorkingDir: "{app}"; \
Tasks: desktopicon; \ Tasks: desktopicon; \
Components: lab Components: lab
[Code]
procedure InstallDep;
var
StatusText: String;
ResultCode: Integer;
MsiFile: String;
begin
MsiFile := ExpandConstant(CurrentFilename);
StatusText := WizardForm.StatusLabel.Caption;
WizardForm.StatusLabel.Caption := CurrentFilename +'...';
WizardForm.ProgressGauge.Style := npbstMarquee;
Log(WizardSelectedComponents(False));
try
if not Exec('msiexec', '/quiet /i '+ MsiFile, '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
begin
MsgBox(CurrentFilename +' installation failed with code: ' + IntToStr(ResultCode) + '.',
mbError, MB_OK);
WizardForm.Close;
end;
finally
WizardForm.StatusLabel.Caption := StatusText;
WizardForm.ProgressGauge.Style := npbstNormal;
end;
end;