mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
cmd/gogio: add support for Windows
Now, gogio can build the program for Windows, using the `-target windows`. It will build with `-H=windowsgui`, by default. Also, it can compile for multiple platforms if specified using `-target` (e.g. `-target arm, 386, amd64`), the executable will have the respective suffix (i.e. `_386.exe`). gogio will also attach (any) appicon.png as executable icon resource and include some information about the file and supported operating system. Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
This commit is contained in:
@@ -222,12 +222,8 @@ int main(int argc, char * argv[]) {
|
||||
if err := ioutil.WriteFile(plistFile, []byte(infoPlist), 0660); err != nil {
|
||||
return err
|
||||
}
|
||||
icon := *iconPath
|
||||
if icon == "" {
|
||||
icon = filepath.Join(bi.pkgDir, "appicon.png")
|
||||
}
|
||||
if _, err := os.Stat(icon); err == nil {
|
||||
assetPlist, err := iosIcons(bi, tmpDir, app, icon)
|
||||
if _, err := os.Stat(bi.iconPath); err == nil {
|
||||
assetPlist, err := iosIcons(bi, tmpDir, app, bi.iconPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user