chromelyapps / Chromely

Build Cross Platform HTML Desktop Apps on .NET using native GUI, HTML5, JavaScript, CSS, Owin, AspNetCore (MVC, RazorPages, Blazor)
MIT License
2.98k stars 279 forks source link

App Icon not showing on Linux #336

Closed peerem closed 3 years ago

peerem commented 3 years ago

Hello.

The app icon is not showing on Linux. On Windows all works fine. The icon is definitely in the right place.

FrankPfattheicher commented 3 years ago

Hi @peerem ,

did you try the Chromely.Integration.TestApp ?

Be sure the icon is added as content (copy always) - not as embedded-resource.

As you can see below - the icon is there.

Chromely

peerem commented 3 years ago

Under Windows all run fine, but under Linux I see only an "X" symbol.

This is the configuration:

config.WindowOptions.RelativePathToIconFile = "peerem.ico";

And this the files in the folder:

cef_100_percent.pak cef_200_percent.pak cef_extensions.pak cef.pak chrome-sandbox data devtools_resources.pak ffmpeg icudtl.dat libcef.so libEGL.so libe_sqlcipher.so libGLESv2.so locales Logs PeerEmDesktop peerem.ico snapshot_blob.bin swiftshader v8_context_snapshot.bin wwwroot

FrankPfattheicher commented 3 years ago

Can you please add a screen shot; And have you tried a PNG icon? Maybe the file is invalid for Linux.

peerem commented 3 years ago

It works with the PNG. I changed my configuration because Windows needs the ICO.

config.WindowOptions.RelativePathToIconFile = $"peerem.{(RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ? "png" : "ico")}";

FrankPfattheicher commented 3 years ago

Fine - this behaviour should be documented.