我正在尝试找出在 Windows 中创建 Tcl starkit 的基本步骤。我以前问过类似的问题,还购买了一本关于 Tcl 编程的书,访问了 wiki.tcl.tk,直接给 Tcl 程序员发电子邮件等等……总之,我从我的资源中收到了很好的反馈,这网站;然而,我未能解释说,在构建批处理文件、使用命令控制台和创建目录方面,我完全是个新手。
我真的需要有人为我解释清楚,因为我似乎无法解释任何人试图告诉我的内容。我认为 Visual Studio 和 .NET 让我变得愚蠢:)
目前,我已经下载了 tclkit、tclkitsh 和 sdx.kit,并创建了一个简单的程序(Test_App.tcl)。到目前为止,我知道我必须通过控制台(tclkitsh)运行 sdx,方法是创建一个批处理文件(sdx.bat),创建一个 vfs 目录,然后使用 sdx 包装。我完全不知道如何执行这些简单的步骤。
这似乎要求太多了,但如果有人能用超级新手术语翻译“创建starkit”,我将非常感激。我希望是这样的:在 tclkitsh 控制台中,输入以下内容...;在 tclkit.exe 中,输入以下内容...;现在你应该……;等等。
谢谢你,
东风公司
I am trying to figure out the basic steps to creating a Tcl starkit in Windows. I've asked a similar question before, as well as purchased a book on Tcl programming, visited wiki.tcl.tk, emailed Tcl programmers directly, etc... In all, I've received great feed back from my resources and this website; however, I've failed to explain that I am a complete novice when it comes to building batch files, using a command console, and creating directories.
I really need someone to basically spell things out for me, because I cannot seem to interpret what anyone is trying to tell me. I think Visual Studio and .NET has made me stupid :)
Currently, I have downloaded tclkit, tclkitsh, and sdx.kit, as well as created a simple program (Test_App.tcl). So far, I know I have to run sdx through the console (tclkitsh) by creating a batch file (sdx.bat), create a vfs directory, and then use sdx wrap. I am completely oblivious on how to do these simple steps.
This seems like too much to ask, but if someone could translate creating a starkit in uber novice terms I would be incredibly grateful. I was hoping something like: In tclkitsh console, type the following...; in tclkit.exe, type the following...; now you should have...; and on.
Thank you,
DFM
发布评论
评论(1)
第 1 步:创建工作目录。打开 Windows 命令提示符。这可能位于开始菜单“附件”、“命令提示符”下。键入命令“mkdir temp”,然后使用“cd temp”cd 到此目录:
记下此目录的位置。它应该在提示时告诉你。
第 2 步:下载必要的文件。您需要三样东西,一个 包含 Tk 的基本工具包(将成为打包应用程序的一部分),sdx.kit(具有执行包装命令的 tclkit)和 tclkit 的命令行版本(从中运行 sdx.kit)。
下载这三个文件并将它们放入您创建的临时目录中。严格来说,这不是必需的,但它使本教程变得更容易。将命令行重命名为 tclkit,也是为了使本教程更容易:
第 3 步:验证一切正常。运行 sdx.kit,不带其他参数。它应该打印出一些帮助信息:
第 4 步:为您的代码创建一个目录。 sdx 假定对于名为“myapp”的应用程序,存在名为“myapp.vfs”的目录:
第 5 步:创建代码。创建一个名为“main.tcl”的文件并将其放置在 myapp.vfs 目录中。使用记事本或您选择的文本编辑器。为该文件提供以下内容:
验证 myapp.vfs 是否如下所示:
第 6 步:使用 sdx 包装代码。将工作目录置于原始临时目录中,发出以下命令来包装代码。
第 7 步:将打包文件重命名为 .exe 后缀。 sdx.kit 应该已创建一个名为“myapp”的文件。为了运行它,您需要将其重命名为“myapp.exe”。完成此操作后,您可以通过键入命令“myapp”或双击资源管理器窗口中的图标来运行它。
如果一切顺利,应该会弹出一个窗口,其中带有“Hello, world”标签
Step 1: make a working directory. Open up a windows command prompt. This is probably under the start menu, "Accessories", "Command Prompt".Type the command "mkdir temp", then cd to this directory with "cd temp":
Make a note of where this directory is. It should tell you right on the prompt.
Step 2: Download the necessary files. You need three things, a base kit that inclues Tk (which will become part of the wrapped application), sdx.kit (a tclkit that has the commands that do the wrapping) and the command line version of tclkit (from which sdx.kit will be run).
Download the three files and put them in the temporary directory that you created. Strictly speaking this isn't necessary, but it makes this tutorial easier. Rename the command line tclkit, also to make this tutorial easier:
Step 3: verify that everything is working. Run sdx.kit with no other arguments. It should print out a little bit of help information:
Step 4: create a directory for your code. sdx assumes that for an application named "myapp" that there exists a directory named "myapp.vfs":
Step 5: create your code. Create a file named "main.tcl" and place it in the myapp.vfs directory. Use notepad or the text editor of your choice. Give the file the following contents:
Verify that myapp.vfs looks like this:
Step 6: wrap the code using sdx. With your working directory in the original temporary directory, issue the following command to wrap your code.
Step 7: rename the wrapped file to have a .exe suffix. sdx.kit should have created a file named "myapp". In order to run this you'll need to rename it to "myapp.exe". Once you do that you can run it by typing the command "myapp" or double-clicking on the icon from an explorer window.
If all went well, a window should pop up with the label that says "Hello, world"