# compose-desktop

Mark Alvaro

10/17/2023, 2:19 PM
Hi there! Using compose desktop to build an app that will run on Mac and Linux. The packageDmg-generated dmg works fine. However when I try to install the deb package on Ubuntu, I get an error about unmet dependencies. Ubuntu doesn't give any clues as to what is missing. Any ideas what I could be missing? Pasting more info in thread.
Copy code
Copy code
compose.desktop {
    application {
        mainClass = "my.MainKt"

        nativeDistributions {
            targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
            packageName = "my-app"
            packageVersion = "1.0.0"
            includeAllModules = true
Copy code
plugins {
Was using a newer version of kotlin/compose, but downgraded because I couldn't get the dmg to work, so I copied an older project of mine's configuration. Unfortunately I never tried to get the old one to work on Linux.
I've installed a jre and jdk on the Linux box.
Found a little bit of help from Google and now realize it is probably an arch issue. Anyway to specify use amd when building from an arm?

Michael Paus

10/17/2023, 2:56 PM
It is much more likely to get help for the current versions than for these ancient ones.

Mark Alvaro

10/17/2023, 3:05 PM
Got past it by building on the Ubuntu box itself, but still curious even with new versions if you can build an amd package from an arm laptop. Struggling to find any docs or posts about that.

Kirill Grouchnikov

10/17/2023, 3:19 PM
The safest bet is to always build for a specific platform on that platform.
👍 1

Sebastian Kürten

10/17/2023, 3:46 PM
Building for other architectures is not supported by the Compose Gradle plugin and it cannot support that while it still utilizes
for packaging as that tool in turn does not support cross-compilation (it is a non goal for the tool as specified here: I started a project that intends to go around that limitation by pulling the functionality of
into the packaging plugin. It still relies on JDK tooling, but uses
instead which is able to package JVM runtimes for other operating systems and architectures. The tool is a new plugin called pinpit that can be used in conjunction with the compose plugin. I'm already using it in production, here's more info on it: and (second tool is for creating a working template project to get off the ground quickly with a new project). Your alternatives are: • Running your builds on various different machines with the architectures you want to package for • Using github runners (although I think they do not support linux arm for example) • using another 3rd party tool called Conveyor:
👍 4

Mark Alvaro

10/17/2023, 4:47 PM
Awesome thank you for the info! Will look into pinpit.