]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
Fix 默认不编译gtk界面
authorqydysky <qydysky@foxmail.com>
Sat, 8 Apr 2023 17:11:23 +0000 (01:11 +0800)
committerqydysky <qydysky@foxmail.com>
Sat, 8 Apr 2023 17:11:23 +0000 (01:11 +0800)
.github/workflows/go.yml
.github/workflows/test.yml
README.md

index eb1d108a4e9f1da063916e265f2781eea0cdbf9d..1da45b2d34349271073fdbdda9f4922b558a8a90 100644 (file)
@@ -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 ./
index 4142eb881e0c3b63dd6445c1ba3977c00cc3021d..d2f2b64dbacb12efc8ac6c578d419c0f0cf16852 100644 (file)
@@ -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 ./
index abaaba798b1302da3be9a022404da30c3487ce4e..81e8675c3932b9ec26f1acfdabff4f85978f453e 100644 (file)
--- 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`等需要关闭界面及音频的功能,配置好录播存放位置,做好直播流服务的端口映射