Revision: 42204
          http://brlcad.svn.sourceforge.net/brlcad/?rev=42204&view=rev
Author:   brlcad
Date:     2011-01-13 03:26:20 +0000 (Thu, 13 Jan 2011)

Log Message:
-----------
for some reason, 'create interp' goes through a different initialization 
process which causes a failure to find init.tcl if we try to run uninstalled.  
it checks [tcl::pkgconfig get scriptdir,runtime] but does not respect 
$tcl_library.  it DOES, however, respect env(TCL_LIBRARY) so make sure we set 
that too when we're initializing unless the user already has it set to 
something.

Modified Paths:
--------------
    brlcad/trunk/src/libtclcad/tclcadAutoPath.c

Modified: brlcad/trunk/src/libtclcad/tclcadAutoPath.c
===================================================================
--- brlcad/trunk/src/libtclcad/tclcadAutoPath.c 2011-01-13 03:12:49 UTC (rev 
42203)
+++ brlcad/trunk/src/libtclcad/tclcadAutoPath.c 2011-01-13 03:26:20 UTC (rev 
42204)
@@ -223,7 +223,7 @@
     snprintf(buffer, MAX_BUF, "set tcl_library");
     Tcl_Eval(interp, buffer);
     bu_vls_strncat(&auto_path, Tcl_GetStringResult(interp), MAX_BUF);
-
+    
     /* get string of invocation binary */
     which_argv = bu_which(bu_argv0_full_path());
     if (!which_argv) {
@@ -431,6 +431,18 @@
                } else {
                    found_init_tcl=1;
                }
+
+               /* extra measures necessary for "create interp":
+                * determine if TCL_LIBRARY is set, and set it if not.
+                */
+               library_path = getenv("TCL_LIBRARY");
+               if (!library_path) {
+                   /* this REALLY sets it */
+                   snprintf(buffer, MAX_BUF, "set env(TCL_LIBRARY) {%s}", 
srcpath);
+                   if (Tcl_Eval(interp, buffer)) {
+                       bu_log("Tcl_Eval ERROR:\n%s\n", 
Tcl_GetStringResult(interp));
+                   }
+               }
            }
        }
 


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

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to