> What is the purpose of the three ngcgui*.tcl files you added to the tcl dir?
> What is their relationship to each other and to the rest of our code

The files tcl/ngcgui_app.tcl and tcl/ngcgui_ttt.tcl provide tcl-packages named
"Ngcgui" and "Ngcguittt" respectively.  This is done explicitly by the tcl
"package provide" commands therein.   This is similar to other files in the
same directory, namely tcl/emc.so which can provide a tcl-package named "Emc"
and tcl/hal.so that can provide a tcl-package named "Hal".  (Initial capital
letter is a tcl convention for tcl-package names).  These tcl-packages are made
available through the tcl/pkgIndex file which must be in the tcl library search
path for the system.  The tcl/pkgIndex file uses the tcl command:
    "package ifneeded ..."
to supply scripts that invoke matching packages.

When using RIP, an overriding environmental variable, TCLLIBPATH, is set
explicitly in scripts/emc-environment:
    configure.in:             EMC2_HOME=`(cd ..;pwd)`
    scripts/emc-environment:  TCLLIBPATH=$EMC2_HOME/tcl
So TCLLIBPATH points to the tcl/ directory of the source tree and the directory
will be found without being part of the system tcl library search path.

For nonRIP builds, as I understand it:
    Makefile.inc.in:  tcldir=$(prefix)/lib/tcltk/emc2
This sets location for tcl library files in a subdirectory that is part of the
standard tcl library search path of ubuntu (ref: commit 48fff363cb0)

The file tcl/ngcgui.tcl is the main body of code and is sourced by
tcl/ngcgui_app.tcl expecting it to be located in the same directory.

Importantly, the file tcl/ngcgui.tcl is constructed so that it can _also_ run
as a standalone application.  For standalone use, the file tcl/ngcgui should be
copied or linked to a filename that:

  1) is in the user's search path
  2) has execute permissions
  3) is named ngcgui (without the .tcl suffix)
     (This naming convention has been applied elsewhere to .tcl files
      that can be executable,
      viz tkemc.tcl-->tkemc, tooledit.tcl-->tooledit.)

> (especially to Axis)?
When using the axis gui, an ini file that includes an item:

  [DISPLAY]TKPKG = Ngcgui verno

causes the axis gui code to execute the following tcl command in the root
tk window:

  package require Ngcgui verno

When the "package require" command executes, pkgIndex files in the system
search path (and TCLLIBPATH) are read to find "package provide" statements that
match (per tcl rules) the package name and version.  When a matching package is
found, the associated script in the pkgIndex.tcl file is executed.

For the Ngcgui package,  tcl/pkgIndex.tcl executes a command that sources
the tcl/ngcgui_app.tcl file and it in turn sources the ngcgui.tcl file.  
Sourcing
both files loads all their procs and executes the ngcgui_app_init proc which
reads the emc ini file and processes conforming [DISPLAY]NGCGUI* directives
to make and configure tab pages in the axis gui.

For the Ngcguittt package, tcl/pkgIndex.tcl executes a command that
sources tcl/ngcgui_ttt.tcl file.  Sourcing this file loads its procs
and executes the ::ttt::embedinit proc which reads the emc ini file
and processes conforming [DISPLAY]TTT* directives to configure a tab
page to support a gui to truetype-tracer that can run truetype-tracer
and create an ngcgui tab page for the subroutine created.

> Thanks for looking at it, but the new patch in that mbox still doesnt
> fix package building.

hope this info helps, maybe you can explain what needs fixing -- I think
the main probem is installing a link or copy to a standalone ngcgui file?


dewey
-- 
Dewey Garrett


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to