cupcake is a Tcl/Tk text editor application. The program is graphical and uses the Tk toolkit along with Future Lab graphical library modules. The program is run using the graphical wish shell. Before attempting to run this program, edit the main program file (cupcake.tcl) and set the Tcl directory structure so that the program can locate the required Future Lab library files.
The cupcake editor contains the following features:
Cupcake preferences are saved to a file in the prefs directory which is part of the Tcl directory structure. This directory is not included as part of the Future Lab GPL Tcl package. You must create this directory yourself.
You can get cupcake to lauch automatically when you double-click on a file or right-click and choose edit from the context menu. Here is how you do this:
The batch file you construct will be one of two types depending on whether you are using the development version of Tcl or Freewrap. Using a batch file does have one drawback. You will see a momentary DOS prompt appear when you launch cupcake through an association. In the example batch files below, I have numbered each line as a reference. Do not use the line numbers in your batch file.
When you installed the development version of Tcl, the installer created file associations for the tcl file extension. You can launch any Tcl program by just double-clicking on it. The batch file we will construct will simply call cupcake directly. Here is the batch file:
1 @echo off 2 rem Launch the cupcake editor and load a file 3 rem into it. May/2006, Rick Smereka 4 c: 5 cd \gpl\tcl\apps\cupcake 6 start cupcake.tcl %1
On line 5 of the above batch file, we change the directory to where you installed the Future Lab Tcl GPL package. Make sure you cd right into the cupcake directory.
There are two ways to use Freewrap. It can be used as a compiler to build executable programs or it can be used as a wish shell or environment. I use it as a wish shell. In the following batch file, I am making the following assumptions:
Here is the batch file for use with Freewrap:
1 @echo off 2 rem Launch the cupcake editor and load a file into it. 3 rem For use with 'Freewrap'. May/2006, Rick Smereka 4 c: 5 cd \gpl\tcl\bin 6 start tclaunch ..\apps\cupcake\cupcake.tcl %1
On line 5 of the above batch file, notice that I have changed the directory to where tclaunch.exe resides. On line 6, I execute the tclaunch program supplying the path and name of the cupcake program.