From: EMC C. s. <cv...@cv...> - 2006-07-30 16:33:01
|
Modified file emc2/tcl/scripts/Set_Coordinates.tcl Full file: <http://cvs.linuxcnc.org/cvs/emc2/tcl/scripts/Set_Coordinates.tcl?rev=1.6> Difference: <http://cvs.linuxcnc.org/cvs/emc2/tcl/scripts/Set_Coordinates.tcl.diff?r1=1.5;r2=1.6> Branch: HEAD Log: revision 1.6 date: 2006/07/30 16:32:59; author: jepler; state: Exp; lines: +5 -25 use emc.tcl in most tcl scripts, removing around 300 lines of boilerplate in the process. --- Set_Coordinates.tcl 2006/05/06 14:02:22 1.5 +++ Set_Coordinates.tcl 2006/07/30 16:32:59 1.6 @@ -1,6 +1,4 @@ #!/bin/sh -# we need to find the tcl dir, it was exported from emc.run \ -export EMC2_TCL_DIR # the next line restarts using iosh \ exec $EMC2_EMCSH "$0" "$@" @@ -15,34 +13,16 @@ # Copyright (c) 2005 All rights reserved. # # Last change: -# $Revision: 1.5 $ -# $Author: flo-h $ -# $Date: 2006/05/06 14:02:22 $ +# $Revision: 1.6 $ +# $Author: jepler $ +# $Date: 2006/07/30 16:32:59 $ #################################################################### # Graphical display of coordinate system offsets # Writes revised offsets to xxx.var and reloads global variables #################################################################### -set TCLBIN tcl/bin -set TCLSCRIPTS tcl/scripts -set LANGDIR src/po - -if {[info exists env(EMC2_TCL_DIR)]} { - set TCLBIN $env(EMC2_TCL_DIR) - set TCLSCRIPTS $env(EMC2_TCL_DIR) - set TCLBIN $TCLBIN/bin - set TCLSCRIPTS $TCLSCRIPTS/scripts -} - -if {[info exists env(EMC2_LANG_DIR)]} { - set LANGDIR $env(EMC2_LANG_DIR) -} - -package require msgcat -if ([info exists env(LANG)]) { - msgcat::mclocale $env(LANG) - msgcat::mcload $LANGDIR -} +# Load the emc.tcl file, which defines variables for various useful paths +source [file join [file dirname [info script]] .. emc.tcl] wm title . [msgcat::mc "EMC Set Coordinate"] |