From f76b21b02c01cff2b6fdf74b8994e8a335b75e4d Mon Sep 17 00:00:00 2001 From: Devman <85770917+amir-devman@users.noreply.github.com> Date: Thu, 1 Feb 2024 06:14:29 +0330 Subject: [PATCH] Fix mobile build on windows gobind executable name is not exactly `gobind` on windows it's `gobind.exe` Signed-off-by: Devman <85770917+amir-devman@users.noreply.github.com> --- cmd/internal/build_shared/sdk.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cmd/internal/build_shared/sdk.go b/cmd/internal/build_shared/sdk.go index 35607196..1bcd40bb 100644 --- a/cmd/internal/build_shared/sdk.go +++ b/cmd/internal/build_shared/sdk.go @@ -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") + + 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 }