freeWrap

Builds stand-alone TCL/TK executables. No compiler required!
OR
Use it as a single-file WISH shell

Description

The freewrap program turns TCL/TK scripts into single-file binary executable programs.

The resulting program can be distributed to machines that do not have TCL/TK installed. The executable will also work on machines that have TCL/TK installed but will use its own TCL/TK "image". freeWrap itself does not need TCL/TK installed to run.

The freeWrap program is a TCL/TK script that has been turned into a single-file executable program with the help of D. Richard Hipp's mktclapp utility. (See http://www.hwaci.com/sw/mktclapp for details)

Easy, one-step wrapping.

freeWrap consists of a single executable file. There is no setup required. Wrapping is accomplished with a single command.

freewrapTCLSH can be used to wrap TCL-only scripts.

freewrapTCLSH creates a single executable file from a TCL script. The wrapping syntax is identical to the freewrap program. This produces a console-only type of program.

freeWrap can be used as a single file stand-alone WISH

Renaming the freewrap program to some other file name causes freewrap to behave as a a stand-alone, single-file WISH that can be used to run any TCL/TK script.

freewrapTCLSH can be used as a single file stand-alone TCLSH shell

Renaming the freewrapTCLSH program to some other file name causes freewrapTCLSH to behave as a a stand-alone, single-file TCLSH shell that can be used to run any TCL script.

freeWrap encrypts your distributed program

freeWrap automatically encrypts your TCL/TK script code prior to wrapping it.

Shared libraries can be used with your wrapped programs.

freeWrapped applications can load TCL/TK shared library extensions that have been compiled with the new STUBS interface.

Your wrapped programs can be customized with your own window icons.

The Windows version of freeWrap now supports the modification of toplevel window icons.

No license fees for wrapped programs.

There are no license fees associated with freeWrap. See the freeWrap license.

Cross-platform generation of programs is now supported.

The -w "wrap using" option allows cross-platform creation of wrapped applications without the use of the target computer system.

freeWrap includes several Windows-specific commands for installing your wrapped applications.

These commands can be used to determine the location of Windows' special directories and make for easy creation of file extension associations and shortcuts.

Availability

freeWrap executables are freely available for both Linux and Windows95/98/NT. Instructions and source code for building freeWrap on both Windows and UNIX platforms are included in the distributions. See the Downloads table below for specifics.

Versions of freeWrap that include the BLT extension to TCL/TK are also available for download.

TCL-only versions of freeWrap are also available for wrapping TCL (non-TK) scripts.

History - current revision = 4.4

Changes for version 4.4

  1. freeWrap 4.4 is based on TCL/TK 8.3.2
  2. Added a -w "wrap using" option to specify the file to use as the freeWrap stub. This allows cross-platform creation of wrapped applications without the use of the target computer system.
  3. All extensions compiled into freeWrap (Blt, winico, dde, registry, Tk) are now statically loaded and are available for loading into TCL interpreters created with the interp command.
  4. Created ::freewrap namespace and moved all existing freewrap variables, commands and procedures into it.
  5. Added some commands to install new file types and associations into the Windows registry.
  6. Added a ::freewrap::shortcut command to create shortcuts under Windows.
  7. Added a ::freewrap::getSpecialDir command to find "Start Menu", "Desktop" and similar directory locations under Windows.

Changes for version 4.3

  1. freeWrap 4.3 is based on TCL/TK 8.3.1.
  2. Fixed a bug introduced by TCL/TK 8.3 that prevented the use of the "\" path separator on the freeWrap command line. Paths on the freeWrap command line can again use either the forward or backward slash character.

Changes for version 4.2

  1. Fixed a fatal bug that occurred when using the _freewrap_pkgfilecopy procedure.

