Revision: 78017
          http://sourceforge.net/p/brlcad/code/78017
Author:   starseeker
Date:     2020-12-19 00:13:43 +0000 (Sat, 19 Dec 2020)
Log Message:
-----------
More bu_brlcad_root changes

Modified Paths:
--------------
    brlcad/trunk/src/archer/plugins/Wizards/tankwizard.tcl
    brlcad/trunk/src/archer/plugins/Wizards/tirewizard.tcl
    brlcad/trunk/src/brlman/brlman.tcl
    brlcad/trunk/src/burst/burst.cpp
    brlcad/trunk/src/libdm/osgl/dm-osgl.cpp
    brlcad/trunk/src/libdm/osgl/if_osgl.cpp
    brlcad/trunk/src/librt/primitives/primitive_util.c
    brlcad/trunk/src/qged/cadimport.cpp

Modified: brlcad/trunk/src/archer/plugins/Wizards/tankwizard.tcl
===================================================================
--- brlcad/trunk/src/archer/plugins/Wizards/tankwizard.tcl      2020-12-19 
00:03:09 UTC (rev 78016)
+++ brlcad/trunk/src/archer/plugins/Wizards/tankwizard.tcl      2020-12-19 
00:13:43 UTC (rev 78017)
@@ -26,15 +26,10 @@
 #       This is a script for loading/registering the tank wizard.
 #
 
-set brlcadDataPath [bu_brlcad_root "share/plugins"]
+set brlcadDataPath [file join [bu_dir data] plugins]
 # puts "pwd is [pwd], path is $brlcadDataPath"
 set filename [file join $brlcadDataPath archer Wizards tankwizard 
TankWizard.tcl]
 if { ![file exists $filename] } {
-    # non-tclscript resource, look in the source invocation path
-    set brlcadDataPath [bu_brlcad_root "src"]
-    set filename [file join $brlcadDataPath archer plugins Wizards tankwizard 
TankWizard.tcl]
-}
-if { ![file exists $filename] } {
     puts "Could not load the TankWizard plugin, skipping $filename"
     return
 }

Modified: brlcad/trunk/src/archer/plugins/Wizards/tirewizard.tcl
===================================================================
--- brlcad/trunk/src/archer/plugins/Wizards/tirewizard.tcl      2020-12-19 
00:03:09 UTC (rev 78016)
+++ brlcad/trunk/src/archer/plugins/Wizards/tirewizard.tcl      2020-12-19 
00:13:43 UTC (rev 78017)
@@ -23,15 +23,10 @@
 #       This is a script for loading/registering the tire wizard.
 #
 
-set brlcadDataPath [bu_brlcad_root "share/plugins"]
+set brlcadDataPath [file join [bu_dir data] plugins]
 # puts "pwd is [pwd], path is $brlcadDataPath"
 set filename [file join $brlcadDataPath archer Wizards tirewizard 
TireWizard.tcl]
 if { ![file exists $filename] } {
-    # non-tclscript resource, look in the source invocation path
-    set brlcadDataPath [bu_brlcad_root "src"]
-    set filename [file join $brlcadDataPath archer plugins Wizards tirewizard 
TireWizard.tcl]
-}
-if { ![file exists $filename] } {
     puts "Could not load the TireWizard plugin, skipping $filename"
     return
 }

Modified: brlcad/trunk/src/brlman/brlman.tcl
===================================================================
--- brlcad/trunk/src/brlman/brlman.tcl  2020-12-19 00:03:09 UTC (rev 78016)
+++ brlcad/trunk/src/brlman/brlman.tcl  2020-12-19 00:13:43 UTC (rev 78017)
@@ -42,7 +42,7 @@
 if {[info exists ::man_file]} {
     $w select $man_file
 } else {
-    set intro_file [file join [bu_brlcad_root "share/$::data_dir"] 
mann/Introduction.html]
+    set intro_file [file join [bu_dir doc] html mann Introduction.html]
     $w loadPage $intro_file
 }
 

Modified: brlcad/trunk/src/burst/burst.cpp
===================================================================
--- brlcad/trunk/src/burst/burst.cpp    2020-12-19 00:03:09 UTC (rev 78016)
+++ brlcad/trunk/src/burst/burst.cpp    2020-12-19 00:13:43 UTC (rev 78017)
@@ -1786,7 +1786,7 @@
 
     if (argc == 0 || !argv) return -1;
 
-    /* Let bu_brlcad_root and friends know where we are */
+    /* Let libbu know where we are */
     bu_setprogname(argv[0]);
 
     /* Initialize */

Modified: brlcad/trunk/src/libdm/osgl/dm-osgl.cpp
===================================================================
--- brlcad/trunk/src/libdm/osgl/dm-osgl.cpp     2020-12-19 00:03:09 UTC (rev 
78016)
+++ brlcad/trunk/src/libdm/osgl/dm-osgl.cpp     2020-12-19 00:13:43 UTC (rev 
78017)
@@ -688,7 +688,7 @@
        return DM_NULL;
     }
     privvars->fontNormal = FONS_INVALID;
