]> granicus.if.org Git - libjpeg-turbo/commitdiff
Install jpeg62.dll in SDK directory, not Windows system directory. Also, check wheth...
authorDRC <dcommander@users.sourceforge.net>
Thu, 25 Feb 2010 05:52:44 +0000 (05:52 +0000)
committerDRC <dcommander@users.sourceforge.net>
Thu, 25 Feb 2010 05:52:44 +0000 (05:52 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@153 632fc199-4ca6-4c93-a231-07263d6284db

README-turbo.txt
release/libjpeg-turbo.nsi

index 684f9f4cda7533bf91842e46568e4cb76355bf58..4704114fbe2b115bac49cf110fa8b5a1bf7ce381 100755 (executable)
@@ -66,11 +66,19 @@ will effectively accelerate every dynamically linked libjpeg application on the
 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
index 6142d664032790785df4864ccb696607a24c2141..28c6d5633aa22da955703a5fb620477726175aae 100644 (file)
@@ -12,12 +12,31 @@ UninstPage instfiles
 
 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
@@ -62,14 +81,14 @@ Section "Uninstall"
        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
@@ -90,6 +109,7 @@ Section "Uninstall"
 
        RMDir "$INSTDIR\include"
        RMDir "$INSTDIR\lib"
+       RMDir "$INSTDIR\bin"
        RMDir "$INSTDIR"
 
 SectionEnd