Skip to content

Commit

Permalink
Merge pull request #215 from rladstaetter/202-use-jlink-option-file-a…
Browse files Browse the repository at this point in the history
…lso-for-linux-builds

202 use jlink option file also for linux builds
  • Loading branch information
rladstaetter authored Apr 22, 2024
2 parents a423e00 + 5facf4b commit c22894a
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 128 deletions.
133 changes: 14 additions & 119 deletions dist/dist-linux/installer-linux/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,20 @@
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<directory>src/main/installer</directory>
<includes>
<include>icon/**</include>
</includes>
<filtering>false</filtering>
<targetPath>${project.build.directory}</targetPath>
</resource>
<resource>
<directory>src/main/installer</directory>
<includes>
<include>jpackage-commandline.options</include>
</includes>
<filtering>true</filtering>
<targetPath>${project.build.directory}</targetPath>
</resource>
</resources>
<plugins>
Expand All @@ -56,59 +65,15 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<!-- delete java rt in any case (otherwise build exits with error later) -->
<execution>
<id>delete-javart</id>
<phase>generate-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<delete dir="${project.build.directory}/java-rt"/>
<delete dir="${project.build.directory}/app-tmp-image"/>
</target>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>step-1-create-custom-jre</id>
<phase>generate-resources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${jdk.jlink.binary}</executable>
<workingDirectory>${project.build.directory}</workingDirectory>
<environmentVariables>
<JAVA_HOME>${jdk.home}</JAVA_HOME>
</environmentVariables>
<arguments>
<argument>--strip-native-commands</argument>
<argument>--no-header-files</argument>
<argument>--no-man-pages</argument>
<argument>--compress=zip-6</argument>
<argument>--strip-debug</argument>
<argument>--add-modules</argument>
<argument>jdk.crypto.ec,jdk.localedata,java.base,java.desktop,jdk.jfr,java.logging,jdk.unsupported</argument>
<argument>--include-locales=en</argument>
<argument>--output</argument>
<argument>java-rt</argument>
</arguments>
</configuration>
</execution>

<!-- create application image -->
<execution>
<id>step-2-create-unsigned-app</id>
<id>create-app-store-pkg</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
Expand All @@ -120,77 +85,7 @@
<JAVA_HOME>${jdk.home}</JAVA_HOME>
</environmentVariables>
<arguments>
<argument>--verbose</argument>
<argument>--name</argument>
<argument>LogoRRR</argument>
<argument>--app-version</argument>
<argument>${revision}</argument>
<!--
<argument>-resource-dir</argument>
<argument>classes/res/</argument>
-->
<argument>--vendor</argument>
<argument>logorrr.app</argument>
<argument>--description</argument>
<argument>LogoRRR is a log file visualisation app, see https://www.logorrr.app/ </argument>
<argument>--copyright</argument>
<argument>Copyright 2021-2023 www.logorrr.app</argument>
<argument>--type</argument>
<argument>app-image</argument>
<argument>--runtime-image</argument>
<argument>java-rt</argument>
<argument>--input</argument>
<argument>libs</argument>
<argument>--main-class</argument>
<argument>${main.launcher.class}</argument>
<argument>--main-jar</argument>
<argument>app-${project.version}.jar</argument>
<argument>--java-options</argument>
<argument>-Xmx4096m</argument>
<argument>--dest</argument>
<argument>app-tmp-image</argument>
<argument>--verbose</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>step-4-create-pkg</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${jdk.jpackage.binary}</executable>
<workingDirectory>${project.build.directory}</workingDirectory>
<environmentVariables>
<JAVA_HOME>${jdk.home}</JAVA_HOME>
</environmentVariables>
<arguments>
<argument>--verbose</argument>
<argument>--name</argument>
<argument>LogoRRR</argument>
<argument>--app-image</argument>
<argument>app-tmp-image/LogoRRR</argument>
<argument>--app-version</argument>
<argument>${revision}</argument>
<argument>--icon</argument>
<argument>classes/icon/icon_128x128.png</argument>
<!--
<argument>-resource-dir</argument>
<argument>classes/res/</argument>
-->
<argument>--vendor</argument>
<argument>logorrr.app</argument>
<argument>--description</argument>
<argument>LogoRRR is a log file visualisation app, see https://www.logorrr.app/</argument>
<argument>--copyright</argument>
<argument>Copyright 2021-2023 www.logorrr.app</argument>
<argument>--license-file</argument>
<argument>${basedir}/../../../LICENSE</argument>
<argument>--type</argument>
<argument>deb</argument>
<argument>--dest</argument>
<argument>installer</argument>
<argument>@jpackage-commandline.options</argument>
</arguments>
</configuration>
</execution>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--type deb
--copyright "Copyright 2021-2024 www.logorrr.app"
--description "LogoRRR is a log file visualisation app, see https://www.logorrr.app/"
--icon icon/icon_256x256.png
--name LogoRRR
--dest app-tmp-image
--temp app-tmp
--vendor logorrr.app
--verbose
--input libs
--java-options -Xmx4096m
--license-file ../../../../LICENSE
--dest installer
--add-modules jdk.crypto.ec,jdk.localedata,java.base,java.desktop,jdk.jfr,java.logging,jdk.unsupported
--jlink-options "--strip-native-commands --no-header-files --no-man-pages --compress=zip-6 --strip-debug --include-locales=en"
--app-version ${revision}
--main-class ${main.launcher.class}
--java-options -Xmx4096m
--java-options -Djava.library.path=$APPDIR/.
--main-jar app-${project.version}.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 2 additions & 0 deletions dist/dist-osx/installer-osx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@
<groupId>app.logorrr.dist.repackaged</groupId>
<artifactId>dist-repackaged</artifactId>
</dependency>
<!--
<dependency>
<groupId>app.logorrr</groupId>
<artifactId>build</artifactId>
</dependency>
-->
<dependency>
<groupId>app.logorrr.native</groupId>
<artifactId>native-osx</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
--type pkg
--copyright "Copyright 2021-2023 www.logorrr.app"
--mac-package-identifier app.logorrr
--mac-package-name LogoRRR
--mac-sign
--mac-signing-key-user-name "${mac.signingkey.username}"
--mac-app-store
--mac-entitlements LogoRRR.entitlements.xml
--mac-app-category public.app-category.developer-tools
--copyright "Copyright 2021-2024 www.logorrr.app"
--description "LogoRRR is a log file visualisation app, see https://www.logorrr.app/"
--icon icon/logorrr-iconset.icns
--name LogoRRR
Expand All @@ -11,18 +18,11 @@
--resource-dir res/
--java-options -Xmx4096m
--license-file ../../../../LICENSE
--mac-package-identifier app.logorrr
--mac-package-name LogoRRR
--mac-sign
--mac-signing-key-user-name "${mac.signingkey.username}"
--mac-app-store
--mac-entitlements LogoRRR.entitlements.xml
--mac-app-category public.app-category.developer-tools
--dest installer
--add-modules jdk.crypto.ec,jdk.localedata,java.base,java.desktop,jdk.jfr,java.logging,jdk.unsupported
--jlink-options "--strip-native-commands --no-header-files --no-man-pages --compress=zip-6 --strip-debug --include-locales=en"
--app-version ${revision}
--main-class ${main.launcher.class}
--java-options -Xmx4096m
--java-options -Djava.library.path=$APPDIR/.
--main-jar app-${project.version}.jar
--main-jar app-${project.version}.jar

0 comments on commit c22894a

Please sign in to comment.