diff --git a/build-on-mac.spec b/build-on-mac.spec index 0b59bf0..a6fb593 100644 --- a/build-on-mac.spec +++ b/build-on-mac.spec @@ -19,12 +19,13 @@ exe = EXE(pyz, a.binaries, a.zipfiles, a.datas, - name='NodeMCU-PyFlasher', + name='NodeMCU PyFlasher', debug=False, strip=False, upx=True, console=False , icon='images/icon-256.icns') app = BUNDLE(exe, - name='NodeMCU-PyFlasher-5.0.0.app', + name='NodeMCU PyFlasher.app', + version='5.0.0', icon='./images/icon-256.icns', bundle_identifier='com.frightanic.nodemcu-pyflasher') diff --git a/build-on-win.spec b/build-on-win.spec index c6c9b33..bafbaa6 100644 --- a/build-on-win.spec +++ b/build-on-win.spec @@ -19,8 +19,10 @@ exe = EXE(pyz, a.binaries, a.zipfiles, a.datas, - name='NodeMCU-PyFlasher-5.0.0', + name='NodeMCU-PyFlasher', + version='windows-version-info.txt', debug=False, strip=False, upx=True, - console=False , icon='images\\icon-256.ico') + console=False, + icon='images\\icon-256.ico') diff --git a/build.sh b/build.sh index 726dca4..3d1f8ee 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash # rm -fr build dist VERSION=5.0.0 -NAME=NodeMCU-PyFlasher +NAME="NodeMCU PyFlasher" +DIST_NAME="NodeMCU-PyFlasher" pyinstaller --log-level=DEBUG \ --noconfirm \ @@ -9,5 +10,5 @@ pyinstaller --log-level=DEBUG \ build-on-mac.spec # https://github.com/sindresorhus/create-dmg -create-dmg dist/$NAME-$VERSION.app -mv "$NAME-$VERSION 0.0.0.dmg" dist/$NAME-$VERSION.dmg +create-dmg "dist/$NAME.app" +mv "$NAME $VERSION.dmg" "dist/$DIST_NAME.dmg" diff --git a/requirements.txt b/requirements.txt index 7283483..556432b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,3 +3,4 @@ pyserial~=3.5 wxPython~=4.1.1 PyInstaller~=4.2 httplib2>=0.18.1 +pyinstaller-versionfile>=2.0.0 diff --git a/windows-metadata.yaml b/windows-metadata.yaml new file mode 100644 index 0000000..6b5fdc1 --- /dev/null +++ b/windows-metadata.yaml @@ -0,0 +1,9 @@ +# https://github.com/DudeNr33/pyinstaller-versionfile +# create-version-file windows-metadata.yaml --outfile windows-version-info.txt +Version: 5.0.0 +CompanyName: Marcel Stör +FileDescription: NodeMCU PyFlasher +InternalName: NodeMCU PyFlasher +LegalCopyright: © Marcel Stör. All rights reserved. +OriginalFilename: NodeMCU-PyFlasher.exe +ProductName: NodeMCU PyFlasher \ No newline at end of file diff --git a/windows-version-info.txt b/windows-version-info.txt new file mode 100644 index 0000000..bde9c14 --- /dev/null +++ b/windows-version-info.txt @@ -0,0 +1,46 @@ +# GENERATED FILE. DO NOT EDIT. Created by running create-version-file windows-metadata.yaml --outfile windows-version-info.txt +# +# UTF-8 +# +# 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. Must always contain 4 elements. + filevers=(5,0,0,0), + prodvers=(5,0,0,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=0x40004, + # 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'Marcel Stör'), + StringStruct(u'FileDescription', u'NodeMCU PyFlasher'), + StringStruct(u'FileVersion', u'5.0.0.0'), + StringStruct(u'InternalName', u'NodeMCU PyFlasher'), + StringStruct(u'LegalCopyright', u'© Marcel Stör. All rights reserved.'), + StringStruct(u'OriginalFilename', u'NodeMCU-PyFlasher.exe'), + StringStruct(u'ProductName', u'NodeMCU PyFlasher'), + StringStruct(u'ProductVersion', u'5.0.0.0')]) + ]), + VarFileInfo([VarStruct(u'Translation', [1033, 1200])]) + ] +) \ No newline at end of file