mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
calibre executables in windows now have the proper version information set
This commit is contained in:
parent
f9501dce90
commit
b6ab0ba4a0
@ -28,33 +28,12 @@ for icon in ICONS:
|
|||||||
raise Exception('No icon at '+icon)
|
raise Exception('No icon at '+icon)
|
||||||
|
|
||||||
VERSION = re.sub('[a-z]\d+', '', VERSION)
|
VERSION = re.sub('[a-z]\d+', '', VERSION)
|
||||||
|
WINVER = VERSION+'.0'
|
||||||
|
|
||||||
PY2EXE_DIR = os.path.join(BASE_DIR, 'build','py2exe')
|
PY2EXE_DIR = os.path.join(BASE_DIR, 'build','py2exe')
|
||||||
|
|
||||||
class BuildEXE(py2exe.build_exe.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):
|
def run(self):
|
||||||
py2exe.build_exe.py2exe.run(self)
|
py2exe.build_exe.py2exe.run(self)
|
||||||
print 'Adding plugins...'
|
print 'Adding plugins...'
|
||||||
@ -128,19 +107,13 @@ class BuildEXE(py2exe.build_exe.py2exe):
|
|||||||
for f in glob.glob(os.path.join(VC90, '*')):
|
for f in glob.glob(os.path.join(VC90, '*')):
|
||||||
shutil.copyfile(f, os.path.join(PY2EXE_DIR, os.path.basename(f)))
|
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):
|
def exe_factory(dest_base, script, icon_resources=None):
|
||||||
exe = {
|
exe = {
|
||||||
'dest_base' : dest_base,
|
'dest_base' : dest_base,
|
||||||
'script' : script,
|
'script' : script,
|
||||||
'name' : dest_base,
|
'name' : dest_base,
|
||||||
'version' : VERSION+'.0',
|
'version' : WINVER,
|
||||||
'description' : 'calibre - E-book library management',
|
'description' : 'calibre - E-book library management',
|
||||||
'author' : 'Kovid Goyal',
|
'author' : 'Kovid Goyal',
|
||||||
'copyright' : '(c) Kovid Goyal, 2008',
|
'copyright' : '(c) Kovid Goyal, 2008',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user