Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Plisson <damien.plisson@yahoo.fr>2009-11-02 14:20:31 +0300
committerDamien Plisson <damien.plisson@yahoo.fr>2009-11-02 14:20:31 +0300
commit3b43a5228e37e8cb79063474295a951c423497b3 (patch)
tree42c4ef998bf36a442d3848a4e0c45909376da45e /source/blender
parentda1765765baf3bc84059548a43beec0c3a1c2d41 (diff)
Mac / COCOA :
- revert tiff load/save to use standard libtiff (to ensure 100% colorimetry & alpha interpretation across platforms) - include patch #18720 to fix load of libtiff dynlib (if present on system)
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/imbuf/CMakeLists.txt9
-rw-r--r--source/blender/imbuf/SConscript4
-rw-r--r--source/blender/imbuf/intern/dynlibtiff.c30
-rw-r--r--source/blender/imbuf/intern/readimage.c4
-rw-r--r--source/blender/imbuf/intern/writeimage.c4
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c2
6 files changed, 35 insertions, 18 deletions
diff --git a/source/blender/imbuf/CMakeLists.txt b/source/blender/imbuf/CMakeLists.txt
index 55497fdabb7..336f4cc70b0 100644
--- a/source/blender/imbuf/CMakeLists.txt
+++ b/source/blender/imbuf/CMakeLists.txt
@@ -24,13 +24,8 @@
#
# ***** END GPL LICENSE BLOCK *****
-IF(WITH_COCOA)
- FILE(GLOB SRC intern/*.c intern/*.m)
- LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/dynlibtiff.c")
- LIST(REMOVE_ITEM SRC "${CMAKE_CURRENT_SOURCE_DIR}/intern/tiff.c")
-ELSE(WITH_COCOA)
- FILE(GLOB SRC intern/*.c)
-ENDIF(WITH_COCOA)
+FILE(GLOB SRC intern/*.c)
+
SET(INC
. ../makesdna ../../../intern/guardedalloc ../../../intern/memutil ../blenlib
diff --git a/source/blender/imbuf/SConscript b/source/blender/imbuf/SConscript
index 9684c19b247..a8d91b2d31e 100644
--- a/source/blender/imbuf/SConscript
+++ b/source/blender/imbuf/SConscript
@@ -2,10 +2,6 @@
Import ('env')
sources = env.Glob('intern/*.c')
-if env['WITH_GHOST_COCOA']:
- sources += env.Glob('intern/*.m')
- sources.remove('intern/dynlibtiff.c')
- sources.remove('intern/tiff.c')
incs = '. ../makesdna #/intern/guardedalloc #/intern/memutil ../blenlib'
incs += ' ../avi ../blenkernel'
diff --git a/source/blender/imbuf/intern/dynlibtiff.c b/source/blender/imbuf/intern/dynlibtiff.c
index b9186e482c5..6db83b37c05 100644
--- a/source/blender/imbuf/intern/dynlibtiff.c
+++ b/source/blender/imbuf/intern/dynlibtiff.c
@@ -78,6 +78,34 @@ void libtiff_loadlibtiff(void)
if (libtiff != NULL) return;
/* Try to find libtiff in a couple of standard places */
+#ifdef __APPLE__
+ /* OSX has version specific library */
+ //standard install location
+ libtiff = PIL_dynlib_open("/usr/local/lib/libtiff.dylib");
+ if (libtiff != NULL) return;
+ libtiff = PIL_dynlib_open("/usr/local/lib/libtiff.3.dylib");
+ if (libtiff != NULL) return;
+ //inside the blender app package contents/resources
+ libtiff = PIL_dynlib_open("@executable_path/../resources/libtiff.dylib");
+ if (libtiff != NULL) return;
+ libtiff = PIL_dynlib_open("@executable_path/../resources/libtiff.3.dylib");
+ if (libtiff != NULL) return;
+ //inside the blender app package contents/frameworks
+ libtiff = PIL_dynlib_open("@executable_path/../frameworks/libtiff.dylib");
+ if (libtiff != NULL) return;
+ libtiff = PIL_dynlib_open("@executable_path/../frameworks/libtiff.3.dylib");
+ if (libtiff != NULL) return;
+ //along side the blender app package
+ libtiff = PIL_dynlib_open("@executable_path/../../../libtiff.dylib");
+ if (libtiff != NULL) return;
+ libtiff = PIL_dynlib_open("@executable_path/../../../libtiff.3.dylib");
+ if (libtiff != NULL) return;
+ //inside the blender app package contents/MacOS
+ libtiff = PIL_dynlib_open("@executable_path/libtiff.dylib");
+ if (libtiff != NULL) return;
+ libtiff = PIL_dynlib_open("@executable_path/libtiff.3.dylib");
+ if (libtiff != NULL) return;
+#else
libtiff = PIL_dynlib_open("libtiff.so");
if (libtiff != NULL) return;
libtiff = PIL_dynlib_open("libtiff.so.3");
@@ -88,7 +116,6 @@ void libtiff_loadlibtiff(void)
if (libtiff != NULL) return;
libtiff = PIL_dynlib_open("/usr/lib/libtiff.so.3");
if (libtiff != NULL) return;
- /* OSX has version specific library */
#ifdef __x86_64__
libtiff = PIL_dynlib_open("/usr/lib64/libtiff.so.3");
if (libtiff != NULL) return;
@@ -97,6 +124,7 @@ void libtiff_loadlibtiff(void)
if (libtiff != NULL) return;
/* For solaris */
libtiff = PIL_dynlib_open("/usr/openwin/lib/libtiff.so");
+#endif
}
diff --git a/source/blender/imbuf/intern/readimage.c b/source/blender/imbuf/intern/readimage.c
index 5003127dfb6..f248e6bb6c4 100644
--- a/source/blender/imbuf/intern/readimage.c
+++ b/source/blender/imbuf/intern/readimage.c
@@ -57,7 +57,7 @@
#include "IMB_dpxcineon.h"
#include "BKE_global.h"
-#if defined(__APPLE__) && defined(GHOST_COCOA)
+#if defined(__APPLE__) && defined(IMBUF_COCOA)
#include "IMB_cocoa.h"
#else
#include "IMB_tiff.h"
@@ -157,7 +157,7 @@ ImBuf *IMB_ibImageFromMemory(int *mem, int size, int flags) {
ibuf = imb_loadcineon((uchar *)mem, size, flags);
if (ibuf) return(ibuf);
-#if defined(__APPLE__) && defined(GHOST_COCOA)
+#if defined(__APPLE__) && defined(IMBUF_COCOA)
ibuf = imb_cocoaLoadImage((uchar *)mem, size, flags);
if(ibuf) {
ibuf->ftype = TIF;
diff --git a/source/blender/imbuf/intern/writeimage.c b/source/blender/imbuf/intern/writeimage.c
index f8452ac4cd4..06ce59cddec 100644
--- a/source/blender/imbuf/intern/writeimage.c
+++ b/source/blender/imbuf/intern/writeimage.c
@@ -53,7 +53,7 @@
#include "IMB_bmp.h"
#include "IMB_radiance_hdr.h"
-#if defined(__APPLE__) && defined(GHOST_COCOA)
+#if defined(__APPLE__) && defined(IMBUF_COCOA)
#include "IMB_cocoa.h"
#else
#include "IMB_tiff.h"
@@ -119,7 +119,7 @@ short IMB_saveiff(struct ImBuf *ibuf, char *name, int flags)
return imb_saveiris(ibuf, name, flags);
}
-#if defined(__APPLE__) && defined(GHOST_COCOA)
+#if defined(__APPLE__) && defined(IMBUF_COCOA)
if (IS_tiff(ibuf)) {
if(ibuf->rect==NULL && ibuf->rect_float)
IMB_rect_from_float(ibuf);
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index 96199a2a158..8097822acbc 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -247,9 +247,7 @@ void WM_exit(bContext *C)
BPY_end_python();
#endif
-#if !(defined(__APPLE__) && defined(GHOST_COCOA))
libtiff_exit();
-#endif
#ifdef WITH_QUICKTIME
quicktime_exit();