Skip to content

Commit

Permalink
Update installer builder scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
fjwright committed Mar 18, 2021
1 parent 3bf4034 commit b2c1c55
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 21 deletions.
35 changes: 20 additions & 15 deletions installers/Linux/build
Original file line number Diff line number Diff line change
@@ -1,37 +1,42 @@
#! /bin/bash
# Use jpackage to build a Run-REDUCE installer for Linux.
# User's Guide: https://docs.oracle.com/en/java/javase/15/jpackage/.
# Man Page: https://docs.oracle.com/en/java/javase/15/docs/specs/man/jpackage.html.
# Requires JDK 14+ and (e.g.) JAVA_HOME = /usr/lib/jvm/adoptopenjdk-15-hotspot-amd64.
# User's Guide: https://docs.oracle.com/en/java/javase/16/jpackage/.
# Man Page: https://docs.oracle.com/en/java/javase/16/docs/specs/man/jpackage.html.
# Requires JDK 14+ and (e.g.) JAVA_HOME = /usr/bin/java (set using alternatives)

# Ubuntu: sudo update-java-alternatives
# Fedora: sudo alternatives --config java

# Set (e.g.) PATH_TO_FX_MODS = ~/javafx-jmods-16
# and (e.g.) PATH_TO_FX = ~/javafx-16/lib (to run Version)

# Debian Linux also requires the fakeroot package.
# Red Hat Linux also requires the rpm-build package.

# --type app-image creates only the application image for testing.
# --verbose enables verbose output.

# Use JDK 14 because JDK 15 currently leads to ghost output!
# sudo update-java-alternatives

# For --linux-rpm-license-type values see https://spdx.org/licenses/.

echo -n 'java version '
java --version
java --version
echo -n 'jpackage version '
jpackage --version
jpackage --version
echo -n 'jlink version '
jlink --version
echo 'JAVA_HOME =' "$JAVA_HOME"
echo 'PATH_TO_FX_MODS =' "$PATH_TO_FX_MODS"
jlink --version
echo 'JAVA_HOME =' $JAVA_HOME
echo 'PATH_TO_FX_MODS =' $PATH_TO_FX_MODS
echo 'PATH_TO_FX =' $PATH_TO_FX '(to run Version)'

VERSION=$(java \
--module-path "$PATH_TO_FX:/media/sf_Run-REDUCE/out/production" \
--module-path $PATH_TO_FX:/media/sf_Run-REDUCE/out/production \
--module Run.REDUCE/fjwright.runreduce.Version)

echo 'Run-REDUCE version =' "$VERSION"
echo 'Run-REDUCE version =' $VERSION
echo '---'

jpackage --name Run-REDUCE --app-version "$VERSION" \
--module-path "$PATH_TO_FX_MODS:/media/sf_Run-REDUCE/out/production" \
jpackage --name Run-REDUCE --app-version $VERSION \
--module-path "$PATH_TO_FX_MODS":/media/sf_Run-REDUCE/out/production \
--module Run.REDUCE/fjwright.runreduce.RunREDUCE \
--icon /media/sf_Run-REDUCE/resources/images/RR-icon-128.png \
--description "A JavaFX GUI to run the REDUCE CAS" \
Expand Down
12 changes: 6 additions & 6 deletions installers/Windows/build.bat
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
@echo off
rem Use jpackage to build a Run-REDUCE installer for Windows.
rem User's Guide: https://docs.oracle.com/en/java/javase/15/jpackage/
rem Man Page: https://docs.oracle.com/en/java/javase/15/docs/specs/man/jpackage.html
rem User's Guide: https://docs.oracle.com/en/java/javase/16/jpackage/
rem Man Page: https://docs.oracle.com/en/java/javase/16/docs/specs/man/jpackage.html
rem Requires JDK 14+ and WiX 3.0+.
rem Requires (e.g.) JAVA_HOME = "D:\Program Files\AdoptOpenJDK\jdk-14.0.2.12-hotspot"
rem Requires (e.g.) JAVA_HOME = "D:\Program Files\Java\jdk-16"
rem and PATH_TO_FX_MODS = "D:\Program Files\AdoptOpenJDK\javafx-jmods-16"
rem and PATH_TO_FX = "D:\Program Files\Java\javafx-16\lib" (to run Version)

rem --type app-image creates only the application image for testing.
rem --verbose enables verbose output.

rem Use JDK 14 because JDK 15 currently leads to ghost output!

echo java version
java --version
echo jpackage version
Expand All @@ -26,7 +26,7 @@ echo Run-REDUCE version = %VERSION%
echo ---

jpackage --name Run-REDUCE --app-version %VERSION% ^
--module-path %PATH_TO_FX_MODS%;..\..\out\production ^
--module-path "%PATH_TO_FX_MODS%;..\..\out\production" ^
--module Run.REDUCE/fjwright.runreduce.RunREDUCE ^
--type msi ^
--icon RR-icon-128.ico ^
Expand Down

0 comments on commit b2c1c55

Please sign in to comment.