forked from tlecomte/friture
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfriture.spec
47 lines (41 loc) · 1.62 KB
/
friture.spec
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
# -*- mode: python -*-
from PyInstaller.utils.hooks import collect_data_files
block_cipher = None
sounddevice_data = collect_data_files("sounddevice", subdir="_sounddevice_data")
libportaudio = [(file[0], "_sounddevice_data/portaudio-binaries") for file in sounddevice_data if "libportaudio" in file[0]]
print(libportaudio)
if len(libportaudio) != 1:
raise ValueError('libportaudio dll could not be found')
# workaround for PyInstaller that does not look where the new PyQt5 official wheels put the Qt dlls
from PyInstaller.compat import getsitepackages
pathex = [os.path.join(x, 'PyQt5', 'Qt', 'bin') for x in getsitepackages()]
a = Analysis(['main.py'],
pathex=pathex,
binaries=None,
datas=libportaudio,
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
exclude_binaries=True,
name='friture',
debug=False,
strip=False,
upx=False,
console=False,
icon="resources/images/friture.ico")
coll = COLLECT(exe,
# add vcruntime140.dll - PyInstaller excludes it by default because it thinks it comes from c:\Windows
a.binaries + [('vcruntime140.dll', 'C:\\Python35\\vcruntime140.dll', 'BINARY')],
a.zipfiles,
a.datas,
strip=False,
upx=False,
name='friture')