I'm struggling with something that looks like a bu...
# compose-desktop
s
I'm struggling with something that looks like a bug to me... I have a Compose Desktop app for JVM (
kotlin("jvm")
)
Setting the icon like this works:
Copy code
windows {
  iconFile.set(project.file("src/main/resources/icon.ico"))
}
It stops working if I set additionally a appResourcesRootDir:
Copy code
appResourcesRootDir.set(
  rootProject.layout.projectDirectory.dir("resources")
)
The issue: The EXE has an icon, but it's missing in the taskbar. It's the Java Duke there. It only affects Windows. For macOS it still works. How can I fix this? Edit: Nevermind. It's a bug in connect2x/sysnotify
s
does this only happen when running it from the IDE? because when published for windows as an .msix for example, the icon should be specified in the manifest xml
s
It happens also when running the EXE created by
createReleaseDistributable
s
interesting. what if you put the icon file in a different place, and not the actual resources dir?
s
As ChatGPT suggested I also put it into the new resources dir. That did not work, too.
iconFile.set(_project_.file("icon.ico"))
&
iconFile.set(_project_.file("resources/icon.ico"))
do not work, too.
s
Copy code
appResourcesRootDir.set(project.file("resources"))
windows {
    iconFile.set(project.file("desktopAppIcons/windows.ico"))
}
I have both as well but I do see the icons in the taskbar
do you have an icon set in
Window
? I just removed it from here and now when I run it from IJ I only see the JB icon
s
I set an icon in Window, but that only affects the window, not the taskbar
s
yeah I thought so as well because it says in the inline docs but for me it changes both
s
On Windows? Interesting.
Maybe the bug was introduced with 1.9.0, did not check
s
yep. without this
icon = painterResource(Res.drawable.logo_512)
after createDistributable I see java duke. even though icons are defined in the build file
s
The duke in the window. That's normal.
s
taskbar & window
the build file's icon probably only affects the .exe's file icon
image.png
s
I guess you're right about that.
s
But I can't say if that's new with 1.9 either because I never paid attention to that. I only publish to app stores where icons work differently anyway
👍 1
s
I set the Window icon to a completely different icon. Indeed both locations change. But having set
appResourcesRootDir.set(project.file("resources"))
or not influences if the icon will also show up for the task bar. Both should not be related. I don't get it.
Setting it on
singleWindowApplication
works, but direcly on
Window
not.
s
Yeah that's strange
s
It's a bug in connect2x/sysnotify