diff --git a/desktop/build.gradle.kts b/desktop/build.gradle.kts index f82eba240..6de2f6166 100644 --- a/desktop/build.gradle.kts +++ b/desktop/build.gradle.kts @@ -43,12 +43,26 @@ compose.desktop { application { mainClass = "org.meshtastic.desktop.MainKt" - buildTypes.release.proguard { configurationFiles.from(project.file("proguard-rules.pro")) } + buildTypes.release.proguard { + isEnabled.set(false) + configurationFiles.from(project.file("proguard-rules.pro")) + } nativeDistributions { targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb) packageName = "Meshtastic" + // App Icon + macOS { + iconFile.set(project.file("src/main/resources/icon.png")) + } + windows { + iconFile.set(project.file("src/main/resources/icon.png")) + } + linux { + iconFile.set(project.file("src/main/resources/icon.png")) + } + // Read version from project properties (passed by CI) or default to 0.1.0 // Native installers require strict numeric semantic versions (X.Y.Z) without suffixes val rawVersion = project.findProperty("appVersionName")?.toString() ?: "0.1.0" diff --git a/desktop/src/main/kotlin/org/meshtastic/desktop/Main.kt b/desktop/src/main/kotlin/org/meshtastic/desktop/Main.kt index 2118e02e6..1ea53339b 100644 --- a/desktop/src/main/kotlin/org/meshtastic/desktop/Main.kt +++ b/desktop/src/main/kotlin/org/meshtastic/desktop/Main.kt @@ -23,6 +23,7 @@ import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue import androidx.compose.runtime.remember import androidx.compose.runtime.staticCompositionLocalOf +import androidx.compose.ui.res.painterResource import androidx.compose.ui.unit.dp import androidx.compose.ui.window.Window import androidx.compose.ui.window.application @@ -85,6 +86,7 @@ fun main() = application { Window( onCloseRequest = ::exitApplication, title = "Meshtastic Desktop", + icon = painterResource("icon.png"), state = rememberWindowState(width = 1024.dp, height = 768.dp), ) { // Providing localePref via a staticCompositionLocalOf forces the entire subtree to diff --git a/desktop/src/main/resources/icon.png b/desktop/src/main/resources/icon.png new file mode 100644 index 000000000..e3e10fb55 Binary files /dev/null and b/desktop/src/main/resources/icon.png differ