equal
deleted
inserted
replaced
156 |
156 |
157 |
157 |
158 // it is static for the sake of sharing with "installer" bundlers |
158 // it is static for the sake of sharing with "installer" bundlers |
159 // that may skip calls to validate/bundle in this class! |
159 // that may skip calls to validate/bundle in this class! |
160 public static File getRootDir(File outDir, Map<String, ? super Object> p) { |
160 public static File getRootDir(File outDir, Map<String, ? super Object> p) { |
161 return new File(outDir, APP_FS_NAME.fetchFrom(p)); |
161 return new File(outDir, APP_NAME.fetchFrom(p)); |
162 } |
162 } |
163 |
163 |
164 public static String getLauncherName(Map<String, ? super Object> p) { |
164 public static String getLauncherName(Map<String, ? super Object> p) { |
165 return APP_FS_NAME.fetchFrom(p); |
165 return APP_NAME.fetchFrom(p); |
166 } |
166 } |
167 |
167 |
168 public static String getLauncherCfgName(Map<String, ? super Object> p) { |
168 public static String getLauncherCfgName(Map<String, ? super Object> p) { |
169 return "app/" + APP_FS_NAME.fetchFrom(p) + ".cfg"; |
169 return "app/" + APP_NAME.fetchFrom(p) + ".cfg"; |
170 } |
170 } |
171 |
171 |
172 @Override |
172 @Override |
173 public Path getAppDir() { |
173 public Path getAppDir() { |
174 return appDir; |
174 return appDir; |
195 List<Map<String, ? super Object>> entryPoints |
195 List<Map<String, ? super Object>> entryPoints |
196 = StandardBundlerParam.SECONDARY_LAUNCHERS.fetchFrom(params); |
196 = StandardBundlerParam.SECONDARY_LAUNCHERS.fetchFrom(params); |
197 for (Map<String, ? super Object> entryPoint : entryPoints) { |
197 for (Map<String, ? super Object> entryPoint : entryPoints) { |
198 Map<String, ? super Object> tmp = new HashMap<>(originalParams); |
198 Map<String, ? super Object> tmp = new HashMap<>(originalParams); |
199 tmp.putAll(entryPoint); |
199 tmp.putAll(entryPoint); |
200 // remove name.fs that was calculated for main launcher. |
|
201 // otherwise, wrong launcher name will be selected. |
|
202 tmp.remove(APP_FS_NAME.getID()); |
|
203 createLauncherForEntryPoint(tmp, root); |
200 createLauncherForEntryPoint(tmp, root); |
204 } |
201 } |
205 |
202 |
206 // Copy class path entries to Java folder |
203 // Copy class path entries to Java folder |
207 copyApplication(); |
204 copyApplication(); |
231 |
228 |
232 private void copyIcon() throws IOException { |
229 private void copyIcon() throws IOException { |
233 File icon = ICON_PNG.fetchFrom(params); |
230 File icon = ICON_PNG.fetchFrom(params); |
234 if (icon != null) { |
231 if (icon != null) { |
235 File iconTarget = new File(resourcesDir.toFile(), |
232 File iconTarget = new File(resourcesDir.toFile(), |
236 APP_FS_NAME.fetchFrom(params) + ".png"); |
233 APP_NAME.fetchFrom(params) + ".png"); |
237 IOUtils.copyFile(icon, iconTarget); |
234 IOUtils.copyFile(icon, iconTarget); |
238 } |
235 } |
239 } |
236 } |
240 |
237 |
241 private void copyApplication() throws IOException { |
238 private void copyApplication() throws IOException { |