Revision: 77526
http://sourceforge.net/p/brlcad/code/77526
Author: starseeker
Date: 2020-10-22 00:00:14 +0000 (Thu, 22 Oct 2020)
Log Message:
-----------
Shouldn't need the parent dir lookup with the approach we ended up with - pull
in the simpler trunk version of this logic.
Modified Paths:
--------------
brlcad/branches/thirdparty_rework/src/libtclcad/init.c
Modified: brlcad/branches/thirdparty_rework/src/libtclcad/init.c
===================================================================
--- brlcad/branches/thirdparty_rework/src/libtclcad/init.c 2020-10-21
23:50:28 UTC (rev 77525)
+++ brlcad/branches/thirdparty_rework/src/libtclcad/init.c 2020-10-22
00:00:14 UTC (rev 77526)
@@ -97,47 +97,18 @@
char libdir[MAXPATHLEN] = {0};
bu_dir(libdir, MAXPATHLEN, BU_DIR_LIB, NULL);
if (strlen(libdir)) {
- struct bu_vls initpath = BU_VLS_INIT_ZERO;
struct bu_vls lib_path = BU_VLS_INIT_ZERO;
bu_vls_sprintf(&lib_path, "%s%ctcl%s/init.tcl", libdir,
BU_DIR_SEPARATOR, TCL_VERSION);
if (bu_file_exists(bu_vls_cstr(&lib_path), NULL)) {
+ struct bu_vls initpath = BU_VLS_INIT_ZERO;
bu_vls_sprintf(&lib_path, "%s%ctcl%s", libdir, BU_DIR_SEPARATOR,
TCL_VERSION);
bu_vls_printf(&initpath, "set tcl_library {%s}",
bu_vls_cstr(&lib_path));
if (Tcl_Eval(interp, bu_vls_addr(&initpath))) {
- bu_log("Problem initializing tcl_library to system init.tcl
path: Tcl_Eval ERROR:\n%s\n", Tcl_GetStringResult(interp));
+ bu_log("Problem initializing tcl_library to init.tcl path:
Tcl_Eval ERROR:\n%s\n", Tcl_GetStringResult(interp));
}
- } else {
- /* For superbuilds, we may need to look one directory up. Only do
this when we're not installed. */
- int installed = 0;
- struct bu_vls ppath = BU_VLS_INIT_ZERO;
- bu_path_component(&ppath, libdir, BU_PATH_DIRNAME);
- {
- char inst[MAXPATHLEN] = {0};
- bu_dir(inst, MAXPATHLEN, BU_DIR_INSTALL, NULL);
- if (BU_STR_EQUAL(bu_vls_cstr(&ppath), inst)) {
- installed = 1;
- }
- }
- if (!installed) {
- struct bu_vls ptail = BU_VLS_INIT_ZERO;
- struct bu_vls tpath = BU_VLS_INIT_ZERO;
- bu_path_component(&ptail, libdir, BU_PATH_BASENAME);
- bu_path_component(&tpath, bu_vls_cstr(&ppath), BU_PATH_DIRNAME);
- bu_vls_sprintf(&lib_path, "%s%c%s%ctcl%s/init.tcl",
bu_vls_cstr(&tpath), BU_DIR_SEPARATOR, bu_vls_cstr(&ptail), BU_DIR_SEPARATOR,
TCL_VERSION);
- if (bu_file_exists(bu_vls_cstr(&lib_path), NULL)) {
- bu_vls_sprintf(&lib_path, "%s%c%s%ctcl%s",
bu_vls_cstr(&tpath), BU_DIR_SEPARATOR, bu_vls_cstr(&ptail), BU_DIR_SEPARATOR,
TCL_VERSION);
- bu_vls_printf(&initpath, "set tcl_library {%s}",
bu_vls_cstr(&lib_path));
- if (Tcl_Eval(interp, bu_vls_addr(&initpath))) {
- bu_log("Problem initializing tcl_library to system
init.tcl path: Tcl_Eval ERROR:\n%s\n", Tcl_GetStringResult(interp));
- }
- }
- bu_vls_free(&tpath);
- bu_vls_free(&ptail);
- }
- bu_vls_free(&ppath);
+ bu_vls_free(&initpath);
}
bu_vls_free(&lib_path);
- bu_vls_free(&initpath);
}
if (Tcl_Init(interp) == TCL_ERROR) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits