Visual TCL, How to install it and use it? - ruby

im newbie with tk gui programming and i've searched for TK gui builders FOR WINDOWS platform,
the most new program that i've found is "Visual TCL",
but after installing it ON WINDOWS i get a folder full of tcl files...but any exe of the program...
So what i need to do now to run it???
I've readed the readme file and it says something about need to associate the tcl files with the "Wish" application...¿?
i've searched about this "wish" app on google but...nothing.
by the way, if you can recommend me a good gui builder for tk 8.5 (for Ruby, on Windows) then please...
but the question is that i want a powerfull new editor to start with this, that's the reason why i choosed by the moment "Visual TCL" (last updated on 2012), I don't want an old and desfased application for example like "guibuilder" from "active state"...or tkbuilder...
Thankyou for read.
PS: sorry for my english

For windows, install ActiveTcl from http://www.activestate.com/activetcl

You should go for vTcl_1.6.1a1 here..
http://sourceforge.net/projects/vtcl/files/vtcl/1.6.1.a1/
and download the package.
Although it is in .tar.gz , which is a Linux understood package file, you can open it using WinZip. If you've installed WinZip, try opening this file using WinZip (it will ask you to open through its Classic View - click OK) and Extract its contents into your desired folder.
vtcl.tcl file in the root folder is the main file that you need to run.
But before that you should have installed Tcl/Tk latest version some where from ActiveState Tcl. This will automatically associate all .tcl file extensions with Wish Application.
Before clicking vtcl.tcl, go into the folder named lib and open the file tkcon.tcl using any text editor. Replace the line (present in the very 1st if condition)
package require -exact Tk $tcl_version
to
package require Tk $tcl_version
save it and close it.
Now run vtcl.tcl and enjoy using this powerful string based scripting language.

Related

How to add winapi to Lua for Windows

I've installed Lua for Windows "batteries included" 5.1.4-46.
It doesn't have everything I want.
I'm trying to re-write AutoIt scripts that I use on my personal PC.
I can't find an easy way to access the windows registry.
The WinAPI module by Steve Donovan looks like it will give me what I want.
I also want to be able to retrieve file attributes in order to determine if a directory is a junction.
I realize my real issues are not WinAPI, but if I learn how to add it to Lua for Windows, I can hopefully add other Lua addons.
How do I add WinAPI to the Lua installation from Lua for Windows?
Edit: I've found a binary winapi.dll for Lua 5.1 lua for windows.
enter link description here
I copied it to the "Lua\5.1\clibs" folder. I added require("winapi") to the top of a short program. I had to exit and restart SciTE editor and now it appears to be working.
The third party lib will ultimately (after build) be a DLL. As long as the DLL is on your LUA_CPATH, you can require dll_name and it will load dll_name.dll. There are binary (pre-built) versions of winapi for LuaForWindows, like v1.0.1. But you are probably better off getting the most recent release and building using one of the build scripts in root folder of .zip release. Once you have built, look for the .dll produced and move it to one of the locations on LUA_CPATH, or edit LUA_CPATH to include the folder where you want to put all your Lua extension modules.

Files under Program Files have a split personality

I have a Ruby application I'm installing (along with a packaged ruby interpreter) under Program Files on Windows 7 with an NSIS-built installer. In order to debug it, I edited one of the files to add some debugging statements. After that, I uninstalled the package and ran a new version of the installer which includes a new copy of the edited file, without debugging statements.
Now, I can't get the new copy to load into ruby. If I run type <filename> in cmd.exe, or open the file in Notepad.exe or Firefox, I see the new version. If I run ruby -e "puts File.read('<filename>')", or open the file in emacs, I see the old version.
If, in Windows Explorer, I copy the file to a new filename, everything can see the new contents at that filename. If I delete the original file and rename the copy to replace the original, the split personality returns.
This situation survives a reboot, so it's not a simple matter of a file being accidentally held open.
What on earth is going on here? Is there some aspect of the install process that might be checkpointing the file in a way I can revert, or at least switch off while I'm debugging the installer?
update
If I run ruby -e "puts File.read('<filename>')" in a console that is run as administrator, I see the correct, new contents. How should I be managing this file?
I think it has to do with UAC file system virtualization. Check whether your file exists in C:\Users\<username>\AppData\Local\VirtualStore. If it does, delete it from the VirtualStore.
The fact you see the correct file when running Administrator console proves that it's because of virtualization: UAC virtualization is turned off for elevated processes.
In general, do not put files you plan to change a lot in Program Files. From Vista onward, there is an interesting way things work to "allow" you to write to a protected file, but it really gets stored in your app data directories, not actually in Program Files. So, utilities that go through the Windows API find the "new" version of the file correctly, but utilities that are more low-level (ruby.exe) only find the existing version. If you navigate to that folder, do you see a "Compatibility Files" button right above the contents? Press that and you'll see your updated version.
Scott Hanselman wrote a good article about this when it was introduced in Vista.
You can only write to the real file when you're logged on as Administrator.

