Repository navigation
Expand file tree
/
Copy pathMicroClawDeployer.spec
More file actions
78 lines (70 loc) · 2.37 KB
/
Copy pathMicroClawDeployer.spec
File metadata and controls
78 lines (70 loc) · 2.37 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
71
72
73
74
75
76
77
78
# -*- mode: python ; coding: utf-8 -*-
import importlib
from pathlib import Path
from PyInstaller.utils.hooks import collect_data_files, collect_dynamic_libs
# Uses onedir mode to avoid WDAC (Windows Defender Application Control) blocking
# unsigned DLLs extracted to %TEMP% by onefile mode.
# build.ps1 packs the output directory into a self-extracting installer.
# Fail fast if pywebview is missing — collect_data_files silently returns [] for
# uninstalled packages, which produces a broken installer that crashes at runtime.
if importlib.util.find_spec('webview') is None:
raise SystemExit(
'\n*** BUILD ERROR: pywebview is not installed in this Python environment. ***\n'
'The installer requires pywebview to bundle its WebView assets.\n'
'Fix: pip install pywebview (or: uv pip install -r requirements.txt)\n'
)
webview_datas = collect_data_files('webview', subdir='lib') + collect_data_files('webview', subdir='js')
webview_binaries = collect_dynamic_libs('webview')
pythonnet_datas = collect_data_files('pythonnet', subdir='runtime')
managed_skill_datas = [
(str(skill_dir), f"skills/{skill_dir.name}")
for skill_dir in Path("skills").iterdir()
if skill_dir.is_dir() and skill_dir.name != "rednote-publisher"
]
a = Analysis(
['deploy.py'],
pathex=[],
binaries=webview_binaries,
datas=[
('dist/microclaw-portable.zip', '.'),
('dist/install-manifest.json', '.'),
('scripts/windows/setup-dependencies.ps1', '.'),
('scripts/windows/node-runtime.ps1', '.'),
('scripts', 'scripts'),
('deployer/assets', 'deployer/assets'),
] + managed_skill_datas + webview_datas + pythonnet_datas,
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=['PyQt5', 'PyQt6', 'PySide2', 'PySide6', 'qtpy'],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name='MicroClawInstaller',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=False,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon=['deployer/assets/microclaw.ico'],
)
coll = COLLECT(
exe,
a.binaries,
a.datas,
strip=False,
upx=False,
name='MicroClawInstaller',
)