fvarrui / JavaPackager

:package: Gradle/Maven plugin to package Java applications as native Windows, MacOS, or Linux executables and create installers for them.
GNU General Public License v3.0
1.07k stars 133 forks source link

Targetting linux from windows #326

Closed 3nigm4 closed 1 year ago

3nigm4 commented 1 year ago

[INFO] Generating AppImage... [WARNING] AppImage cannot be generated due to the target platform (linux) is different from the execution platform (windows)! [WARNING] AppImage artifact generation skipped! [WARNING] AppImage NOT generated!!!

It was not clear to me from the README.md that this is not supported. Could you explain why this is not working?

fvarrui commented 1 year ago

Hi @3nigm4! JP uses appimagetool (as explained here) to generate an appimage, and AFAIK this tool only runs on Linux.

image

Maybe it's not well expliained in the docs. What I mean in the Platform column is that the artifact can only be generated from this platform. A failure in the generation of a distributable artifact doesn't stop the execution of the plugin.

fvarrui commented 1 year ago

Hi @3nigm4! Did this answer your question?

3nigm4 commented 1 year ago

Hi @fvarrui, thank you for the explanation! Yes this answers my question. My next question is how this could be supported. I guess trying to get a PR into appimagetool would be easiest for you, right?

fvarrui commented 1 year ago

Hi @3nigm4!

I guess trying to get a PR into appimagetool would be easiest for you, right?

Sorry, I'm not sure what you mean.

But if what you really want is to generate distributables of your app for all platforms, I suggest you use a CI tool like CircleCI or GitHub Actions.

3nigm4 commented 1 year ago

I meant building app images for linux on windows.

fvarrui commented 1 year ago

I meant building app images for linux on windows.

You can't run appimagetool from Windows unless you use WSL or something like that. As I recommended to you above, I think you could use a CI tool in order to generate installers for all platforms.

3nigm4 commented 1 year ago

I see thank you!