]> granicus.if.org Git - libjpeg-turbo/commitdiff
Move the TurboJPEG DLLs back into the system directory on Windows platforms. For...
authorDRC <dcommander@users.sourceforge.net>
Wed, 24 Apr 2013 05:26:42 +0000 (05:26 +0000)
committerDRC <dcommander@users.sourceforge.net>
Wed, 24 Apr 2013 05:26:42 +0000 (05:26 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@949 632fc199-4ca6-4c93-a231-07263d6284db

java/org/libjpegturbo/turbojpeg/TJLoader.java.in
release/libjpeg-turbo.nsi.in

index c5db200ea420cad6fa3685057e4501f6633e43f2..22353a5df10bad9668605aa5ac2453b94f4c6f2e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C)2011, 2013 D. R. Commander.  All Rights Reserved.
+ * Copyright (C)2011 D. R. Commander.  All Rights Reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -30,10 +30,6 @@ package org.libjpegturbo.turbojpeg;
 
 final class TJLoader {
   static void load() {
-    try {
-      System.loadLibrary("@TURBOJPEG_DLL_NAME@");
-    } catch (java.lang.UnsatisfiedLinkError e) {
-      System.load("@CMAKE_INSTALL_PREFIX@/bin/@TURBOJPEG_DLL_NAME@.dll");
-    }
+    System.loadLibrary("@TURBOJPEG_DLL_NAME@");
   }
 };
index a20328a8a2b9a02152a8fe1f238d6d05d80abf8b..8fcd764a08ee2c5ece9930ad4319c804c850d426 100755 (executable)
@@ -19,23 +19,31 @@ Section "@CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@ (required)"
 !endif
        SectionIn RO
 !ifdef GCC
-       IfFileExists $INSTDIR/bin/libturbojpeg.dll exists 0
+       IfFileExists $SYSDIR/libturbojpeg.dll exists 0
 !else
-       IfFileExists $INSTDIR/bin/turbojpeg.dll exists 0
+       IfFileExists $SYSDIR/turbojpeg.dll exists 0
 !endif
        goto notexists
        exists:
+!ifdef GCC
        MessageBox MB_OK "An existing version of the @CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@ is already installed.  Please uninstall it first."
+!else
+       MessageBox MB_OK "An existing version of the @CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@ or the TurboJPEG SDK is already installed.  Please uninstall it first."
+!endif
        quit
 
        notexists:
+       SetOutPath $SYSDIR
+!ifdef GCC
+       File "@CMAKE_BINARY_DIR@\libturbojpeg.dll"
+!else
+       File "@CMAKE_BINARY_DIR@\${BUILDDIR}turbojpeg.dll"
+!endif
        SetOutPath $INSTDIR\bin
 !ifdef GCC
        File "/oname=libjpeg-@DLL_VERSION@.dll" "@CMAKE_BINARY_DIR@\sharedlib\libjpeg-*.dll" 
-       File "@CMAKE_BINARY_DIR@\libturbojpeg.dll"
 !else
        File "@CMAKE_BINARY_DIR@\sharedlib\${BUILDDIR}jpeg@DLL_VERSION@.dll"
-       File "@CMAKE_BINARY_DIR@\${BUILDDIR}turbojpeg.dll"
 !endif
        File "@CMAKE_BINARY_DIR@\sharedlib\${BUILDDIR}cjpeg.exe"
        File "@CMAKE_BINARY_DIR@\sharedlib\${BUILDDIR}djpeg.exe"
@@ -97,14 +105,14 @@ Section "Uninstall"
 
 !ifdef GCC
        Delete $INSTDIR\bin\libjpeg-@DLL_VERSION@.dll
-       Delete $INSTDIR\bin\libturbojpeg.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 $INSTDIR\bin\jpeg@DLL_VERSION@.dll
-       Delete $INSTDIR\bin\turbojpeg.dll
+       Delete $SYSDIR\turbojpeg.dll
        Delete $INSTDIR\lib\jpeg.lib
        Delete $INSTDIR\lib\jpeg-static.lib
        Delete $INSTDIR\lib\turbojpeg.lib