Open Osiris-Team opened 2 years ago
Hi @Osiris-Team!
JavaPackager is able to generate a ZIP (zipball) and TGZ (tarball) files with your app, so the user only has to extract the folder with the app, without installation. Try createZipball=true
and/or createTarball=true
options, and generateInstaller=false
if you don't want installers.
Oh yeah thats nice. Isnt it possible to have it all inside an exe though?
Yes, there's a way, but it's not supported by JavaPackager (yet?).
You can create a self extract and run EXE file from a ZIP file using 7z SDK. Take a look at this article. Maybe you can automate the self-extract-and-run EXE generation using Maven, and we can add as a new JavaPackager feature.
@fvarrui - It looks like, based on the article that you linked, that the resulting .exe file merely extracts other files and then executes one of the extracted files - and if I have that wrong, please let me know - but if that is the case, is there no way to have a self-contained .exe file with all of the included java libraries and executables that somehow magically just bust out of the .exe into ram and then execute the runnable .jar file, without adding additional files to the directory where the .exe is located?
One potential issue with the mentioned solution could be unwanted 'litter' on the hard drive (or thumb drive) when an app is not closed down in a 'clean' fashion.
But again, if I'm misunderstanding how it all works, then just kick me and I'll fall in line. ☺
Hi @EasyG0ing1! Yes, I agree with you ... but I think that this unwanted "litter" is stored in a temp directory, so it should be removed by the OS sooner or later. I don't know another all-in-one EXE solution.
Does someone want to implement this feature?
Does someone want to implement this feature?
Do you want it?
Yeah why not. Could take a bit before I find some time though.
Sorry for the misunderstanding ... I mean if you really want this feature, I'll be happy to implement it.
Oh yess that would be awesome :)
I upvote this feature request. Totally self-contained exe's (aka "portable .exe's") would have enormous utility in the broader spectrum of software development.
Ok, I plan to add this feature in v1.7.0, with some other requested features. Thanks!
I'm researching about using warp to build portable executables for each platform. It looks good!
You can create a self extract and run EXE file from a ZIP file using 7z SDK. Take a look at this article. Maybe you can automate the self-extract-and-run EXE generation using Maven, and we can add as a new JavaPackager feature.
After several tests I didn't manage to build a portable EXE with 7z SDK, so I rule out this route for now.
@fvarrui
I'm researching about using warp to build portable executables for each platform. It looks good!
Warp reminds me of the IBM OS/2 days ... ;-)
It looks somewhat complicated, but it does look functional.
Warp reminds me of the IBM OS/2 days ... ;-)
I'm old enough to remember that too 😅
Some programs can be directly used by running the executable/binary, without needing to install them first using an installer. To have an option to enable this in JavaPackager would be awesome (aka generate additional portable executables/binaries).