From 29c834a0708f34d04a682ed8e04c7896df25d95f Mon Sep 17 00:00:00 2001 From: levi Date: Wed, 2 Nov 2022 17:26:03 +0800 Subject: [PATCH] chore: add linux build step --- README.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d3412cc3..d84066fd 100644 --- a/README.md +++ b/README.md @@ -41,17 +41,17 @@ go install github.com/monkeyWie/gopeed/cmd/gopeed > 前端代码位于`ui/flutter`目录下。 +### 环境要求 + +1. Golang 1.9+ +2. Flutter 3.0+ + ### 克隆项目 ```bash git clone git@github.com:monkeyWie/gopeed.git ``` -### 环境要求 - -1. Golang 1.9+ -2. Flutter 3.0+ - ### 编译 #### 桌面端 @@ -63,11 +63,19 @@ git clone git@github.com:monkeyWie/gopeed.git - macos ```bash -go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o bin/libgopeed.dylib github.com/monkeyWie/gopeed/bind/desktop +go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/macos/Frameworks/libgopeed.dylib github.com/monkeyWie/gopeed/bind/desktop cd ui/flutter flutter build macos ``` +- linux + +```bash +go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/linux/bundle/lib/libgopeed.so github.com/monkeyWie/gopeed/bind/desktop +cd ui/flutter +flutter build linux +``` + #### 移动端 同样的也是需要准备好`cgo`环境,接着安装`gomobile`: