From 62fbbcb505e06417a0155ecafac5df287fb071c6 Mon Sep 17 00:00:00 2001 From: Ivan Holmes Date: Tue, 4 Aug 2020 18:50:07 +0100 Subject: [PATCH] update windows spec file --- version.rc | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ win.spec | 4 ++-- 2 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 version.rc diff --git a/version.rc b/version.rc new file mode 100644 index 0000000..79068e0 --- /dev/null +++ b/version.rc @@ -0,0 +1,50 @@ +# UTF-8 +# + +# Nasty hack to get the version number included automatically +with open('_version.py', 'r') as versinfo: + exec(versinfo.read() + +versNum = [int(x) for x in version.split(".")] + +# For more details about fixed file info 'ffi' see: +# http://msdn.microsoft.com/en-us/library/ms646997.aspx +VSVersionInfo( + ffi=FixedFileInfo( +# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4) +# Set not needed items to zero 0. +filevers=(versNum[0], versNum[1], versNum[2], 0), +prodvers=(versNum[0], versNum[1], versNum[2], 0), +# Contains a bitmask that specifies the valid bits 'flags'r +mask=0x3f, +# Contains a bitmask that specifies the Boolean attributes of the file. +flags=0x0, +# The operating system for which this file was designed. +# 0x4 - NT and there is no need to change it. +OS=0x4, +# The general type of file. +# 0x1 - the file is an application. +fileType=0x1, +# The function of the file. +# 0x0 - the function is not defined for this fileType +subtype=0x0, +# Creation date and time stamp. +date=(0, 0) +), + kids=[ +StringFileInfo( + [ + StringTable( + u'040904B0', + [StringStruct(u'CompanyName', u'Ivan Holmes'), + StringStruct(u'FileDescription', u'Chordsheet'), + StringStruct(u'FileVersion', version), + StringStruct(u'InternalName', u'Chordsheet'), + StringStruct(u'LegalCopyright', u'Copyright (c) Ivan Holmes, 2020. Some rights reserved.'), + StringStruct(u'OriginalFilename', u'chordsheet.exe'), + StringStruct(u'ProductName', u'Chordsheet'), + StringStruct(u'ProductVersion', version)]) + ]), +VarFileInfo([VarStruct(u'Translation', [1033, 1200])]) + ] +) \ No newline at end of file diff --git a/win.spec b/win.spec index f1d6347..796f150 100644 --- a/win.spec +++ b/win.spec @@ -2,7 +2,6 @@ block_cipher = None - a = Analysis(['gui.py'], pathex=['C:\\Users\\Ivan Holmes\\code\\chordsheet'], binaries=[], @@ -34,4 +33,5 @@ exe = EXE(pyz, upx=True, upx_exclude=[], runtime_tmpdir=None, - console=False ) + console=False, + version='version.rc')