calibre executables in windows now have the proper version information set

This commit is contained in:
Kovid Goyal 2009-02-18 15:36:19 -08:00
parent f9501dce90
commit b6ab0ba4a0

View File

@ -28,33 +28,12 @@ for icon in ICONS:
raise Exception('No icon at '+icon)
VERSION = re.sub('[a-z]\d+', '', VERSION)
WINVER = VERSION+'.0'
PY2EXE_DIR = os.path.join(BASE_DIR, 'build','py2exe')
class BuildEXE(py2exe.build_exe.py2exe):
manifest_resource_id = 0
MANIFEST_TEMPLATE = '''
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="%(version)s"
processorArchitecture="x86"
name="net.kovidgoyal.%(prog)s"
type="win32"
/>
<description>Ebook management application</description>
<!-- Identify the application security requirements. -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="asInvoker"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
'''
def run(self):
py2exe.build_exe.py2exe.run(self)
print 'Adding plugins...'
@ -128,19 +107,13 @@ class BuildEXE(py2exe.build_exe.py2exe):
for f in glob.glob(os.path.join(VC90, '*')):
shutil.copyfile(f, os.path.join(PY2EXE_DIR, os.path.basename(f)))
@classmethod
def manifest(cls, prog):
cls.manifest_resource_id += 1
return (24, cls.manifest_resource_id,
cls.MANIFEST_TEMPLATE % dict(prog=prog, version=(VERSION+'.0')))
def exe_factory(dest_base, script, icon_resources=None):
exe = {
'dest_base' : dest_base,
'script' : script,
'name' : dest_base,
'version' : VERSION+'.0',
'version' : WINVER,
'description' : 'calibre - E-book library management',
'author' : 'Kovid Goyal',
'copyright' : '(c) Kovid Goyal, 2008',