Install jpeg62.dll in SDK directory, not Windows system directory. Also, check whether SDK is already installed prior to re-installing

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@153 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
DRC
2010-02-25 05:52:44 +00:00
parent f19caa5e67
commit 7e0b499ee7
2 changed files with 36 additions and 8 deletions

View File

@@ -66,11 +66,19 @@ will effectively accelerate every dynamically linked libjpeg application on the
system. system.
The Windows version of libjpeg-turbo installs jpeg62.dll into The Windows version of libjpeg-turbo installs jpeg62.dll into
%systemroot%\system32. However, if jpeg62.dll also exists in an application's c:\libjpeg-turbo\bin, and the PATH environment variable can be modified such
install directory, then Windows will load the application's version of it that this directory is searched before any others that might contain
first. Thus, if an application ships with jpeg62.dll, then back up the jpeg62.dll. However, if jpeg62.dll also exists in an application's install
application's version of jpeg62.dll and copy %systemroot%\system32\jpeg62.dll directory, then Windows will load the application's version of it first. Thus,
into the application's install directory to accelerate it. if an application ships with jpeg62.dll, then back up the application's version
of jpeg62.dll and copy c:\libjpeg-turbo\bin\jpeg62.dll into the application's
install directory to accelerate it.
libjpeg-turbo's version of jpeg62.dll requires the Visual C++ 2008 C run time
DLL (msvcr90.dll). This library ships with more recent versions of Windows,
but users of older versions can obtain it from the Visual C++ 2008
Redistributable Package, which is available as a free download from Microsoft's
web site.
Mac applications typically embed their own copies of libjpeg.62.dylib inside Mac applications typically embed their own copies of libjpeg.62.dylib inside
the (hidden) application bundle, so it is not possible to globally replace the (hidden) application bundle, so it is not possible to globally replace

View File

@@ -12,12 +12,31 @@ UninstPage instfiles
Section "libjpeg-turbo SDK for ${PLATFORM} (required)" Section "libjpeg-turbo SDK for ${PLATFORM} (required)"
SectionIn RO SectionIn RO
!ifdef GCC
IfFileExists $SYSDIR/libturbojpeg.dll exists 0
!else
IfFileExists $SYSDIR/turbojpeg.dll exists 0
!endif
goto notexists
exists:
!ifdef GCC
MessageBox MB_OK "An existing version of the libjpeg-turbo SDK for ${PLATFORM} is already installed. Please uninstall it first."
!else
MessageBox MB_OK "An existing version of the libjpeg-turbo SDK for ${PLATFORM} or the TurboJPEG SDK is already installed. Please uninstall it first."
!endif
quit
notexists:
SetOutPath $SYSDIR SetOutPath $SYSDIR
!ifdef GCC !ifdef GCC
File "${WLIBDIR}\libturbojpeg.dll" File "${WLIBDIR}\libturbojpeg.dll"
File "${WLIBDIR}\libjpeg-62.dll"
!else !else
File "${WLIBDIR}\turbojpeg.dll" File "${WLIBDIR}\turbojpeg.dll"
!endif
SetOutPath $INSTDIR\bin
!ifdef GCC
File "${WLIBDIR}\libjpeg-62.dll"
!else
File "${WLIBDIR}\jpeg62.dll" File "${WLIBDIR}\jpeg62.dll"
!endif !endif
SetOutPath $INSTDIR\lib SetOutPath $INSTDIR\lib
@@ -62,14 +81,14 @@ Section "Uninstall"
DeleteRegKey HKLM "SOFTWARE\${APPNAME} ${VERSION}" DeleteRegKey HKLM "SOFTWARE\${APPNAME} ${VERSION}"
!ifdef GCC !ifdef GCC
Delete $SYSDIR\libjpeg-62.dll Delete $INSTDIR\bin\libjpeg-62.dll
Delete $SYSDIR\libturbojpeg.dll Delete $SYSDIR\libturbojpeg.dll
Delete $INSTDIR\lib\libturbojpeg.dll.a" Delete $INSTDIR\lib\libturbojpeg.dll.a"
Delete $INSTDIR\lib\libturbojpeg.a" Delete $INSTDIR\lib\libturbojpeg.a"
Delete $INSTDIR\lib\libjpeg.dll.a" Delete $INSTDIR\lib\libjpeg.dll.a"
Delete $INSTDIR\lib\libjpeg.a" Delete $INSTDIR\lib\libjpeg.a"
!else !else
Delete $SYSDIR\jpeg62.dll Delete $INSTDIR\bin\jpeg62.dll
Delete $SYSDIR\turbojpeg.dll Delete $SYSDIR\turbojpeg.dll
Delete $INSTDIR\lib\jpeg.lib Delete $INSTDIR\lib\jpeg.lib
Delete $INSTDIR\lib\jpeg-static.lib Delete $INSTDIR\lib\jpeg-static.lib
@@ -90,6 +109,7 @@ Section "Uninstall"
RMDir "$INSTDIR\include" RMDir "$INSTDIR\include"
RMDir "$INSTDIR\lib" RMDir "$INSTDIR\lib"
RMDir "$INSTDIR\bin"
RMDir "$INSTDIR" RMDir "$INSTDIR"
SectionEnd SectionEnd