-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·44 lines (32 loc) · 917 Bytes
/
build.sh
File metadata and controls
executable file
·44 lines (32 loc) · 917 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# CS Code Editor 构建脚本
# 用于编译 Go 共享库和 Flutter 应用
set -e
PROJECT_ROOT="$(cd "$(dirname "$0")" && pwd)"
GO_CORE_DIR="$PROJECT_ROOT/go_core"
echo "🔨 Building CS Code Editor..."
echo ""
# 1. 编译 Go 共享库
echo "📦 Building Go core library..."
cd "$GO_CORE_DIR"
# 下载依赖
go mod tidy
# 编译为共享库
go build -buildmode=c-shared -o libcore.so
echo "✅ Go core library built: libcore.so"
echo ""
# 2. 安装 Flutter 依赖
echo "📦 Installing Flutter dependencies..."
cd "$PROJECT_ROOT"
flutter pub get
echo "✅ Flutter dependencies installed"
echo ""
# 3. 构建 Flutter 应用
echo "🚀 Building Flutter application..."
flutter build linux --release
echo ""
echo "✅ Build complete!"
echo ""
echo "📍 Executable location: build/linux/x64/release/bundle/cs_code_editor"
echo ""
echo "Run with: ./build/linux/x64/release/bundle/cs_code_editor"