[PD-cvs] SF.net SVN: pure-data: [9850] branches/pd-extended/v0-40

eighthave at users.sourceforge.net eighthave at users.sourceforge.net
Sun May 18 20:35:45 CEST 2008


Revision: 9850
          http://pure-data.svn.sourceforge.net/pure-data/?rev=9850&view=rev
Author:   eighthave
Date:     2008-05-18 11:35:45 -0700 (Sun, 18 May 2008)

Log Message:
-----------
- removed old Tcl/Tk hack for setting the LIBQUICKTIME_PLUGIN_DIR and wrote it
  in C inside pdp_qt.c, where it is actually needed.

Modified Paths:
--------------
    branches/pd-extended/v0-40/externals/pdp/modules/image_io/pdp_qt.c
    branches/pd-extended/v0-40/pd/src/u_main.tk

Modified: branches/pd-extended/v0-40/externals/pdp/modules/image_io/pdp_qt.c
===================================================================
--- branches/pd-extended/v0-40/externals/pdp/modules/image_io/pdp_qt.c	2008-05-18 18:02:14 UTC (rev 9849)
+++ branches/pd-extended/v0-40/externals/pdp/modules/image_io/pdp_qt.c	2008-05-18 18:35:45 UTC (rev 9850)
@@ -26,8 +26,8 @@
 
 #include "pdp.h"
 #include "pdp_llconv.h"
+#include "s_stuff.h" // need to get sys_libdir for libquicktime plugins
 
-
 #define min(x,y) ((x<y)?(x):(y))
 
 
@@ -967,6 +967,19 @@
     pdp_qt_setup_common(pdp_qt_tilde_class);
 
     class_addmethod(pdp_qt_tilde_class, (t_method)pdp_qt_dsp, gensym("dsp"), 0);
+
+#ifdef __APPLE__
+    /* this is necessary for pdp_qt to find the embedded libquicktime plugins */
+    char buf[FILENAME_MAX];
+    char realpath_buf[FILENAME_MAX];
+    strncpy(buf, sys_libdir->s_name, FILENAME_MAX - 20);
+    strcat(buf, "/../lib/libquicktime");
+    if(realpath(buf, realpath_buf))
+    {
+        post("[pdp_qt]: setting LIBQUICKTIME_PLUGIN_DIR to:\n   %s", realpath_buf);
+        setenv("LIBQUICKTIME_PLUGIN_DIR", realpath_buf, 0); // 0 means don't overwrite existing value
+    }
+#endif
 }
 
 #ifdef __cplusplus

Modified: branches/pd-extended/v0-40/pd/src/u_main.tk
===================================================================
--- branches/pd-extended/v0-40/pd/src/u_main.tk	2008-05-18 18:02:14 UTC (rev 9849)
+++ branches/pd-extended/v0-40/pd/src/u_main.tk	2008-05-18 18:35:45 UTC (rev 9850)
@@ -143,11 +143,6 @@
     set pd_gui2 [string range $argv0 0 [expr [string last / $argv0 ] - 1]]
     set pd_guidir [file normalize $pd_gui2/..]
     load $pd_guidir/bin/libPdTcl.dylib
-    # this is the embedded libquicktime can find its embedded plugins
-    set libquicktime_plugin_dir \
-        [file normalize $pd_gui2/../../lib/libquicktime]
-    puts stderr "Setting LIBQUICKTIME_PLUGIN_DIR: $libquicktime_plugin_dir"
-    set env(LIBQUICKTIME_PLUGIN_DIR) $libquicktime_plugin_dir
     set pd_tearoff 0
     global pd_macready
     set pd_macready 0


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Pd-cvs mailing list