On Wed, 2011-01-19 at 15:23 +0100, Martin Zibricky wrote:
> Giovanni Bajo píše v St 19. 01. 2011 v 15:07 +0100:
> > The bootloader does the equivalent of sys.argv[0]+".manifest". Since
> > it
> > dynamically loads the manifest, it works unless the end user renames
> > the
> > executable (which is never supported by PyInstaller, eg. it breaks the
> > multi-package mode).
> 
> What makes me worried is the following text from 
> 
> http://msdn.microsoft.com/en-us/library/f2c0w594(v=vs.80).aspx
> 
> ----
> If you specify /MANIFEST, the name of the manifest file will be the same
> as the name of your output file, with .manifest appended to the file
> name. For example, if your output file name is MyFile.exe, the manifest
> file name will be MyFile.exe.manifest. If you
> specify /MANIFESTFILE:name, the name of the manifest will be what you
> specify in name.
> ----
> 
> So I think that when using the linkflag '/MANIFEST' the name of the
> required manifest file is hard coded in the executable to values like
> 'run.exe.manifest' and that loading manifest file dynamically is then
> overriden.

I think you're mixmatching the issues.

/MANIFEST only generates the manifest on the disk. If you remove that
flag from the linker command line, the manifest is simply not
generated. /MANIFEST does not modify the executable in any form.

For a manifest to be automatically loaded and activated by the operating
system, there are two ways:

 * Either the manifest is on the disk, next to the executable, with the
same name of the executable plus ".manifest"
 * or the manifest is embedded within the executable (embedding is
usually achieved through the mt.exe tool after linking).

In the case of PyInstaller, we load and activate the manifest "manually"
through Win32 APIs in one-file mode (since it's extracted to the temp
directory); in one-dire mode, the OS loads it automatically since it
sits there on the disk next to the executable.
-- 
Giovanni Bajo   ::  [email protected]
Develer S.r.l.  ::  http://www.develer.com

My Blog: http://giovanni.bajo.it
Last post: Compile-time Function Execution in D

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyinstaller?hl=en.

Reply via email to