Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
mindmap-x/desktop.spec at main · allmonday/mindmap-x · GitHub
Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Events
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
allmonday
mindmap-x
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
mindmap-x
/
desktop.spec
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
77 lines (66 loc) · 3.11 KB
main
Breadcrumbs
mindmap-x
/
desktop.spec
Copy path
Top
File metadata and controls
Code
Blame
77 lines (66 loc) · 3.11 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
# -*- mode: python ; coding: utf-8 -*-
"""PyInstaller spec:桌面应用(onedir;macOS 再包 .app bundle,Windows 出 exe)。
datas 落点与运行时定位对齐:
- src/static → _MEIPASS/src/static(src/main.py 用 __file__ 定位)
- alembic/* → _MEIPASS/alembic/(src/desktop.py 用 _MEIPASS 定位 script_location;
versions/*.py 由 alembic ScriptDirectory 从磁盘读取,作数据文件即可)
"""
import
sys
import
tomllib
from
pathlib
import
Path
from
PyInstaller
.
utils
.
hooks
import
collect_data_files
,
collect_dynamic_libs
,
collect_submodules
,
copy_metadata
# 版本唯一事实源:pyproject.toml 的 project.version(写入 .app 的 Info.plist)
VERSION
=
tomllib
.
loads
((
Path
(
SPECPATH
)
/
"pyproject.toml"
).
read_text
(
encoding
=
"utf-8"
))[
"project"
][
"version"
]
datas
=
[
(
"alembic/env.py"
,
"alembic"
),
(
"alembic/versions"
,
"alembic/versions"
),
(
"src/static"
,
"src/static"
),
]
# 包内数据文件(voyager 的 web 静态资源等)不会随 import 分析收集,必须显式收
datas
+=
collect_data_files
(
"nexusx"
)
datas
+=
collect_data_files
(
"strands"
)
# 运行时 importlib.metadata 查版本的库(fastmcp/fastapi 等在 import 期就查),frozen 环境必须显式携带 dist-info;
# agent-mindmap 是本项目(src/main.py 的 FastAPI version 读它)
for
_pkg
in
(
"agent-mindmap"
,
"fastmcp"
,
"nexusx"
,
"strands-agents"
,
"fastapi"
,
"uvicorn"
,
"starlette"
,
"pydantic"
,
"sqlalchemy"
,
"sqlmodel"
,
"alembic"
,
"aiosqlite"
,
"greenlet"
,
"pywebview"
,
"platformdirs"
,
):
datas
+=
copy_metadata
(
_pkg
)
hiddenimports
=
[
# pywebview 按 sys.platform 字符串选 gui 后端(cocoa=macOS / winforms=Windows)
"webview.platforms.cocoa"
if
sys
.
platform
==
"darwin"
else
"webview.platforms.winforms"
,
*
collect_submodules
(
"uvicorn"
),
# loop / ws 实现按字符串动态选择
# sqlalchemy dialect 由 URL 字符串在运行时解析加载,静态分析不可见
"sqlalchemy.dialects.sqlite.aiosqlite"
,
"aiosqlite"
,
"greenlet"
,
]
# 原生扩展(Rust/C 编译的 .pyd/.so)显式收集:Windows 实测 pydantic_core
# 的 _pydantic_core.pyd 未随 Analysis 自动收进(纯 Python 部分在、二进制缺,
# 运行时 ModuleNotFoundError);greenlet 同为原生扩展一并防
binaries
=
collect_dynamic_libs
(
"pydantic_core"
)
+
collect_dynamic_libs
(
"greenlet"
)
a
=
Analysis
(
[
"src/desktop.py"
],
pathex
=
[],
binaries
=
binaries
,
datas
=
datas
,
hiddenimports
=
hiddenimports
,
excludes
=
[
"tkinter"
],
noarchive
=
False
,
)
pyz
=
PYZ
(
a
.
pure
)
exe
=
EXE
(
pyz
,
a
.
scripts
,
[],
exclude_binaries
=
True
,
name
=
"MindMapX"
,
console
=
False
,
# windowed:无终端(日志落数据目录 desktop.log)
icon
=
"assets/MindMapX.ico"
if
sys
.
platform
==
"win32"
else
None
,
# Windows:exe 图标(标题栏随之)
upx
=
False
,
)
coll
=
COLLECT
(
exe
,
a
.
binaries
,
a
.
datas
,
strip
=
False
,
upx
=
False
,
name
=
"MindMapX"
)
# 图标复用 Web favicon(X 四臂分叉树):assets/app-icon.svg 派生
if
sys
.
platform
==
"darwin"
:
app
=
BUNDLE
(
coll
,
name
=
"MindMapX.app"
,
version
=
VERSION
,
console
=
False
,
icon
=
"assets/MindMapX.icns"
)
You can’t perform that action at this time.