Hi Andrea,
Andrea Gavana wrote:
Hi All,
I am (slowly) working on updating GUI2Exe, and again I stumbled
upon the issue of the manifest file on Python 2.6/Vista/py2exe (and
other executable builders as well). I don't have Vista, so I am
progressing almost as in a dark room with my code. I have read the
very interesting Wiki page Werner has set up:
py2exe - wxPyWiki
Thank you, but I think it still needs some work.
But I still have some questions. As I understand, with Python 2.6 and
Vista you shouldn't check the manifest option in GUI2Exe: but GUI2Exe
needs to know if a manifest is needed, so I believe I will change what
the manifest option does in case the user is compiling on Vista using
Python 2.6. Anyway, is this line of reasoning correct:
==> Assuming the manifest option in GUI2Exe *is* checked <== :
if operating_system >= Windows Vista and Python_version >= 2.6:
if operating_system >= Windows and Python_version >= 2.6:
The problem is not the build machine, but the machine you deploy too. So, ideally we should be able to build an exe/installer on any Windows OS version and deploy to any Windows OS version.
For this to work (as far as I have found so far) you need to put the VC90 manifest and relevant dll's into the same folder then the app.exe, i.e. they can not be in a sub-folder.
If one uses the py2exe option "lib/library.zip" then the "lib" folder needs to get a second copy of the VC90 stuff.
Now, I have second thoughts if Gui2Exe/py2exe should copy these things or if this is not better done in an installer. I.e. an InnoSetup script can check if a particular version the VC90 stuff is available on a system and if it is not install anything, or if it is not install it either as private or into the SxS folders.
So, maybe Gui2Exe/py2exe should just give the information that xyz is needed - i.e. a list of dll's etc.
(a) Do not embed the manifest in the executable
I do not think that it will disturb anything if you keep it.
(b) Create a Microsoft.VC90.CRT.manifest
(c) Extract the content of the Microsoft.VC90.CRT.manifest from
some other DLL (where??) and copy it to the manifest in (b)
Best is probably to get it from python25/python.exe or pythonw.exe.
Robin posted some info on how one can update the manifest with some ctypes/Python code and I tried to adapt it to read this code, but without any success.
else:
(a) Do everything as you did before the Python 2.6/Windows SxS mess came up
Is this correct? Am I missing something? Does anyone have an answer
for the point (c)?
Other than that, does anyone have any experience with the other
freezing tools (cx_Freeze, bbFreeze, PyInstaller) on Vista with Python
I played with cx- and bbFreeze, and I am planning to do some more work with cxFreeze as it looks like one could very easily support Windows and Linux with it, which would be nice. I will at least document the points Anthony Tuininga made in a recent thread on the wiki along the lines of what I have done for py2exe.
BTW, cxFreeze actually copied the VC90 dll's into the build folder, but it did not automatically include the manifest, but Anthony explained how that would be done.
Werner