Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix module-path if javafxDir contains spaces #785

Merged
merged 2 commits into from
Jan 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion launcher/src/se/llbit/chunky/launcher/ChunkyLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
*/
public class ChunkyLauncher {

public static final String LAUNCHER_VERSION = "v1.12.0";
public static final String LAUNCHER_VERSION = "v1.12.1";

/**
* Print a launch error message to the console.
Expand Down
3 changes: 2 additions & 1 deletion launcher/src/se/llbit/chunky/launcher/JavaFxLocator.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ private static void runWithJavafx(Path javafxDir, String[] args) {
cmd.add("--javaOptions");
StringBuilder javaOptions = new StringBuilder();
javaOptions.append("--module-path ");
javaOptions.append(javafxDir.toAbsolutePath().toString());
// Escape the path twice to make the second launcher pass the options to Chunky retaining the double speechmarks (fixes paths with spaces)
javaOptions.append("\\\"" + javafxDir.toAbsolutePath().toString() + "\\\"");
javaOptions.append(" --add-modules ");
javaOptions.append("javafx.controls,javafx.fxml");
cmd.add(javaOptions.toString());
Expand Down