Tcl Source Code

View Ticket
Login
Ticket UUID: 48a2a52296ba2add860c649685bb92e813f4f788
Title: Tcl / Tk Visual Studio Solution Files
Type: Patch Version: 0.1
Submitter: anonymous Created on: 2013-11-20 13:44:12
Subsystem: 91. Tutorial Assigned To: nobody
Priority: 1 Zero Severity: Cosmetic
Status: Open Last Modified: 2013-11-20 16:17:25
Resolution: None Closed By: nobody
    Closed on:
Description:
Hi,

Since a couple of weeks, I've been working with Tcl/Tk source code. And I noticed that there are no solution files for Tcl/Tk.

Ok, of course, it is possible to build it from source code in Linux using the GNU Toolchain. It is also possible to build Tcl/Tk from source using the nmake utility that comes with the Visual Studio. But it gets kind of cumbersome first setting the environment variables. Then, cd to the Tcl source directory and fill out the appropriate arguments for the nmake command. Do it once for build and once for install. Then repeat it again for Tk.

Then run the wish or tclsh from command prompt and using visual studio attach to it to debug it further. By the end I would have 2 folders open, 2 command prompt terminals open and a visual studio instance running.
************************************************************
Now, with these proposed solution files, running only one instance of a visual studio, we can build, run and debug the Tcl/Tk project.

A small note at the beginning: I am using Visual Studio 2010 on a 64bit Windows. And my version of Tcl/Tk is 8.5.15.

Some drawbacks/shortcomings of these solution files are:
1. The paths are *hardcoded*. You have to create a directory structure of the form:

c:\tcl\tcltk\build\
c:\tcl\tcltk\tcl8.5.15\
c:\tcl\tcltk\tk8.5.15\

Once the source files (from activestate, etc) have been extracted in their respective folders of c:\tcl\tcltk\tcl8.5.15 and c:\tcl\tcltk\tk8.5.15, ... 

1. then place the tcl project and solution files (from me) in c:\tcl\tcltk\tcl8.5.15\win\

2. and then place the tk project file (from me) in c:\tcl\tcltk\tk8.5.15\win\

Of course, the paths can be changed later by editing the solution files, when one gets a hang of the things.

A debug version of the tcl and tk files are built under c:\tcl\tcltk\build\Debug\

A release version of the tcl and tk files are built under c:\tcl\tcltk\build\Release\

2. The solution files are dependent on their respective Tcl or Tk make files that comes with the source code.

3. Everytime one builds Tcl, one must first do a "New Build" and then do a "Build". The "New Build" command builds the tcl/tk projects in their respective directories. The "Build" command then puts them in c:\tcl\tcltk\build\

The same scheme works when you do a debug or a release.

4. Finally to run the projects, it works if you right click on the project file from within the visual studio IDE and scroll down the options to "Debugging" and there choose "Run a New Instance". For some reason, simply pressing f5 or clicking the green button doesnt work for the moment.

Well, I know it is not perfect, but it works somewhat for us compared to the previous scheme. Happy to receive any feedback ! A similar version of the above text is placed in a readme file zipped together with the solution files.

Attachments: