Skip to content

Commit

Permalink
include-extensions was consulted too early, leaving the matched fil…
Browse files Browse the repository at this point in the history
…es out of the manifest
  • Loading branch information
Edvin Syse committed Sep 24, 2016
1 parent eb8d644 commit a302457
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Change Log
All notable changes to this project will be documented in this file.

## [10.0.14-SNAPSHOT]

- `include-extensions` was consulted too early, leaving the matched files out of the manifest

## [1.0.13] - 2016-09-12

- Support for fully customizable update UI, see (https://github.com/edvin/fxlauncher-custom-ui)
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>no.tornado</groupId>
<artifactId>fxlauncher</artifactId>
<version>1.0.13</version>
<version>1.0.14-SNAPSHOT</version>
<packaging>jar</packaging>
<name>FX Launcher</name>
<description>Auto updating launcher for JavaFX Applications</description>
Expand Down
16 changes: 12 additions & 4 deletions src/main/java/fxlauncher/CreateManifest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ public static void main(String[] args) throws IOException {
URI baseURI = URI.create(args[0]);
String launchClass = args[1];
Path appPath = Paths.get(args[2]);
FXManifest manifest = create(baseURI, launchClass, appPath);

String cacheDir = null;
Boolean acceptDowngrade = null;
String parameters = null;

if (args.length > 3) {
// Parse named parameters
Expand All @@ -36,11 +39,11 @@ public static void main(String[] args) throws IOException {
if (named != null) {
// Configure cacheDir
if (named.containsKey("cache-dir"))
manifest.cacheDir = named.get("cache-dir");
cacheDir = named.get("cache-dir");

// Configure acceptDowngrade
if (named.containsKey("accept-downgrade"))
manifest.acceptDowngrade = Boolean.valueOf(named.get("accept-downgrade"));
acceptDowngrade = Boolean.valueOf(named.get("accept-downgrade"));

// Add additional files with these extensions to manifest
if (named.containsKey("include-extensions"))
Expand All @@ -63,9 +66,14 @@ public static void main(String[] args) throws IOException {

// Add the raw parameter string to the manifest
if (rest.length() > 0)
manifest.parameters = rest.toString();
parameters = rest.toString();
}

FXManifest manifest = create(baseURI, launchClass, appPath);
if (cacheDir != null) manifest.cacheDir = cacheDir;
if (acceptDowngrade != null) manifest.acceptDowngrade = acceptDowngrade;
if (parameters != null) manifest.parameters = parameters;

JAXB.marshal(manifest, appPath.resolve("app.xml").toFile());
}

Expand Down

0 comments on commit a302457

Please sign in to comment.