Disable ProGuard for desktop release and add application icon (#4776)

This commit is contained in:
James Rich 2026-03-12 23:09:18 -05:00 committed by GitHub
parent 0ed9b6633b
commit aacf5c69e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 1 deletions

View file

@ -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"

View file

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB