PyInstaller .manifest #959

Merged
merged 3 commits into from Jun 24, 2014

Conversation

Projects
None yet
2 participants
Contributor

Metallicow commented Feb 22, 2014

PyInstaller

Usually these files are written by a python script from a template
before PyInstaller builds the exe, so as to inject date/other infos
into it.

*.exe.manifest
*.manifest

Example template

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <assemblyIdentity
    type="win32"
    name="SourceCoder"
    version="14.2.22.0"
    processorArchitecture="x86"
  />
  <description>Description</description>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false" />
      </requestedPrivileges>
    </security>
  </trustInfo>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity
         type="win32"
         name="Microsoft.Windows.Common-Controls"
         version="6.0.0.0"
         processorArchitecture="x86"
         publicKeyToken="6595b64144ccf1df"
         language="*"
       />
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity
         type="win32"
         name="Microsoft.VC90.CRT"
         version="9.0.21022.8"
         processorArchitecture="x86"
         publicKeyToken="1fc8b3b9a1e18e3b"
       />
    </dependentAssembly>
  </dependency>
</assembly>

Metallicow added some commits Feb 22, 2014

@Metallicow Metallicow PyInstaller .manifest
# PyInstaller
#  Usually these files are written by a python script from a template
#  before PyInstaller builds the exe, so as to inject date/other infos
into it.
*.exe.manifest
*.manifest

Example template
```
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<assemblyIdentity
type="win32"
name="SourceCoder"
version="14.2.22.0"
processorArchitecture="x86"
/>
<description>Description</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="x86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.VC90.CRT"
version="9.0.21022.8"
processorArchitecture="x86"
publicKeyToken="1fc8b3b9a1e18e3b"
/>
</dependentAssembly>
</dependency>
</assembly>
```
2a36f44
@Metallicow Metallicow .spec files also 8b4090b
Collaborator

arcresu commented Feb 23, 2014

Thanks for this! The *.exe.manifest rules is already covered by *.manifest so is redundant. What are the .spec files? I did a quick search of the documentation on PyInstaller's website and it seems to suggest that the manifest files are only created when you pass a flag rather than being created by default. Is that the case?

Contributor

Metallicow commented Feb 23, 2014

Re: spec: PyInstaller usually generates this if you have not made one yourself or specify one. Basically It tells PyInstaller the options and sutch you want. It usually checks for this before compiling the frozen exe.
Ex: like when running pyinstaller.py -[options] script.py
Normally the spec file and manifest file would be on the command line options.

I created the .manifest file from a template and a python script and just inject infos into it, so I don't think It actually generates those ones without consent, but they are always laying around and/or tend to get overwritten constantly.

Ex: .spec

# -*- mode: python -*-
a = Analysis(['P:\\pythonScript.py'],
             pathex=['P:\\python\\src'],
             hiddenimports=[],
             hookspath=None,
             runtime_hooks=None)
pyz = PYZ(a.pure)
exe = EXE(pyz,
          a.scripts,
          a.binaries,
          a.zipfiles,
          a.datas,
          name='myPythonApp.exe',
          debug=False,
          strip=None,
          upx=True,
          console=True , icon='P:\\Ico\\myapp.ico')

Collaborator

arcresu commented Jun 24, 2014

Thanks, this looks good. Sorry for the delay!

arcresu merged commit 4016064 into github:master Jun 24, 2014

Metallicow deleted the Metallicow:PyInstaller-.gitignore branch Jun 25, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment