SergelsOrg / csv2tex

Tool to replace placeholders in tex-files
GNU General Public License v3.0
5 stars 0 forks source link

Application packaging (e.g. deb package) #56

Open ArchibaldBienetre opened 2 years ago

ArchibaldBienetre commented 2 years ago

Packaging the application as a .deb or .rpm package or similar may be as easy as writing a single-line bash script.

Trick #3: jpackage versus modules

You know jpackage, but wait: Do you really know jpackage?

jpackage is a command-line tool that takes an entire Java app as input and produces a fully self-contained application image, meaning it includes your code, dependencies, and a Java runtime. jpackage creates the runtime for your app with jlink, which you can fully configure through jpackage, or you can pass it the path to a runtime image that you already created.

Other configuration options for jpackage include the ability to specify application metadata such as icons and licenses, installation options, and launchers as well as JVM and program options.

jpackage produces output in platform-specific formats such as deb and rpm for Linux or exe and msi for Windows.

Now that you know jpackage, do you know that it can do all of that for modular as well as nonmodular applications?

Copied to ClipboardError: Could not CopyCopied to ClipboardError: Could not Copy
# generate an application image for a modular application:
jpackage --type app-image -n name -p modulePath -m moduleName/className
# for a nonmodular application:
jpackage --type app-image -i inputDir -n name --main-class className --main-jar myJar.jar
ArchibaldBienetre commented 2 years ago

The jlink gradle plugin that is already in our code offers a jpackage gradle task - we can just configure it there, should we need packaging.

Have a look at the jlink plugin's example repositories for reference: https://github.com/beryx-gist/badass-runtime-example-javafx/blob/3c9ceb86bb31c4767ef5c9afe6374624d88af2ad/build.gradle#L48

ArchibaldBienetre commented 2 years ago

This looks good, nebula rings a bell, might be it was a facebook library EDIT: Netflix https://github.com/nebula-plugins

Gradle plugin for constructing linux packages, specifically RPM and DEBs.

https://github.com/nebula-plugins/gradle-ospackage-plugin