beryx / badass-jlink-plugin

Create a custom runtime image of your modular application
https://badass-jlink-plugin.beryx.org
Apache License 2.0
386 stars 27 forks source link

appimage does not generate in manjaro #225

Open AmirAli-AZ opened 1 year ago

AmirAli-AZ commented 1 year ago

Hi I'm trying to generate an appimage for my javafx app but it does not generate any appimage

Screenshot_20230211_132404 Screenshot_20230211_132710 Screenshot_20230211_132722

siordache commented 1 year ago

As explained in the jpackage doc, the app-image type is used to "test your application before creating an installable package". Since you probably want an installable package, remove the following lines from the jpackage block:

installerType = 'app-image'
targetPlatform('linux-x86_64', '/usr/lib/jvm/java-17-openjdk')

Run the Gradle build again and you should find the installable package (rpm or deb) under build/jpackage. Under build/image you'll find the runtime image and under build/jpackage/Wally you should find the application image.

If you get an error, you may need to put the following line in the jpackage block:

jpackageHome = '/usr/lib/jvm/java-17-openjdk'
AmirAli-AZ commented 1 year ago

i did but i still don't see installable package

Screenshot_20230211_150245

siordache commented 1 year ago

That's strange. Please run ./gradlew -i clean jpackage and post the output of the jpackage task.

AmirAli-AZ commented 1 year ago
> Task :jpackage FAILED
Caching disabled for task ':jpackage' because:
  Build cache is disabled
Task ':jpackage' is not up-to-date because:
  Task has failed previously.
Watching 138 directories to track changes
Watching 109 directories to track changes
runtimeImageDir: /home/amiran/IdeaProjects/Wally/build/image
taskData: org.beryx.jlink.data.JPackageTaskData(moduleName:com.amirali.wally, mainClass:com.amirali.wally.App, customImageData:null, imageDir:/home/amiran/IdeaProjects/Wally/build/extension 'jlink' property 'imageName', runtimeImageDir:/home/amiran/IdeaProjects/Wally/build/image, jpackageData:org.beryx.jlink.data.JPackageData(jpackageHome:, outputDir:jpackage, imageOutputDir:/home/amiran/IdeaProjects/Wally/build/jpackage, imageName:Wally, imageOptions:[], resourceDir:null, targetPlatformName:null, skipInstaller:false, installerType:null, installerOutputDir:/home/amiran/IdeaProjects/Wally/build/jpackage, installerName:Wally, appVersion:null, vendor:Unknown, icon:null, installerOptions:[--app-version, 1.0-SNAPSHOT], args:[], jvmArgs:[], defaultJPackageHome:/usr/lib/jvm/java-17-openjdk, secondaryLaunchers:[], launcherName:app, JPackageHomeOrDefault:/usr/lib/jvm/java-17-openjdk))
Starting process 'command '/usr/lib/jvm/java-17-openjdk/bin/jpackage''. Working directory: /home/amiran/IdeaProjects/Wally Command: /usr/lib/jvm/java-17-openjdk/bin/jpackage --type rpm --dest /home/amiran/IdeaProjects/Wally/build/jpackage --name Wally --app-version 1.0-SNAPSHOT --vendor Unknown --app-image /home/amiran/IdeaProjects/Wally/build/jpackage/Wally --app-version 1.0-SNAPSHOT
Successfully started process 'command '/usr/lib/jvm/java-17-openjdk/bin/jpackage''
Error: Invalid or unsupported type: [rpm]

Watching 133 directories to track changes
Watching 162 directories to track changes
Invalid or unsupported type: [rpm]

Execution failed for task ':jpackage'.
> Process 'command '/usr/lib/jvm/java-17-openjdk/bin/jpackage'' finished with non-zero exit value 1

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --debug option to get more log output.
> Run with --scan to get full insights.
AmirAli-AZ commented 1 year ago

so i think jpackage doesn't support arch and arch based distributions

siordache commented 1 year ago

What happens if you configure installerType = 'deb'?

AmirAli-AZ commented 1 year ago

nope, even app-image doesn't work I thought app-image will work with all linux distributions

airsquared commented 1 year ago

@AmirAli-AZ are you still having this issue?

AmirAli-AZ commented 1 year ago

Does anything changed? I don't know, I'll test later

airsquared commented 1 year ago

Try with JDK 17.0.8, there were some bugs related to jpackage fixed there.