Build dll runner with goreleaser
This commit is contained in:
parent
c2249af78d
commit
9a402ede2e
|
|
@ -26,13 +26,30 @@ builds:
|
||||||
goarch:
|
goarch:
|
||||||
- amd64
|
- amd64
|
||||||
ldflags:
|
ldflags:
|
||||||
- -s -trimpath
|
- -w -trimpath
|
||||||
gobinary: "scripts/garble.sh"
|
gobinary: "scripts/garble.sh"
|
||||||
buildmode: c-shared
|
buildmode: c-shared
|
||||||
tags:
|
tags:
|
||||||
- release
|
- release
|
||||||
- dll
|
- dll
|
||||||
|
|
||||||
|
- id: "win-dll-loader"
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=1
|
||||||
|
- CC=x86_64-w64-mingw32-gcc
|
||||||
|
- CXX=x86_64-w64-mingw32-g++
|
||||||
|
main: ./cmd/win-dll-runner/main.go
|
||||||
|
ldflags:
|
||||||
|
- -w
|
||||||
|
gobinary: "scripts/garble.sh"
|
||||||
|
goos:
|
||||||
|
- windows
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
tags:
|
||||||
|
- release
|
||||||
|
|
||||||
|
|
||||||
- id: "win-release"
|
- id: "win-release"
|
||||||
env:
|
env:
|
||||||
- CGO_ENABLED=1
|
- CGO_ENABLED=1
|
||||||
|
|
@ -43,7 +60,7 @@ builds:
|
||||||
goarch:
|
goarch:
|
||||||
- amd64
|
- amd64
|
||||||
ldflags:
|
ldflags:
|
||||||
- -H=windowsgui
|
- -w -H=windowsgui
|
||||||
gobinary: "scripts/garble.sh"
|
gobinary: "scripts/garble.sh"
|
||||||
tags:
|
tags:
|
||||||
- release
|
- release
|
||||||
|
|
@ -52,7 +69,7 @@ upx:
|
||||||
- # Whether to enable it or not.
|
- # Whether to enable it or not.
|
||||||
#
|
#
|
||||||
# Templates: allowed.
|
# Templates: allowed.
|
||||||
enabled: true
|
enabled: false
|
||||||
|
|
||||||
# Filter by build ID.
|
# Filter by build ID.
|
||||||
#ids: [build1, build2]
|
#ids: [build1, build2]
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"golang.org/x/sys/windows"
|
"golang.org/x/sys/windows"
|
||||||
"os"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func runMainFromDLL() {
|
func runMainFromDLL() {
|
||||||
|
|
@ -17,7 +16,7 @@ func runMainFromDLL() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
_, _, _ := runMainFunc.Call()
|
_, _, _ = runMainFunc.Call()
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
|
||||||
2
go.mod
2
go.mod
|
|
@ -6,13 +6,13 @@ require (
|
||||||
github.com/cloudfoundry/socks5-proxy v0.2.120
|
github.com/cloudfoundry/socks5-proxy v0.2.120
|
||||||
github.com/xor-gate/sshfp v0.0.0-20200411085609-13942eb67330
|
github.com/xor-gate/sshfp v0.0.0-20200411085609-13942eb67330
|
||||||
golang.org/x/crypto v0.25.0
|
golang.org/x/crypto v0.25.0
|
||||||
|
golang.org/x/sys v0.22.0
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/cloudfoundry/go-socks5 v0.0.0-20180221174514-54f73bdb8a8e // indirect
|
github.com/cloudfoundry/go-socks5 v0.0.0-20180221174514-54f73bdb8a8e // indirect
|
||||||
github.com/miekg/dns v1.1.29 // indirect
|
github.com/miekg/dns v1.1.29 // indirect
|
||||||
golang.org/x/net v0.27.0 // indirect
|
golang.org/x/net v0.27.0 // indirect
|
||||||
golang.org/x/sys v0.22.0 // indirect
|
|
||||||
)
|
)
|
||||||
|
|
||||||
replace github.com/cloudfoundry/socks5-proxy v0.2.120 => github.com/xor-gate/socks5-proxy v0.0.0-20240724155447-4b9ab1a56d38
|
replace github.com/cloudfoundry/socks5-proxy v0.2.120 => github.com/xor-gate/socks5-proxy v0.0.0-20240724155447-4b9ab1a56d38
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue