asticode / go-astilectron-bundler

Bundle your Astilectron app with ease
MIT License
129 stars 68 forks source link

Showing the electron icon in app launchers of windows #60

Open Errrorr opened 5 years ago

Errrorr commented 5 years ago

Hi, I have some problems about launching my app in windows environment.

  1. When I right-click the app in launchers, it shows the electron icon instead of the application icon. And after clicking the option 'electron', it popups electron window. 1 image

  2. When I add my app to app launchers, the launcher icon becomes the electron icon. image

Thank you for your help.

asticode commented 4 years ago

Can you share some code so that I can see how you're setting up Astilectron options ?

Errrorr commented 4 years ago

Oh sorry, I forgot to show some information.

bundler.json

{
  "app_name": "pplinservice",
  "environments": [
    {
      "arch": "amd64",
      "os": "windows",
      "env": {
        "CC": "x86_64-w64-mingw32-gcc",
        "CXX": "x86_64-w64-mingw32-g++",
        "CGO_ENABLED": "1"
      }
    }
  ],
  "icon_path_windows": "resources/app/statics/icons/icon.ico",
  "output_path": "../output/latest"
}

bootstrap.Options

bootstrap.Options{
  Asset:         Asset,
  RestoreAssets: RestoreAssets,
  AstilectronOptions: astilectron.Options{
    AppName: "PPLinService",
    AppIconDefaultPath: "resources/app/statics/icons/icon.png",
  },
  Debug:         *debug,
  OnWait: func(_ *astilectron.Astilectron, ws []*astilectron.Window, _ *astilectron.Menu, _ *astilectron.Tray, _ *astilectron.Menu) error {
    if *debug {
      ws[0].OpenDevTools()
    }
    runForegroundMode(ws[0])
    return nil
  },
  Windows: []*bootstrap.Window{
    {
      Homepage:       "index.html",
      MessageHandler: ctrl.HandleMessages,
      Options: &astilectron.WindowOptions{
        Center: astilectron.PtrBool(true),
        Width:  astilectron.PtrInt(800),
        Height: astilectron.PtrInt(600),
      },
    },
  },
}
asticode commented 4 years ago

Right off the bat I've no idea why it shows Electron's menu. I'll investigate more once I've some free time.

Errrorr commented 4 years ago

Thank you very much.

pzeinlinger commented 3 years ago

Hi @asticode, I'm running into the same problem. Have you found the issue yet?

asticode commented 3 years ago

@pzeinlinger unfortunately no 😒