|
1 | 1 | package io.github.fvarrui.javapackager.packagers; |
2 | 2 |
|
3 | 3 | import java.io.File; |
4 | | -import java.io.FileOutputStream; |
5 | 4 | import java.nio.file.Path; |
6 | 5 | import java.util.Arrays; |
7 | 6 | import java.util.Optional; |
8 | | -import java.util.Properties; |
9 | 7 |
|
10 | 8 | import org.apache.commons.lang3.StringUtils; |
11 | 9 |
|
|
14 | 12 | import io.github.fvarrui.javapackager.model.WindowsConfig; |
15 | 13 | import io.github.fvarrui.javapackager.model.WindowsExeCreationTool; |
16 | 14 | import io.github.fvarrui.javapackager.utils.FileUtils; |
17 | | -import io.github.fvarrui.javapackager.utils.JarUtils; |
18 | 15 | import io.github.fvarrui.javapackager.utils.Logger; |
19 | 16 | import io.github.fvarrui.javapackager.utils.RcEdit; |
20 | 17 | import io.github.fvarrui.javapackager.utils.VelocityUtils; |
@@ -52,9 +49,7 @@ protected File doApply(WindowsPackager packager) throws Exception { |
52 | 49 | File jarFile = packager.getJarFile(); |
53 | 50 | File manifestFile = packager.getManifestFile(); |
54 | 51 | File iconFile = packager.getIconFile(); |
55 | | - File libsFolder = packager.getLibsFolder(); |
56 | 52 | File appFolder = packager.getAppFolder(); |
57 | | - String mainClass = packager.getMainClass(); |
58 | 53 | File jreDestinationFolder = packager.getJreDestinationFolder(); |
59 | 54 | boolean bundleJre = packager.getBundleJre(); |
60 | 55 | String vmLocation = packager.getWinConfig().getVmLocation(); |
@@ -136,21 +131,6 @@ protected File doApply(WindowsPackager packager) throws Exception { |
136 | 131 | // copies JAR to libs folder |
137 | 132 | FileUtils.copyFileToFolder(jarFile, appFolder); |
138 | 133 |
|
139 | | - // copies winrun4j launcher helper library (needed to work around |
140 | | - /* |
141 | | - File winrun4jJar = new File(libsFolder, "winrun4j-launcher.jar"); |
142 | | - FileUtils.copyResourceToFile("/windows/winrun4j-launcher.jar", winrun4jJar); |
143 | | -
|
144 | | - // generates winrun4j properties pointing to main class |
145 | | - File propertiesFile = new File(getOutputFolder(), "winrun4j.properties"); |
146 | | - Properties properties = new Properties(); |
147 | | - properties.setProperty("main.class", mainClass); |
148 | | - properties.store(new FileOutputStream(propertiesFile), "WinRun4J Helper Launcher Properties"); |
149 | | -
|
150 | | - // copies winrun4j properties to launcher jar |
151 | | - JarUtils.addFileToJar(winrun4jJar, propertiesFile); |
152 | | - */ |
153 | | - |
154 | 134 | // generates ini file |
155 | 135 | File genericIni = new File(getOutputFolder(), "app.ini"); |
156 | 136 | VelocityUtils.render("windows/ini.vtl", genericIni, packager); |
|
0 commit comments