Revision: 42248
          http://brlcad.svn.sourceforge.net/brlcad/?rev=42248&view=rev
Author:   starseeker
Date:     2011-01-13 18:42:10 +0000 (Thu, 13 Jan 2011)

Log Message:
-----------
Follow Sean's lead with making Archer better about looking for files - archer 
now runs successfully from the build dir.

Modified Paths:
--------------
    brlcad/branches/cmake/src/archer/CMakeLists.txt
    brlcad/branches/cmake/src/archer/archer

Modified: brlcad/branches/cmake/src/archer/CMakeLists.txt
===================================================================
--- brlcad/branches/cmake/src/archer/CMakeLists.txt     2011-01-13 18:26:06 UTC 
(rev 42247)
+++ brlcad/branches/cmake/src/archer/CMakeLists.txt     2011-01-13 18:42:10 UTC 
(rev 42248)
@@ -3,6 +3,7 @@
        INSTALL(PROGRAMS archer.bat DESTINATION bin)
 ENDIF(WIN32)
 configure_file(archer ${CMAKE_BINARY_DIR}/bin/archer COPYONLY)
+configure_file(itk_redefines.tcl ${CMAKE_CURRENT_BINARY_DIR}/itk_redefines.tcl 
COPYONLY)
 INSTALL(PROGRAMS archer DESTINATION bin)
 INSTALL(FILES itk_redefines.tcl DESTINATION 
${${CMAKE_PROJECT_NAME}_INSTALL_DATA_DIR}/tclscripts)
 

Modified: brlcad/branches/cmake/src/archer/archer
===================================================================
--- brlcad/branches/cmake/src/archer/archer     2011-01-13 18:26:06 UTC (rev 
42247)
+++ brlcad/branches/cmake/src/archer/archer     2011-01-13 18:42:10 UTC (rev 
42248)
@@ -59,7 +59,16 @@
 exec $WISH $0 $@
 
 # Itk's default class doesn't keep the menu, but Archer needs it - redefine 
itk:Toplevel
-source [file join [bu_brlcad_data "tclscripts"] itk_redefines.tcl]
+set itk_file [file join [bu_brlcad_data "tclscripts"] itk_redefines.tcl]
+if { ![file exists $itk_file] } {
+       #try src tree
+       set itk_file [file join [bu_brlcad_data "src"] archer itk_redefines.tcl]
+       if { ![file exists $itk_file] } {
+               #try local relative
+               set itk_file [file join src archer itk_redefines.tcl]
+       }
+}
+source $itk_file
 
 # Set ttk theme
 if {[tk windowingsystem] eq "aqua"} {


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

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to