Skip to content

Commit df98baf

Browse files
committed
and another one
1 parent 34dde32 commit df98baf

3 files changed

Lines changed: 47 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ jobs:
2929
python-version: "3.12"
3030
cache: "pip"
3131

32+
- name: Setup MSVC 14.40 toolset
33+
uses: ilammy/msvc-dev-cmd@v1
34+
with:
35+
toolset: 14.40
36+
3237
- name: Install dependencies
3338
run: pip install .
3439

@@ -41,7 +46,8 @@ jobs:
4146
- name: Build EXE with PyInstaller
4247
run: pyinstaller packaging/windows.spec --noconfirm
4348

44-
- name: Strip Rich PE header to avoid false AV detections
49+
- name: Strip Rich PE header
50+
shell: bash
4551
run: |
4652
python -c "
4753
import struct, pathlib
@@ -93,7 +99,8 @@ jobs:
9399
- name: Build EXE with PyInstaller
94100
run: pyinstaller packaging/windows.spec --noconfirm
95101

96-
- name: Strip Rich PE header to avoid false AV detections
102+
- name: Strip Rich PE header
103+
shell: bash
97104
run: |
98105
python -c "
99106
import struct, pathlib

packaging/version_info.txt

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# UTF-8
2+
#
3+
# For more details about fixed file info 'ffi' see:
4+
# http://msdn.microsoft.com/en-us/library/ms646997.aspx
5+
VSVersionInfo(
6+
ffi=FixedFileInfo(
7+
filevers=(1, 0, 0, 0),
8+
prodvers=(1, 0, 0, 0),
9+
mask=0x3f,
10+
flags=0x0,
11+
OS=0x40004,
12+
fileType=0x1,
13+
subtype=0x0,
14+
date=(0, 0)
15+
),
16+
kids=[
17+
StringFileInfo(
18+
[
19+
StringTable(
20+
u'040904B0',
21+
[
22+
StringStruct(u'CompanyName', u'Flowseal'),
23+
StringStruct(u'FileDescription', u'Telegram Desktop WebSocket Bridge Proxy'),
24+
StringStruct(u'FileVersion', u'1.0.0.0'),
25+
StringStruct(u'InternalName', u'TgWsProxy'),
26+
StringStruct(u'LegalCopyright', u'Copyright (c) Flowseal. MIT License.'),
27+
StringStruct(u'OriginalFilename', u'TgWsProxy.exe'),
28+
StringStruct(u'ProductName', u'TG WS Proxy'),
29+
StringStruct(u'ProductVersion', u'1.0.0.0'),
30+
]
31+
)
32+
]
33+
),
34+
VarFileInfo([VarStruct(u'Translation', [1033, 1200])])
35+
]
36+
)

packaging/windows.spec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ a = Analysis(
3434
)
3535

3636
icon_path = os.path.join(os.path.dirname(SPEC), os.pardir, 'icon.ico')
37+
version_path = os.path.join(os.path.dirname(SPEC), 'version_info.txt')
3738
if os.path.exists(icon_path):
3839
a.datas += [('icon.ico', icon_path, 'DATA')]
3940

@@ -60,4 +61,5 @@ exe = EXE(
6061
codesign_identity=None,
6162
entitlements_file=None,
6263
icon=icon_path if os.path.exists(icon_path) else None,
64+
version=version_path if os.path.exists(version_path) else None,
6365
)

0 commit comments

Comments
 (0)