Gordon McMillan installer and Python 2.4

S

Svein Brekke

Hi.

Thank you Gordon McMillan for a very nice freeze tool for python.
(I use it on Windows XP SP2 for creating a single-file self-extracting
wxPython based installation script for a non-python application.)

Recently I upgraded to python 2.4, and on my system any .exe file
generated by the installer crashes immediately after startup. I use
version 6a2 of the installer.

The following steps provokes the crash:
1) Make a file hello.py with contents "print 'hello world'"
2) python c:/installer/Configure.py
3) python c:/installer/Makespec.py --onefile hello.py
4) python c:/installer/Build.py hello.spec
5) hello.exe

Catching the crash in Visual Studio 2003, gives the following message:
Unhandled exception at 0x7c918fea in run.exe: 0xC0000005: Access
violation writing location 0x00000010.

The call stack is quite long, but starts with
ntdll.dll!7c918fea()
python24.dll!1e062ac4()
MSVCR71.dll!_getptd() Line 319 C
MSVCR71.dll!isalpha(int c=58) Line 48 + 0x5 C
python24.dll!1e06350d()


Has anyone else succeded in using McMillans installer on 2.4?
Thanks for any help.

-Svein
 
S

Simon John

Seriously, if you're only interested in Windows, just use py2exe, or if
you want Linux+Windows, try cx_Freeze.
 
S

Svein Brekke

Seriously, if you're only interested in Windows, just use py2exe, or if
you want Linux+Windows, try cx_Freeze.

According to the command line help for cx_Freeze and py2exe, they
cannot pack my program with additional installation files into one
self-extracting .exe file (which is what I want to do).

Am I wrong on this?

McMillan's installer lets me easily do this for python 2.3, but
crashes on python 2.4.

-Svein
 
S

Serge Orlov

Svein said:
According to the command line help for cx_Freeze and py2exe, they
cannot pack my program with additional installation files into one
self-extracting .exe file (which is what I want to do).

Am I wrong on this?

You're right, but that doesn't mean py2exe is not for you. Packing
a program, displaying a license, choosing installation directory
is not Python specific, just use a generic installer. They are better
because they have much more users than Python specific installers.
See for example http://nsis.sourceforge.net/features/featurelist/

Use py2exe to bundle python core, extentions and your program into
one directory, then use nsis to create the installator.

Serge.
 
P

Peter Hansen

Svein said:
According to the command line help for cx_Freeze and py2exe, they
cannot pack my program with additional installation files into one
self-extracting .exe file (which is what I want to do).

Am I wrong on this?

As far as py2exe goes, no, you're not wrong.

On the other hand, there are readily available utilities that
will do what you are asking for, independent of Python and py2exe
and everything else. Standalone single-file packagers.

Unfortunately I don't recall the names of any, but I'm pretty
sure you can find one if you look, or someone else will remind
us of the names.

-Peter
 
J

Just

"Serge Orlov said:
You're right, but that doesn't mean py2exe is not for you. Packing
a program, displaying a license, choosing installation directory
is not Python specific, just use a generic installer. They are better
because they have much more users than Python specific installers.
See for example http://nsis.sourceforge.net/features/featurelist/

Use py2exe to bundle python core, extentions and your program into
one directory, then use nsis to create the installator.

It's not so much about the installation I suppose. A friend of mine is
packaging an app for Windows, and he _really_ likes the installed thing
to be a single-file .exe, not a folder with many things. Apparently
McMillan Installer does that very nicely. Too bad it doesn't support
Python 2.4 (yet).

Just
 
R

Richie Hindle

[Svein]
According to the command line help for cx_Freeze and py2exe, they
cannot pack my program with additional installation files into one
self-extracting .exe file (which is what I want to do).
[Peter]
On the other hand, there are readily available utilities that
will do what you are asking for, independent of Python and py2exe
and everything else. Standalone single-file packagers.

InnoSetup is the most popular free single-file-installer generator for
Windows. NSIS is probably second.
 
S

Svein Brekke

According to the command line help for cx_Freeze and py2exe, they
As far as py2exe goes, no, you're not wrong.

On the other hand, there are readily available utilities that
will do what you are asking for, independent of Python and py2exe
and everything else. Standalone single-file packagers.

Beeing able to use python to specify the installers behaviour (like
checking what files to install on different systems, decrypting
archives, etc.) is for me very attractive. AND, I have functional and
well tested version on python 2.3. Hence, the best options seems at
the moment to be: keep using python 2.3.

-Svein
 
M

Martin Bless

Thank you Gordon McMillan for a very nice freeze tool for python.

Yes, thanks a lot.
Recently I upgraded to python 2.4, and on my system any .exe file
generated by the installer crashes immediately after startup.

Yes, I can confirm this observation. The same on my machine: any .exe
crashes immediately. I too have the feeling the McMillan installer has
benefits (I justed started playing with installers). But py2exe seems
to work better at the moment.

mb - Martin
 
P

Peter Hansen

Richie said:
[Svein]
According to the command line help for cx_Freeze and py2exe, they
cannot pack my program with additional installation files into one
self-extracting .exe file (which is what I want to do).
[Peter]

On the other hand, there are readily available utilities that
will do what you are asking for, independent of Python and py2exe
and everything else. Standalone single-file packagers.

InnoSetup is the most popular free single-file-installer generator for
Windows. NSIS is probably second.

I'm not sure now, but I *think* the OP actually wanted one
of those beasties which will literally *run* from a single
EXE file, not just install from one in the usual way.

The only ones of which I'm aware are usually called something
like "self-executing zip files" and they -- invisibly to the
user -- will temporarily extract themselves into a temporary
folder, run the main exe, and then (optionally) clean up
completely after the application exits, removing all temporary
files.

-Peter
 
D

David Bolen

Has anyone else succeded in using McMillans installer on 2.4?
Thanks for any help.

I have a feeling that it may be related to the fact that the starter
modules (run*.exe) were built with VC6, which matches with Python
builds up to 2.3, but not 2.4 (which is built with VC7). So you're
probably running into a mismatch between C runtime libraries.

Since it sounds like you have VS 2003 available to you, you might try
rebuilding the appropriate run*.exe (the source is in the installer
tree beneath the source directory). VS 2003 should auto-convert the
..dsw/.dsp files but there's at least one dependency (zlib) that you
might have to build separately and handle manually (e.g., update the
project to locate your particular zlib library).

-- David
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top