-
Notifications
You must be signed in to change notification settings - Fork 5
/
PyInstaller.spec
86 lines (76 loc) · 3.3 KB
/
PyInstaller.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
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
# Eidolon Biomedical Framework
# Copyright (C) 2016-8 Eric Kerfoot, King's College London, all rights reserved
#
# This file is part of Eidolon.
#
# Eidolon is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Eidolon is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program (LICENSE.txt). If not, see <http://www.gnu.org/licenses/>
from PyInstaller import compat
from glob import glob
import platform
exename='Eidolon.bin' if compat.is_darwin else 'Eidolon'
outname='Eidolon'
pathex=['.']
binaries=[]
hiddenimports=[
'numpy', 'scipy','PyQt4.uic','PyQt5.uic','_struct','eidolon','eidolon.renderer',
'eidolon.plugins','eidolon.ui','ipykernel.datapub'
]
block_cipher = None
datas=[
('res','res'),
('config.ini','.'),
('tests','tests'),
('tutorial','tutorial'),
('eidolon/EidolonLibs/IRTK','eidolon/EidolonLibs/IRTK'),
('eidolon/EidolonLibs/python','eidolon/EidolonLibs/python'),
('eidolon/EidolonLibs/MIRTK/ffd_motion.cfg','eidolon/EidolonLibs/MIRTK')
]
if compat.is_win:
binaries=[
('eidolon/EidolonLibs/win64_mingw/bin/cg.dll','.'),
('eidolon/EidolonLibs/win64_mingw/bin/Plugin_CgProgramManager.dll','.'),
('eidolon/EidolonLibs/win64_mingw/bin/RenderSystem_GL.dll','.')
]
datas.append(('eidolon/EidolonLibs/MIRTK/Win64','eidolon/EidolonLibs/MIRTK/Win64'))
elif compat.is_darwin:
outname+='.app'
hiddenimports+=['appdirs','packaging','packaging.version','packaging.specifiers','packaging.requirements','packaging.utils','cProfile']
datas+=[
('eidolon/EidolonLibs/osx/bin/Ogre.framework','Contents/Frameworks/Ogre.framework'),
('eidolon/EidolonLibs/osx/bin/OgreOverlay.framework','Contents/Frameworks/OgreOverlay.framework'),
('eidolon/EidolonLibs/osx/bin/Cg.framework','Contents/Frameworks/Cg.framework'),
('eidolon/EidolonLibs/osx/bin/Plugin_CgProgramManager.framework','Contents/Frameworks/Plugin_CgProgramManager.framework'),
('eidolon/EidolonLibs/osx/bin/RenderSystem_GL.framework','Contents/Frameworks/RenderSystem_GL.framework'),
('eidolon/EidolonLibs/MIRTK/OSX','EidolonLibs/MIRTK/OSX')
]
elif compat.is_linux:
hiddenimports+=['scipy._lib.messagestream']
binaries+=[(f,'.') for f in glob('eidolon/EidolonLibs/linux/bin/*')]
datas.append(('eidolon/EidolonLibs/MIRTK/Linux','eidolon/EidolonLibs/MIRTK/Linux'))
a = Analysis(
['main.py'],
pathex=pathex,
binaries=binaries,
datas=datas,
hiddenimports=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=exename, debug=False, strip=False, upx=True, console=True )
coll = COLLECT(exe,a.binaries, a.zipfiles, a.datas, strip=False, upx=True, name=outname)