Skip to content

Commit

Permalink
Packaging with GraalVM support (#1957)
Browse files Browse the repository at this point in the history
* Package creation fix

* Removed useless options

* Revert Removed useless options

* Fix linux build

* Fix linux installation
  • Loading branch information
qparis authored Jun 1, 2019
1 parent c69b5b1 commit 5853ca7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
8 changes: 5 additions & 3 deletions phoenicis-dist/src/scripts/phoenicis-create-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,21 @@ PHOENICIS_OPERATING_SYSTEM="$(uname)"
if [ "$PHOENICIS_OPERATING_SYSTEM" == "Darwin" ]; then
PHOENICIS_APPTITLE="Phoenicis PlayOnMac"
JPACKAGER_OS="osx"
JAR_RELATIVE_PATH="../Java"
fi

if [ "$PHOENICIS_OPERATING_SYSTEM" == "Linux" ]; then
PHOENICIS_APPTITLE="Phoenicis PlayOnLinux"
JPACKAGER_OS="linux"
JAR_RELATIVE_PATH="/usr/share/phoenicis/app"
fi

PHOENICIS_TARGET="$SCRIPT_PATH/../../target"
PHOENICIS_JPACKAGER="$SCRIPT_PATH/../../target/jpackager"
PHOENICIS_RESOURCES="$SCRIPT_PATH/../resources"
PHOENICIS_MODULES="jdk.crypto.ec,java.base,javafx.base,javafx.web,javafx.media,javafx.graphics,javafx.controls,java.naming,java.sql,java.scripting,jdk.scripting.nashorn"
PHOENICIS_JPACKAGER_ARGUMENTS=("-i" "$PHOENICIS_TARGET/lib" "--main-jar" "phoenicis-javafx-$VERSION.jar" "-n" "$PHOENICIS_APPTITLE" "--output" "$PHOENICIS_TARGET/packages/" "--add-modules" "$PHOENICIS_MODULES" "-p" "$PHOENICIS_TARGET/lib/" "--version" "$VERSION")

PHOENICIS_MODULES="jdk.crypto.ec,java.base,javafx.base,javafx.web,javafx.media,javafx.graphics,javafx.controls,java.naming,java.sql,java.scripting,jdk.scripting.nashorn,jdk.internal.vm.ci,org.graalvm.truffle"
PHOENICIS_RUNTIME_OPTIONS="-XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI --upgrade-module-path=$JAR_RELATIVE_PATH/compiler.jar"
PHOENICIS_JPACKAGER_ARGUMENTS=("-i" "$PHOENICIS_TARGET/lib" "--main-jar" "phoenicis-javafx-$VERSION.jar" "-n" "$PHOENICIS_APPTITLE" "--output" "$PHOENICIS_TARGET/packages/" "--add-modules" "$PHOENICIS_MODULES" "-p" "$PHOENICIS_TARGET/lib/" "--version" "$VERSION" "--jvm-args" "$PHOENICIS_RUNTIME_OPTIONS")

_download_jpackager() {
mkdir -p "$PHOENICIS_JPACKAGER"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public PolyglotScriptEngine(String language, Map<String, String> options) {
this.errorHandlers = new ArrayList<>();
this.language = language;
this.context = Context.newBuilder(language)
.allowExperimentalOptions(true)
.options(options).allowHostAccess(true).build();
}

Expand Down
5 changes: 5 additions & 0 deletions phoenicis-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@
<artifactId>bcprov-jdk15on</artifactId>
<groupId>org.bouncycastle</groupId>
</exclusion>
<exclusion>
<!-- Jackson is already included by Phoenicis -->
<artifactId>jackson-core</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
Expand Down

0 comments on commit 5853ca7

Please sign in to comment.