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
@@ -222,7 +222,10 @@ int main(int argc, char * argv[]) {
if err := ioutil.WriteFile(plistFile, []byte(infoPlist), 0660); err != nil {
return err
}
icon := filepath.Join(bi.dir, "appicon.png")
icon := *iconPath
if icon == "" {
icon = filepath.Join(bi.dir, "appicon.png")
}
if _, err := os.Stat(icon); err == nil {
assetPlist, err := iosIcons(bi, tmpDir, app, icon)
if err != nil {