Add PyInstaller build support for deployment

- Add PyInstaller spec files (onefile and onedir modes)
- Add build scripts for executable creation
- Add MCP hooks for PyInstaller compatibility
- Add test script for MCP server validation
- Add Windsurf integration setup guide
- Update main.py with better error reporting
- Successfully tested MCP server works with ONEDIR build (45MB)

Features:
- Single executable deployment without Python dependency
- ONEDIR mode preserves stdio communication for MCP
- Build scripts with deployment instructions
- Windsurf config integration guide

Files added:
- mt5-quant.spec (PyInstaller spec)
- mt5-quant-onedir.spec (directory mode)
- scripts/build-executable.sh (onefile)
- scripts/build-executable-onedir.sh (directory)
- hooks/hook-mcp.py (PyInstaller hook)
- test_mcp.py (validation script)
- WINDSURF_SETUP.md (integration guide)
This commit is contained in:
Devid HW
2026-04-18 13:00:28 +07:00
parent 3a52ccf398
commit 3cfd374160
8 changed files with 674 additions and 2 deletions
+4 -2
View File
@@ -23,8 +23,10 @@ try:
import mcp.server.stdio
import mcp.types as types
from mcp.server import Server
except ImportError:
print("ERROR: mcp package not installed. Run: pip install mcp", file=sys.stderr)
except ImportError as e:
print(f"ERROR: Failed to import MCP package: {e}", file=sys.stderr)
import traceback
traceback.print_exc()
sys.exit(1)
# Config/ROOT_DIR resolution (priority order):