Browse Source

增加系统控制 代码

master
viviman 3 years ago
parent
commit
34fbadeac3
  1. 2
      golang_learn/data_func/go_to_tray/demo04/.gitignore
  2. 40
      golang_learn/data_func/go_to_tray/demo04/.goreleaser.yaml
  3. 6
      golang_learn/data_func/go_to_tray/demo04/amd-linux.bat
  4. 6
      golang_learn/data_func/go_to_tray/demo04/arm-linux.bat
  5. 9
      golang_learn/data_func/go_to_tray/demo04/mac.bat

2
golang_learn/data_func/go_to_tray/demo04/.gitignore

@ -0,0 +1,2 @@
dist/

40
golang_learn/data_func/go_to_tray/demo04/.goreleaser.yaml

@ -0,0 +1,40 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
# run : goreleaser --snapshot --skip-publish --rm-dist
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need go generate
# - go generate ./...
builds:
- env:
- CGO_ENABLED=0
id: "hyTool"
binary: "hyTool"
ldflags: -s -w -H=windowsgui
goos:
- linux
# - windows
goarch:
# - "386"
- amd64
- arm
# - arm64
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "v1.0.0-hyTool"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

6
golang_learn/data_func/go_to_tray/demo04/amd-linux.bat

@ -1,6 +0,0 @@
SET CC=gcc
set GO111MODULE=on
SET CGO_ENABLED=0
set GOARCH=amd64
set GOOS=linux
go build main.go

6
golang_learn/data_func/go_to_tray/demo04/arm-linux.bat

@ -1,6 +0,0 @@
SET CC=gcc
set GO111MODULE=on
SET CGO_ENABLED=0
set GOARCH=arm
set GOOS=linux
go build main.go

9
golang_learn/data_func/go_to_tray/demo04/mac.bat

@ -1,9 +0,0 @@
SET CC=gcc
SET CGO_ENABLED=1
# shellcheck disable=SC2121
set GOARCH=amd64
# shellcheck disable=SC2121
set GOOS=darwin
rsrc -manifest main.manifest -ico main.ico -o main.syso
go generate
go build -gccgoflags="-DDARWIN -x objective-c -fobjc-arc" -ldflags="framework=Cocoa" .
Loading…
Cancel
Save