-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added conveyor packaging for fx-sampler (#580)
* added basic conveyor configuration * fixed resource paths in packaged jars * added a square icon * shaded the SampleScanner class to work with Conveyor * replaced the sample scanner hack with a conveyor hack * disabled javadoc linting (fix should be in a separate PR) * upgraded runtime to jdk21 and fx21 * added missing modules * added optional classpath debug prints to sample
- Loading branch information
Showing
23 changed files
with
175 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -162,3 +162,4 @@ $RECYCLE.BIN/ | |
# intermediated scan results for coverity | ||
/*.tgz | ||
|
||
chartfx-samples/output/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
conveyor.compatibility-level = 11 | ||
include required("/stdlib/jdk/21/openjdk.conf") | ||
include required("/stdlib/jvm/javafx/from-jmods.conf") | ||
javafx.version = "21" | ||
app.mac.info-plist.LSMinimumSystemVersion = 11.0 // JavaFX 21 requirement | ||
|
||
// Instructions: | ||
// mvn package | ||
// cd chartfx-samples | ||
// run: conveyor run | ||
// x-platform build: conveyor make site | ||
|
||
iconDir = "../docs/icons" | ||
|
||
app { | ||
|
||
// App information | ||
vendor = "GSI" | ||
display-name = "ChartFx Sampler" | ||
description = "Shows various examples of ChartFx charts" | ||
fsname = chartfx-sampler | ||
long-fsname = chartfx-sampler | ||
rdns-name = io.fair_acc.${app.fsname} | ||
version = 11.3.0 | ||
revision = 0 | ||
|
||
// Note: true shows console output for debugging | ||
windows.console = false | ||
|
||
// Resources | ||
icons = ${iconDir}"/icon-rounded-*.png" | ||
windows.icons = ${iconDir}"/icon-square-*.png" | ||
windows.manifests.msix.background-color = "#ffffff" | ||
inputs = [ | ||
"target/samples-master-SNAPSHOT.jar" | ||
"target/lib/*.jar" | ||
] | ||
|
||
// JRE config | ||
jvm { | ||
extract-native-libraries = false | ||
gui.main-class = io.fair_acc.sample.ChartFxSampler | ||
|
||
modules = [ | ||
// detected by jdeps | ||
java.base | ||
java.desktop | ||
java.instrument | ||
java.logging | ||
java.management | ||
java.rmi | ||
javafx.base | ||
javafx.controls | ||
javafx.fxml | ||
javafx.graphics | ||
javafx.swing | ||
javafx.web | ||
jdk.attach | ||
jdk.management | ||
jdk.unsupported | ||
// detect // uncomment to detect again | ||
|
||
// non-detected dependencies | ||
javafx.media, | ||
jdk.zipfs, | ||
] | ||
|
||
options = [ | ||
// generic vm args from docs | ||
"--add-reads=javafx.graphics=ALL-UNNAMED" | ||
"--add-opens=javafx.controls/com.sun.javafx.charts=ALL-UNNAMED" | ||
"--add-opens=javafx.controls/com.sun.javafx.scene.control.inputmap=ALL-UNNAMED" | ||
"--add-opens=javafx.graphics/com.sun.javafx.iio=ALL-UNNAMED" | ||
"--add-opens=javafx.graphics/com.sun.javafx.iio.common=ALL-UNNAMED" | ||
"--add-opens=javafx.graphics/com.sun.javafx.css=ALL-UNNAMED" | ||
"--add-opens=javafx.base/com.sun.javafx.runtime=ALL-UNNAMED" | ||
"--add-exports=javafx.controls/com.sun.javafx.scene.control.behavior=ALL-UNNAMED" | ||
|
||
// used for samples w/ lower-level access | ||
"--add-opens=jdk.management/com.sun.management=ALL-UNNAMED" | ||
"--add-opens=javafx.graphics/javafx.scene=ALL-UNNAMED" | ||
"--add-opens=javafx.graphics/javafx.css=ALL-UNNAMED" | ||
"--add-opens=javafx.graphics/com.sun.javafx.scene.traversal=ALL-UNNAMED" | ||
"--add-opens=javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED" | ||
"--add-opens=javafx.graphics/javafx.scene=ALL-UNNAMED" | ||
"--add-opens=javafx.graphics/com.sun.javafx.tk=ALL-UNNAMED" | ||
] | ||
|
||
// The FXSampler project only searches for jars/classes in directories | ||
// at or below the working directory. Conveyor packages app contents | ||
// in a sibling directory, so nothing gets found. We can work around | ||
// this by manually setting the working directory. The '&&' token | ||
// is an undocumented token that means "the place where the exe is | ||
// found" | ||
system-properties.user.dir = "&&/../" | ||
|
||
} | ||
|
||
// Release using GitHub Releases | ||
site.base-url = github.com/fair-acc/chart-fx/releases/latest/download | ||
vcs-url = github.com/fair-acc/chart-fx | ||
license = LGPL 3 | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
chartfx-samples/src/main/java/io/fair_acc/sample/ChartFxSampler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,33 @@ | ||
package io.fair_acc.sample; | ||
|
||
import java.io.File; | ||
import java.nio.file.Path; | ||
import java.util.Arrays; | ||
import java.util.Optional; | ||
|
||
import fxsampler.FXSampler; | ||
|
||
public class ChartFxSampler { | ||
private static boolean debug = Optional.ofNullable(System.getenv("chartfx.debug")) | ||
.map(Boolean::parseBoolean) | ||
.orElse(false); | ||
|
||
public static void main(String[] args) { | ||
if (debug) { | ||
// Debug output for checking classpath | ||
System.out.println("\nJars on ClassPath:"); | ||
String classpath = System.getProperty("java.class.path"); | ||
Arrays.stream(classpath.split(File.pathSeparator)) | ||
.map(String::toString) | ||
.filter(str -> str.endsWith(".jar")) | ||
.map(str -> "* " + str.substring(str.lastIndexOf(File.separatorChar) + 1)) | ||
.sorted() | ||
.forEach(System.out::println); | ||
|
||
// The FX Sampler only searches for jars/classes at and below the working directory | ||
System.out.println("\nworkingDir = " + Path.of(".").toAbsolutePath().normalize() + "\n"); | ||
} | ||
|
||
FXSampler.main(args); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters