97 lines
2.9 KiB
Batchfile
97 lines
2.9 KiB
Batchfile
|
|
@echo off
|
|||
|
|
REM Claw项目构建验证脚本(Windows版)
|
|||
|
|
echo 🦞 Starting Claw project build verification...
|
|||
|
|
|
|||
|
|
REM Check Rust environment
|
|||
|
|
where cargo >nul 2>nul
|
|||
|
|
if %errorlevel% neq 0 (
|
|||
|
|
echo ❌ Cargo not found, please install Rust first
|
|||
|
|
exit /b 1
|
|||
|
|
)
|
|||
|
|
echo ✅ Rust environment check passed
|
|||
|
|
|
|||
|
|
REM Build shared library
|
|||
|
|
echo 📦 Building shared library...
|
|||
|
|
cd Server\shared
|
|||
|
|
cargo check
|
|||
|
|
if %errorlevel% neq 0 (
|
|||
|
|
echo ❌ Shared library build failed
|
|||
|
|
exit /b 1
|
|||
|
|
)
|
|||
|
|
cd ..\..
|
|||
|
|
echo ✅ Shared library build successful
|
|||
|
|
|
|||
|
|
REM Build gateway service
|
|||
|
|
echo 🚪 Building gateway service...
|
|||
|
|
cd Server\gateway
|
|||
|
|
cargo check
|
|||
|
|
if %errorlevel% neq 0 (
|
|||
|
|
echo ❌ Gateway service build failed
|
|||
|
|
exit /b 1
|
|||
|
|
)
|
|||
|
|
cd ..\..
|
|||
|
|
echo ✅ Gateway service build successful
|
|||
|
|
|
|||
|
|
REM Build SmartClaw service
|
|||
|
|
echo 🤖 Building SmartClaw service...
|
|||
|
|
cd Server\SmartClaw
|
|||
|
|
cargo check
|
|||
|
|
if %errorlevel% neq 0 (
|
|||
|
|
echo ❌ SmartClaw service build failed
|
|||
|
|
exit /b 1
|
|||
|
|
)
|
|||
|
|
cd ..\..
|
|||
|
|
echo ✅ SmartClaw service build successful
|
|||
|
|
|
|||
|
|
REM Check WeChat app structure
|
|||
|
|
echo 📱 Checking WeChat app structure...
|
|||
|
|
if not exist "client\wechat_app" (
|
|||
|
|
echo ❌ WeChat app directory not found
|
|||
|
|
exit /b 1
|
|||
|
|
)
|
|||
|
|
|
|||
|
|
REM Check required files
|
|||
|
|
set required_files=client\wechat_app\app.json client\wechat_app\app.js client\wechat_app\app.wxss client\wechat_app\project.config.json client\wechat_app\sitemap.json
|
|||
|
|
|
|||
|
|
for %%f in (%required_files%) do (
|
|||
|
|
if not exist "%%f" (
|
|||
|
|
echo ❌ Missing required file: %%f
|
|||
|
|
exit /b 1
|
|||
|
|
)
|
|||
|
|
)
|
|||
|
|
echo ✅ WeChat app structure check passed
|
|||
|
|
|
|||
|
|
REM Check web app
|
|||
|
|
echo 🌐 Checking web application...
|
|||
|
|
if not exist "client\web\index.html" (
|
|||
|
|
echo ❌ Web application not found
|
|||
|
|
exit /b 1
|
|||
|
|
)
|
|||
|
|
echo ✅ Web application check passed
|
|||
|
|
|
|||
|
|
echo.
|
|||
|
|
echo 🎉 Project build verification completed!
|
|||
|
|
echo.
|
|||
|
|
echo 📋 Project Structure Overview:
|
|||
|
|
echo ├── Server/
|
|||
|
|
echo │ ├── gateway/ # Gateway service (Server A)
|
|||
|
|
echo │ ├── SmartClaw/ # SmartClaw service (Server B)
|
|||
|
|
echo │ └── shared/ # Shared code library
|
|||
|
|
echo ├── client/
|
|||
|
|
echo │ ├── wechat_app/ # WeChat Mini Program (native)
|
|||
|
|
echo │ │ ├── pages/ # Page directory
|
|||
|
|
echo │ │ ├── utils/ # Utility functions
|
|||
|
|
echo │ │ ├── components/ # Custom components
|
|||
|
|
echo │ │ └── assets/ # Static resources
|
|||
|
|
echo │ └── web/ # Enterprise WeChat web app
|
|||
|
|
echo ├── docs/ # Project documentation
|
|||
|
|
echo ├── scripts/ # Build scripts
|
|||
|
|
echo └── build/ # Build artifacts
|
|||
|
|
echo.
|
|||
|
|
echo 🚀 Technology Stack:
|
|||
|
|
echo • Backend: Rust + Actix Web + Embedded-Redis + HeedDB
|
|||
|
|
echo • Frontend: WXML + WXSS + JavaScript (WeChat native)
|
|||
|
|
echo • Communication: WebSocket reverse connection + HTTPS
|
|||
|
|
echo • Database: HeedDB (embedded) + Embedded-Redis
|
|||
|
|
echo.
|
|||
|
|
echo ✨ Project is ready for development!
|