[ANN] PyInstaller 1.3 released

Discussion in 'Python' started by Giovanni Bajo, Dec 20, 2006.

  1. Hello,

    PyInstaller 1.3 is out!

    Grab latest version at:

    PyInstaller is a program that converts (packages) Python programs into
    stand-alone executables, under Windows, Linux and Irix. Its main advantages
    over similar tools are that PyInstaller works with any version of Python since
    1.5, it builds smaller executables thanks to transparent compression, it is
    multi-platform (so you can build one-file binaries also under Linux), and use
    the OS support to load the dynamic libraries, thus ensuring full compatibility.

    * Packaging of Python programs into standard executables, that
    work on computers without Python installed.
    * Multiplatform: works under Windows, Linux and Irix. (Mac port
    in development. See /branches/mac on SVN)
    * Multiversion: works under any version of Python since 1.5.
    * Dual packaging mode:
    o Single directory: build a directory containing an
    executable plus all the external binary modules (.dll,
    .pyd, .so) used by the program.
    o Single file: build a single executable file, totally
    self-contained, which runs without any external
    * Support for automatic binary packing through the well-known
    UPX compressor.
    * Optional console mode (see standard output and standard error
    at runtime).
    * Selectable executable icon (Windows only).
    * Fully configurable version resource section in executable
    (Windows only).
    * Support for building COM servers (Windows only).

    + Fix bug with user-provided icons disappearing from built executables
    when these were compressed with UPX.
    + Fix problems with packaging of applications using PIL (that was broken
    because of a bug in Python's import machinery, in recent Python
    versions). Also add a workaround including Tcl/Tk with PIL unless
    ImageTk is imported.
    + (Windows) When used under Windows XP, packaged programs now have
    the correct look & feel and follow user's themes (thanks to the manifest
    file being linked within the generated executable). This is especially
    useful for applications using wxPython.
    + Fix a buffer overrun in the bootloader (which could lead to a crash)
    when the built executable is run from within a deep directory (more than
    70-80 characters in the pathname).
    * Bootstrap modules are now compressed in the executable (so that they
    are not visible in plaintext by just looking at it with a hex editor).
    * Fixed a regression introduced in 1.1: under Linux, the bootloader does
    not depend on libpythonX.X.so anymore.

    We've moved
    PyInstaller has a new home:
    (thanks to the guys at webfaction.com for top-notch free hosting!)

    We also own a domain name (http://pyinstaller.org) which can be used as a
    permanent redirector to our home.

    The mailing list moved as well, it's now at
    http://groups.google.com/group/PyInstaller. Join us for discussion!
    Giovanni Bajo, Dec 20, 2006
    1. Advertisements

  2. Giovanni Bajo

    Robin Becker Guest


    I just tried this on something which we currently use py2exe+nsis to package and
    it certainly seems to produce a small exe, but when run I see a cryptic message
    on two message boxes

    ! msvcr71.dll

    ! could not be extracted

    the program then exits.

    When run with -X I saw output from the upx process
    Ultimate Packer for eXecutables
    Copyright (C) 1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006
    UPX 2.03w Markus Oberhumer, Laszlo Molnar & John Reiser Nov 7th 2006

    File size Ratio Format Name
    -------------------- ------ ----------- -----------
    348160 -> 165888 47.65% win32/pe MSVCR71.dll

    Packed 1 file.

    So I'm just guessing there might be a case sensitivity issue in the unpacking
    Robin Becker, Dec 20, 2006
    1. Advertisements

  3. yeah that's pretty cryptic. It's a known bug which I need to come around and
    fix it. Anyway, the message itself is harmless: if the program then exits,
    there is *another* problem.

    If you want to help with that, you could enable the console+debug mode and see
    what the traceback is. I'd be very glad to fix the problem for you.
    Giovanni Bajo, Dec 20, 2006
  4. Giovanni Bajo

    Robin Becker Guest

    Giovanni Bajo wrote:
    No problem I'll give it a whirl tomorrow.
    Robin Becker, Dec 20, 2006
  5. Giovanni Bajo

    Robin Becker Guest

    Giovanni Bajo wrote:
    No problem I'll give it a whirl tomorrow.
    Robin Becker, Dec 20, 2006
  6. Giovanni Bajo

    Robin Becker Guest


    OK I found the problem. First off I still see this message about

    msvcr71.dll could not be extracted!

    in the debug output.

    Secondly I found that the icon I specified in the Makespec.py invocation is
    actually being added to the distribution exe. I actually want to put the icon
    onto the running Tk app.

    We're using this code to do that

    self.tk.call('wm','iconbitmap', self._w, '-default', 'rptlabw.ico')

    ie it's assumed that the icon has been extracted into the runtime folder.

    I guess I either need to put the icon in as a resource or figure out some way to
    find the original exe and extract the icon from it.
    Robin Becker, Dec 21, 2006
  7. If you specify it as icon (--icon to Makespec), it means you want it as icon
    of the executable.

    If you just want to add it as an additional data file, read the manual about
    that. It will be extracted to the runtime directory and you should be able to
    access it through _MEIPASS2 (manual should be clear about that). You can't
    just read it from the "current directory" because the current directory is
    where your exectuable is run (which could even be off a CDROM...).
    Giovanni Bajo, Dec 22, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.