https://kotlinlang.org logo
#compose-desktop
Title
# compose-desktop
g

Garret Yoder

03/29/2024, 7:14 PM
For windows builds, is there a task to create a 'fat-exe'? Currently that I know of the gradle plugin provides packageExe - which creates a .exe installer, and createDistributable - which creates an exe w/ all of it's dependencies which would not work. I'm looking to just make a standalone exe with everything packaged inside of it.
a

Adam Brown

03/29/2024, 7:40 PM
that would be really nice
s

Stefan Oltmann

03/31/2024, 9:24 PM
This would be great, but I don’t think it’s possible. Even ExcelsiorJet in the old days had still a „runtime“ folder - even if everything else was packed into a big EXE. It’s possible that some libs/DLLs must be separate and also possibly maintain their signature. A fat standalone EXE that does not even extract anything (like DLLs) into the system would be something really great. The same of course for macOS & Linux. I’m not sure if this could be achieved with GraalVM 🤔
a

Adam Brown

03/31/2024, 10:30 PM
you think if we ever got kotlin native compose it could work?
yes black 1
s

Stefan Oltmann

04/01/2024, 7:21 AM
Oh yes, I believe that. The native executable target of my libs produce single EXE files. So putting together libs & own code in a singular EXE seems to be entirely possible.
g

Garret Yoder

04/01/2024, 12:57 PM
An exe is just a fancy folder with some metadata, so there shouldn't be anything stopping us from plopping that directory inside the exe.
s

Stefan Oltmann

04/01/2024, 2:20 PM
An exe is just a fancy folder with some metadata, so there shouldn't be anything stopping us from plopping that directory inside the exe.
If it is so easy, why hasn't it been done?
g

Garret Yoder

04/01/2024, 6:18 PM
Just because it hasn't been set up doesn't indicate difficulty. I'll work on it over the next few days.
s

Stefan Oltmann

04/01/2024, 6:24 PM
However, that’s exactly my assumption. ExcelsiorJet would have done it otherwise. I’m looking towards your single-exe solution. Would love a all-in-one packaging where people can’t destroy the installation by deleting stuff in the runtime folder… or even worse virus scanners doing that. Had that once with Windows Defender on a false positive.
g

Garret Yoder

04/01/2024, 7:23 PM
well we can make uberjars, so you'd just need to package the uberjar into an exe w/ something like a minified graal
It's JVM so none of it is compiled binary, it's just fancy folders with metadata.
s

Stefan Oltmann

04/01/2024, 9:48 PM
I mentioned GraalVM earlier