-
Notifications
You must be signed in to change notification settings - Fork 5
/
gui-win32.spec
52 lines (43 loc) · 1.15 KB
/
gui-win32.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
# -*- mode: python ; coding: utf-8 -*-
from pkgutil import iter_modules
from PyInstaller.utils.hooks import collect_data_files
import ltctplugin
hiddenimports = [
name
for _, name, _ in iter_modules(ltctplugin.__path__, ltctplugin.__name__ + ".")
if name != "ltctplugin.base"
]
datas = []
for module in hiddenimports:
datas += collect_data_files(module)
a = Analysis(
["gui.py"],
datas=[
("ltchiptool.txt", "."),
("ltchiptool/boards/", "./boards/"),
("ltchiptool/platform.json", "."),
("ltchiptool/families.json", "."),
("ltchiptool/gui/ltchiptool-192x192.png", "."),
("ltchiptool/gui/ltchiptool.ico", "."),
("ltchiptool/gui/ltchiptool.xrc", "."),
("ltchiptool/gui/ko-fi.png", "."),
("ltchiptool/gui/colors.json", "."),
("pyproject.toml", "."),
]
+ datas,
hiddenimports=hiddenimports,
)
pyz = PYZ(a.pure, a.zipped_data)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name="ltchiptool",
strip=False,
upx=True,
console=False,
icon=["ltchiptool\\gui\\ltchiptool.ico"],
version="gui-win32.txt",
)