Changes for version 4.1

  1. freeWrap 4.1 is based on TCL/TK 8.3.0
  2. The Windows version of freeWrap now includes the tcl83pip.dll file from the normal TCL distribution. This file is necessary when running scripts that redirect stdin/stdout through pipes using the exec or open commands.
  3. The BLT version of freeWrap now correctly finds and outputs the postscript headers.
  4. The documentation now describes how to properly wrap and use character encoding files.
  5. The documentation includes an expanded description of referencing wrapped file names.
  6. Added a -b option for wrapping any type of binary file.
  7. freeWrap now operates properly even if it is run through a symbolic link under UNIX.

Changes for version 4.0

  1. freeWrap 4.0 is based on TCL/TK 8.2.2
  2. The freeWrap executable file is now much smaller. It has been compressd with UPX and now fits on a single floppy.
  3. Wrapped file paths can now include spaces.
  4. Wrapped binary files take less room than previous versions of freeWrap.
  5. Added a few features, procedure and variables to support my new application distribution program, freeDelivery.
  6. Added -p command line option to wrap application distribution packages
  7. Pressing the [x] on the root window under Windows95/98/NT now exits the program completely from memory. Several people were confused about Windows' default behavior which closed the root window but kept the program in memory. Programmer's can still intercept the WM_DELETE_WINDOW event themselves using the "wm protocol" command.

Changes for version 3.3

  1. freeWrap 3.3 is based on TCL./TK version 8.2.1
  2. TCL load command now works with stubs-enabled shared libraries.
  3. Using freeWrap's -f option, the list of files to wrap can be retrieved from a text file.
  4. The Windows version now includes the WINICO package to allow setting of toplevel window icons.

Changes for version 3.2

  1. Corrected code so the path to the executing copy of freeWrap is correctly determined. This eliminated the couldn't open "freewrap": no such file or directory error seen at wrap time on some operating systems (e.g. WindowsNT, Irix).
  2. Included a free license statement for freeWrap.
  3. Added _freewrap_patchLevel variable to indicate the freeWrap revision number.

Changes for version 3.1

  1. Corrected improper decryption of additional wrapped files.
  2. Corrected inability to access additional wrapped files under UNIX.
  3. Included BLT library files into freeWrapBLT version.
  4. Corrected handling of line continuations (\ character) under Windows.
  5. The TCL/TK interp command now works correctly under freeWrap.

Changes for version 3.0

  1. Can now wrap multiple scripts together
  2. Can now wrap binary image files into executable. (GIF, PPM, PGM)
  3. Automatic encryption of wrapped files.
  4. freeWrap 3.0 is based on TCL/TK 8.1.1

How to use freeWrap

Visit the freeWrap How-To page.

How freeWrap was made

freeWrap does not include any alterations to the TCL/TK core. It is plain-vanilla TCL/TK with sometimes an extension such as BLT thrown in.

Visit the freeWrap build page for a short description on how to build it.

TCL/TK extensions

TCL/TK extensions can be loaded dynamically if they have been compiled with the TEA (i.e. stubs) interface.

Alternatively, if you are willing to recompile freeWrap, TCL/TK extensions may also be statically compiled into freeWrap. See the Downloads section for versions of freeWrap that include statically compiled TCL/TK extensions.

Downloads

The following downloads are available.
 

freewrap44.zip freeWrap version 4.4 for the Windows operating system. 
freewrapTCLSH44.zip freeWrap version 4.4 for use with TCL-only scripts (Windows operating system)
freewrapBLT44.zip freeWrap version 4.4 with the BLT2.4u extension built-in for the Windows operating system.
freewrap44.tar.gz freeWrap version 4.4 for Linux (Intel) operating system. Decompress and unTAR this program to install freeWrap 4.4 on Linux.
freewrapTCLSH44.tar.gz freeWrap version 4.4 for use with TCL-only scripts (Linux operating system)
freewrapBLT44.tar.gz freeWrap version 4.4 with BLT2.4u for Linux (Intel) operating system. Decompress and unTAR this program to install freeWrapBLT 4.4 on Linux.
freewrapsrc44.tar.gz freeWrap version 4.4 source distribution in compressed TAR format for building on any version of UNIX or Windows. Includes source code for all versions downloaded here.

 

This page last updated October 8, 2000

Send comments to dlabelle@nycap.rr.com