Revision: 45853
          http://brlcad.svn.sourceforge.net/brlcad/?rev=45853&view=rev
Author:   starseeker
Date:     2011-08-09 20:34:10 +0000 (Tue, 09 Aug 2011)

Log Message:
-----------
Simplify loading of Archer plugins - use bu_brlcad_data and avoid all the CWD 
logic.  Good cleanup, and plugin loading now works in the build directory.

Modified Paths:
--------------
    brlcad/trunk/src/archer/CMakeLists.txt
    brlcad/trunk/src/archer/plugins/Makefile.am
    brlcad/trunk/src/tclscripts/archer/Archer.tcl
    brlcad/trunk/src/tclscripts/archer/tclIndex

Removed Paths:
-------------
    brlcad/trunk/src/archer/plugins/utility.tcl
    brlcad/trunk/src/archer/plugins/wizards.tcl

Modified: brlcad/trunk/src/archer/CMakeLists.txt
===================================================================
--- brlcad/trunk/src/archer/CMakeLists.txt      2011-08-09 19:56:58 UTC (rev 
45852)
+++ brlcad/trunk/src/archer/CMakeLists.txt      2011-08-09 20:34:10 UTC (rev 
45853)
@@ -5,12 +5,6 @@
 configure_file(archer ${CMAKE_BINARY_DIR}/bin/archer COPYONLY)
 INSTALL(PROGRAMS archer DESTINATION bin)
 
-set(archer_plugins
-  plugins/utility.tcl
-  plugins/wizards.tcl
-)
-BRLCAD_ADDDATA(archer_plugins plugins/archer)
-
 BRLCAD_ADDFILE(plugins/Core/README plugins/archer/Core)
 BRLCAD_ADDFILE(plugins/Commands/README plugins/archer/Command)
 

Modified: brlcad/trunk/src/archer/plugins/Makefile.am
===================================================================
--- brlcad/trunk/src/archer/plugins/Makefile.am 2011-08-09 19:56:58 UTC (rev 
45852)
+++ brlcad/trunk/src/archer/plugins/Makefile.am 2011-08-09 20:34:10 UTC (rev 
45853)
@@ -7,11 +7,4 @@
 
 pluginsdir = $(BRLCAD_DATA)/plugins/archer
 
-plugins_DATA = \
-       utility.tcl \
-       wizards.tcl
-
-EXTRA_DIST = \
-       $(plugins_DATA)
-
 include $(top_srcdir)/misc/Makefile.defs

Deleted: brlcad/trunk/src/archer/plugins/utility.tcl
===================================================================
--- brlcad/trunk/src/archer/plugins/utility.tcl 2011-08-09 19:56:58 UTC (rev 
45852)
+++ brlcad/trunk/src/archer/plugins/utility.tcl 2011-08-09 20:34:10 UTC (rev 
45853)
@@ -1,42 +0,0 @@
-#                     U T I L I T Y . T C L
-# BRL-CAD
-#
-# Copyright (c) 2002-2011 United States Government as represented by
-# the U.S. Army Research Laboratory.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public License
-# version 2.1 as published by the Free Software Foundation.
-#
-# This library is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this file; see the file named COPYING for more
-# information.
-#
-###
-#
-# Author -
-#          Bob Parker
-#
-# Description -
-#       This is a script for loading Archer's wizards.
-#
-
-if [ file exists Utility ] {
-    cd Utility
-    Archer::pluginLoadCWDFiles
-    cd ..
-}
-
-# Local Variables:
-# mode: Tcl
-# tab-width: 8
-# c-basic-offset: 4
-# tcl-indent-level: 4
-# indent-tabs-mode: t
-# End:
-# ex: shiftwidth=4 tabstop=8

