Is there a way to package an application into an E...
# compose-desktop
b
Is there a way to package an application into an EXE that isn't an installer? I want to share something with friends that they can just run without them having to worry about things being installed on their system. I saw mention of installer and app-image exes in this channel, but idk if that's what I'm looking for or where to read up on it
m
An app-image is what jpackage generates if configured to do so but I personally have never used that with Compose. (But it works with JavaFX where I have used it on Macs.)
d
buildDistributable
task builds an exe, no installer
b
@David W How do you get that task? I've only got the Kotlin and Compose plugins in my gradle build script and I'm getting
Task 'buildDistributable' not found in root project
a
It's “createDistributable”. However, it doesn't package just one exe. It packages jvm & an app into a folder (with an exe launcher), which can be copied anywhere (as a folder or a zip), but it's not a single exe file
😃 2
k
Thanks for this question! So creating an MSI installer will be everything in one file, but needs to be installed. Whereas creating a Distributable will be everything in one folder, and can be portable and run from the exe. Sounds great! Thanks!
Hello @alexey.tsvetkov, I'm trying to create the .exe / .msi files for my CfD app, and have read thru the Native Distributions tutorial on JB GitHub, and Compiling Applications on JB website, but am not able to pump out my files! Can you please help me find the info I need? Thanks very much!! Cheers.
@David W Have you done .exe .MSI creation from IntelliJ IDEA?
d
I have not, only distributable (not msi)
k
So .exe?
Or .jar?
d
.exe
k
Goodoh, in trying to get at least a .exe generated, but nothing's happening.
d
specifically, the
createDistributable
task
k
Yes, so where does that have to go??
it answered most of my questions
k
I haven't been able to find any reference to it at all!
Yes, a few times! I'm missing something.
I need to find where you setup the task. I'm sure my Gradle build file is right, and I've setup the output folders I think.
It mentions the tasks in that doc, but not where to activate them?
d
the Tasks panel in intellij
message has been deleted
k
Oh, well that sounds sensible.... ☺️
d
sorry, Gradle panel, not Tasks
k
Oh, Gradle tasks!
Righto, well I can look that up. Thanks so much! 🤓📚📖📑📒
Yes, so you have a number of tasks running there to automate stuff.
d
all provided by the
org.jetbrains.compose
gradle plugin, i believe
k
Ok cool. I'll have to have a look in there.
d
tbh i just set up the project using the New Project template for Compose and those tasks were there
k
Well if they're already in there, do they need activating somehow? Or maybe my config is a bit off somewhere. Anyway, I'll be able to look down the right rabbit hole now! 😀
Yep goodoh.
d
activating?
k
Switching on?
I'll try some stuff.
d
you can double click them to run them
k
Oh ok!
Hey, it worked!! I can now manually create .exe app folders and .msi installer files!! Major progress! (for me! 😁) Thanks so much for your help today... ✌️😊👍 I see that the .exe bundle is about 100MB for my project, and the .msi installer is just under 50MB, so that's a very good start for my experiments! I'm sure there'll be ways to optimise that as it grows, but for now I have a way to get my program out to my testers!! 🥳
658 Views