Closed dzirbel closed 1 month ago
me to
me to
Is there a workaround for this? It seems like it has pretty low priority.
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
Same here with the following setup
compose.desktop {
application {
mainClass = "com.example.MainKt"
nativeDistributions {
macOS {
// macOS specific options
targetFormats(TargetFormat.Dmg)
}
windows {
// Windows specific options
targetFormats(TargetFormat.Msi, TargetFormat.Exe)
}
linux {
// Linux specific options
targetFormats(TargetFormat.AppImage)
}
packageName = "Example"
packageVersion = "1.0.0"
}
}
}
When running
./gradlew composeApp:packageDmg
A problem occurred configuring project ':composeApp'.
> Unexpected target format for MacOS: AppImage
did that get fixed? if yes, which commit? (we tried this on 2 weeks ago and it was still causing trouble, even with the windows build)
Describe the bug Running
packageReleaseDistributionForCurrentOS
on macOS with a build configuration that includesTargetFormat.AppImage
throwsIllegalStateException: Unexpected target format for MacOS: AppImage
.The cause is fairly clear: the
AppImage
enum value usescurrentOS
as itstargetOS
here, while the task configuration checks explicitly for DMG or PKG here, when creating notarization tasks. Since AppImages are generally only used by Linux I wouldn't expect them to be built bypackageReleaseDistributionForCurrentOS
on macOS.As a related note, using
TargetFormat.AppImage
doesn't seem to actually produce an app image file (which should be a single executable file), instead just theapp
directory without any packaging. Since it's also produced on every OS it seems to be used for a different purpose than actually packaging an AppImage, but I might be missing something here.Affected platforms Select one of the platforms below:
Versions
To Reproduce Include
targetFormats(TargetFormat.AppImage)
in any project and runpackageReleaseDistributionForCurrentOS
from macOS.Expected behavior
packageReleaseDistributionForCurrentOS
runs and does not attempt to package an AppImage on macOS.Additional context I believe the notarization task logic is also flawed due to https://github.com/JetBrains/compose-multiplatform/issues/2233 - it attempts (and fails) to add two
notarize
tasks when both DMG and PKG formats are included. It's likely both issues can be resolved by some refactoring of the creating of thenotarize
tasks.