refactor: restructure to core/ + ui/ with multi-threaded backend

This commit is contained in:
root
2026-04-12 18:15:55 +08:00
parent c13d3f671c
commit 83906a6985
64 changed files with 5269 additions and 571 deletions

View File

@ -1,32 +1,22 @@
#!/bin/bash
# Linux打包脚本
# 需要在Linux系统上运行
set -e
echo "开始打包Linux版本..."
echo "Building Linux binary..."
# 检查Python和PyInstaller
if ! command -v python3 &> /dev/null; then
echo "错误: 未找到python3"
echo "Error: python3 not found"
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" \
python3 -m PyInstaller --clean --onefile --console \
--add-data "ui/styles:ui/styles" \
--add-data "core/prompts/templates:core/prompts/templates" \
--hidden-import textual \
--hidden-import openai \
--hidden-import flask \
--hidden-import neo4j \
--collect-all textual \
trulymem_entry.py
echo "打包完成!"
echo "可执行文件位于: dist/TrulyMEM"
echo "Done! Binary: dist/TrulyMEM"

22
build/build_macos.sh Normal file
View File

@ -0,0 +1,22 @@
#!/bin/bash
set -e
echo "Building macOS binary..."
if ! command -v python3 &> /dev/null; then
echo "Error: python3 not found"
exit 1
fi
pip3 install -r requirements.txt
python3 -m PyInstaller --clean --onefile --console \
--add-data "ui/styles:ui/styles" \
--add-data "core/prompts/templates:core/prompts/templates" \
--hidden-import textual \
--hidden-import openai \
--hidden-import neo4j \
--collect-all textual \
trulymem_entry.py
echo "Done! Binary: dist/TrulyMEM"

View File

@ -1,33 +1,22 @@
@echo off
REM Windows打包脚本
echo Building Windows binary...
echo 开始打包Windows版本...
REM 检查Python
python --version >nul 2>&1
if errorlevel 1 (
echo 错误: 未找到python
echo Error: python not found
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" ^
python -m PyInstaller --clean --onefile --console ^
--add-data "ui/styles;ui/styles" ^
--add-data "core/prompts/templates;core/prompts/templates" ^
--hidden-import textual ^
--hidden-import openai ^
--hidden-import flask ^
--hidden-import neo4j ^
--collect-all textual ^
trulymem_entry.py
echo 打包完成!
echo 可执行文件位于: dist\TrulyMEM.exe
pause
echo Done! Binary: dist\TrulyMEM.exe
pause

View File

@ -1,12 +1,18 @@
# -*- mode: python ; coding: utf-8 -*-
a = Analysis(
['trulymem_entry.py'],
pathex=[],
binaries=[],
datas=[('graph_memory_tui/styles/*.css', 'graph_memory_tui/styles')],
hiddenimports=['textual', 'openai', 'flask', 'neo4j'],
datas=[
('ui/styles', 'ui/styles'),
('core/prompts/templates', 'core/prompts/templates'),
],
hiddenimports=[
'textual',
'openai',
'neo4j',
'sqlite3',
],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
@ -15,7 +21,6 @@ a = Analysis(
optimize=0,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
@ -35,4 +40,4 @@ exe = EXE(
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
)