重构构建文件: 移入build/目录

- 创建build/存放构建脚本
- 清理遗留graph_memory_tui/web引用
- 入口改为trulymem_entry.py
- 更新文档路径
This commit is contained in:
root
2026-04-12 17:12:04 +08:00
parent 1575a92dd8
commit 377102b2a0
5 changed files with 4 additions and 109 deletions

View File

@ -167,10 +167,10 @@ pytest tests/
```bash
# Windows
python build_windows.bat
bash build/build_windows.bat
# Linux
bash build_linux.sh
bash build/build_linux.sh
```
---

View File

@ -1,33 +0,0 @@
#!/bin/bash
# Linux打包脚本
# 需要在Linux系统上运行
echo "开始打包Linux版本..."
# 检查Python和PyInstaller
if ! command -v python3 &> /dev/null; then
echo "错误: 未找到python3"
exit 1
fi
# 安装依赖
echo "安装依赖..."
pip3 install -r requirements.txt
# 打包Linux二进制文件
echo "打包Linux二进制文件..."
python3 -m PyInstaller \
--clean \
--onefile \
--name TrulyMEM \
--console \
--add-data "graph_memory_tui/styles/*.css:graph_memory_tui/styles" \
--add-data "graph_memory_tui/web/templates/*.html:graph_memory_tui/web/templates" \
--hidden-import textual \
--hidden-import openai \
--hidden-import flask \
--hidden-import neo4j \
graph_memory_tui/main.py
echo "打包完成!"
echo "可执行文件位于: dist/TrulyMEM"

View File

@ -1,34 +0,0 @@
@echo off
REM Windows打包脚本
echo 开始打包Windows版本...
REM 检查Python
python --version >nul 2>&1
if errorlevel 1 (
echo 错误: 未找到python
exit /b 1
)
REM 安装依赖
echo 安装依赖...
pip install -r requirements.txt
REM 打包Windows exe文件
echo 打包Windows exe文件...
python -m PyInstaller ^
--clean ^
--onefile ^
--name TrulyMEM ^
--console ^
--add-data "graph_memory_tui/styles/*.css;graph_memory_tui/styles" ^
--add-data "graph_memory_tui/web/templates/*.html;graph_memory_tui/web/templates" ^
--hidden-import textual ^
--hidden-import openai ^
--hidden-import flask ^
--hidden-import neo4j ^
graph_memory_tui/main.py
echo 打包完成!
echo 可执行文件位于: dist\TrulyMEM.exe
pause

View File

@ -87,6 +87,6 @@ pip install -r requirements.txt
pytest tests/
# 打包(需 PyInstaller
python build_windows.bat # Windows
bash build_linux.sh # Linux
bash build/build_windows.bat # Windows
bash build/build_linux.sh # Linux
```

View File

@ -1,38 +0,0 @@
# -*- mode: python ; coding: utf-8 -*-
a = Analysis(
['trulymem_entry.py'],
pathex=[],
binaries=[],
datas=[('graph_memory_tui/styles/*.css', 'graph_memory_tui/styles'), ('graph_memory_tui/web/templates/*.html', 'graph_memory_tui/web/templates')],
hiddenimports=['textual', 'openai', 'flask', 'neo4j'],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='TrulyMEM',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)