cmd/gogio: group buildInfo related code

Signed-off-by: Walter Werner SCHNEIDER <contact@schnwalter.eu>
This commit is contained in:
Walter Werner SCHNEIDER
2020-11-11 23:16:33 +02:00
committed by Elias Naur
parent 7eb32360e5
commit 3c739323cb
7 changed files with 197 additions and 138 deletions
+3 -3
View File
@@ -111,7 +111,7 @@ func buildAndroid(tmpDir string, bi *buildInfo) error {
"CGO_ENABLED=1",
),
}
pkgs, err := packages.Load(cfg, bi.pkg)
pkgs, err := packages.Load(cfg, bi.pkgPath)
if err != nil {
return err
}
@@ -205,7 +205,7 @@ func compileAndroid(tmpDir string, tools *androidTools, bi *buildInfo) (err erro
"-buildmode=c-shared",
"-tags", bi.tags,
"-o", libFile,
bi.pkg,
bi.pkgPath,
)
cmd.Env = append(
os.Environ(),
@@ -352,7 +352,7 @@ func exeAndroid(tmpDir string, tools *androidTools, bi *buildInfo, extraJars, pe
}
icon := *iconPath
if icon == "" {
icon = filepath.Join(bi.dir, "appicon.png")
icon = filepath.Join(bi.pkgDir, "appicon.png")
}
iconSnip := ""
if _, err := os.Stat(icon); err == nil {