From 377102b2a02b69777eaefdc3a549226a7331aff1 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 12 Apr 2026 17:12:04 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=E6=9E=84=E5=BB=BA=E6=96=87?= =?UTF-8?q?=E4=BB=B6:=20=E7=A7=BB=E5=85=A5build/=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 创建build/存放构建脚本 - 清理遗留graph_memory_tui/web引用 - 入口改为trulymem_entry.py - 更新文档路径 --- README.md | 4 ++-- build_linux.sh | 33 --------------------------------- build_windows.bat | 34 ---------------------------------- docs/一键启动指南.md | 4 ++-- trulymem.spec | 38 -------------------------------------- 5 files changed, 4 insertions(+), 109 deletions(-) delete mode 100644 build_linux.sh delete mode 100644 build_windows.bat delete mode 100644 trulymem.spec diff --git a/README.md b/README.md index e2c6eac..2b301f4 100644 --- a/README.md +++ b/README.md @@ -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 ``` --- diff --git a/build_linux.sh b/build_linux.sh deleted file mode 100644 index b7104e3..0000000 --- a/build_linux.sh +++ /dev/null @@ -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" diff --git a/build_windows.bat b/build_windows.bat deleted file mode 100644 index 7ecca5c..0000000 --- a/build_windows.bat +++ /dev/null @@ -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 diff --git a/docs/一键启动指南.md b/docs/一键启动指南.md index 6ec57d1..f92b62d 100644 --- a/docs/一键启动指南.md +++ b/docs/一键启动指南.md @@ -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 ``` diff --git a/trulymem.spec b/trulymem.spec deleted file mode 100644 index 77aa43a..0000000 --- a/trulymem.spec +++ /dev/null @@ -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, -)