cmd/gogio: add -icon flag for specifying the app icon file

Before users were limited to only use a appicon.png in the root directory.
Now the user is free to use any png anywhere on the system with the help of the -icon flag.

Signed-off-by: Axel Paulander <axel.paulander@gmail.com>
This commit is contained in:
axel paulander
2020-08-15 21:32:48 +02:00
committed by Elias Naur
parent 17b5898dd3
commit edef73f580
4 changed files with 13 additions and 5 deletions
+4 -1
View File
@@ -350,7 +350,10 @@ func exeAndroid(tmpDir string, tools *androidTools, bi *buildInfo, extraJars, pe
return err
}
}
icon := filepath.Join(bi.dir, "appicon.png")
icon := *iconPath
if icon == "" {
icon = filepath.Join(bi.dir, "appicon.png")
}
iconSnip := ""
if _, err := os.Stat(icon); err == nil {
err := buildIcons(resDir, icon, []iconVariant{