Opened 11 years ago

Closed 9 years ago

#35 closed defect (fixed)

DLL update procedure

Reported by: jef Owned by: jef
Priority: major Component: Installer
Version: 1.0 Keywords: dllupdate
Cc: hhayashi, warmerdam

Description

Some DLLs should be update DLLs in %WINDIR%\system32 instead of just installing them into %OSGEO4W_ROOT%, if the are there.

E.g. it's likely to find an elder version of OpenSSL DLLs in %WINDIR%\system32, which breaks everything using SSL (like libcurl and in turn GDAL and everything that depends on it). This only applies to EXEs/DLLs that are loaded from different path than %OSGEO4W_ROOT%\bin (like Python extension, GRASS executables). About the DLL search order: http://msdn.microsoft.com/en-us/library/ms682586(VS.85).aspx

We should have a tool that can retrieve the version of a DLL and if necessary replaces it with a newer one. I found a code snippet that should how to retrieve the DLL version on http://www.codeproject.com/KB/DLL/dllversion.aspx

The update procedure should also consider replace on reboot, if the older version of the DLL is currently in use (osgeo4w-setup has code to do that).

A related posting of the qgis-developer list: http://lists.osgeo.org/pipermail/qgis-developer/2009-January/005733.html

Attachments (1)

diff (3.3 KB) - added by jef 11 years ago.
patch that adds a -reboot option to dllupdate that creates %OSGEO4W_ROOT%/etc/setup/reboot when a reboot is necessary, lets setup pick that up, issue a message box and remove the file.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 11 years ago by warmerdam

Owner: changed from osgeo4w-dev@… to warmerdam
Status: newassigned

I have:

  • Implemented a dllupdate utility program that will replace a windows\system32 dll with a newer version if we have one. It is suitable for use from post install scripts.
  • I have factored libeay32.dll and ssleay32.dll out into a new pkg-openssl.
  • I have added a post install script in this package to use dllupdate to install these files into \windows\system32 if we appear to have a newer version.

I would appreciate testing of the new setting (via a standard package upgrade on a problem system).

Leaving open pending this test.

I would note that the PackagingInstructions have not been updated to reflect the availability of dllupdate (now part of pkg-msvcrt).

comment:2 Changed 11 years ago by jef

Summary: DLL installation procedureDLL update procedure

It might work better if we tried to install libeay32.dll/ssleay32.dll instead of libeay23.dll/ssleay23.dll ;)

Also Windows might be installed on a different drive. So I'd recommend to use %WINDIR% instead of hardcoding C:\WINDOWS.

Finally it would be nice if the installer scripts had a way to tell the installer to notify the user that a reboot is necessary. Maybe by creating a certain file (like %OSGEO4W_ROOT%/etc/reboot), which dllupdate could do in case a reboot is due.

comment:3 Changed 11 years ago by warmerdam

Keywords: dllupdate added

openssl.bat has been fixed to try and install libeay32.dll and ssleay32.dll in -2 package.

I have modified ddlupdate to use %WINDIR%, and this is in the -2 msvcrt package.

Modifying setup to report in use file replacement is more involved. I would be interested in doing it but I can't say when I will get to it. It might be prudent if it were filed as a distinct enhancement ticket.

Changed 11 years ago by jef

Attachment: diff added

patch that adds a -reboot option to dllupdate that creates %OSGEO4W_ROOT%/etc/setup/reboot when a reboot is necessary, lets setup pick that up, issue a message box and remove the file.

comment:4 Changed 11 years ago by (none)

Milestone 1.0 Release deleted

comment:5 Changed 9 years ago by warmerdam

Cc: hhayashi warmerdam added
Owner: changed from warmerdam to jef
Status: assignednew

Jurgen,

Sorry for neglecting this so long. I see I don't have my OSGeo4W setup.exe development environment setup any more. Perhaps you would like to apply the change and update packages accordingly yourself? Some notes are at:

http://trac.osgeo.org/osgeo4w/wiki/SetupDevelopment

I am adding Hayashi-san as a cc since he has done the most recent work on setup.exe and might want to know what is happening.

comment:6 in reply to:  5 Changed 9 years ago by jef

Resolution: fixed
Status: newclosed

Applied in r1168 (setup) and r1169 (dllupdate).

Also updated in testing:

  • osgeo4w-setup.exe in download and the packages
  • setup: containing the installer and dllupdate),
  • msvcrt: handling a reboot notification from vcredist install)
  • openssl: running dllupdate
Note: See TracTickets for help on using tickets.