Hiding dock icon for MacOS

This commit is contained in:
Rukira 2026-08-25 11:38:37 +01:00
parent b7bff1a7bd
commit e873f14a7b
3 changed files with 25 additions and 3 deletions

View file

@ -70,7 +70,7 @@ compose.desktop {
application {
mainClass = "com.rukira.wowbackup.MainKt"
jvmArgs("-Dapple.awt.enableTemplateImages=true")
jvmArgs("-Dapple.awt.enableTemplateImages=true", "-Dapple.awt.UIElement=true")
nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
@ -82,6 +82,12 @@ compose.desktop {
macOS {
bundleID = "com.rukira.wowbackup"
iconFile.set(project.file("src/jvmMain/resources/icon.icns"))
infoPlist {
extraKeysRawXml = """
<key>LSUIElement</key>
<true/>
""".trimIndent()
}
}
windows {

View file

@ -28,6 +28,9 @@ import java.awt.GraphicsEnvironment
private val logger = KotlinLogging.logger {}
fun main() {
if (Platform.current == OS.Mac) {
System.setProperty("apple.awt.UIElement", "true")
}
LoggingSetup.init()
logger.info { "WoW Backup starting" }