|
1 | 1 | # -*- mode: python ; coding: utf-8 -*- |
2 | | -from PyInstaller.utils.hooks import collect_data_files |
3 | 2 | from PyInstaller.utils.hooks import collect_dynamic_libs |
| 3 | +from PyInstaller.utils.hooks import collect_all |
4 | 4 |
|
5 | 5 | datas = [('icon.ico', '.'), ('icon_status_on.ico', '.'), ('icon_status_off.ico', '.')] |
6 | 6 | binaries = [] |
7 | | -datas += collect_data_files('pycaw') |
| 7 | +hiddenimports = ['pystray', 'pystray._win32', 'PIL', 'PIL.Image', 'PIL.ImageDraw', 'pycaw', 'pycaw.pycaw', 'comtypes', 'comtypes.client'] |
8 | 8 | binaries += collect_dynamic_libs('comtypes') |
| 9 | +tmp_ret = collect_all('pycaw') |
| 10 | +datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2] |
9 | 11 |
|
10 | 12 |
|
11 | | -block_cipher = None |
| 13 | +a = Analysis( |
| 14 | + ['VCVM.py'], |
| 15 | + pathex=[], |
| 16 | + binaries=binaries, |
| 17 | + datas=datas, |
| 18 | + hiddenimports=hiddenimports, |
| 19 | + hookspath=[], |
| 20 | + hooksconfig={}, |
| 21 | + runtime_hooks=[], |
| 22 | + excludes=['numpy', 'pandas', 'scipy', 'matplotlib', 'tkinter'], |
| 23 | + noarchive=False, |
| 24 | + optimize=0, |
| 25 | +) |
| 26 | +pyz = PYZ(a.pure) |
12 | 27 |
|
13 | | - |
14 | | -a = Analysis(['VCVM.py'], |
15 | | - pathex=[], |
16 | | - binaries=binaries, |
17 | | - datas=datas, |
18 | | - hiddenimports=['pystray', 'pystray._win32', 'PIL', 'PIL.Image', 'PIL.ImageDraw', 'pycaw', 'pycaw.pycaw', 'comtypes', 'comtypes.client'], |
19 | | - hookspath=[], |
20 | | - hooksconfig={}, |
21 | | - runtime_hooks=[], |
22 | | - excludes=['numpy', 'pandas', 'scipy', 'matplotlib', 'tkinter'], |
23 | | - win_no_prefer_redirects=False, |
24 | | - win_private_assemblies=False, |
25 | | - cipher=block_cipher, |
26 | | - noarchive=False) |
27 | | -pyz = PYZ(a.pure, a.zipped_data, |
28 | | - cipher=block_cipher) |
29 | | - |
30 | | -exe = EXE(pyz, |
31 | | - a.scripts, |
32 | | - a.binaries, |
33 | | - a.zipfiles, |
34 | | - a.datas, |
35 | | - [], |
36 | | - name='VCVM', |
37 | | - debug=False, |
38 | | - bootloader_ignore_signals=False, |
39 | | - strip=False, |
40 | | - upx=True, |
41 | | - upx_exclude=[], |
42 | | - runtime_tmpdir=None, |
43 | | - console=False, |
44 | | - disable_windowed_traceback=False, |
45 | | - target_arch=None, |
46 | | - codesign_identity=None, |
47 | | - entitlements_file=None , icon='icon.ico') |
| 28 | +exe = EXE( |
| 29 | + pyz, |
| 30 | + a.scripts, |
| 31 | + a.binaries, |
| 32 | + a.datas, |
| 33 | + [], |
| 34 | + name='VCVM', |
| 35 | + debug=False, |
| 36 | + bootloader_ignore_signals=False, |
| 37 | + strip=False, |
| 38 | + upx=True, |
| 39 | + upx_exclude=[], |
| 40 | + runtime_tmpdir=None, |
| 41 | + console=False, |
| 42 | + disable_windowed_traceback=False, |
| 43 | + argv_emulation=False, |
| 44 | + target_arch=None, |
| 45 | + codesign_identity=None, |
| 46 | + entitlements_file=None, |
| 47 | + icon=['icon.ico'], |
| 48 | +) |
0 commit comments