Revision: 41455
          http://brlcad.svn.sourceforge.net/brlcad/?rev=41455&view=rev
Author:   starseeker
Date:     2010-11-23 20:21:39 +0000 (Tue, 23 Nov 2010)

Log Message:
-----------
Make use of the TCL_SYSTEM_INITTCL_PATH variable and spell out the init.tcl 
path for system tcl for tclcadAutoPath

Modified Paths:
--------------
    brlcad/branches/cmake/src/libtclcad/tclcadAutoPath.c

Modified: brlcad/branches/cmake/src/libtclcad/tclcadAutoPath.c
===================================================================
--- brlcad/branches/cmake/src/libtclcad/tclcadAutoPath.c        2010-11-23 
20:18:17 UTC (rev 41454)
+++ brlcad/branches/cmake/src/libtclcad/tclcadAutoPath.c        2010-11-23 
20:21:39 UTC (rev 41455)
@@ -81,6 +81,8 @@
 tclcad_auto_path(Tcl_Interp *interp)
 {
     struct bu_vls auto_path;
+    struct bu_vls tcl_library;
+    struct bu_vls system_tcl_library;
     struct bu_vls lappend;
     struct bu_vls tclcmd;
     struct bu_vls invocation_full_path;
@@ -121,11 +123,21 @@
     data = bu_brlcad_data("", 1);
 
     bu_vls_init(&auto_path);
+    bu_vls_init(&tcl_library);
+    bu_vls_init(&system_tcl_library);
     bu_vls_init(&lappend);
     bu_vls_init(&tclcmd);
     bu_vls_init(&invocation_full_path);
     bu_vls_init(&root_full_path);
     bu_vls_init(&build_full_path);
+
+    /* If we have a system init.tcl path passed in, put it in tcl_library */
+    bu_vls_sprintf(&system_tcl_library, "%s", TCL_SYSTEM_INITTCL_PATH);
+    if(bu_vls_strlen(&system_tcl_library) > 0) {
+      bu_vls_sprintf(&tcl_library, "set tcl_library %s", 
bu_vls_addr(&system_tcl_library));
+      Tcl_Eval(interp, bu_vls_addr(&tcl_library));
+      found_init_tcl = 1;
+    }
  
     /* determine if TCLCAD_LIBRARY_PATH is set */
     library_path = getenv("TCLCAD_LIBRARY_PATH");
@@ -421,6 +433,8 @@
 
     which_argv = NULL;
     bu_vls_free(&auto_path);
+    bu_vls_free(&system_tcl_library);
+    bu_vls_free(&tcl_library);
     bu_vls_free(&lappend);
 
     return;


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

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to