Skip to content

Commit

Permalink
Fix mobile build on windows
Browse files Browse the repository at this point in the history
gobind executable name is not exactly `gobind` on windows it's `gobind.exe`

Signed-off-by: Devman <[email protected]>
  • Loading branch information
amir-devman authored Feb 1, 2024
1 parent 38f76dd commit cc05a5c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cmd/internal/build_shared/sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,15 @@ var GoBinPath string

func FindMobile() {
goBin := filepath.Join(build.Default.GOPATH, "bin")
if !rw.FileExists(goBin + "/" + "gobind") {
log.Fatal("missing gomobile installation")

Check failure on line 88 in cmd/internal/build_shared/sdk.go

View workflow job for this annotation

GitHub Actions / Build

File is not `gci`-ed with --skip-generated -s standard -s prefix(github.com/sagernet/) -s default --custom-order (gci)
if runtime.GOOS == "windows" {
if !rw.FileExists(goBin + "/" + "gobind.exe") {
log.Fatal("missing gomobile.exe installation")
}
} else {
if !rw.FileExists(goBin + "/" + "gobind") {
log.Fatal("missing gomobile installation")
}
}
GoBinPath = goBin
}

0 comments on commit cc05a5c

Please sign in to comment.