Revision: 40562
http://brlcad.svn.sourceforge.net/brlcad/?rev=40562&view=rev
Author: starseeker
Date: 2010-09-14 20:00:28 +0000 (Tue, 14 Sep 2010)
Log Message:
-----------
Add some test code - more like notes, really - on how to approach this. I'm
going to try and use Tcl's functionality here if possible, since that should be
cross platform and realpath may not be
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-09-14
16:05:54 UTC (rev 40561)
+++ brlcad/branches/cmake/src/libtclcad/tclcadAutoPath.c 2010-09-14
20:00:28 UTC (rev 40562)
@@ -227,7 +227,22 @@
if (!which_argv) {
which_argv = bu_argv0_full_path();
}
+ char resolvedargv0[MAXPATHLEN];
+ char resolvedroot[MAXPATHLEN];
+ char resolvedbuilddir[MAXPATHLEN];
+ realpath(which_argv, resolvedargv0);
+ printf("string of invocation binary: %s\n", resolvedargv0);
+ realpath(root, resolvedroot);
+ printf("root: %s\n", resolvedroot);
+ realpath(BUILD_BINARY_DIR, resolvedbuilddir);
+ printf("root: %s\n", resolvedbuilddir);
+ if(strstr(resolvedargv0, resolvedbuilddir))
+ printf("Running from build directory\n");
+
+ if(strstr(resolvedargv0, resolvedroot))
+ printf("Running from installed directory\n");
+
/* get name of installation binary */
snprintf(buffer, MAX_BUF, "%s%cbin%c%s", root, BU_DIR_SEPARATOR,
BU_DIR_SEPARATOR, bu_getprogname());
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits