/** * Write manifest in the install jar. * * @throws IOException for any I/O error */ protected void writeManifest() throws IOException { // Add splash screen configuration List<String> lines = IOUtils.readLines(getClass().getResourceAsStream("MANIFEST.MF")); if (splashScreenImage != null) { String destination = String.format("META-INF/%s", splashScreenImage.getName()); mergeManager.addResourceToMerge(splashScreenImage.getAbsolutePath(), destination); lines.add(String.format("SplashScreen-Image: %s", destination)); } lines.add(""); File tempManifest = com.izforge.izpack.util.file.FileUtils.createTempFile("MANIFEST", ".MF"); FileUtils.writeLines(tempManifest, lines); mergeManager.addResourceToMerge(tempManifest.getAbsolutePath(), "META-INF/MANIFEST.MF"); }
/** Write manifest in the install jar. */ @Override public void writeManifest() throws IOException { IXMLElement data = resourceFinder.getXMLTree(); IXMLElement guiPrefsElement = data.getFirstChildNamed("guiprefs"); // Add splash screen configuration List<String> lines = IOUtils.readLines(getClass().getResourceAsStream("MANIFEST.MF")); IXMLElement splashNode = guiPrefsElement.getFirstChildNamed("splash"); if (splashNode != null) { // Add splash image to installer jar File splashImage = FileUtils.toFile( resourceFinder.findProjectResource(splashNode.getContent(), "Resource", splashNode)); String destination = String.format("META-INF/%s", splashImage.getName()); mergeManager.addResourceToMerge(splashImage.getAbsolutePath(), destination); lines.add(String.format("SplashScreen-Image: %s", destination)); } lines.add(""); File tempManifest = com.izforge.izpack.util.file.FileUtils.createTempFile("MANIFEST", ".MF"); FileUtils.writeLines(tempManifest, lines); mergeManager.addResourceToMerge(tempManifest.getAbsolutePath(), "META-INF/MANIFEST.MF"); }
/** * Write skeleton installer to primary jar. It is just an included jar, except that we copy the * META-INF as well. */ protected void writeSkeletonInstaller() throws IOException { sendMsg("Copying the skeleton installer", PackagerListener.MSG_VERBOSE); mergeManager.addResourceToMerge("com/izforge/izpack/installer/"); mergeManager.addResourceToMerge("org/picocontainer/"); mergeManager.addResourceToMerge("img/"); mergeManager.addResourceToMerge("bin/"); mergeManager.addResourceToMerge("com/izforge/izpack/api/"); mergeManager.addResourceToMerge("com/izforge/izpack/event/"); mergeManager.addResourceToMerge("com/izforge/izpack/core/"); mergeManager.addResourceToMerge("com/izforge/izpack/data/"); mergeManager.addResourceToMerge("com/izforge/izpack/gui/"); mergeManager.addResourceToMerge("com/izforge/izpack/merge/"); mergeManager.addResourceToMerge("com/izforge/izpack/util/"); mergeManager.addResourceToMerge("org/apache/regexp/"); mergeManager.addResourceToMerge("com/coi/tools/"); mergeManager.addResourceToMerge("org/apache/tools/zip/"); mergeManager.merge(primaryJarStream); }
public void addPanel(Panel panel) { sendMsg("Adding panel: " + panel.getPanelid() + " :: Classname : " + panel.getClassName()); panelList.add(panel); // serialized to keep order/variables correct PanelMerge mergeable = pathResolver.getPanelMerge(panel.getClassName()); mergeManager.addResourceToMerge(mergeable); }
public void addJarContent(URL jarURL) { sendMsg("Adding content of jar: " + jarURL.getFile(), PackagerListener.MSG_VERBOSE); mergeManager.addResourceToMerge(mergeableResolver.getMergeableFromURL(jarURL)); }