From 3acf5dc2ad35ccbd6b1b2a8326b00af777250a80 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Fri, 24 Mar 2017 18:27:44 -0700 Subject: [PATCH] Install launcher(s) if not found. --- .../main/java/com/beust/kobalt/wrapper/Main.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/modules/wrapper/src/main/java/com/beust/kobalt/wrapper/Main.java b/modules/wrapper/src/main/java/com/beust/kobalt/wrapper/Main.java index 931f8452..e2e22e42 100644 --- a/modules/wrapper/src/main/java/com/beust/kobalt/wrapper/Main.java +++ b/modules/wrapper/src/main/java/com/beust/kobalt/wrapper/Main.java @@ -219,6 +219,20 @@ public class Main { log(2, " Couldn't find $VERSION_TEXT, overwriting the installed wrapper"); installWrapperFiles(version, wrapperVersion); } + + // + // Install the launcher if not already found. + // + File kobaltw = new File(KOBALTW); + File kobaltw_bat = new File(KOBALTW_BAT); + + if (!kobaltw.exists()) { + generateKobaltW(kobaltw.toPath()); + } + + if (!kobaltw_bat.exists()) { + generateKobaltWBat(kobaltw_bat.toPath()); + } } return kobaltJarFile;