system.
The Windows version of libjpeg-turbo installs jpeg62.dll into
-%systemroot%\system32. However, if jpeg62.dll also exists in an application's
-install directory, then Windows will load the application's version of it
-first. Thus, if an application ships with jpeg62.dll, then back up the
-application's version of jpeg62.dll and copy %systemroot%\system32\jpeg62.dll
-into the application's install directory to accelerate it.
+c:\libjpeg-turbo\bin, and the PATH environment variable can be modified such
+that this directory is searched before any others that might contain
+jpeg62.dll. However, if jpeg62.dll also exists in an application's install
+directory, then Windows will load the application's version of it first. Thus,
+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
the (hidden) application bundle, so it is not possible to globally replace
Section "libjpeg-turbo SDK for ${PLATFORM} (required)"
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
!ifdef GCC
File "${WLIBDIR}\libturbojpeg.dll"
- File "${WLIBDIR}\libjpeg-62.dll"
!else
File "${WLIBDIR}\turbojpeg.dll"
+!endif
+ SetOutPath $INSTDIR\bin
+!ifdef GCC
+ File "${WLIBDIR}\libjpeg-62.dll"
+!else
File "${WLIBDIR}\jpeg62.dll"
!endif
SetOutPath $INSTDIR\lib
DeleteRegKey HKLM "SOFTWARE\${APPNAME} ${VERSION}"
!ifdef GCC
- Delete $SYSDIR\libjpeg-62.dll
+ Delete $INSTDIR\bin\libjpeg-62.dll
Delete $SYSDIR\libturbojpeg.dll
Delete $INSTDIR\lib\libturbojpeg.dll.a"
Delete $INSTDIR\lib\libturbojpeg.a"
Delete $INSTDIR\lib\libjpeg.dll.a"
Delete $INSTDIR\lib\libjpeg.a"
!else
- Delete $SYSDIR\jpeg62.dll
+ Delete $INSTDIR\bin\jpeg62.dll
Delete $SYSDIR\turbojpeg.dll
Delete $INSTDIR\lib\jpeg.lib
Delete $INSTDIR\lib\jpeg-static.lib
RMDir "$INSTDIR\include"
RMDir "$INSTDIR\lib"
+ RMDir "$INSTDIR\bin"
RMDir "$INSTDIR"
SectionEnd