|
3 | 3 | # Initial command: |
4 | 4 | # pyinstaller -y --clean -n DataLab -i resources\DataLab.ico cdl\start.pyw |
5 | 5 |
|
6 | | -import os.path as osp |
7 | | -import guidata |
8 | | -guidata_path = osp.dirname(guidata.__file__) |
9 | | -guidata_images = osp.join(guidata_path, 'images') |
10 | | -guidata_locale = osp.join(guidata_path, 'locale', 'fr', 'LC_MESSAGES') |
11 | | -import plotpy |
12 | | -plotpy_path = osp.dirname(plotpy.__file__) |
13 | | -plotpy_images = osp.join(plotpy_path, 'images') |
14 | | -plotpy_locale = osp.join(plotpy_path, 'locale', 'fr', 'LC_MESSAGES') |
15 | | - |
16 | | -from PyInstaller.utils.hooks import collect_submodules |
| 6 | +from PyInstaller.utils.hooks import collect_submodules, collect_data_files |
17 | 7 | all_hidden_imports = collect_submodules('cdl') |
| 8 | +datas = collect_data_files('cdl') + [('cdl\\plugins', 'cdl\\plugins')] |
| 9 | +datas += collect_data_files('guidata') + collect_data_files('plotpy') |
18 | 10 |
|
19 | 11 | a = Analysis( |
20 | 12 | ['cdl\\start.pyw'], |
21 | 13 | pathex=[], |
22 | 14 | binaries=[], |
23 | | - datas=[ |
24 | | - (guidata_images, 'guidata\\images'), |
25 | | - (guidata_locale, 'guidata\\locale\\fr\\LC_MESSAGES'), |
26 | | - (plotpy_images, 'plotpy\\images'), |
27 | | - (plotpy_locale, 'plotpy\\locale\\fr\\LC_MESSAGES'), |
28 | | - ('cdl\\plugins', 'cdl\\plugins'), |
29 | | - ('cdl\\data', 'cdl\\data'), |
30 | | - ('cdl\\locale\\fr\\LC_MESSAGES\\cdl.mo', 'cdl\\locale\\fr\\LC_MESSAGES'), |
31 | | - ], |
| 15 | + datas=datas, |
32 | 16 | hiddenimports=all_hidden_imports, |
33 | 17 | hookspath=[], |
34 | 18 | hooksconfig={}, |
|
0 commit comments