OpenOffice.org headless installer

I use OpenOffice.org only for PDF generation in my project, but my users have to download the whole OpenOffice package if they want to use the software. Is there any Ooo installer which only installs a headless Writer, and which has a minimal installer which don't includes the other unused components (UI, Impress, etc.)?
If you are using Ubuntu, have a look at http://packages.ubuntu.com/search?keywords=openoffice&searchon=names&suite=karmic&section=all ... it contains the various OpenOffice packages
You can ship headless OpenOffice.org with your application.
edit: AFAIK, there is no headless installer for MS Windows, but you can extract files from cabs and add them to your installer. This is what Alfresco is doing.
If you want to keep separate user profile you need to edit bootstrap.ini and write new UserInstallation path or use -env:UserInstallation command line argument when starting OpenOffice.org.

Is it possible to have PackageMaker build an installer without "packaging" the content at build time?

I have content to be installed, but it's file and folder layout is determined by the brittle, old, Windows installer. I can't fundamentally alter the structure, and I'd prefer not to alter it at all. I can't put it in a PackageMaker package and somehow get the Windows installer to figure out how to read it, for example.
Is there a way to use PackageMaker without having to bundle up the real content at build time? Is there a way to build the package with symlinks and have PM honor them at run time?
I need to support 10.5-6.
edit: If I could use an uncompressed package, that might be able to share the content files between installers. Is there way to do that?
I'll try to give more info about what I'm doing, if something isn't clear please let me know. Please forgive any redundancy.
I need to create a Mac/PC DVD to install my application. The application consists of either a Mac or Windows "reader app", and about a GB of "content" files. There is an existing Windows installer that reads installs the Windows reader and the content files off the DVD and installs them. It is (unfortunately) not a possibility to change the Windows installer. Therefore, the shared content files on the DVD must remain exactly as they are on the disk, I can not zip or package them up, or anything.
I need to make a Mac installer that will install the Mac app and the content. So, the installer needs to install the content from the folder structure of the DVD, which it will have to look at during install-time. My understanding is that PackageMaker requires you to package up the installed files during the creation "build phase" of the installer. That won't work for me because I can't alter the content on disk.
Sunil said:
During creating installer using packagemaker we can attach both a file and a folder also we can specify the path it will be installed. If u want customized way of storing the installed data eg- in some directory structure then in pre installed script write the script to create directory to be created.
I am not able to "attach" files or folder to the installer when I create it. I need the installer to read the content off the DVD when the user runs the installer.
Let me know if there is something that needs to be clarified further.
It sounds like you want the .pkg to copy the files right from the DVD, instead of having PackageMaker bundle the files into the .pkg, correct?
As far as I know a .pkg cannot do this natively. As NSD has mentioned you can do this in a postinstall/postflight script, but you want to display a proper progress bar. The only option left that I can see is to write a Cocoa app which not only copies the files off the DVD but also displays a progress bar in its GUI, and use that app as the postinstall "script".
During creating installer using packagemaker we can attach both a file and a folder also we can specify the path it will be installed. If u want customized way of storing the installed data eg- in some directory structure then in pre installed script write the script to create directory to be created. Can you please describe your problem more deeply so that i may help you
Write a postinstall or postflight script that copies the files off of the DVD.

How Can I Compile Firefox and Include a Few Extensions?

I need to be able to compile firefox and bundle it with a few extensions so when people download it the extensions are already there.
I was wondering if anyone can point me to some documentation. I have been searching for hours and can't seem to find anything like that.
Thanks,
Sebastian
If you don't need to specifically 'compile' Firefox and are using Windows, you can create a simple batch (.bat) file to execute the Firefox installer and then the extensions installers in order. Alternatively, you can also use a Powershell (.ps1) script.
you might want to check out CCK or something like it.
It's a matter of copying the extensions contents to the extension guid directory of FireFox. First unzip the extensions files (xpi files are just a normal zip files) then copy them.
You can do that automatically by writing simple shell scripts for Linux/Unix/Mac, or, batch files for Windows XP and PowerShell for Vista (as John Dunagan mentioned).
Check the forth post in the following thread
http://forums.mozillazine.org/viewtopic.php?f=7&t=586672&start=0&st=0&sk=t&sd=a
I don't see a need for recompiling it.
Just create an install procedure (a script actually), which is gonna install firefox first and then the extensions afterwards.
Recompiling won't help at all. The extensions aren't compiled into Firefox, because doing so would make Firefox have to be recompiled every time an extension is installed. Just follow the above answers to automatically install the extensions.

Resources