From 7de5460544eb21148992327f2b07faf5e3d1a9d0 Mon Sep 17 00:00:00 2001 From: qydysky Date: Sun, 9 Apr 2023 01:11:23 +0800 Subject: [PATCH] =?utf8?q?Fix=20=E9=BB=98=E8=AE=A4=E4=B8=8D=E7=BC=96?= =?utf8?q?=E8=AF=91gtk=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .github/workflows/go.yml | 3 ++- .github/workflows/test.yml | 3 ++- README.md | 9 ++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index eb1d108..1da45b2 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -59,8 +59,9 @@ jobs: - name: Build run: | cd demo + set CGO_ENABLED=0 go get . - CGO_ENABLED=0 go build -v -buildmode=exe -o demo.exe main.go + go build -v -buildmode=exe -o demo.exe main.go - name: zip run: .\7za.exe a -r .\windows_go${{ matrix.go }}.zip ./ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4142eb8..d2f2b64 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -56,7 +56,8 @@ jobs: run: | cd demo go get . - CGO_ENABLED=0 go build -v -buildmode=exe -o demo.exe main.go + set CGO_ENABLED=0 + go build -v -buildmode=exe -o demo.exe main.go - name: zip run: .\7za.exe a -r .\windows_go${{ matrix.go }}.zip ./ diff --git a/README.md b/README.md index abaaba7..81e8675 100644 --- a/README.md +++ b/README.md @@ -453,7 +453,8 @@ go build -v -tags `gtk` -o demo.exe -i main.go clone/下载本项目。进入`demo`目录(文件夹),运行: ``` -CGO_ENABLED=0 go build [-tags "gtk"] . +linux: CGO_ENABLED=0 go build [-tags "gtk"] . +windows: set CGO_ENABLED=0;go build [-tags "gtk"] . ``` 再运行生成的`demo.exe`或`demo` @@ -463,7 +464,8 @@ CGO_ENABLED=0 go build [-tags "gtk"] . clone/下载本项目。进入`demo`目录(文件夹),运行: ``` -CGO_ENABLED=0 go run [-tags "gtk"] . [-r 房间ID] [-ckv 自定义config_K_v.json] +linux: CGO_ENABLED=0 go run [-tags "gtk"] . [-r 房间ID] [-ckv 自定义config_K_v.json] +windows: set CGO_ENABLED=0;go run [-tags "gtk"] . [-r 房间ID] [-ckv 自定义config_K_v.json] ``` 3. docker部署 @@ -480,7 +482,8 @@ apt-get update && apt-get install -y ca-certificates openssl clone/下载本项目。进入`demo`目录(文件夹),运行: ``` set GOOS=linux -CGO_ENABLED=0 go build . +set CGO_ENABLED=0 +go build . ``` 注意实际使用时,在`config_K_v.json`关闭`tts`等需要关闭界面及音频的功能,配置好录播存放位置,做好直播流服务的端口映射 -- 2.39.2