-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharGUIments.spec
More file actions
92 lines (79 loc) · 2.06 KB
/
arGUIments.spec
File metadata and controls
92 lines (79 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# -*- mode: python ; coding: utf-8 -*-
import sys
import os
from PyInstaller.utils.hooks import collect_data_files, collect_dynamic_libs
# Location of your custom Python installation
tcl_lib = r'C:\Users\d\.pyenv\pyenv-win\versions\3.10.11\tcl\tcl8.6'
tk_lib = r'C:\Users\d\.pyenv\pyenv-win\versions\3.10.11\tcl\tk8.6'
dll_dir = r'C:\Users\d\.pyenv\pyenv-win\versions\3.10.11\DLLs'
# Collect pycaw and comtypes data
pycaw_datas = collect_data_files('pycaw')
comtypes_binaries = collect_dynamic_libs('comtypes')
# Add tkinter DLLs manually
tkinter_binaries = [
(os.path.join(dll_dir, 'tcl86t.dll'), '.'),
(os.path.join(dll_dir, 'tk86t.dll'), '.'),
]
# Include icons
extra_datas = [
('icon.ico', '.'),
(tcl_lib, 'lib/tcl8.6'),
(tk_lib, 'lib/tk8.6'),
]
image_assets = [
('show.png', '.'),
('hide.png', '.'),
('settings.png', '.'),
('about.png', '.'),
('add.png', '.'),
('delete.png', '.'),
('stop.png', '.'),
('run.png', '.'),
('edit.png', '.'),
]
# Combine all data and binaries
datas = pycaw_datas + extra_datas + image_assets
binaries = comtypes_binaries + tkinter_binaries
hiddenimports = [
'tkinter',
'pystray',
'pystray._win32',
'PIL',
'PIL.Image',
'PIL.ImageDraw',
'pycaw',
'pycaw.pycaw',
'comtypes',
'comtypes.client'
]
block_cipher = None
a = Analysis(
['arGUIments.py'],
pathex=[],
binaries=binaries,
datas=datas,
hiddenimports=hiddenimports,
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='arGUIments',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False, # This is equivalent to --windowed
icon='icon.ico'
)