-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathdashai.spec
More file actions
70 lines (64 loc) · 1.94 KB
/
dashai.spec
File metadata and controls
70 lines (64 loc) · 1.94 KB
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
import os
import platform
import site
SITEPKG = str(site.getsitepackages()[-1])
# Check for llama_cpp/lib presence to determine if we can include the binaries
llama_lib = os.path.exists(os.path.join(SITEPKG, "llama_cpp/lib"))
# Ensure the temp_checkpoints directory exists before building
if not os.path.exists(os.path.join("DashAI/back/user_models/temp_checkpoints")):
os.makedirs("DashAI/back/user_models/temp_checkpoints")
a = Analysis(
platform.system() == "Windows" and ["DashAI/__main__.py"] or ["DashAI/webview.py"],
pathex=["."],
binaries=llama_lib and [(f"{SITEPKG}/llama_cpp/lib/*", "llama_cpp/lib")] or [],
datas=[
("DashAI/__main__.py", "DashAI/__main__.py"),
("DashAI/alembic", "DashAI/alembic"),
("DashAI/front/build", "DashAI/front/build"),
("DashAI/back/static/images", "DashAI/back/static/images"),
("DashAI/back/types/inf/ptype/LR.sav", "DashAI/back/types/inf/ptype"),
("DashAI/back/types/inf/ptype/scaler.pkl", "DashAI/back/types/inf/ptype"),
(
"DashAI/back/user_models/temp_checkpoints",
"DashAI/back/user_models/temp_checkpoints",
),
(f"{SITEPKG}/transformers", "transformers"),
],
hiddenimports=[],
hookspath=["hooks"],
runtime_hooks=None,
excludes=None,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
exclude_binaries=True,
name="DashAI-launcher-cpu",
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=False,
console=True,
argv_emulation=True,
)
coll = COLLECT(
exe,
a.binaries,
a.datas,
strip=False,
upx=False,
upx_exclude=[],
name="DashAI-launcher-cpu",
)
if platform.system() == "Darwin":
app = BUNDLE(
coll,
name='DashAI.app',
icon=None,
bundle_identifier='com.dashai.app',
info_plist={
'NSHighResolutionCapable': 'True',
'LSBackgroundOnly': 'False',
},
)