From df98baf961b863de52e9e54146e3070ab7e93440 Mon Sep 17 00:00:00 2001 From: Flowseal Date: Wed, 8 Apr 2026 00:36:12 +0300 Subject: [PATCH] and another one --- .github/workflows/build.yml | 11 +++++++++-- packaging/version_info.txt | 36 ++++++++++++++++++++++++++++++++++++ packaging/windows.spec | 2 ++ 3 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 packaging/version_info.txt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ee1b86..20841aa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,6 +29,11 @@ jobs: python-version: "3.12" cache: "pip" + - name: Setup MSVC 14.40 toolset + uses: ilammy/msvc-dev-cmd@v1 + with: + toolset: 14.40 + - name: Install dependencies run: pip install . @@ -41,7 +46,8 @@ jobs: - name: Build EXE with PyInstaller run: pyinstaller packaging/windows.spec --noconfirm - - name: Strip Rich PE header to avoid false AV detections + - name: Strip Rich PE header + shell: bash run: | python -c " import struct, pathlib @@ -93,7 +99,8 @@ jobs: - name: Build EXE with PyInstaller run: pyinstaller packaging/windows.spec --noconfirm - - name: Strip Rich PE header to avoid false AV detections + - name: Strip Rich PE header + shell: bash run: | python -c " import struct, pathlib diff --git a/packaging/version_info.txt b/packaging/version_info.txt new file mode 100644 index 0000000..dfa7684 --- /dev/null +++ b/packaging/version_info.txt @@ -0,0 +1,36 @@ +# UTF-8 +# +# For more details about fixed file info 'ffi' see: +# http://msdn.microsoft.com/en-us/library/ms646997.aspx +VSVersionInfo( + ffi=FixedFileInfo( + filevers=(1, 0, 0, 0), + prodvers=(1, 0, 0, 0), + mask=0x3f, + flags=0x0, + OS=0x40004, + fileType=0x1, + subtype=0x0, + date=(0, 0) + ), + kids=[ + StringFileInfo( + [ + StringTable( + u'040904B0', + [ + StringStruct(u'CompanyName', u'Flowseal'), + StringStruct(u'FileDescription', u'Telegram Desktop WebSocket Bridge Proxy'), + StringStruct(u'FileVersion', u'1.0.0.0'), + StringStruct(u'InternalName', u'TgWsProxy'), + StringStruct(u'LegalCopyright', u'Copyright (c) Flowseal. MIT License.'), + StringStruct(u'OriginalFilename', u'TgWsProxy.exe'), + StringStruct(u'ProductName', u'TG WS Proxy'), + StringStruct(u'ProductVersion', u'1.0.0.0'), + ] + ) + ] + ), + VarFileInfo([VarStruct(u'Translation', [1033, 1200])]) + ] +) diff --git a/packaging/windows.spec b/packaging/windows.spec index 6c21f7f..ff4e1b9 100644 --- a/packaging/windows.spec +++ b/packaging/windows.spec @@ -34,6 +34,7 @@ a = Analysis( ) icon_path = os.path.join(os.path.dirname(SPEC), os.pardir, 'icon.ico') +version_path = os.path.join(os.path.dirname(SPEC), 'version_info.txt') if os.path.exists(icon_path): a.datas += [('icon.ico', icon_path, 'DATA')] @@ -60,4 +61,5 @@ exe = EXE( codesign_identity=None, entitlements_file=None, icon=icon_path if os.path.exists(icon_path) else None, + version=version_path if os.path.exists(version_path) else None, )