private void setInstall(List lines, LauncherData launcherData, File launcherFolder) { if (launcherData.getFwConfigLocation() == null || launcherData.getFwJar() == null) { ParserUtils.removeArgument(EquinoxConstants.OPTION_INSTALL, lines); return; } String launcherString = launcherFolder.getAbsolutePath().replace('\\', '/'); if (launcherString.endsWith(MAC_OS_APP_FOLDER)) { //We can do 3 calls to getParentFile without checking because launcherFolder = launcherFolder.getParentFile().getParentFile(); if (!launcherData.getOS().endsWith(MACOSX_BUNDLED)) launcherFolder = launcherFolder.getParentFile(); } if (!ParserUtils.fromOSGiJarToOSGiInstallArea(launcherData.getFwJar().getAbsolutePath()).equals(launcherFolder)) { ParserUtils.setValueForArgument(EquinoxConstants.OPTION_INSTALL, launcherFolder.getAbsolutePath().replace('\\', '/'), lines); } }
static File getLauncherConfigLocation(LauncherData launcherData) { File launcherIni = launcherData.getLauncherConfigLocation(); if (launcherIni != null) return launcherIni; File launcher = launcherData.getLauncher(); if (launcher == null) return null; String launcherName = launcher.getName(); int dotLocation = launcherName.lastIndexOf('.'); if (dotLocation != -1) launcherName = launcherName.substring(0, dotLocation); File launcherFolder = launcher.getParentFile(); if (org.eclipse.osgi.service.environment.Constants.OS_MACOSX.equals(launcherData.getOS())) { if (launcherData.getFwConfigLocation() != null) launcherFolder = launcherData.getFwConfigLocation().getParentFile(); else if (launcherData.getFwPersistentDataLocation() != null) launcherFolder = launcherData.getFwPersistentDataLocation().getParentFile(); else throw new IllegalStateException("Not able to determine launcher ini file from " + launcherData); //$NON-NLS-1$ } File result = new File(launcherFolder, launcherName + EquinoxConstants.INI_EXTENSION); return result; }
private void setInstall(List<String> lines, LauncherData launcherData, File launcherFolder) { if (launcherData.getFwConfigLocation() == null || launcherData.getFwJar() == null) { ParserUtils.removeArgument(EquinoxConstants.OPTION_INSTALL, lines); return; } if (Constants.OS_MACOSX.equals(launcherData.getOS())) { if (!new File(ParserUtils.fromOSGiJarToOSGiInstallArea(launcherData.getFwJar().getAbsolutePath()), "../MacOS").equals(launcherFolder)) { ParserUtils.setValueForArgument(EquinoxConstants.OPTION_INSTALL, launcherFolder.getAbsolutePath().replace('\\', '/'), lines); } } else if (!ParserUtils.fromOSGiJarToOSGiInstallArea(launcherData.getFwJar().getAbsolutePath()).equals(launcherFolder)) { ParserUtils.setValueForArgument(EquinoxConstants.OPTION_INSTALL, launcherFolder.getAbsolutePath().replace('\\', '/'), lines); } }
private void setConfigurationLocation(List<String> lines, URI osgiInstallArea, LauncherData data) { String result = FileUtils.toPath(URIUtil.makeRelative(data.getFwConfigLocation().toURI(), osgiInstallArea)); //We don't write the default if (CONFIGURATION_FOLDER.equals(result)) { if (ParserUtils.getValueForArgument(EquinoxConstants.OPTION_CONFIGURATION, lines) != null) ParserUtils.removeArgument(EquinoxConstants.OPTION_CONFIGURATION, lines); return; } if (ParserUtils.getValueForArgument(EquinoxConstants.OPTION_CONFIGURATION, lines) == null) { ParserUtils.setValueForArgument(EquinoxConstants.OPTION_CONFIGURATION, result.replace('\\', '/'), lines); } return; }
private void setConfigurationLocation(List lines, URI osgiInstallArea, LauncherData data) { String result = FileUtils.toPath(URIUtil.makeRelative(data.getFwConfigLocation().toURI(), osgiInstallArea)); //We don't write the default if (CONFIGURATION_FOLDER.equals(result)) { if (ParserUtils.getValueForArgument(EquinoxConstants.OPTION_CONFIGURATION, lines) != null) ParserUtils.removeArgument(EquinoxConstants.OPTION_CONFIGURATION, lines); return; } if (ParserUtils.getValueForArgument(EquinoxConstants.OPTION_CONFIGURATION, lines) == null) { ParserUtils.setValueForArgument(EquinoxConstants.OPTION_CONFIGURATION, result.replace('\\', '/'), lines); } return; }
File fwConfigLocation = launcherData.getFwConfigLocation(); File fwPersistentDataLocation = launcherData.getFwPersistentDataLocation();
File fwConfigLocation = launcherData.getFwConfigLocation(); File fwPersistentDataLocation = launcherData.getFwPersistentDataLocation();
File fwConfigLoc = manipulator.getLauncherData().getFwConfigLocation(); File baseDir = null; if (fwConfigLoc == null) {
File fwConfigLoc = manipulator.getLauncherData().getFwConfigLocation(); File baseDir = null; if (fwConfigLoc == null) {
File fwConfigLoc = manipulator.getLauncherData().getFwConfigLocation(); File baseDir = null; if (fwConfigLoc == null) {
launcherData.setFwJar(fwJar); File outputFile = launcherData.getFwConfigLocation(); if (outputFile.exists()) { if (outputFile.isFile()) { try { URI configArea = manipulator.getLauncherData().getFwConfigLocation().toURI(); writep2DataArea(configData, configProps, configArea); writeSimpleConfiguratorURL(configData, configProps, configArea);
launcherData.setFwJar(fwJar); File outputFile = launcherData.getFwConfigLocation(); if (outputFile.exists()) { if (outputFile.isFile()) { try { URI configArea = manipulator.getLauncherData().getFwConfigLocation().toURI(); writep2DataArea(configData, configProps, configArea); writeSimpleConfiguratorURL(configData, configProps, configArea);
public void setLauncherData(LauncherData value) { launcherData.initialize(); launcherData.setFwConfigLocation(value.getFwConfigLocation()); launcherData.setFwPersistentDataLocation(value.getFwPersistentDataLocation(), value.isClean()); launcherData.setJvm(value.getJvm()); launcherData.setJvmArgs(value.getJvmArgs()); launcherData.setOS(value.getOS()); if (launcherData.getFwName().equals(value.getFwName())) if (launcherData.getFwVersion().equals(value.getFwVersion())) { // TODO launcherData.getFwName()/getFwVersion()/ // getLauncherName()/getLauncherVersion() might be taken into consideration // for copying . launcherData.setFwJar(value.getFwJar()); launcherData.setHome(value.getHome()); launcherData.setLauncher(value.getLauncher()); launcherData.setLauncherConfigLocation(value.getLauncherConfigLocation()); } }
@Override public void setLauncherData(LauncherData value) { launcherData.initialize(); launcherData.setFwConfigLocation(value.getFwConfigLocation()); launcherData.setFwPersistentDataLocation(value.getFwPersistentDataLocation(), value.isClean()); launcherData.setJvm(value.getJvm()); launcherData.setJvmArgs(value.getJvmArgs()); launcherData.setOS(value.getOS()); if (launcherData.getFwName().equals(value.getFwName())) if (launcherData.getFwVersion().equals(value.getFwVersion())) { // TODO launcherData.getFwName()/getFwVersion()/ // getLauncherName()/getLauncherVersion() might be taken into consideration // for copying . launcherData.setFwJar(value.getFwJar()); launcherData.setHome(value.getHome()); launcherData.setLauncher(value.getLauncher()); launcherData.setLauncherConfigLocation(value.getLauncherConfigLocation()); } }