Questions about Installer/Builder/Standalone

Gordon McMillan gmcm at hypernet.com
Mon Jun 26 19:47:53 EDT 2000


Mike Callahan wrote: 

>I am playing with Gordon McMillan's Installer 0.3f for Windows and have
>gotten it to work using freeze, simple, and standalone with non-Tkinter
>apps. Good job Gordon! I can make a Tkinter app using simple but I
>cannot get it to work using standalone. I know that simple does some
>magic to get the app to use the local Tk it installs and Gordon talks
>about it in the docs. But I cannot figure out what the magic is. 

Two pieces of "magic". Look in the gen_install.py from Simple. There's a 
snippet of code there that unpacks the bundled up tcl/tk:

installutils.installCArchive(os.path.join(idir,'TCLlib.pkg'), idir, 
'lib/tcl')

Basically, this is unpacking TCLlib.pkg into lib/tcl (relative to where 
you're installing). That happens once. Somehow you need to get 
InstallShield to do it for you.

Then, each time you run, there's some code that runs first (which you'll 
find in projects/BuildTK/runTK.py). All it does is set environment 
variables so that _tkinter will find the private tcl/tk stuff installed 
above. If you cut&paste from runTK to the top of your main script, it 
should run fine.

- Gordon



More information about the Python-list mailing list