mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-03-27 10:11:48 -04:00
build(desktop): dynamically configure target formats based on host OS (#4796)
This commit is contained in:
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
@@ -310,6 +310,7 @@ jobs:
|
||||
desktop/build/compose/binaries/main-release/*/*.exe
|
||||
desktop/build/compose/binaries/main-release/*/*.deb
|
||||
desktop/build/compose/binaries/main-release/*/*.rpm
|
||||
desktop/build/compose/binaries/main-release/*/*.AppImage
|
||||
retention-days: 1
|
||||
if-no-files-found: ignore
|
||||
|
||||
|
||||
@@ -78,19 +78,25 @@ compose.desktop {
|
||||
// notarize = true
|
||||
// appleID = System.getenv("APPLE_ID")
|
||||
// appStorePassword = System.getenv("APPLE_APP_SPECIFIC_PASSWORD")
|
||||
targetFormats(TargetFormat.Dmg)
|
||||
}
|
||||
windows {
|
||||
iconFile.set(project.file("src/main/resources/icon.ico"))
|
||||
menuGroup = "Meshtastic"
|
||||
// TODO: Must generate and set a consistent UUID for Windows upgrades.
|
||||
// upgradeUuid = "YOUR-UPGRADE-UUID-HERE"
|
||||
targetFormats(TargetFormat.Msi, TargetFormat.Exe)
|
||||
}
|
||||
linux {
|
||||
iconFile.set(project.file("src/main/resources/icon.png"))
|
||||
menuGroup = "Network"
|
||||
targetFormats(TargetFormat.Deb, TargetFormat.Rpm, TargetFormat.AppImage)
|
||||
}
|
||||
|
||||
// Define target formats based on the current host OS to avoid configuration errors
|
||||
// (e.g., trying to configure Linux AppImage notarization on macOS).
|
||||
val currentOs = System.getProperty("os.name").lowercase()
|
||||
when {
|
||||
currentOs.contains("mac") -> targetFormats(TargetFormat.Dmg)
|
||||
currentOs.contains("win") -> targetFormats(TargetFormat.Msi, TargetFormat.Exe)
|
||||
else -> targetFormats(TargetFormat.Deb, TargetFormat.Rpm, TargetFormat.AppImage)
|
||||
}
|
||||
|
||||
// Read version from project properties (passed by CI) or default to 1.0.0
|
||||
|
||||
Reference in New Issue
Block a user