/*
- * 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:
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@");
}
};
!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"
!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