Skip to content

Commit

Permalink
feat: Exe task can archive additional resources.
Browse files Browse the repository at this point in the history
  • Loading branch information
teletha committed May 18, 2023
1 parent 4055364 commit 6e10499
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/java/bee/task/Exe.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import psychopath.Directory;
import psychopath.File;
import psychopath.Folder;
import psychopath.Location;
import psychopath.Locator;

public class Exe extends Task {
Expand All @@ -45,6 +46,9 @@ public class Exe extends Task {
/** The usage of custom JRE. */
protected boolean useCustomJRE = true;

/** The additional packing data. */
protected final Set<Location> additional = new HashSet();

@Command("Generate windows exe file which executes the main class.")
public File build() {
if (!Platform.isWindows()) {
Expand Down Expand Up @@ -146,6 +150,11 @@ public File build() {
folder.add(jre);
}

// addtional data
for (Location location : additional) {
folder.add(location);
}

ui.info("Packing application and libraries.");

return folder.packTo(project.getOutput().file(project.getProduct() + "-" + project.getVersion() + ".zip"));
Expand Down

0 comments on commit 6e10499

Please sign in to comment.