Deleted: brlcad/trunk/src/archer/plugins/wizards.tcl
===================================================================
--- brlcad/trunk/src/archer/plugins/wizards.tcl 2011-08-09 19:56:58 UTC (rev 
45852)
+++ brlcad/trunk/src/archer/plugins/wizards.tcl 2011-08-09 20:34:10 UTC (rev 
45853)
@@ -1,43 +0,0 @@
-#                     W I Z A R D S . T C L
-# BRL-CAD
-#
-# Copyright (c) 2002-2011 United States Government as represented by
-# the U.S. Army Research Laboratory.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public License
-# version 2.1 as published by the Free Software Foundation.
-#
-# This library is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this file; see the file named COPYING for more
-# information.
-#
-###
-#
-# Author -
-#          Bob Parker
-#
-# Description -
-#       This is a script for loading Archer's wizards.
-#
-
-if [ file exists Wizards ] {
-    cd Wizards
-    Archer::pluginLoadCWDFiles
-    cd ..
-}
-
-
-# Local Variables:
-# mode: Tcl
-# tab-width: 8
-# c-basic-offset: 4
-# tcl-indent-level: 4
-# indent-tabs-mode: t
-# End:
-# ex: shiftwidth=4 tabstop=8

Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl
===================================================================
--- brlcad/trunk/src/tclscripts/archer/Archer.tcl       2011-08-09 19:56:58 UTC 
(rev 45852)
+++ brlcad/trunk/src/tclscripts/archer/Archer.tcl       2011-08-09 20:34:10 UTC 
(rev 45853)
@@ -141,7 +141,6 @@
        # Plugins Section
        proc initArcher {}
        proc pluginDialog {_w}
-       proc pluginLoadCWDFiles {}
        proc pluginLoader {}
        proc pluginGed {_archer}
        proc pluginQuery {_name}
@@ -718,33 +717,6 @@
     $dialog activate
 }
 
-
-## - pluginLoadCWDFiles
-#
-# Load the current working directory's (CWD) files.
-#
-::itcl::body Archer::pluginLoadCWDFiles {} {
-    foreach filename [lsort [glob -nocomplain *]] {
-       if [file isfile $filename] {
-           set ext [file extension $filename]
-           switch -exact -- $ext {
-               ".tcl" -
-               ".itk" -
-               ".itcl" {
-                   uplevel \#0 source $filename
-               }
-               ".sh" {
-                   # silently ignore
-               }
-               default {
-                   # silently ignore
-               }
-           }
-       }
-    }
-}
-
-
 ::itcl::body Archer::pluginLoader {} {
     global env
 
@@ -765,8 +737,24 @@
     }
 
     foreach plugindir [list $pluginPath] {
-       ::cd $plugindir
-       pluginLoadCWDFiles
+       set utilities_list [concat [lsort [glob -nocomplain 
$plugindir/Utility/*]]] 
+       set wizards_list [concat [lsort [glob -nocomplain 
$plugindir/Wizards/*]]]
+       set plugins_list [concat $utilities_list $wizards_list]
+       foreach filename $plugins_list {
+           if [file isfile $filename] {
+               set ext [file extension $filename]
+               switch -exact -- $ext {
+                   ".tcl" -
+                   ".itk" -
+                   ".itcl" {
+                       uplevel \#0 source $filename
+                   }
+                   default {
+                       # silently ignore
+                   }
+               }
+           }
+       }
     }
 
     ::cd $pwd

Modified: brlcad/trunk/src/tclscripts/archer/tclIndex
===================================================================
--- brlcad/trunk/src/tclscripts/archer/tclIndex 2011-08-09 19:56:58 UTC (rev 
45852)
+++ brlcad/trunk/src/tclscripts/archer/tclIndex 2011-08-09 20:34:10 UTC (rev 
45853)
@@ -308,7 +308,6 @@
 set auto_index(::Archer::pluginDialog) [list source [file join $dir 
Archer.tcl]]
 set auto_index(::Archer::pluginGed) [list source [file join $dir Archer.tcl]]
 set auto_index(::Archer::pluginGetMinAllowableRid) [list source [file join 
$dir Archer.tcl]]
-set auto_index(::Archer::pluginLoadCWDFiles) [list source [file join $dir 
Archer.tcl]]
 set auto_index(::Archer::pluginLoader) [list source [file join $dir 
Archer.tcl]]
 set auto_index(::Archer::pluginQuery) [list source [file join $dir Archer.tcl]]
 set auto_index(::Archer::pluginRegister) [list source [file join $dir 
Archer.tcl]]


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

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to