-    privvars->fontNormal = fonsAddFont(privvars->fs, "sans", 
bu_brlcad_root("share/fonts/ProFont.ttf", 0));
+    privvars->fontNormal = fonsAddFont(privvars->fs, "sans", bu_dir(NULL, 0, 
BU_DIR_DATA, "fonts", "ProFont.ttf", NULL));
 
     /* This is the applications display list offset */
     dmp->i->dm_displaylist = glGenLists(0);

Modified: brlcad/trunk/src/libdm/osgl/if_osgl.cpp
===================================================================
--- brlcad/trunk/src/libdm/osgl/if_osgl.cpp     2020-12-19 00:03:09 UTC (rev 
78016)
+++ brlcad/trunk/src/libdm/osgl/if_osgl.cpp     2020-12-19 00:13:43 UTC (rev 
78017)
@@ -506,8 +506,8 @@
        std::string ppath = std::string(bu_dir(NULL, 0, BU_DIR_LIB, 
"osgPlugins"));
        osgDB::FilePathList paths = 
osgDB::Registry::instance()->getLibraryFilePathList();
        if (ppath.length()) {
-           /* The first entry is the final installed path - prefer that to the 
local
-            * bu_brlcad_root lib directory.  This means our new path should be 
the
+           /* The first entry is the final installed path - prefer that to the
+            * local lib directory.  This means our new path should be the
             * second entry in the list - insert it accordingly. */
            osgDB::FilePathList::iterator in_itr=++(paths.begin());
            paths.insert(in_itr, ppath);

Modified: brlcad/trunk/src/librt/primitives/primitive_util.c
===================================================================
--- brlcad/trunk/src/librt/primitives/primitive_util.c  2020-12-19 00:03:09 UTC 
(rev 78016)
+++ brlcad/trunk/src/librt/primitives/primitive_util.c  2020-12-19 00:13:43 UTC 
(rev 78017)
@@ -555,8 +555,7 @@
 
     programs = (cl_program*)bu_calloc(count, sizeof(cl_program), "programs");
     for (i=0; i<count; i++) {
-       snprintf(file, MAXPATHLEN, "%s%c%s", "share/" BRLCAD_OPENCL_DIR, 
BU_DIR_SEPARATOR, filenames[i]);
-       snprintf(path, MAXPATHLEN, "%s", bu_brlcad_root(file, 0));
+       snprintf(path, MAXPATHLEN, "%s", bu_dir(NULL, 0, BU_DIR_DATA, 
BRLCAD_OPENCL_DIR, filenames[i], NULL));
 
         pc_string = clt_read_code(path, &pc_length);
         programs[i] = clCreateProgramWithSource(context, 1, &pc_string, 
&pc_length, &error);
@@ -654,7 +653,7 @@
         if (error != CL_SUCCESS) bu_bomb("failed to create an OpenCL command 
queue");
 
        /* locate opencl directory */
-       snprintf(path, MAXPATHLEN, "%s", bu_brlcad_root("share/" 
BRLCAD_OPENCL_DIR, 0));
+       snprintf(path, MAXPATHLEN, "%s", bu_dir(NULL, 0, BU_DIR_DATA, 
BRLCAD_OPENCL_DIR, NULL));
 
        /* compile opencl programs */
        snprintf(args, MAXPATHLEN, "-I %s -D RT_SINGLE_HIT=1", path);

Modified: brlcad/trunk/src/qged/cadimport.cpp
===================================================================
--- brlcad/trunk/src/qged/cadimport.cpp 2020-12-19 00:03:09 UTC (rev 78016)
+++ brlcad/trunk/src/qged/cadimport.cpp 2020-12-19 00:13:43 UTC (rev 78017)
@@ -109,10 +109,7 @@
 QString
 RhinoImportDialog::command()
 {
-    QString prog_name(bu_brlcad_dir("bin", 1));
-    prog_name.append("/3dm-g");
-    prog_name.append(EXECUTABLE_SUFFIX);
-    prog_name = QString(bu_brlcad_root((const char *)prog_name.toLocal8Bit(), 
1));
+    QString prog_name(bu_dir(NULL, 0, BU_DIR_BIN, "3dm-g", BU_DIR_EXT, NULL));
     return prog_name;
 }
 
@@ -190,10 +187,7 @@
 QString
 STEPImportDialog::command()
 {
-    QString prog_name(bu_brlcad_dir("bin", 1));
-    prog_name.append("/step-g");
-    prog_name.append(EXECUTABLE_SUFFIX);
-    prog_name = QString(bu_brlcad_root((const char *)prog_name.toLocal8Bit(), 
1));
+    QString prog_name(bu_dir(NULL, 0, BU_DIR_BIN, "step-g", BU_DIR_EXT, NULL));
     return prog_name;
 }
 

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

Reply via email to