Hello,
a manifest looks like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="0.64.1.0"
processorArchitecture="x86"
name="Python"
type="win32"
/>
<description>Python Interpreter</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
under windows installations of python you have a file called
pythonw.exe.manifest in the same directory as pythonw.exe. The main
benefit of using a manifest is to enable the XP look and feel of your
application.
One solution is to put this manifest in the same directory as the
resulting output of pyinstaller and rename the file to
MyApp.exe.manifest.
If you have the --onfile option injecting the manifest would be a nice option.
See also the py2exe way of doing it:
http://mail.python.org/pipermail/python-list/2004-June/226653.html
regards,
ramin
On 6/21/06, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
Send PyInstaller mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.hpcf.upr.edu/mailman/listinfo/pyinstaller
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of PyInstaller digest..."
Today's Topics:
1. Re: Win32 manifest - code suggestion (Giovanni Bajo)
2. Re: Problems attempting to use PyInstaller (Giovanni Bajo)
----------------------------------------------------------------------
Message: 1
Date: Tue, 20 Jun 2006 12:44:42 +0200
From: "Giovanni Bajo" <[EMAIL PROTECTED]>
Subject: Re: [PyInstaller] Win32 manifest - code suggestion
To: "PyInstaller Mailing List" <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"
Ramin Sabet wrote:
> It would be great to add a manifest to the --onefile binary (nicer
> than having the .exe and the .exe.manifest).
>
> I tried this code in your build.py which worked fine:
>
> def AddManifest(self,dstpath,strManifestPath):
> print 'AddManifest',dstpath,strManifestPath
> import win32api #, win32con
> strManifest=open(strManifestPath,'rt').read()
> hdst = win32api.BeginUpdateResource (dstpath, 0)
> win32api.UpdateResource (hdst, 24, 1, strManifest)
> win32api.EndUpdateResource (hdst, 0)
>
> Would be great if you could include it with commandline option (like
> the icon or version resource) in a future version ...
I never used VS2005, so I don't know what this manifest file is. When is it
generated? It looks like this code embeds the manifest within the
bootloader, so maybe the correct solution is to build correctly the
bootloader, so that the manifest file is already embedded?
--
Giovanni Bajo
------------------------------
Message: 2
Date: Tue, 20 Jun 2006 13:03:53 +0200
From: "Giovanni Bajo" <[EMAIL PROTECTED]>
Subject: Re: [PyInstaller] Problems attempting to use PyInstaller
To: "PyInstaller Mailing List" <[email protected]>
Cc: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"
Don Dwiggins wrote:
> I'm a current user of py2exe, and am experimenting with PyInstaller
> as
> a possible replacement. I'm on WinXP using Python 2.4 and wxPython
> 2.6.3.2.
Sorry for being late on this. I don't have much time for PyInstaller right
now :(
> I've succeeded in created a single-file executable in a distribution
> directory that has an "aux_files" subdirectory containing some data
> files. However, I've run across a few problems with PyInstaller 1.1
> that I thought it worth mentioning:
>
> 1. The config.dat generated by Configure.py had the following line:
> 'hasUPX': (1, 94),
> This caused Build.py to fail, since it was expecting that key to have
> an integer value; I changed it to
> 'hasUPX': 1,
> and it worked OK. Should I submit a ticket for this?
This is fixed on trunk already, sorry about that. I should have made a
quick-fix release for this...
> 2. I use EnsureDispatch in my app, and encountered a problem that's
> described in Ticket #41. By making the patches shown in the ticket, I
> was able to get a successful build, and have run the application on
> the build machine and a test machine without Python installed.
I'm not familiar with win32com enough. I had a quick look at the patch in
that ticket but there was something that was concerning me at the time...
Would you please add a note to that ticket, saying that the patch also
worked for you? So I'll remember to check better :)
> 3. In attempting to create the directory structure I mentioned above,
> I defined a COLLECT instance referencing the files in the
> subdirectory,
> then passed that to a second COLLECT for the distribution directory;
> this one looks like
> dist = COLLECT(exe, aux, name='pyi_dist')
> This gave a traceback using Build.py on it. Looking at it in the
> debugger, it seems that COLLECT wants its args to have a value for the
> "typ" attribute, but the COLLECT class doesn't define that attribute.
> I suspect that I went about this the wrong way, but you might want to
> note
> in the manual that COLLECT args can only be instances of certain
> subclasses of Target (unless I've misunderstood this completely).
Well, I think that the problem is that COLLECT acts like a TOC but it is not
a TOC. In fact, it contains a self.toc attributes. Tree, instead, acts like
a TOC but it *is* a TOC. This is why it works passing a Tree to COLLECT but
not another COLLECT instance. If you want to attempt something (please :), I
think you should make it so COLLECT derives from both Target and TOC, just
as Tree does. This way, it should naturally be possible to embed COLLECTs
within other COLLECTs.
Now besides the technical merit, I am not sure what it buys you to run two
collects in a row, since each collect is a physical copy of files...
> I was able to get close to what I want by using a Tree for the aux
> files, adding
> prefix='aux_files/'
> to get the files into the appropriate subdirectory of the
> distribution. This gave me everything in the subdirectory, however.
> What I'd like
> here is an 'includes=' option, since I only want one file from there.
> Any suggestions?
If you want a single file, you don't need neither a COLLECT nor a Tree. You
can simply specify it as [(name, path, typecode)]. See the manual
http://pyinstaller.hpcf.upr.edu/docs/Manual_v1.1.html#toc-class-table-of-contents
about how to add a single file to an existing TOC.
If you want to provide a patch to specify specific glob/regexp patterns as
"includes" to Tree, I'm fine, as soon as it is semantically clear that Tree
is a way to automatically make a TOC out of a "large" tree of elements.
Adding single files is much easier than that.
Thanks for your great feedback!
--
Giovanni Bajo
------------------------------
_______________________________________________
PyInstaller mailing list
[email protected]
http://lists.hpcf.upr.edu/mailman/listinfo/pyinstaller
End of PyInstaller Digest, Vol 10, Issue 6
******************************************
_______________________________________________
PyInstaller mailing list
[email protected]
http://lists.hpcf.upr.edu/mailman/listinfo/pyinstaller