Issues with Installer written in Python for Linux

Stephan Kuhagen nospam at domain.tld
Wed Aug 30 00:17:09 EDT 2006


dwelch91 at gmail.com wrote:

> I am undertaking writing an installer for a software package using
> Python. It is exclusively for Linux. Because this is an installer and
> has to run on numerous Linux distros, it is presenting some unique
> challenges.

I had the same problem to solve as you, and I hope, my answer is not too
offtopic to you, since I wrote the solution in Tcl/Tk. I needed the
installer to work in text-mode, if no X is available and with a GUI, if X
can be used. The Installer works in both modes. It is not very fancy, but
allows to run additional scripts after installation, shows some info and
License-Agreement, Logo and so on. The "trick" was to pack all in a single
script, that first runs as a shell script, checks if Tcl is available at
all (for you python), the starting up Tcl, feeding it the same file as a
Tcl-Script, then checking inside of Tcl, if Tk can be loaded (for you
TkInter, which is the same thing) and if so, run the GUI, otherwise run in
a text-mode, which I implemented using only basic shell-commands (cat,
md5sum for validity-check, bzip2, but gzip would also work, and sed, the
other commands are bash-builtins) so they should be on every distro. But
that part possibly can better also be implemented in python or Tcl. - If
you are interested, how it works and think, it would help you, tell me. You
can look at the installer at www.mevislab.de -> Downloads, take one of the
Linux-Installers. If you want, I can also give you the scripts, that create
such a installer. They are a little bit confused written, since they had to
be finished yesterday, as ever (and laying around since, annoying me, when
I look at the code). But may be they help or at least inspire you, doing
the same thing but better.

Regards
Stephan



More information about the Python-list mailing list