[Robert Abitbol] I have downloaded the great Tclkit.exe and I have often started tcl programs by copying them and pasting them into tclkit.exe (it's a great system I find!) Now, how do I make a TCL program executable? Do I use Tclkit.exe? Thanks! ---- '''How to compile a TCL script and an icons directory into an exe (in Windows)''' [Robert Abitbol] Thanks [FW] for your great help! This is how to compile a tcl script + an icons directory (or any other directory) into an exe program. Let's assume for the sake of the example that we have a script called Birds.tcl located in c:\Birds. Please copy the commands but don't forget to make the necessary adaptations. These instructions work for '''Windows.''' '''1)''' Copy tclkit.exe and sdxkit into the directory where your Tcl source code file is. Ex: in c:\Birds TCLKit.exe can be downloaded from: Sdx.kit can be downloaded from: '''2)''' Make a copy of the tclkit.exe into the directory where your TCL source code file is. Ex: in c:\Birds. Rename it to tclkit2.exe. ---> You will now have in c:\Birds the following files: * Birds.tcl * tclkit.exe * tclkit2.exe * sdx.kit '''3)''' At Start/Run, type the following command (make the necessary adaptations): c:\Birds\tclkit sdx.kit qwrap birds.tcl You will then get the TCL console. It will give a message: .. updates Leave the console '''4)''' At Start/Run again type the following command (make the necessary adaptations): c:\Birds\tclkit sdx.kit unwrap birds.kit You will then get the TCL console. It will give a message: .. updates Leave the console '''5)''' At this stage, you have to copy the icons directory (or any other directory into: c:\Birds\Birds.vfs\lib\app-Birds (Make the necessary adaptations) '''6)''' At Start/Run again type the following command (make the necessary adaptations): c:\Birds\tclkit sdx.kit wrap birds.exe 1-runtime tclkit2.exe Leave the console. ---> '''Your exe is ready. Congratulations! Have fun! :)''' ----- '''Comments''' "[How can I compile Tcl type scripts into binary code]" answers the question for many people. If you're starting from an appreciation of [Tclkit], as apparently is the case, a [Starpack] might well be the most natural follow-up. [FW]: Yep, the [starpack] page has the basic instructions. [FW]: I helped him solve this off-wiki. I was gonna fix up his instructions as to how to make a starpack but I figured they would be out of place on this page, since they're the same as to make any Starkit. I won't be so brash as to delete them though. [Robert Abitbol] Well just for fun, try to find instructions as clear as the ones above on this wiki. By the way: no need to complete them: I have done it. Thanks! I appreciate your excellent explanations! [aa] - [How to create my first Starpack] seems somewhat more clear to me than the instructions above, and has the advantage of not being limited to Windows. [Robert Abitbol] It works for you! Great then! Well it doesn't work for me and I am sure it doesn't work for a lot of people. To the contrary, [FW]'s explanations works perfectly, A1! As the latins used to say: "de gustibus non disputandem" : we cannot discuss tastes; to each his own. I am sure explaining a different way to create an exe won't hurt anyone! :) Oh! And if you decide to adapt the instructions above for Apple or Unix Operating systems, please be my guest. I did not do it since I run Windows. You could write 2 lines of text. Something like: For Apple users: Do ... (instead of Start/Run) For Unix users: Do ... (instead of Start/Run) ----- See also: http://www.equi4.com/papers/skpaper4_2.html