diff --git a/apisupport/apisupport.installer.maven/build.xml b/apisupport/apisupport.installer.maven/build.xml
deleted file mode 100644
index b65dc4c41fcd..000000000000
--- a/apisupport/apisupport.installer.maven/build.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
- Builds, tests, and runs the project org.netbeans.modules.apisupport.installer.maven
-
-
diff --git a/apisupport/apisupport.installer.maven/manifest.mf b/apisupport/apisupport.installer.maven/manifest.mf
deleted file mode 100644
index 2fe320acc11b..000000000000
--- a/apisupport/apisupport.installer.maven/manifest.mf
+++ /dev/null
@@ -1,6 +0,0 @@
-Manifest-Version: 1.0
-AutoUpdate-Show-In-Client: false
-OpenIDE-Module: org.netbeans.modules.apisupport.installer.maven
-OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/apisupport/installer/maven/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.50
-
diff --git a/apisupport/apisupport.installer.maven/nbproject/project.properties b/apisupport/apisupport.installer.maven/nbproject/project.properties
deleted file mode 100644
index 3b054ca8045d..000000000000
--- a/apisupport/apisupport.installer.maven/nbproject/project.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-is.eager=true
-javac.source=1.8
-javac.compilerargs=-Xlint -Xlint:-serial
diff --git a/apisupport/apisupport.installer.maven/nbproject/project.xml b/apisupport/apisupport.installer.maven/nbproject/project.xml
deleted file mode 100644
index 73bf722a1300..000000000000
--- a/apisupport/apisupport.installer.maven/nbproject/project.xml
+++ /dev/null
@@ -1,179 +0,0 @@
-
-
-
- org.netbeans.modules.apisupport.project
-
-
- org.netbeans.modules.apisupport.installer.maven
-
-
- org.apache.tools.ant.module
-
-
-
- 3
- 3.39
-
-
-
- org.netbeans.libs.nbi.ant
-
- 1.2
-
-
-
- org.netbeans.libs.nbi.engine
-
- 1.0
-
-
-
- org.netbeans.modules.apisupport.installer
-
-
-
- 1.2
-
-
-
- org.netbeans.modules.maven
-
-
-
- 2
- 2.0
-
-
-
- org.netbeans.modules.maven.embedder
-
-
-
- 2
- 2.54
-
-
-
- org.netbeans.modules.project.ant
-
-
-
- 1
- 1.62
-
-
-
- org.netbeans.modules.projectapi
-
-
-
- 1
- 1.29
-
-
-
- org.netbeans.modules.projectuiapi
-
-
-
- 1
- 1.78
-
-
-
- org.netbeans.modules.projectuiapi.base
-
-
-
- 1
- 1.78
-
-
-
- org.openide.awt
-
-
-
- 7.20
-
-
-
- org.openide.dialogs
-
-
-
- 7.14
-
-
-
- org.openide.execution
-
-
-
- 9.0
-
-
-
- org.openide.filesystems
-
-
-
- 9.0
-
-
-
- org.openide.modules
-
-
-
- 7.14
-
-
-
- org.openide.util
-
-
-
- 9.3
-
-
-
- org.openide.util.lookup
-
-
-
- 8.0
-
-
-
- org.openide.util.ui
-
-
-
- 9.3
-
-
-
-
-
-
-
diff --git a/apisupport/apisupport.installer.maven/src/org/netbeans/modules/apisupport/installer/maven/Bundle.properties b/apisupport/apisupport.installer.maven/src/org/netbeans/modules/apisupport/installer/maven/Bundle.properties
deleted file mode 100644
index 7bb86009f0a5..000000000000
--- a/apisupport/apisupport.installer.maven/src/org/netbeans/modules/apisupport/installer/maven/Bundle.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-OpenIDE-Module-Display-Category=Developing NetBeans
-OpenIDE-Module-Name=Legacy Maven NetBeans Platform Application Installer
-OpenIDE-Module-Short-Description=Module for creating installers for Maven NetBeans Platform-based applications (prior to 3.7 plugin).
-
-
diff --git a/apisupport/apisupport.installer.maven/src/org/netbeans/modules/apisupport/installer/maven/actions/BuildInstallersAction.java b/apisupport/apisupport.installer.maven/src/org/netbeans/modules/apisupport/installer/maven/actions/BuildInstallersAction.java
deleted file mode 100644
index f9562769ebbf..000000000000
--- a/apisupport/apisupport.installer.maven/src/org/netbeans/modules/apisupport/installer/maven/actions/BuildInstallersAction.java
+++ /dev/null
@@ -1,360 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.netbeans.modules.apisupport.installer.maven.actions;
-
-import java.awt.event.ActionEvent;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.nio.file.Files;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.Properties;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import java.util.prefs.Preferences;
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.JButton;
-import org.apache.maven.artifact.versioning.ComparableVersion;
-import org.apache.tools.ant.module.api.support.ActionUtils;
-import org.netbeans.api.project.Project;
-import org.netbeans.modules.apisupport.installer.ui.SuiteInstallerProjectProperties;
-import org.netbeans.modules.maven.api.NbMavenProject;
-import org.netbeans.modules.maven.api.PluginPropertyUtils;
-import org.netbeans.spi.project.support.ant.PropertyUtils;
-import org.openide.DialogDescriptor;
-import org.openide.DialogDisplayer;
-import org.openide.ErrorManager;
-import org.openide.NotifyDescriptor;
-import org.openide.awt.ActionID;
-import org.openide.awt.ActionReference;
-import org.openide.awt.ActionRegistration;
-import org.openide.awt.DynamicMenuContent;
-import org.openide.filesystems.FileObject;
-import org.openide.filesystems.FileStateInvalidException;
-import org.openide.filesystems.FileUtil;
-import org.openide.modules.InstalledFileLocator;
-import org.openide.util.ContextAwareAction;
-import org.openide.util.Lookup;
-import org.openide.util.NbBundle;
-import org.openide.util.RequestProcessor;
-import org.openide.util.Utilities;
-
-/**
- *
- * @author Dmitry Lipin
- */
-@ActionID(id = "org.netbeans.modules.apisupport.installer.maven.actions.BuildInstallersAction", category = "Project")
-@ActionRegistration(displayName = "#CTL_BuildInstallers", lazy=false)
-@ActionReference(position = 1290, path = "Projects/org-netbeans-modules-maven/Actions")
-public final class BuildInstallersAction extends AbstractAction implements ContextAwareAction {
-
- public BuildInstallersAction() {
- putValue(NAME, NbBundle.getMessage(BuildInstallersAction.class, "CTL_BuildInstallers"));
- }
-
- public
- @Override
- void actionPerformed(ActionEvent e) {
- assert false;
- }
-
- public
- @Override
- Action createContextAwareInstance(Lookup actionContext) {
- return new ContextBuildInstaller(actionContext);
- }
-
- static class ContextBuildInstaller extends AbstractAction {
-
- private final Lookup actionContext;
-
- public ContextBuildInstaller(Lookup actionContext) {
- this.actionContext = actionContext;
- putValue(NAME, NbBundle.getMessage(BuildInstallersAction.class, "CTL_BuildInstallers"));
- putValue(DynamicMenuContent.HIDE_WHEN_DISABLED, true);
- Project project = actionContext.lookup(Project.class);
- if (project == null) {
- setEnabled(false); //#224115
- } else {
- NbMavenProject watcher = project.getLookup().lookup(NbMavenProject.class);
- if (watcher == null
- || !NbMavenProject.TYPE_NBM_APPLICATION.equalsIgnoreCase(watcher.getPackagingType())) {
- setEnabled(false);
- } else {
- String version = PluginPropertyUtils.getPluginVersion(watcher.getMavenProject(), "org.codehaus.mojo", "nbm-maven-plugin");
- if (version == null || new ComparableVersion(version).compareTo(new ComparableVersion("3.7-SNAPSHOT")) >= 0) {
- setEnabled(false); // now handled by maven.apisupport
- }
- }
- }
- }
-
- @SuppressWarnings("RV_RETURN_VALUE_IGNORED_BAD_PRACTICE") // mkdirs
- public
- @Override
- void actionPerformed(ActionEvent e) {
- Project project = actionContext.lookup(Project.class);
- NbMavenProject watcher = project.getLookup().lookup(NbMavenProject.class);
- if (watcher != null && NbMavenProject.TYPE_NBM_APPLICATION.equalsIgnoreCase(watcher.getPackagingType())) {
-
- //Preferences prefs = SuiteInstallerProjectProperties.prefs(project);
- File suiteLocation = FileUtil.toFile(project.getProjectDirectory());
- //FileObject propertiesFile = project.getProjectDirectory().getFileObject(AntProjectHelper.PROJECT_PROPERTIES_PATH);
- String zipName = watcher.getMavenProject().getArtifactId()
- + "-"
- + watcher.getMavenProject().getVersion()
- + ".zip";
- File zipFile = new File(suiteLocation, "target/" + zipName);
- Logger.getLogger(BuildInstallersAction.class.getName()).log(
- Level.WARNING, "Running Build Installers action for (existing={1}) zip file {0}",
- new Object[]{zipFile, zipFile.exists()});
-
- Preferences prefs = SuiteInstallerProjectProperties.prefs(project);
-
-
-
-
- String appName = watcher.getMavenProject().getParent().getArtifactId();
-
- File appIconIcnsFile = null;
- String licenseType = prefs.get(SuiteInstallerProjectProperties.LICENSE_TYPE, null);
- File licenseFile = null;
- String licenseFileProp = prefs.get(SuiteInstallerProjectProperties.LICENSE_FILE, null);
- if (licenseFileProp != null) {
- licenseFile = PropertyUtils.resolveFile(suiteLocation, licenseFileProp);
- //if(!licenseFile.exists()) {
- // licenseFile = null;
- //}
- }
-
- //${harness.dir}/etc/applicationIcon.icns
- appIconIcnsFile = new File(InstalledFileLocator.getDefault().locate(
- "etc/applicationIcon.icns",
- "org.netbeans.modules.apisupport.harness", false).getAbsolutePath().replace("\\", "/"));
-
- if (licenseFile == null && licenseType != null && !licenseType.equals(SuiteInstallerProjectProperties.LICENSE_TYPE_NO)) {
- Logger.getLogger(BuildInstallersAction.class.getName()).log(Level.FINE, "License type defined to {0}", licenseType);
- String licenseResource = null;
- try {
- licenseResource = NbBundle.getMessage(SuiteInstallerProjectProperties.class,
- "SuiteInstallerProjectProperties.license.file." + licenseType);
- } catch (MissingResourceException ex) {
- Logger.getLogger(BuildInstallersAction.class.getName()).log(Level.WARNING, "License resource not found");
- }
-
- if (licenseResource != null) {
- InputStream is = null;
- try {
- URL url = new URL(licenseResource);
- is = url.openStream();
- if (is != null) {
- licenseFile = Files.createTempFile("license", ".txt").toFile();
- licenseFile.getParentFile().mkdirs();
- licenseFile.deleteOnExit();
-
- OutputStream os = new FileOutputStream(licenseFile);
- byte[] bytes = new byte[4096];
- int read = 0;
- while ((read = is.read(bytes)) > 0) {
- os.write(bytes, 0, read);
- }
- os.flush();
- os.close();
- } else {
- Logger.getLogger(BuildInstallersAction.class.getName()).log(
- Level.WARNING, "License resource {0} not found", licenseResource);
- }
- } catch (MalformedURLException ex) {
- Logger.getLogger(BuildInstallersAction.class.getName()).log(Level.WARNING,
- "Can`t parse URL", ex);
- } catch (IOException ex) {
- Logger.getLogger(BuildInstallersAction.class.getName()).log(Level.WARNING,
- "Input/Output error", ex);
- } finally {
- if (is != null) {
- try {
- is.close();
- } catch (IOException ex) {
- }
- }
- }
- }
- }
-
- //Logger.getLogger(BuildInstallersAction.class.getName()).warning("actionPerformed for " + suiteLocation);
- Properties props = new Properties();
- File parentProjectDir = watcher.getMavenProject().getParent().getBasedir();
- //Logger.getLogger(MavenBuildInstallersAction.class.getName()).warning("parent dir " + parentProjectDir);
- props.put("suite.location", parentProjectDir.getAbsolutePath().replace("\\", "/"));
- props.put("suite.dist.zip", zipFile.getAbsolutePath().replace("\\", "/"));
- props.put("suite.dist.directory", new File(suiteLocation, "target").getAbsolutePath().replace("\\", "/"));
- props.put("installer.build.dir", new File(suiteLocation, "target/installerbuild").getAbsolutePath().replace("\\", "/"));
- props.put("installers.file.prefix",
- watcher.getMavenProject().getArtifactId()
- + "-" + watcher.getMavenProject().getVersion());
-
- props.put("suite.nbi.product.uid",
- appName.replaceAll("[0-9]+", "").replace("_", "-").toLowerCase(Locale.ENGLISH));
-
-
- props.put("nbi.stub.location", InstalledFileLocator.getDefault().locate(
- "nbi/stub",
- "org.netbeans.libs.nbi.ant", false).getAbsolutePath().replace("\\", "/"));
- props.put(
- "nbi.stub.common.location", InstalledFileLocator.getDefault().locate(
- "nbi/.common",
- "org.netbeans.libs.nbi.ant", false).getAbsolutePath().replace("\\", "/"));
-
- props.put(
- "nbi.ant.tasks.jar", InstalledFileLocator.getDefault().locate(
- "modules/ext/nbi-ant-tasks.jar",
- "org.netbeans.libs.nbi.ant", false).getAbsolutePath().replace("\\", "/"));
- props.put(
- "nbi.registries.management.jar", InstalledFileLocator.getDefault().locate(
- "modules/ext/nbi-registries-management.jar",
- "org.netbeans.libs.nbi.ant", false).getAbsolutePath().replace("\\", "/"));
- props.put(
- "nbi.engine.jar", InstalledFileLocator.getDefault().locate(
- "modules/ext/nbi-engine.jar",
- "org.netbeans.libs.nbi.engine", false).getAbsolutePath().replace("\\", "/"));
- if (licenseFile != null) {
- Logger.getLogger(BuildInstallersAction.class.getName()).log(Level.FINE,
- "License file is at {0}, exist = {1}", new Object[]{licenseFile, licenseFile.exists()});
- props.put(
- "nbi.license.file", licenseFile.getAbsolutePath());
- }
-
- List platforms = new ArrayList();
-
- boolean installerConfDefined = false;
- for (String k : new String[]{
- SuiteInstallerProjectProperties.GENERATE_FOR_WINDOWS,
- SuiteInstallerProjectProperties.GENERATE_FOR_LINUX,
- SuiteInstallerProjectProperties.GENERATE_FOR_SOLARIS,
- SuiteInstallerProjectProperties.GENERATE_FOR_MAC
- }) {
- if (prefs.getBoolean(k, false)) {
- installerConfDefined = true;
- platforms.add(k.replaceFirst("^os-", ""));
- }
- }
- if (!installerConfDefined) {
- if (Utilities.isWindows()) {
- platforms.add("windows");
- } else if (Utilities.getOperatingSystem() == Utilities.OS_LINUX) {
- platforms.add("linux");
- } else if (Utilities.getOperatingSystem() == Utilities.OS_SOLARIS) {
- platforms.add("solaris");
- } else if (Utilities.isMac()) {
- platforms.add("macosx");
- }
- }
- StringBuilder sb = new StringBuilder();
- for (int i = 0; i < platforms.size(); i++) {
- if (i != 0) {
- sb.append(" ");
- }
- sb.append(platforms.get(i));
- }
- if (sb.length() == 0) {
- //nothing to build
- RequestProcessor.getDefault().post(new Runnable() {
-
- public
- @Override
- void run() {
- DialogDescriptor d = new DialogDescriptor(
- NbBundle.getMessage(BuildInstallersAction.class, "BuildInstallersAction.NotConfigured.Warning.Message"),
- NbBundle.getMessage(BuildInstallersAction.class, "BuildInstallersAction.NotConfigured.Warning.Title"));
- d.setModal(true);
- JButton accept = new JButton(NbBundle.getMessage(BuildInstallersAction.class, "BuildInstallersAction.NotConfigured.Warning.OK"));
- accept.setDefaultCapable(true);
- d.setOptions(new Object[]{
- accept});
- d.setMessageType(NotifyDescriptor.WARNING_MESSAGE);
- if (DialogDisplayer.getDefault().notify(d).equals(accept)) {
- //SuiteCustomizer cpi = prj.getLookup().lookup(org.netbeans.modules.apisupport.project.ui.customizer.SuiteCustomizer.class);
- //cpi.showCustomizer(SuiteCustomizer.APPLICATION, SuiteCustomizer.APPLICATION_CREATE_STANDALONE_APPLICATION);
- }
- }
- });
- return;
- }
-
- props.put("generate.installer.for.platforms",
- sb.toString());
-
-
-
- File javaHome = new File(System.getProperty("java.home"));
- if (new File(javaHome,
- "lib/rt.jar").exists() && javaHome.getName().equals("jre")) {
- javaHome = javaHome.getParentFile();
- }
- props.put(
- "generator-jdk-location-forward-slashes", javaHome.getAbsolutePath().replace("\\", "/"));
- /*
- props.put(
- "generated-installers-location-forward-slashes",
- new File(suiteLocation, "dist").getAbsolutePath().replace("\\", "/"));
- */
-
- /*
- if(appIcon!=null) {
- File appIconFile = new File(appIcon);
- if(!appIconFile.equals(appIconFile.getAbsoluteFile())) {
- //path is relative to suite directory
- appIconFile = new File(suiteLocation, appIcon);
- }
- props.put(
- "nbi.icon.file", appIconFile.getAbsolutePath());
-
- }
- */
-
- if (appIconIcnsFile != null) {
- props.put(
- "nbi.dock.icon.file", appIconIcnsFile.getAbsolutePath());
- }
-
- try {
- ActionUtils.runTarget(findGenXml(), new String[]{"build"}, props);
- } catch (FileStateInvalidException ex) {
- ErrorManager.getDefault().getInstance("org.netbeans.modules.apisupport.project").notify(ex); // NOI18N
- } catch (IOException ex) {
- ErrorManager.getDefault().getInstance("org.netbeans.modules.apisupport.project").notify(ex); // NOI18N
- }
- }
- }
-
- private static FileObject findGenXml() {
- return FileUtil.toFileObject(InstalledFileLocator.getDefault().locate(
- "nbi/stub/template.xml",
- "org.netbeans.libs.nbi.ant", false));
- }
- }
-}
diff --git a/apisupport/apisupport.installer.maven/src/org/netbeans/modules/apisupport/installer/maven/actions/Bundle.properties b/apisupport/apisupport.installer.maven/src/org/netbeans/modules/apisupport/installer/maven/actions/Bundle.properties
deleted file mode 100644
index e4699d7e7fd1..000000000000
--- a/apisupport/apisupport.installer.maven/src/org/netbeans/modules/apisupport/installer/maven/actions/Bundle.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-CTL_BuildInstallers=Build Installers
-BuildInstallersAction.NotApp.Warning.Message=\
- In order to create installers this project should be switched to standalone application.\n\
- Open project properties, switch to Application panel and set type to Standalone Application.
-BuildInstallersAction.NotApp.Warning.Title=Warning
-BuildInstallersAction.NotApp.Warning.OK=OK
-
-BuildInstallersAction.NotConfigured.Warning.Message=\
- In order to create installers please select at least one target platform.\n\
- Open project properties, switch to Installer panel and configure installer settings.
-BuildInstallersAction.NotConfigured.Warning.Title=Warning
-BuildInstallersAction.NotConfigured.Warning.OK=OK
\ No newline at end of file
diff --git a/apisupport/apisupport.installer.maven/src/org/netbeans/modules/apisupport/installer/maven/ui/ExtraPanel.java b/apisupport/apisupport.installer.maven/src/org/netbeans/modules/apisupport/installer/maven/ui/ExtraPanel.java
deleted file mode 100644
index bd46d9179cec..000000000000
--- a/apisupport/apisupport.installer.maven/src/org/netbeans/modules/apisupport/installer/maven/ui/ExtraPanel.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.netbeans.modules.apisupport.installer.maven.ui;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.io.IOException;
-import javax.swing.JComponent;
-import org.apache.maven.artifact.versioning.ComparableVersion;
-import org.netbeans.api.project.Project;
-import static org.netbeans.modules.apisupport.installer.maven.ui.Bundle.*;
-import org.netbeans.modules.apisupport.installer.ui.InstallerPanel;
-import org.netbeans.modules.apisupport.installer.ui.SuiteInstallerProjectProperties;
-import org.netbeans.modules.maven.api.NbMavenProject;
-import org.netbeans.modules.maven.api.PluginPropertyUtils;
-import org.netbeans.spi.project.ui.support.ProjectCustomizer;
-import org.netbeans.spi.project.ui.support.ProjectCustomizer.Category;
-import org.openide.util.Exceptions;
-import org.openide.util.Lookup;
-import org.openide.util.NbBundle.Messages;
-
-/**
- *
- * @author Dmitry Lipin
- */
-
-@ProjectCustomizer.CompositeCategoryProvider.Registration(
- projectType="org-netbeans-modules-maven",
- position=1100
-)
-public class ExtraPanel implements ProjectCustomizer.CompositeCategoryProvider {
-
- @Messages("LBL_InstallerPanel=Installer")
- @Override
- public Category createCategory(Lookup context) {
- Project project = context.lookup(Project.class);
- NbMavenProject watcher = project.getLookup().lookup(NbMavenProject.class);
- if (watcher!=null &&
- NbMavenProject.TYPE_NBM_APPLICATION.equalsIgnoreCase(watcher.getPackagingType())) {
- String version = PluginPropertyUtils.getPluginVersion(watcher.getMavenProject(), "org.codehaus.mojo", "nbm-maven-plugin");
- if (version == null || new ComparableVersion(version).compareTo(new ComparableVersion("3.7-SNAPSHOT")) >= 0) {
- return null; // now handled by maven.apisupport
- }
- return ProjectCustomizer.Category.create(
- "Installer",
- LBL_InstallerPanel(),
- null,
- (ProjectCustomizer.Category[])null);
- }
- return null;
- }
-
- @Messages("LBL_deprecated=Using deprecated Ant-based installer creator. Upgrade to 3.7+ plugin to fix.")
- public @Override JComponent createComponent(Category category, Lookup context) {
- Project project = context.lookup(Project.class);
- SuiteInstallerProjectProperties installerProjectProperties =
- new SuiteInstallerProjectProperties(project);
- // use OkListener to create new configuration first
- category.setStoreListener(new SavePropsListener(installerProjectProperties));
- category.setErrorMessage(LBL_deprecated());
- return new InstallerPanel(installerProjectProperties);
- }
-
- private static class SavePropsListener implements ActionListener {
-
- private SuiteInstallerProjectProperties installerProps;
-
- public SavePropsListener(SuiteInstallerProjectProperties props) {
- installerProps = props;
- }
-
- public @Override void actionPerformed(ActionEvent e) {
- try {
- installerProps.store();
- } catch (IOException ioe) {
- Exceptions.printStackTrace(ioe);
- }
- }
-}
-}
-
diff --git a/apisupport/apisupport.installer/build.xml b/apisupport/apisupport.installer/build.xml
deleted file mode 100644
index e9a7ac868432..000000000000
--- a/apisupport/apisupport.installer/build.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
diff --git a/apisupport/apisupport.installer/manifest.mf b/apisupport/apisupport.installer/manifest.mf
deleted file mode 100644
index 4d3e10fdea9d..000000000000
--- a/apisupport/apisupport.installer/manifest.mf
+++ /dev/null
@@ -1,6 +0,0 @@
-Manifest-Version: 1.0
-AutoUpdate-Show-In-Client: false
-OpenIDE-Module: org.netbeans.modules.apisupport.installer
-OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/apisupport/installer/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.51
-
diff --git a/apisupport/apisupport.installer/nbproject/org-netbeans-modules-apisupport-installer.sig b/apisupport/apisupport.installer/nbproject/org-netbeans-modules-apisupport-installer.sig
deleted file mode 100644
index 8ed2081accff..000000000000
--- a/apisupport/apisupport.installer/nbproject/org-netbeans-modules-apisupport-installer.sig
+++ /dev/null
@@ -1,649 +0,0 @@
-#Signature file v4.1
-#Version 1.50
-
-CLSS public abstract java.awt.Component
-cons protected init()
-fld protected javax.accessibility.AccessibleContext accessibleContext
-fld public final static float BOTTOM_ALIGNMENT = 1.0
-fld public final static float CENTER_ALIGNMENT = 0.5
-fld public final static float LEFT_ALIGNMENT = 0.0
-fld public final static float RIGHT_ALIGNMENT = 1.0
-fld public final static float TOP_ALIGNMENT = 0.0
-innr protected BltBufferStrategy
-innr protected FlipBufferStrategy
-innr protected abstract AccessibleAWTComponent
-innr public final static !enum BaselineResizeBehavior
-intf java.awt.MenuContainer
-intf java.awt.image.ImageObserver
-intf java.io.Serializable
-meth protected boolean requestFocus(boolean)
-meth protected boolean requestFocusInWindow(boolean)
-meth protected final void disableEvents(long)
-meth protected final void enableEvents(long)
-meth protected java.awt.AWTEvent coalesceEvents(java.awt.AWTEvent,java.awt.AWTEvent)
-meth protected java.lang.String paramString()
-meth protected void firePropertyChange(java.lang.String,boolean,boolean)
-meth protected void firePropertyChange(java.lang.String,int,int)
-meth protected void firePropertyChange(java.lang.String,java.lang.Object,java.lang.Object)
-meth protected void processComponentEvent(java.awt.event.ComponentEvent)
-meth protected void processEvent(java.awt.AWTEvent)
-meth protected void processFocusEvent(java.awt.event.FocusEvent)
-meth protected void processHierarchyBoundsEvent(java.awt.event.HierarchyEvent)
-meth protected void processHierarchyEvent(java.awt.event.HierarchyEvent)
-meth protected void processInputMethodEvent(java.awt.event.InputMethodEvent)
-meth protected void processKeyEvent(java.awt.event.KeyEvent)
-meth protected void processMouseEvent(java.awt.event.MouseEvent)
-meth protected void processMouseMotionEvent(java.awt.event.MouseEvent)
-meth protected void processMouseWheelEvent(java.awt.event.MouseWheelEvent)
-meth public <%0 extends java.util.EventListener> {%%0}[] getListeners(java.lang.Class<{%%0}>)
-meth public boolean action(java.awt.Event,java.lang.Object)
- anno 0 java.lang.Deprecated()
-meth public boolean areFocusTraversalKeysSet(int)
-meth public boolean contains(int,int)
-meth public boolean contains(java.awt.Point)
-meth public boolean getFocusTraversalKeysEnabled()
-meth public boolean getIgnoreRepaint()
-meth public boolean gotFocus(java.awt.Event,java.lang.Object)
- anno 0 java.lang.Deprecated()
-meth public boolean handleEvent(java.awt.Event)
- anno 0 java.lang.Deprecated()
-meth public boolean hasFocus()
-meth public boolean imageUpdate(java.awt.Image,int,int,int,int,int)
-meth public boolean inside(int,int)
- anno 0 java.lang.Deprecated()
-meth public boolean isBackgroundSet()
-meth public boolean isCursorSet()
-meth public boolean isDisplayable()
-meth public boolean isDoubleBuffered()
-meth public boolean isEnabled()
-meth public boolean isFocusCycleRoot(java.awt.Container)
-meth public boolean isFocusOwner()
-meth public boolean isFocusTraversable()
- anno 0 java.lang.Deprecated()
-meth public boolean isFocusable()
-meth public boolean isFontSet()
-meth public boolean isForegroundSet()
-meth public boolean isLightweight()
-meth public boolean isMaximumSizeSet()
-meth public boolean isMinimumSizeSet()
-meth public boolean isOpaque()
-meth public boolean isPreferredSizeSet()
-meth public boolean isShowing()
-meth public boolean isValid()
-meth public boolean isVisible()
-meth public boolean keyDown(java.awt.Event,int)
- anno 0 java.lang.Deprecated()
-meth public boolean keyUp(java.awt.Event,int)
- anno 0 java.lang.Deprecated()
-meth public boolean lostFocus(java.awt.Event,java.lang.Object)
- anno 0 java.lang.Deprecated()
-meth public boolean mouseDown(java.awt.Event,int,int)
- anno 0 java.lang.Deprecated()
-meth public boolean mouseDrag(java.awt.Event,int,int)
- anno 0 java.lang.Deprecated()
-meth public boolean mouseEnter(java.awt.Event,int,int)
- anno 0 java.lang.Deprecated()
-meth public boolean mouseExit(java.awt.Event,int,int)
- anno 0 java.lang.Deprecated()
-meth public boolean mouseMove(java.awt.Event,int,int)
- anno 0 java.lang.Deprecated()
-meth public boolean mouseUp(java.awt.Event,int,int)
- anno 0 java.lang.Deprecated()
-meth public boolean postEvent(java.awt.Event)
- anno 0 java.lang.Deprecated()
-meth public boolean prepareImage(java.awt.Image,int,int,java.awt.image.ImageObserver)
-meth public boolean prepareImage(java.awt.Image,java.awt.image.ImageObserver)
-meth public boolean requestFocusInWindow()
-meth public final java.lang.Object getTreeLock()
-meth public final void dispatchEvent(java.awt.AWTEvent)
-meth public float getAlignmentX()
-meth public float getAlignmentY()
-meth public int checkImage(java.awt.Image,int,int,java.awt.image.ImageObserver)
-meth public int checkImage(java.awt.Image,java.awt.image.ImageObserver)
-meth public int getBaseline(int,int)
-meth public int getHeight()
-meth public int getWidth()
-meth public int getX()
-meth public int getY()
-meth public java.awt.Color getBackground()
-meth public java.awt.Color getForeground()
-meth public java.awt.Component getComponentAt(int,int)
-meth public java.awt.Component getComponentAt(java.awt.Point)
-meth public java.awt.Component locate(int,int)
- anno 0 java.lang.Deprecated()
-meth public java.awt.Component$BaselineResizeBehavior getBaselineResizeBehavior()
-meth public java.awt.ComponentOrientation getComponentOrientation()
-meth public java.awt.Container getFocusCycleRootAncestor()
-meth public java.awt.Container getParent()
-meth public java.awt.Cursor getCursor()
-meth public java.awt.Dimension getMaximumSize()
-meth public java.awt.Dimension getMinimumSize()
-meth public java.awt.Dimension getPreferredSize()
-meth public java.awt.Dimension getSize()
-meth public java.awt.Dimension getSize(java.awt.Dimension)
-meth public java.awt.Dimension minimumSize()
- anno 0 java.lang.Deprecated()
-meth public java.awt.Dimension preferredSize()
- anno 0 java.lang.Deprecated()
-meth public java.awt.Dimension size()
- anno 0 java.lang.Deprecated()
-meth public java.awt.Font getFont()
-meth public java.awt.FontMetrics getFontMetrics(java.awt.Font)
-meth public java.awt.Graphics getGraphics()
-meth public java.awt.GraphicsConfiguration getGraphicsConfiguration()
-meth public java.awt.Image createImage(int,int)
-meth public java.awt.Image createImage(java.awt.image.ImageProducer)
-meth public java.awt.Point getLocation()
-meth public java.awt.Point getLocation(java.awt.Point)
-meth public java.awt.Point getLocationOnScreen()
-meth public java.awt.Point getMousePosition()
-meth public java.awt.Point location()
- anno 0 java.lang.Deprecated()
-meth public java.awt.Rectangle bounds()
- anno 0 java.lang.Deprecated()
-meth public java.awt.Rectangle getBounds()
-meth public java.awt.Rectangle getBounds(java.awt.Rectangle)
-meth public java.awt.Toolkit getToolkit()
-meth public java.awt.dnd.DropTarget getDropTarget()
-meth public java.awt.event.ComponentListener[] getComponentListeners()
-meth public java.awt.event.FocusListener[] getFocusListeners()
-meth public java.awt.event.HierarchyBoundsListener[] getHierarchyBoundsListeners()
-meth public java.awt.event.HierarchyListener[] getHierarchyListeners()
-meth public java.awt.event.InputMethodListener[] getInputMethodListeners()
-meth public java.awt.event.KeyListener[] getKeyListeners()
-meth public java.awt.event.MouseListener[] getMouseListeners()
-meth public java.awt.event.MouseMotionListener[] getMouseMotionListeners()
-meth public java.awt.event.MouseWheelListener[] getMouseWheelListeners()
-meth public java.awt.im.InputContext getInputContext()
-meth public java.awt.im.InputMethodRequests getInputMethodRequests()
-meth public java.awt.image.ColorModel getColorModel()
-meth public java.awt.image.VolatileImage createVolatileImage(int,int)
-meth public java.awt.image.VolatileImage createVolatileImage(int,int,java.awt.ImageCapabilities) throws java.awt.AWTException
-meth public java.beans.PropertyChangeListener[] getPropertyChangeListeners()
-meth public java.beans.PropertyChangeListener[] getPropertyChangeListeners(java.lang.String)
-meth public java.lang.String getName()
-meth public java.lang.String toString()
-meth public java.util.Locale getLocale()
-meth public java.util.Set getFocusTraversalKeys(int)
-meth public javax.accessibility.AccessibleContext getAccessibleContext()
-meth public void add(java.awt.PopupMenu)
-meth public void addComponentListener(java.awt.event.ComponentListener)
-meth public void addFocusListener(java.awt.event.FocusListener)
-meth public void addHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener)
-meth public void addHierarchyListener(java.awt.event.HierarchyListener)
-meth public void addInputMethodListener(java.awt.event.InputMethodListener)
-meth public void addKeyListener(java.awt.event.KeyListener)
-meth public void addMouseListener(java.awt.event.MouseListener)
-meth public void addMouseMotionListener(java.awt.event.MouseMotionListener)
-meth public void addMouseWheelListener(java.awt.event.MouseWheelListener)
-meth public void addNotify()
-meth public void addPropertyChangeListener(java.beans.PropertyChangeListener)
-meth public void addPropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener)
-meth public void applyComponentOrientation(java.awt.ComponentOrientation)
-meth public void deliverEvent(java.awt.Event)
- anno 0 java.lang.Deprecated()
-meth public void disable()
- anno 0 java.lang.Deprecated()
-meth public void doLayout()
-meth public void enable()
- anno 0 java.lang.Deprecated()
-meth public void enable(boolean)
- anno 0 java.lang.Deprecated()
-meth public void enableInputMethods(boolean)
-meth public void firePropertyChange(java.lang.String,byte,byte)
-meth public void firePropertyChange(java.lang.String,char,char)
-meth public void firePropertyChange(java.lang.String,double,double)
-meth public void firePropertyChange(java.lang.String,float,float)
-meth public void firePropertyChange(java.lang.String,long,long)
-meth public void firePropertyChange(java.lang.String,short,short)
-meth public void hide()
- anno 0 java.lang.Deprecated()
-meth public void invalidate()
-meth public void layout()
- anno 0 java.lang.Deprecated()
-meth public void list()
-meth public void list(java.io.PrintStream)
-meth public void list(java.io.PrintStream,int)
-meth public void list(java.io.PrintWriter)
-meth public void list(java.io.PrintWriter,int)
-meth public void move(int,int)
- anno 0 java.lang.Deprecated()
-meth public void nextFocus()
- anno 0 java.lang.Deprecated()
-meth public void paint(java.awt.Graphics)
-meth public void paintAll(java.awt.Graphics)
-meth public void print(java.awt.Graphics)
-meth public void printAll(java.awt.Graphics)
-meth public void remove(java.awt.MenuComponent)
-meth public void removeComponentListener(java.awt.event.ComponentListener)
-meth public void removeFocusListener(java.awt.event.FocusListener)
-meth public void removeHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener)
-meth public void removeHierarchyListener(java.awt.event.HierarchyListener)
-meth public void removeInputMethodListener(java.awt.event.InputMethodListener)
-meth public void removeKeyListener(java.awt.event.KeyListener)
-meth public void removeMouseListener(java.awt.event.MouseListener)
-meth public void removeMouseMotionListener(java.awt.event.MouseMotionListener)
-meth public void removeMouseWheelListener(java.awt.event.MouseWheelListener)
-meth public void removeNotify()
-meth public void removePropertyChangeListener(java.beans.PropertyChangeListener)
-meth public void removePropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener)
-meth public void repaint()
-meth public void repaint(int,int,int,int)
-meth public void repaint(long)
-meth public void repaint(long,int,int,int,int)
-meth public void requestFocus()
-meth public void reshape(int,int,int,int)
- anno 0 java.lang.Deprecated()
-meth public void resize(int,int)
- anno 0 java.lang.Deprecated()
-meth public void resize(java.awt.Dimension)
- anno 0 java.lang.Deprecated()
-meth public void revalidate()
-meth public void setBackground(java.awt.Color)
-meth public void setBounds(int,int,int,int)
-meth public void setBounds(java.awt.Rectangle)
-meth public void setComponentOrientation(java.awt.ComponentOrientation)
-meth public void setCursor(java.awt.Cursor)
-meth public void setDropTarget(java.awt.dnd.DropTarget)
-meth public void setEnabled(boolean)
-meth public void setFocusTraversalKeys(int,java.util.Set extends java.awt.AWTKeyStroke>)
-meth public void setFocusTraversalKeysEnabled(boolean)
-meth public void setFocusable(boolean)
-meth public void setFont(java.awt.Font)
-meth public void setForeground(java.awt.Color)
-meth public void setIgnoreRepaint(boolean)
-meth public void setLocale(java.util.Locale)
-meth public void setLocation(int,int)
-meth public void setLocation(java.awt.Point)
-meth public void setMaximumSize(java.awt.Dimension)
-meth public void setMinimumSize(java.awt.Dimension)
-meth public void setName(java.lang.String)
-meth public void setPreferredSize(java.awt.Dimension)
-meth public void setSize(int,int)
-meth public void setSize(java.awt.Dimension)
-meth public void setVisible(boolean)
-meth public void show()
- anno 0 java.lang.Deprecated()
-meth public void show(boolean)
- anno 0 java.lang.Deprecated()
-meth public void transferFocus()
-meth public void transferFocusBackward()
-meth public void transferFocusUpCycle()
-meth public void update(java.awt.Graphics)
-meth public void validate()
-supr java.lang.Object
-
-CLSS public java.awt.Container
-cons public init()
-innr protected AccessibleAWTContainer
-meth protected java.lang.String paramString()
-meth protected void addImpl(java.awt.Component,java.lang.Object,int)
-meth protected void processContainerEvent(java.awt.event.ContainerEvent)
-meth protected void processEvent(java.awt.AWTEvent)
-meth protected void validateTree()
-meth public <%0 extends java.util.EventListener> {%%0}[] getListeners(java.lang.Class<{%%0}>)
-meth public boolean areFocusTraversalKeysSet(int)
-meth public boolean isAncestorOf(java.awt.Component)
-meth public boolean isFocusCycleRoot()
-meth public boolean isFocusCycleRoot(java.awt.Container)
-meth public boolean isFocusTraversalPolicySet()
-meth public boolean isValidateRoot()
-meth public final boolean isFocusTraversalPolicyProvider()
-meth public final void setFocusTraversalPolicyProvider(boolean)
-meth public float getAlignmentX()
-meth public float getAlignmentY()
-meth public int countComponents()
- anno 0 java.lang.Deprecated()
-meth public int getComponentCount()
-meth public int getComponentZOrder(java.awt.Component)
-meth public java.awt.Component add(java.awt.Component)
-meth public java.awt.Component add(java.awt.Component,int)
-meth public java.awt.Component add(java.lang.String,java.awt.Component)
-meth public java.awt.Component findComponentAt(int,int)
-meth public java.awt.Component findComponentAt(java.awt.Point)
-meth public java.awt.Component getComponent(int)
-meth public java.awt.Component getComponentAt(int,int)
-meth public java.awt.Component getComponentAt(java.awt.Point)
-meth public java.awt.Component locate(int,int)
- anno 0 java.lang.Deprecated()
-meth public java.awt.Component[] getComponents()
-meth public java.awt.Dimension getMaximumSize()
-meth public java.awt.Dimension getMinimumSize()
-meth public java.awt.Dimension getPreferredSize()
-meth public java.awt.Dimension minimumSize()
- anno 0 java.lang.Deprecated()
-meth public java.awt.Dimension preferredSize()
- anno 0 java.lang.Deprecated()
-meth public java.awt.FocusTraversalPolicy getFocusTraversalPolicy()
-meth public java.awt.Insets getInsets()
-meth public java.awt.Insets insets()
- anno 0 java.lang.Deprecated()
-meth public java.awt.LayoutManager getLayout()
-meth public java.awt.Point getMousePosition(boolean)
-meth public java.awt.event.ContainerListener[] getContainerListeners()
-meth public java.util.Set getFocusTraversalKeys(int)
-meth public void add(java.awt.Component,java.lang.Object)
-meth public void add(java.awt.Component,java.lang.Object,int)
-meth public void addContainerListener(java.awt.event.ContainerListener)
-meth public void addNotify()
-meth public void addPropertyChangeListener(java.beans.PropertyChangeListener)
-meth public void addPropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener)
-meth public void applyComponentOrientation(java.awt.ComponentOrientation)
-meth public void deliverEvent(java.awt.Event)
- anno 0 java.lang.Deprecated()
-meth public void doLayout()
-meth public void invalidate()
-meth public void layout()
- anno 0 java.lang.Deprecated()
-meth public void list(java.io.PrintStream,int)
-meth public void list(java.io.PrintWriter,int)
-meth public void paint(java.awt.Graphics)
-meth public void paintComponents(java.awt.Graphics)
-meth public void print(java.awt.Graphics)
-meth public void printComponents(java.awt.Graphics)
-meth public void remove(int)
-meth public void remove(java.awt.Component)
-meth public void removeAll()
-meth public void removeContainerListener(java.awt.event.ContainerListener)
-meth public void removeNotify()
-meth public void setComponentZOrder(java.awt.Component,int)
-meth public void setFocusCycleRoot(boolean)
-meth public void setFocusTraversalKeys(int,java.util.Set extends java.awt.AWTKeyStroke>)
-meth public void setFocusTraversalPolicy(java.awt.FocusTraversalPolicy)
-meth public void setFont(java.awt.Font)
-meth public void setLayout(java.awt.LayoutManager)
-meth public void transferFocusDownCycle()
-meth public void update(java.awt.Graphics)
-meth public void validate()
-supr java.awt.Component
-
-CLSS public abstract interface java.awt.MenuContainer
-meth public abstract boolean postEvent(java.awt.Event)
- anno 0 java.lang.Deprecated()
-meth public abstract java.awt.Font getFont()
-meth public abstract void remove(java.awt.MenuComponent)
-
-CLSS public abstract interface java.awt.image.ImageObserver
-fld public final static int ABORT = 128
-fld public final static int ALLBITS = 32
-fld public final static int ERROR = 64
-fld public final static int FRAMEBITS = 16
-fld public final static int HEIGHT = 2
-fld public final static int PROPERTIES = 4
-fld public final static int SOMEBITS = 8
-fld public final static int WIDTH = 1
-meth public abstract boolean imageUpdate(java.awt.Image,int,int,int,int,int)
-
-CLSS public abstract interface java.io.Serializable
-
-CLSS public java.lang.Object
-cons public init()
-meth protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
-meth protected void finalize() throws java.lang.Throwable
-meth public boolean equals(java.lang.Object)
-meth public final java.lang.Class> getClass()
-meth public final void notify()
-meth public final void notifyAll()
-meth public final void wait() throws java.lang.InterruptedException
-meth public final void wait(long) throws java.lang.InterruptedException
-meth public final void wait(long,int) throws java.lang.InterruptedException
-meth public int hashCode()
-meth public java.lang.String toString()
-
-CLSS public abstract interface javax.accessibility.Accessible
-meth public abstract javax.accessibility.AccessibleContext getAccessibleContext()
-
-CLSS public abstract interface javax.swing.ComboBoxModel<%0 extends java.lang.Object>
-intf javax.swing.ListModel<{javax.swing.ComboBoxModel%0}>
-meth public abstract java.lang.Object getSelectedItem()
-meth public abstract void setSelectedItem(java.lang.Object)
-
-CLSS public abstract javax.swing.JComponent
-cons public init()
-fld protected javax.swing.event.EventListenerList listenerList
-fld protected javax.swing.plaf.ComponentUI ui
-fld public final static int UNDEFINED_CONDITION = -1
-fld public final static int WHEN_ANCESTOR_OF_FOCUSED_COMPONENT = 1
-fld public final static int WHEN_FOCUSED = 0
-fld public final static int WHEN_IN_FOCUSED_WINDOW = 2
-fld public final static java.lang.String TOOL_TIP_TEXT_KEY = "ToolTipText"
-innr public abstract AccessibleJComponent
-intf java.io.Serializable
-meth protected boolean isPaintingOrigin()
-meth protected boolean processKeyBinding(javax.swing.KeyStroke,java.awt.event.KeyEvent,int,boolean)
-meth protected boolean requestFocusInWindow(boolean)
-meth protected java.awt.Graphics getComponentGraphics(java.awt.Graphics)
-meth protected java.lang.String paramString()
-meth protected void fireVetoableChange(java.lang.String,java.lang.Object,java.lang.Object) throws java.beans.PropertyVetoException
-meth protected void paintBorder(java.awt.Graphics)
-meth protected void paintChildren(java.awt.Graphics)
-meth protected void paintComponent(java.awt.Graphics)
-meth protected void printBorder(java.awt.Graphics)
-meth protected void printChildren(java.awt.Graphics)
-meth protected void printComponent(java.awt.Graphics)
-meth protected void processComponentKeyEvent(java.awt.event.KeyEvent)
-meth protected void processKeyEvent(java.awt.event.KeyEvent)
-meth protected void processMouseEvent(java.awt.event.MouseEvent)
-meth protected void processMouseMotionEvent(java.awt.event.MouseEvent)
-meth protected void setUI(javax.swing.plaf.ComponentUI)
-meth public <%0 extends java.util.EventListener> {%%0}[] getListeners(java.lang.Class<{%%0}>)
-meth public boolean contains(int,int)
-meth public boolean getAutoscrolls()
-meth public boolean getInheritsPopupMenu()
-meth public boolean getVerifyInputWhenFocusTarget()
-meth public boolean isDoubleBuffered()
-meth public boolean isManagingFocus()
- anno 0 java.lang.Deprecated()
-meth public boolean isOpaque()
-meth public boolean isOptimizedDrawingEnabled()
-meth public boolean isPaintingTile()
-meth public boolean isRequestFocusEnabled()
-meth public boolean isValidateRoot()
-meth public boolean requestDefaultFocus()
- anno 0 java.lang.Deprecated()
-meth public boolean requestFocus(boolean)
-meth public boolean requestFocusInWindow()
-meth public final boolean isPaintingForPrint()
-meth public final java.lang.Object getClientProperty(java.lang.Object)
-meth public final javax.swing.ActionMap getActionMap()
-meth public final javax.swing.InputMap getInputMap()
-meth public final javax.swing.InputMap getInputMap(int)
-meth public final void putClientProperty(java.lang.Object,java.lang.Object)
-meth public final void setActionMap(javax.swing.ActionMap)
-meth public final void setInputMap(int,javax.swing.InputMap)
-meth public float getAlignmentX()
-meth public float getAlignmentY()
-meth public int getBaseline(int,int)
-meth public int getConditionForKeyStroke(javax.swing.KeyStroke)
-meth public int getDebugGraphicsOptions()
-meth public int getHeight()
-meth public int getWidth()
-meth public int getX()
-meth public int getY()
-meth public java.awt.Component getNextFocusableComponent()
- anno 0 java.lang.Deprecated()
-meth public java.awt.Component$BaselineResizeBehavior getBaselineResizeBehavior()
-meth public java.awt.Container getTopLevelAncestor()
-meth public java.awt.Dimension getMaximumSize()
-meth public java.awt.Dimension getMinimumSize()
-meth public java.awt.Dimension getPreferredSize()
-meth public java.awt.Dimension getSize(java.awt.Dimension)
-meth public java.awt.FontMetrics getFontMetrics(java.awt.Font)
-meth public java.awt.Graphics getGraphics()
-meth public java.awt.Insets getInsets()
-meth public java.awt.Insets getInsets(java.awt.Insets)
-meth public java.awt.Point getLocation(java.awt.Point)
-meth public java.awt.Point getPopupLocation(java.awt.event.MouseEvent)
-meth public java.awt.Point getToolTipLocation(java.awt.event.MouseEvent)
-meth public java.awt.Rectangle getBounds(java.awt.Rectangle)
-meth public java.awt.Rectangle getVisibleRect()
-meth public java.awt.event.ActionListener getActionForKeyStroke(javax.swing.KeyStroke)
-meth public java.beans.VetoableChangeListener[] getVetoableChangeListeners()
-meth public java.lang.String getToolTipText()
-meth public java.lang.String getToolTipText(java.awt.event.MouseEvent)
-meth public java.lang.String getUIClassID()
-meth public javax.swing.InputVerifier getInputVerifier()
-meth public javax.swing.JPopupMenu getComponentPopupMenu()
-meth public javax.swing.JRootPane getRootPane()
-meth public javax.swing.JToolTip createToolTip()
-meth public javax.swing.KeyStroke[] getRegisteredKeyStrokes()
-meth public javax.swing.TransferHandler getTransferHandler()
-meth public javax.swing.border.Border getBorder()
-meth public javax.swing.event.AncestorListener[] getAncestorListeners()
-meth public static boolean isLightweightComponent(java.awt.Component)
-meth public static java.util.Locale getDefaultLocale()
-meth public static void setDefaultLocale(java.util.Locale)
-meth public void addAncestorListener(javax.swing.event.AncestorListener)
-meth public void addNotify()
-meth public void addVetoableChangeListener(java.beans.VetoableChangeListener)
-meth public void computeVisibleRect(java.awt.Rectangle)
-meth public void disable()
- anno 0 java.lang.Deprecated()
-meth public void enable()
- anno 0 java.lang.Deprecated()
-meth public void firePropertyChange(java.lang.String,boolean,boolean)
-meth public void firePropertyChange(java.lang.String,char,char)
-meth public void firePropertyChange(java.lang.String,int,int)
-meth public void grabFocus()
-meth public void hide()
- anno 0 java.lang.Deprecated()
-meth public void paint(java.awt.Graphics)
-meth public void paintImmediately(int,int,int,int)
-meth public void paintImmediately(java.awt.Rectangle)
-meth public void print(java.awt.Graphics)
-meth public void printAll(java.awt.Graphics)
-meth public void registerKeyboardAction(java.awt.event.ActionListener,java.lang.String,javax.swing.KeyStroke,int)
-meth public void registerKeyboardAction(java.awt.event.ActionListener,javax.swing.KeyStroke,int)
-meth public void removeAncestorListener(javax.swing.event.AncestorListener)
-meth public void removeNotify()
-meth public void removeVetoableChangeListener(java.beans.VetoableChangeListener)
-meth public void repaint(java.awt.Rectangle)
-meth public void repaint(long,int,int,int,int)
-meth public void requestFocus()
-meth public void resetKeyboardActions()
-meth public void reshape(int,int,int,int)
- anno 0 java.lang.Deprecated()
-meth public void revalidate()
-meth public void scrollRectToVisible(java.awt.Rectangle)
-meth public void setAlignmentX(float)
-meth public void setAlignmentY(float)
-meth public void setAutoscrolls(boolean)
-meth public void setBackground(java.awt.Color)
-meth public void setBorder(javax.swing.border.Border)
-meth public void setComponentPopupMenu(javax.swing.JPopupMenu)
-meth public void setDebugGraphicsOptions(int)
-meth public void setDoubleBuffered(boolean)
-meth public void setEnabled(boolean)
-meth public void setFocusTraversalKeys(int,java.util.Set extends java.awt.AWTKeyStroke>)
-meth public void setFont(java.awt.Font)
-meth public void setForeground(java.awt.Color)
-meth public void setInheritsPopupMenu(boolean)
-meth public void setInputVerifier(javax.swing.InputVerifier)
-meth public void setMaximumSize(java.awt.Dimension)
-meth public void setMinimumSize(java.awt.Dimension)
-meth public void setNextFocusableComponent(java.awt.Component)
- anno 0 java.lang.Deprecated()
-meth public void setOpaque(boolean)
-meth public void setPreferredSize(java.awt.Dimension)
-meth public void setRequestFocusEnabled(boolean)
-meth public void setToolTipText(java.lang.String)
-meth public void setTransferHandler(javax.swing.TransferHandler)
-meth public void setVerifyInputWhenFocusTarget(boolean)
-meth public void setVisible(boolean)
-meth public void unregisterKeyboardAction(javax.swing.KeyStroke)
-meth public void update(java.awt.Graphics)
-meth public void updateUI()
-supr java.awt.Container
-
-CLSS public javax.swing.JPanel
-cons public init()
-cons public init(boolean)
-cons public init(java.awt.LayoutManager)
-cons public init(java.awt.LayoutManager,boolean)
-innr protected AccessibleJPanel
-intf javax.accessibility.Accessible
-meth protected java.lang.String paramString()
-meth public java.lang.String getUIClassID()
-meth public javax.accessibility.AccessibleContext getAccessibleContext()
-meth public javax.swing.plaf.PanelUI getUI()
-meth public void setUI(javax.swing.plaf.PanelUI)
-meth public void updateUI()
-supr javax.swing.JComponent
-
-CLSS public abstract interface javax.swing.ListModel<%0 extends java.lang.Object>
-meth public abstract int getSize()
-meth public abstract void addListDataListener(javax.swing.event.ListDataListener)
-meth public abstract void removeListDataListener(javax.swing.event.ListDataListener)
-meth public abstract {javax.swing.ListModel%0} getElementAt(int)
-
-CLSS public org.netbeans.modules.apisupport.installer.ui.ExtraPanel
-cons public init()
-intf org.netbeans.spi.project.ui.support.ProjectCustomizer$CompositeCategoryProvider
-meth public javax.swing.JComponent createComponent(org.netbeans.spi.project.ui.support.ProjectCustomizer$Category,org.openide.util.Lookup)
-meth public org.netbeans.spi.project.ui.support.ProjectCustomizer$Category createCategory(org.openide.util.Lookup)
-supr java.lang.Object
-hcls SavePropsListener
-
-CLSS public org.netbeans.modules.apisupport.installer.ui.InstallerPanel
-cons public init(org.netbeans.modules.apisupport.installer.ui.SuiteInstallerProjectProperties)
-supr javax.swing.JPanel
-hfds installerProps,jCheckBox1,jCheckBox2,jCheckBox3,jCheckBox4,jCheckBox5,jLabel2,jSeparator1,jSeparator2,licenseComboBox,licenseLabel,pack200Info
-
-CLSS public org.netbeans.modules.apisupport.installer.ui.LicenseComboBoxModel
-cons public init(org.netbeans.api.project.Project,java.util.List,java.util.List)
-intf javax.swing.ComboBoxModel
-meth public int getSize()
-meth public java.lang.Object getElementAt(int)
-meth public java.lang.Object getSelectedItem()
-meth public java.lang.String getName()
-meth public java.util.List getNames()
-meth public java.util.List getTypes()
-meth public void addListDataListener(javax.swing.event.ListDataListener)
-meth public void removeListDataListener(javax.swing.event.ListDataListener)
-meth public void setSelectedItem(java.lang.Object)
-supr java.lang.Object
-hfds listeners,names,selectedItem,selectedItemFromList,suiteProject,types
-
-CLSS public org.netbeans.modules.apisupport.installer.ui.SuiteInstallerProjectProperties
-cons public init(org.netbeans.api.project.Project)
-fld public final static java.lang.String GENERATE_FOR_LINUX = "os-linux"
-fld public final static java.lang.String GENERATE_FOR_MAC = "os-macosx"
-fld public final static java.lang.String GENERATE_FOR_SOLARIS = "os-solaris"
-fld public final static java.lang.String GENERATE_FOR_WINDOWS = "os-windows"
-fld public final static java.lang.String LICENSE_FILE = "license-file"
-fld public final static java.lang.String LICENSE_TYPE = "license-type"
-fld public final static java.lang.String LICENSE_TYPE_CUSTOM = "custom"
-fld public final static java.lang.String LICENSE_TYPE_FILE = "file"
-fld public final static java.lang.String LICENSE_TYPE_NO = "no"
-meth public static java.util.prefs.Preferences prefs(org.netbeans.api.project.Project)
-meth public void store() throws java.io.IOException
-supr java.lang.Object
-hfds licenseModel,linuxModel,macModel,solarisModel,suiteProject,windowsModel
-
-CLSS public final org.netbeans.spi.project.ui.support.ProjectCustomizer
-innr public abstract interface static CategoryComponentProvider
-innr public abstract interface static CompositeCategoryProvider
-innr public final static Category
-meth public static java.awt.Dialog createCustomizerDialog(java.lang.String,org.openide.util.Lookup,java.lang.String,java.awt.event.ActionListener,java.awt.event.ActionListener,org.openide.util.HelpCtx)
- anno 4 org.netbeans.api.annotations.common.NonNull()
- anno 5 org.netbeans.api.annotations.common.NullAllowed()
-meth public static java.awt.Dialog createCustomizerDialog(java.lang.String,org.openide.util.Lookup,java.lang.String,java.awt.event.ActionListener,org.openide.util.HelpCtx)
- anno 4 org.netbeans.api.annotations.common.NonNull()
-meth public static java.awt.Dialog createCustomizerDialog(org.netbeans.spi.project.ui.support.ProjectCustomizer$Category[],org.netbeans.spi.project.ui.support.ProjectCustomizer$CategoryComponentProvider,java.lang.String,java.awt.event.ActionListener,java.awt.event.ActionListener,org.openide.util.HelpCtx)
- anno 4 org.netbeans.api.annotations.common.NonNull()
- anno 5 org.netbeans.api.annotations.common.NullAllowed()
-meth public static java.awt.Dialog createCustomizerDialog(org.netbeans.spi.project.ui.support.ProjectCustomizer$Category[],org.netbeans.spi.project.ui.support.ProjectCustomizer$CategoryComponentProvider,java.lang.String,java.awt.event.ActionListener,org.openide.util.HelpCtx)
- anno 4 org.netbeans.api.annotations.common.NonNull()
-meth public static javax.swing.ComboBoxModel encodingModel(java.lang.String)
-meth public static javax.swing.ListCellRenderer encodingRenderer()
-supr java.lang.Object
-hfds LOG
-hcls DelegateCategoryProvider,EncodingModel,EncodingRenderer
-
-CLSS public abstract interface static org.netbeans.spi.project.ui.support.ProjectCustomizer$CompositeCategoryProvider
- outer org.netbeans.spi.project.ui.support.ProjectCustomizer
-innr public abstract interface static !annotation Registration
-innr public abstract interface static !annotation Registrations
-meth public abstract javax.swing.JComponent createComponent(org.netbeans.spi.project.ui.support.ProjectCustomizer$Category,org.openide.util.Lookup)
-meth public abstract org.netbeans.spi.project.ui.support.ProjectCustomizer$Category createCategory(org.openide.util.Lookup)
-
diff --git a/apisupport/apisupport.installer/nbproject/project.properties b/apisupport/apisupport.installer/nbproject/project.properties
deleted file mode 100644
index 11ef6581274d..000000000000
--- a/apisupport/apisupport.installer/nbproject/project.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-javac.source=1.8
-javac.compilerargs=-Xlint -Xlint:-serial
-nbm.module.author=Dmitry Lipin
diff --git a/apisupport/apisupport.installer/nbproject/project.xml b/apisupport/apisupport.installer/nbproject/project.xml
deleted file mode 100644
index 26074fcc6a55..000000000000
--- a/apisupport/apisupport.installer/nbproject/project.xml
+++ /dev/null
@@ -1,188 +0,0 @@
-
-
-
- org.netbeans.modules.apisupport.project
-
-
- org.netbeans.modules.apisupport.installer
-
-
- org.apache.tools.ant.module
-
-
-
- 3
- 3.39
-
-
-
- org.netbeans.api.annotations.common
-
-
-
- 1
- 1.4
-
-
-
- org.netbeans.libs.nbi.ant
-
- 1.0
-
-
-
- org.netbeans.libs.nbi.engine
-
- 1.0
-
-
-
- org.netbeans.modules.project.ant
-
-
-
- 1
- 1.62
-
-
-
- org.netbeans.modules.projectapi
-
-
-
- 1
- 1.29
-
-
-
- org.netbeans.modules.projectuiapi
-
-
-
- 1
- 1.78
-
-
-
- org.openide.awt
-
-
-
- 7.20
-
-
-
- org.openide.dialogs
-
-
-
- 7.14
-
-
-
- org.openide.execution
-
-
-
- 9.0
-
-
-
- org.openide.filesystems
-
-
-
- 9.0
-
-
-
- org.openide.filesystems.nb
-
-
-
- 9.0
-
-
-
- org.openide.loaders
-
-
-
- 7.61
-
-
-
- org.openide.modules
-
-
-
- 7.14
-
-
-
- org.openide.nodes
-
-
-
- 7.13
-
-
-
- org.openide.util.ui
-
-
-
- 9.3
-
-
-
- org.openide.util
-
-
-
- 9.3
-
-
-
- org.openide.util.lookup
-
-
-
- 8.0
-
-
-
- org.openide.windows
-
-
-
- 6.31
-
-
-
-
- org.netbeans.modules.apisupport.installer.maven
- org.netbeans.modules.apisupport.installer.ui
-
-
-
-
diff --git a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/Bundle.properties b/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/Bundle.properties
deleted file mode 100644
index bc8a274432d3..000000000000
--- a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/Bundle.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-OpenIDE-Module-Display-Category=Developing NetBeans
-OpenIDE-Module-Name=RCP Installers
-OpenIDE-Module-Short-Description=Module for creating installers for NetBeans Platform-based applications
-
diff --git a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/actions/BuildInstallersAction.java b/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/actions/BuildInstallersAction.java
deleted file mode 100644
index f707ceec5633..000000000000
--- a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/actions/BuildInstallersAction.java
+++ /dev/null
@@ -1,354 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.netbeans.modules.apisupport.installer.actions;
-
-import java.awt.event.ActionEvent;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.nio.file.Files;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.Properties;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import java.util.prefs.Preferences;
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.JButton;
-import org.netbeans.api.annotations.common.SuppressWarnings;
-import org.openide.ErrorManager;
-import org.netbeans.api.project.Project;
-import org.openide.awt.ActionID;
-import org.openide.awt.ActionReference;
-import org.openide.awt.ActionRegistration;
-import org.openide.filesystems.FileUtil;
-import org.openide.util.ContextAwareAction;
-import org.openide.util.Lookup;
-import org.openide.util.NbBundle;
-import org.apache.tools.ant.module.api.support.ActionUtils;
-import org.netbeans.api.project.ProjectUtils;
-import org.netbeans.modules.apisupport.installer.ui.SuiteInstallerProjectProperties;
-import org.netbeans.spi.project.support.ant.AntProjectHelper;
-import org.netbeans.spi.project.support.ant.PropertyUtils;
-import org.openide.DialogDescriptor;
-import org.openide.DialogDisplayer;
-import org.openide.NotifyDescriptor;
-import org.openide.filesystems.FileObject;
-import org.openide.filesystems.FileStateInvalidException;
-import org.openide.modules.InstalledFileLocator;
-import org.openide.util.RequestProcessor;
-import org.openide.util.Utilities;
-
-@ActionID(id = "org.netbeans.modules.apisupport.installer.actions.BuildInstallersAction", category = "Project")
-@ActionRegistration(displayName = "#CTL_BuildInstallers", /* XXX might work to be context action on List */ lazy=false)
-@ActionReference(position = 400, path = "Projects/org-netbeans-modules-apisupport-project-suite-package/Actions")
-public final class BuildInstallersAction extends AbstractAction implements ContextAwareAction {
-
- public BuildInstallersAction() {
- putValue(NAME, NbBundle.getMessage(BuildInstallersAction.class, "CTL_BuildInstallers"));
- }
-
- public @Override void actionPerformed(ActionEvent e) {
- assert false;
- }
-
- public @Override Action createContextAwareInstance(Lookup actionContext) {
- return new ContextBuildInstaller(actionContext);
- }
-
- static class ContextBuildInstaller extends AbstractAction {
-
- private final Lookup actionContext;
-
- public ContextBuildInstaller(Lookup actionContext) {
- this.actionContext = actionContext;
- putValue(NAME, NbBundle.getMessage(BuildInstallersAction.class, "CTL_BuildInstallers"));
- }
-
- @SuppressWarnings("RV_RETURN_VALUE_IGNORED_BAD_PRACTICE") // mkdirs
- public @Override void actionPerformed(ActionEvent e) {
- for (Project prj : actionContext.lookupAll(Project.class)) {
- Preferences prefs = SuiteInstallerProjectProperties.prefs(prj);
- File suiteLocation = FileUtil.toFile(prj.getProjectDirectory());
- String appName = "";
- String appIcon = null;
- String appIconIcns = null;
- File appIconIcnsFile = null;
- String licenseType = prefs.get(SuiteInstallerProjectProperties.LICENSE_TYPE, null);
- File licenseFile = null;
- String licenseFileProp = prefs.get(SuiteInstallerProjectProperties.LICENSE_FILE, null);
- if (licenseFileProp != null) {
- licenseFile = PropertyUtils.resolveFile(suiteLocation, licenseFileProp);
- //if(!licenseFile.exists()) {
- // licenseFile = null;
- //}
- }
-
- try {
- FileObject propertiesFile = prj.getProjectDirectory().getFileObject(AntProjectHelper.PROJECT_PROPERTIES_PATH);
- InputStream is = propertiesFile.getInputStream();
- Properties ps = new Properties();
- try {
- ps.load(is);
- } finally {
- is.close();
- }
- appName = ps.getProperty("app.name");
- if (appName != null && appName.contains("$")) {
- appName = ProjectUtils.getInformation(prj).getName();
- }
-
- appIcon = ps.getProperty("app.icon");
- appIconIcns = ps.getProperty("app.icon.icns", null);
- if(appIconIcns!=null) {
- appIconIcnsFile = PropertyUtils.resolveFile(suiteLocation, appIconIcns);
- } else {
- //${harness.dir}/etc/applicationIcon.icns
- appIconIcnsFile = new File(InstalledFileLocator.getDefault().locate(
- "etc/applicationIcon.icns",
- "org.netbeans.modules.apisupport.harness", false).getAbsolutePath().replace("\\", "/"));
- }
-
-
- if (appName == null) {
- //suite, not standalone app
- RequestProcessor.getDefault().post(new Runnable() {
- public @Override void run() {
- DialogDescriptor d = new DialogDescriptor(
- NbBundle.getMessage(BuildInstallersAction.class, "BuildInstallersAction.NotApp.Warning.Message"),
- NbBundle.getMessage(BuildInstallersAction.class, "BuildInstallersAction.NotApp.Warning.Title"));
- d.setModal(true);
- JButton accept = new JButton(NbBundle.getMessage(BuildInstallersAction.class, "BuildInstallersAction.NotApp.Warning.OK"));
- accept.setDefaultCapable(true);
- d.setOptions(new Object[]{
- accept});
- d.setMessageType(NotifyDescriptor.WARNING_MESSAGE);
- if (DialogDisplayer.getDefault().notify(d).equals(accept)) {
- //SuiteCustomizer cpi = prj.getLookup().lookup(org.netbeans.modules.apisupport.project.ui.customizer.SuiteCustomizer.class);
- //cpi.showCustomizer(SuiteCustomizer.APPLICATION, SuiteCustomizer.APPLICATION_CREATE_STANDALONE_APPLICATION);
- }
- }
- });
-
- return;
- }
- } catch (IOException ex) {
- Logger.getLogger(BuildInstallersAction.class.getName()).log(Level.WARNING, "Cannot load properties", ex);
- }
-
-
- if (licenseFile==null && licenseType != null && !licenseType.equals(SuiteInstallerProjectProperties.LICENSE_TYPE_NO)) {
- Logger.getLogger(BuildInstallersAction.class.getName()).log(Level.FINE, "License type defined to {0}", licenseType);
- String licenseResource = null;
- try {
- licenseResource = NbBundle.getMessage(SuiteInstallerProjectProperties.class,
- "SuiteInstallerProjectProperties.license.file." + licenseType);
- } catch (MissingResourceException ex) {
- Logger.getLogger(BuildInstallersAction.class.getName()).log(Level.WARNING, "License resource not found");
- }
-
- if (licenseResource != null) {
- InputStream is = null;
- try {
- URL url = new URL(licenseResource);
- is = url.openStream();
- if (is != null) {
- licenseFile = Files.createTempFile("license", ".txt").toFile();
- licenseFile.getParentFile().mkdirs();
- licenseFile.deleteOnExit();
-
- OutputStream os = new FileOutputStream(licenseFile);
- byte[] bytes = new byte[4096];
- int read = 0;
- while ((read = is.read(bytes)) > 0) {
- os.write(bytes, 0, read);
- }
- os.flush();
- os.close();
- } else {
- Logger.getLogger(BuildInstallersAction.class.getName()).log(
- Level.WARNING, "License resource {0} not found", licenseResource);
- }
- } catch (MalformedURLException ex) {
- Logger.getLogger(BuildInstallersAction.class.getName()).log(Level.WARNING,
- "Can`t parse URL", ex);
- } catch (IOException ex) {
- Logger.getLogger(BuildInstallersAction.class.getName()).log(Level.WARNING,
- "Input/Output error", ex);
- } finally {
- if (is != null) {
- try {
- is.close();
- } catch (IOException ex) {
- }
- }
- }
- }
- }
-
- //Logger.getLogger(BuildInstallersAction.class.getName()).warning("actionPerformed for " + suiteLocation);
- Properties props = new Properties();
- props.put("suite.location", suiteLocation.getAbsolutePath().replace("\\", "/"));
- props.put("suite.nbi.product.uid",
- appName.replaceAll("[0-9]+", "").replace("_", "-").toLowerCase(Locale.ENGLISH));
-
-
- props.put("nbi.stub.location", InstalledFileLocator.getDefault().locate(
- "nbi/stub",
- "org.netbeans.libs.nbi.ant", false).getAbsolutePath().replace("\\", "/"));
- props.put(
- "nbi.stub.common.location", InstalledFileLocator.getDefault().locate(
- "nbi/.common",
- "org.netbeans.libs.nbi.ant", false).getAbsolutePath().replace("\\", "/"));
-
- props.put(
- "nbi.ant.tasks.jar", InstalledFileLocator.getDefault().locate(
- "modules/ext/nbi-ant-tasks.jar",
- "org.netbeans.libs.nbi.ant", false).getAbsolutePath().replace("\\", "/"));
- props.put(
- "nbi.registries.management.jar", InstalledFileLocator.getDefault().locate(
- "modules/ext/nbi-registries-management.jar",
- "org.netbeans.libs.nbi.ant", false).getAbsolutePath().replace("\\", "/"));
- props.put(
- "nbi.engine.jar", InstalledFileLocator.getDefault().locate(
- "modules/ext/nbi-engine.jar",
- "org.netbeans.libs.nbi.engine", false).getAbsolutePath().replace("\\", "/"));
- if (licenseFile != null) {
- Logger.getLogger(BuildInstallersAction.class.getName()).log(Level.FINE,
- "License file is at {0}, exist = {1}", new Object[] {licenseFile, licenseFile.exists()});
- props.put(
- "nbi.license.file", licenseFile.getAbsolutePath());
- }
-
- List platforms = new ArrayList();
-
- boolean installerConfDefined = false;
- for (String k : new String[] {
- SuiteInstallerProjectProperties.GENERATE_FOR_WINDOWS,
- SuiteInstallerProjectProperties.GENERATE_FOR_LINUX,
- SuiteInstallerProjectProperties.GENERATE_FOR_SOLARIS,
- SuiteInstallerProjectProperties.GENERATE_FOR_MAC
- }) {
- if (prefs.getBoolean(k, false)) {
- installerConfDefined = true;
- platforms.add(k.replaceFirst("^os-", ""));
- }
- }
- if (!installerConfDefined) {
- if (Utilities.isWindows()) {
- platforms.add("windows");
- } else if (Utilities.getOperatingSystem() == Utilities.OS_LINUX) {
- platforms.add("linux");
- } else if (Utilities.getOperatingSystem() == Utilities.OS_SOLARIS) {
- platforms.add("solaris");
- } else if (Utilities.isMac()) {
- platforms.add("macosx");
- }
- }
- StringBuilder sb = new StringBuilder();
- for (int i = 0; i < platforms.size(); i++) {
- if (i != 0) {
- sb.append(" ");
- }
- sb.append(platforms.get(i));
- }
- if (sb.length() == 0) {
- //nothing to build
- RequestProcessor.getDefault().post(new Runnable() {
- public @Override void run() {
- DialogDescriptor d = new DialogDescriptor(
- NbBundle.getMessage(BuildInstallersAction.class, "BuildInstallersAction.NotConfigured.Warning.Message"),
- NbBundle.getMessage(BuildInstallersAction.class, "BuildInstallersAction.NotConfigured.Warning.Title"));
- d.setModal(true);
- JButton accept = new JButton(NbBundle.getMessage(BuildInstallersAction.class, "BuildInstallersAction.NotConfigured.Warning.OK"));
- accept.setDefaultCapable(true);
- d.setOptions(new Object[]{
- accept});
- d.setMessageType(NotifyDescriptor.WARNING_MESSAGE);
- if (DialogDisplayer.getDefault().notify(d).equals(accept)) {
- //SuiteCustomizer cpi = prj.getLookup().lookup(org.netbeans.modules.apisupport.project.ui.customizer.SuiteCustomizer.class);
- //cpi.showCustomizer(SuiteCustomizer.APPLICATION, SuiteCustomizer.APPLICATION_CREATE_STANDALONE_APPLICATION);
- }
- }
- });
- return;
- }
-
- props.put("generate.installer.for.platforms",
- sb.toString());
-
-
-
- File javaHome = new File(System.getProperty("java.home"));
- if (new File(javaHome,
- "lib/rt.jar").exists() && javaHome.getName().equals("jre")) {
- javaHome = javaHome.getParentFile();
- }
- props.put(
- "generator-jdk-location-forward-slashes", javaHome.getAbsolutePath().replace("\\", "/"));
- /*
- props.put(
- "generated-installers-location-forward-slashes",
- new File(suiteLocation, "dist").getAbsolutePath().replace("\\", "/"));
- */
-
- if(appIcon!=null) {
- File appIconFile = new File(appIcon);
- if(!appIconFile.equals(appIconFile.getAbsoluteFile())) {
- //path is relative to suite directory
- appIconFile = new File(suiteLocation, appIcon);
- }
- props.put(
- "nbi.icon.file", appIconFile.getAbsolutePath());
-
- }
-
- if(appIconIcnsFile!=null) {
- props.put(
- "nbi.dock.icon.file", appIconIcnsFile.getAbsolutePath());
- }
-
- try {
- ActionUtils.runTarget(findGenXml(), new String[]{"build"}, props);
- } catch (FileStateInvalidException ex) {
- ErrorManager.getDefault().getInstance("org.netbeans.modules.apisupport.project").notify(ex); // NOI18N
- } catch (IOException ex) {
- ErrorManager.getDefault().getInstance("org.netbeans.modules.apisupport.project").notify(ex); // NOI18N
- }
- }
-
- }
-
-
- private static FileObject findGenXml() {
- return FileUtil.toFileObject(InstalledFileLocator.getDefault().locate(
- "nbi/stub/template.xml",
- "org.netbeans.libs.nbi.ant", false));
- }
- }
-}
-
-
diff --git a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/actions/Bundle.properties b/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/actions/Bundle.properties
deleted file mode 100644
index eb3928437c81..000000000000
--- a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/actions/Bundle.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-CTL_BuildInstallers=Installers
-BuildInstallersAction.NotApp.Warning.Message=\
- In order to create installers this project should be switched to standalone application.\n\
- Open project properties, switch to Application panel and set type to Standalone Application.
-BuildInstallersAction.NotApp.Warning.Title=Warning
-BuildInstallersAction.NotApp.Warning.OK=OK
-
-BuildInstallersAction.NotConfigured.Warning.Message=\
- In order to create installers please select at least one target platform.\n\
- Open project properties, switch to Installer panel and configure installer settings.
-BuildInstallersAction.NotConfigured.Warning.Title=Warning
-BuildInstallersAction.NotConfigured.Warning.OK=OK
\ No newline at end of file
diff --git a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/resources/licenses/Apache-2.0 b/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/resources/licenses/Apache-2.0
deleted file mode 100644
index d64569567334..000000000000
--- a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/resources/licenses/Apache-2.0
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/resources/licenses/CDDL-1.0 b/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/resources/licenses/CDDL-1.0
deleted file mode 100644
index d8a159735177..000000000000
--- a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/resources/licenses/CDDL-1.0
+++ /dev/null
@@ -1,380 +0,0 @@
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-1. Definitions.
-
-1.1. "Contributor" means each individual or entity that
-creates or contributes to the creation of Modifications.
-
-1.2. "Contributor Version" means the combination of the
-Original Software, prior Modifications used by a
-Contributor (if any), and the Modifications made by that
-particular Contributor.
-
-1.3. "Covered Software" means (a) the Original Software, or
-(b) Modifications, or (c) the combination of files
-containing Original Software with files containing
-Modifications, in each case including portions thereof.
-
-1.4. "Executable" means the Covered Software in any form
-other than Source Code.
-
-1.5. "Initial Developer" means the individual or entity
-that first makes Original Software available under this
-License.
-
-1.6. "Larger Work" means a work which combines Covered
-Software or portions thereof with code not governed by the
-terms of this License.
-
-1.7. "License" means this document.
-
-1.8. "Licensable" means having the right to grant, to the
-maximum extent possible, whether at the time of the initial
-grant or subsequently acquired, any and all of the rights
-conveyed herein.
-
-1.9. "Modifications" means the Source Code and Executable
-form of any of the following:
-
-A. Any file that results from an addition to,
-deletion from or modification of the contents of a
-file containing Original Software or previous
-Modifications;
-
-B. Any new file that contains any part of the
-Original Software or previous Modification; or
-
-C. Any new file that is contributed or otherwise made
-available under the terms of this License.
-
-1.10. "Original Software" means the Source Code and
-Executable form of computer software code that is
-originally released under this License.
-
-1.11. "Patent Claims" means any patent claim(s), now owned
-or hereafter acquired, including without limitation,
-method, process, and apparatus claims, in any patent
-Licensable by grantor.
-
-1.12. "Source Code" means (a) the common form of computer
-software code in which modifications are made and (b)
-associated documentation included in or with such code.
-
-1.13. "You" (or "Your") means an individual or a legal
-entity exercising rights under, and complying with all of
-the terms of, this License. For legal entities, "You"
-includes any entity which controls, is controlled by, or is
-under common control with You. For purposes of this
-definition, "control" means (a) the power, direct or
-indirect, to cause the direction or management of such
-entity, whether by contract or otherwise, or (b) ownership
-of more than fifty percent (50%) of the outstanding shares
-or beneficial ownership of such entity.
-
-2. License Grants.
-
-2.1. The Initial Developer Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and
-subject to third party intellectual property claims, the
-Initial Developer hereby grants You a world-wide,
-royalty-free, non-exclusive license:
-
-(a) under intellectual property rights (other than
-patent or trademark) Licensable by Initial Developer,
-to use, reproduce, modify, display, perform,
-sublicense and distribute the Original Software (or
-portions thereof), with or without Modifications,
-and/or as part of a Larger Work; and
-
-(b) under Patent Claims infringed by the making,
-using or selling of Original Software, to make, have
-made, use, practice, sell, and offer for sale, and/or
-otherwise dispose of the Original Software (or
-portions thereof).
-
-(c) The licenses granted in Sections 2.1(a) and (b)
-are effective on the date Initial Developer first
-distributes or otherwise makes the Original Software
-available to a third party under the terms of this
-License.
-
-(d) Notwithstanding Section 2.1(b) above, no patent
-license is granted: (1) for code that You delete from
-the Original Software, or (2) for infringements
-caused by: (i) the modification of the Original
-Software, or (ii) the combination of the Original
-Software with other software or devices.
-
-2.2. Contributor Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and
-subject to third party intellectual property claims, each
-Contributor hereby grants You a world-wide, royalty-free,
-non-exclusive license:
-
-(a) under intellectual property rights (other than
-patent or trademark) Licensable by Contributor to
-use, reproduce, modify, display, perform, sublicense
-and distribute the Modifications created by such
-Contributor (or portions thereof), either on an
-unmodified basis, with other Modifications, as
-Covered Software and/or as part of a Larger Work; and
-
-(b) under Patent Claims infringed by the making,
-using, or selling of Modifications made by that
-Contributor either alone and/or in combination with
-its Contributor Version (or portions of such
-combination), to make, use, sell, offer for sale,
-have made, and/or otherwise dispose of: (1)
-Modifications made by that Contributor (or portions
-thereof); and (2) the combination of Modifications
-made by that Contributor with its Contributor Version
-(or portions of such combination).
-
-(c) The licenses granted in Sections 2.2(a) and
-2.2(b) are effective on the date Contributor first
-distributes or otherwise makes the Modifications
-available to a third party.
-
-(d) Notwithstanding Section 2.2(b) above, no patent
-license is granted: (1) for any code that Contributor
-has deleted from the Contributor Version; (2) for
-infringements caused by: (i) third party
-modifications of Contributor Version, or (ii) the
-combination of Modifications made by that Contributor
-with other software (except as part of the
-Contributor Version) or other devices; or (3) under
-Patent Claims infringed by Covered Software in the
-absence of Modifications made by that Contributor.
-
-3. Distribution Obligations.
-
-3.1. Availability of Source Code.
-
-Any Covered Software that You distribute or otherwise make
-available in Executable form must also be made available in
-Source Code form and that Source Code form must be
-distributed only under the terms of this License. You must
-include a copy of this License with every copy of the
-Source Code form of the Covered Software You distribute or
-otherwise make available. You must inform recipients of any
-such Covered Software in Executable form as to how they can
-obtain such Covered Software in Source Code form in a
-reasonable manner on or through a medium customarily used
-for software exchange.
-
-3.2. Modifications.
-
-The Modifications that You create or to which You
-contribute are governed by the terms of this License. You
-represent that You believe Your Modifications are Your
-original creation(s) and/or You have sufficient rights to
-grant the rights conveyed by this License.
-
-3.3. Required Notices.
-
-You must include a notice in each of Your Modifications
-that identifies You as the Contributor of the Modification.
-You may not remove or alter any copyright, patent or
-trademark notices contained within the Covered Software, or
-any notices of licensing or any descriptive text giving
-attribution to any Contributor or the Initial Developer.
-
-3.4. Application of Additional Terms.
-
-You may not offer or impose any terms on any Covered
-Software in Source Code form that alters or restricts the
-applicable version of this License or the recipients'
-rights hereunder. You may choose to offer, and to charge a
-fee for, warranty, support, indemnity or liability
-obligations to one or more recipients of Covered Software.
-However, you may do so only on Your own behalf, and not on
-behalf of the Initial Developer or any Contributor. You
-must make it absolutely clear that any such warranty,
-support, indemnity or liability obligation is offered by
-You alone, and You hereby agree to indemnify the Initial
-Developer and every Contributor for any liability incurred
-by the Initial Developer or such Contributor as a result of
-warranty, support, indemnity or liability terms You offer.
-
-3.5. Distribution of Executable Versions.
-
-You may distribute the Executable form of the Covered
-Software under the terms of this License or under the terms
-of a license of Your choice, which may contain terms
-different from this License, provided that You are in
-compliance with the terms of this License and that the
-license for the Executable form does not attempt to limit
-or alter the recipient's rights in the Source Code form
-from the rights set forth in this License. If You
-distribute the Covered Software in Executable form under a
-different license, You must make it absolutely clear that
-any terms which differ from this License are offered by You
-alone, not by the Initial Developer or Contributor. You
-hereby agree to indemnify the Initial Developer and every
-Contributor for any liability incurred by the Initial
-Developer or such Contributor as a result of any such terms
-You offer.
-
-3.6. Larger Works.
-
-You may create a Larger Work by combining Covered Software
-with other code not governed by the terms of this License
-and distribute the Larger Work as a single product. In such
-a case, You must make sure the requirements of this License
-are fulfilled for the Covered Software.
-
-4. Versions of the License.
-
-4.1. New Versions.
-
-Sun Microsystems, Inc. is the initial license steward and
-may publish revised and/or new versions of this License
-from time to time. Each version will be given a
-distinguishing version number. Except as provided in
-Section 4.3, no one other than the license steward has the
-right to modify this License.
-
-4.2. Effect of New Versions.
-
-You may always continue to use, distribute or otherwise
-make the Covered Software available under the terms of the
-version of the License under which You originally received
-the Covered Software. If the Initial Developer includes a
-notice in the Original Software prohibiting it from being
-distributed or otherwise made available under any
-subsequent version of the License, You must distribute and
-make the Covered Software available under the terms of the
-version of the License under which You originally received
-the Covered Software. Otherwise, You may also choose to
-use, distribute or otherwise make the Covered Software
-available under the terms of any subsequent version of the
-License published by the license steward.
-
-4.3. Modified Versions.
-
-When You are an Initial Developer and You want to create a
-new license for Your Original Software, You may create and
-use a modified version of this License if You: (a) rename
-the license and remove any references to the name of the
-license steward (except to note that the license differs
-from this License); and (b) otherwise make it clear that
-the license contains terms which differ from this License.
-
-5. DISCLAIMER OF WARRANTY.
-
-COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS"
-BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
-INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
-SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR
-PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND
-PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY
-COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE
-INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF
-ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
-WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
-ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS
-DISCLAIMER.
-
-6. TERMINATION.
-
-6.1. This License and the rights granted hereunder will
-terminate automatically if You fail to comply with terms
-herein and fail to cure such breach within 30 days of
-becoming aware of the breach. Provisions which, by their
-nature, must remain in effect beyond the termination of
-this License shall survive.
-
-6.2. If You assert a patent infringement claim (excluding
-declaratory judgment actions) against Initial Developer or
-a Contributor (the Initial Developer or Contributor against
-whom You assert such claim is referred to as "Participant")
-alleging that the Participant Software (meaning the
-Contributor Version where the Participant is a Contributor
-or the Original Software where the Participant is the
-Initial Developer) directly or indirectly infringes any
-patent, then any and all rights granted directly or
-indirectly to You by such Participant, the Initial
-Developer (if the Initial Developer is not the Participant)
-and all Contributors under Sections 2.1 and/or 2.2 of this
-License shall, upon 60 days notice from Participant
-terminate prospectively and automatically at the expiration
-of such 60 day notice period, unless if within such 60 day
-period You withdraw Your claim with respect to the
-Participant Software against such Participant either
-unilaterally or pursuant to a written agreement with
-Participant.
-
-6.3. In the event of termination under Sections 6.1 or 6.2
-above, all end user licenses that have been validly granted
-by You or any distributor hereunder prior to termination
-(excluding licenses granted to You by any distributor)
-shall survive termination.
-
-7. LIMITATION OF LIABILITY.
-
-UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
-(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE
-INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
-COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE
-LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR
-CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
-LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK
-STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
-COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
-INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
-LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL
-INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT
-APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO
-NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR
-CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT
-APPLY TO YOU.
-
-8. U.S. GOVERNMENT END USERS.
-
-The Covered Software is a "commercial item," as that term is
-defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial
-computer software" (as that term is defined at 48 C.F.R.
-252.227-7014(a)(1)) and "commercial computer software
-documentation" as such terms are used in 48 C.F.R. 12.212 (Sept.
-1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1
-through 227.7202-4 (June 1995), all U.S. Government End Users
-acquire Covered Software with only those rights set forth herein.
-This U.S. Government Rights clause is in lieu of, and supersedes,
-any other FAR, DFAR, or other clause or provision that addresses
-Government rights in computer software under this License.
-
-9. MISCELLANEOUS.
-
-This License represents the complete agreement concerning subject
-matter hereof. If any provision of this License is held to be
-unenforceable, such provision shall be reformed only to the
-extent necessary to make it enforceable. This License shall be
-governed by the law of the jurisdiction specified in a notice
-contained within the Original Software (except to the extent
-applicable law, if any, provides otherwise), excluding such
-jurisdiction's conflict-of-law provisions. Any litigation
-relating to this License shall be subject to the jurisdiction of
-the courts located in the jurisdiction and venue specified in a
-notice contained within the Original Software, with the losing
-party responsible for costs, including, without limitation, court
-costs and reasonable attorneys' fees and expenses. The
-application of the United Nations Convention on Contracts for the
-International Sale of Goods is expressly excluded. Any law or
-regulation which provides that the language of a contract shall
-be construed against the drafter shall not apply to this License.
-You agree that You alone are responsible for compliance with the
-United States export administration regulations (and the export
-control laws and regulation of any other countries) when You use,
-distribute or otherwise make available any Covered Software.
-
-10. RESPONSIBILITY FOR CLAIMS.
-
-As between Initial Developer and the Contributors, each party is
-responsible for claims and damages arising, directly or
-indirectly, out of its utilization of rights under this License
-and You agree to work with Initial Developer and Contributors to
-distribute such responsibility on an equitable basis. Nothing
-herein is intended or shall be deemed to constitute any admission
-of liability.
diff --git a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/resources/licenses/CDDL-GPL-2-CP b/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/resources/licenses/CDDL-GPL-2-CP
deleted file mode 100644
index 78ba69c73397..000000000000
--- a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/resources/licenses/CDDL-GPL-2-CP
+++ /dev/null
@@ -1,826 +0,0 @@
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-1. Definitions.
-
-1.1. "Contributor" means each individual or entity that
-creates or contributes to the creation of Modifications.
-
-1.2. "Contributor Version" means the combination of the
-Original Software, prior Modifications used by a
-Contributor (if any), and the Modifications made by that
-particular Contributor.
-
-1.3. "Covered Software" means (a) the Original Software, or
-(b) Modifications, or (c) the combination of files
-containing Original Software with files containing
-Modifications, in each case including portions thereof.
-
-1.4. "Executable" means the Covered Software in any form
-other than Source Code.
-
-1.5. "Initial Developer" means the individual or entity
-that first makes Original Software available under this
-License.
-
-1.6. "Larger Work" means a work which combines Covered
-Software or portions thereof with code not governed by the
-terms of this License.
-
-1.7. "License" means this document.
-
-1.8. "Licensable" means having the right to grant, to the
-maximum extent possible, whether at the time of the initial
-grant or subsequently acquired, any and all of the rights
-conveyed herein.
-
-1.9. "Modifications" means the Source Code and Executable
-form of any of the following:
-
-A. Any file that results from an addition to,
-deletion from or modification of the contents of a
-file containing Original Software or previous
-Modifications;
-
-B. Any new file that contains any part of the
-Original Software or previous Modification; or
-
-C. Any new file that is contributed or otherwise made
-available under the terms of this License.
-
-1.10. "Original Software" means the Source Code and
-Executable form of computer software code that is
-originally released under this License.
-
-1.11. "Patent Claims" means any patent claim(s), now owned
-or hereafter acquired, including without limitation,
-method, process, and apparatus claims, in any patent
-Licensable by grantor.
-
-1.12. "Source Code" means (a) the common form of computer
-software code in which modifications are made and (b)
-associated documentation included in or with such code.
-
-1.13. "You" (or "Your") means an individual or a legal
-entity exercising rights under, and complying with all of
-the terms of, this License. For legal entities, "You"
-includes any entity which controls, is controlled by, or is
-under common control with You. For purposes of this
-definition, "control" means (a) the power, direct or
-indirect, to cause the direction or management of such
-entity, whether by contract or otherwise, or (b) ownership
-of more than fifty percent (50%) of the outstanding shares
-or beneficial ownership of such entity.
-
-2. License Grants.
-
-2.1. The Initial Developer Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and
-subject to third party intellectual property claims, the
-Initial Developer hereby grants You a world-wide,
-royalty-free, non-exclusive license:
-
-(a) under intellectual property rights (other than
-patent or trademark) Licensable by Initial Developer,
-to use, reproduce, modify, display, perform,
-sublicense and distribute the Original Software (or
-portions thereof), with or without Modifications,
-and/or as part of a Larger Work; and
-
-(b) under Patent Claims infringed by the making,
-using or selling of Original Software, to make, have
-made, use, practice, sell, and offer for sale, and/or
-otherwise dispose of the Original Software (or
-portions thereof).
-
-(c) The licenses granted in Sections 2.1(a) and (b)
-are effective on the date Initial Developer first
-distributes or otherwise makes the Original Software
-available to a third party under the terms of this
-License.
-
-(d) Notwithstanding Section 2.1(b) above, no patent
-license is granted: (1) for code that You delete from
-the Original Software, or (2) for infringements
-caused by: (i) the modification of the Original
-Software, or (ii) the combination of the Original
-Software with other software or devices.
-
-2.2. Contributor Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and
-subject to third party intellectual property claims, each
-Contributor hereby grants You a world-wide, royalty-free,
-non-exclusive license:
-
-(a) under intellectual property rights (other than
-patent or trademark) Licensable by Contributor to
-use, reproduce, modify, display, perform, sublicense
-and distribute the Modifications created by such
-Contributor (or portions thereof), either on an
-unmodified basis, with other Modifications, as
-Covered Software and/or as part of a Larger Work; and
-
-(b) under Patent Claims infringed by the making,
-using, or selling of Modifications made by that
-Contributor either alone and/or in combination with
-its Contributor Version (or portions of such
-combination), to make, use, sell, offer for sale,
-have made, and/or otherwise dispose of: (1)
-Modifications made by that Contributor (or portions
-thereof); and (2) the combination of Modifications
-made by that Contributor with its Contributor Version
-(or portions of such combination).
-
-(c) The licenses granted in Sections 2.2(a) and
-2.2(b) are effective on the date Contributor first
-distributes or otherwise makes the Modifications
-available to a third party.
-
-(d) Notwithstanding Section 2.2(b) above, no patent
-license is granted: (1) for any code that Contributor
-has deleted from the Contributor Version; (2) for
-infringements caused by: (i) third party
-modifications of Contributor Version, or (ii) the
-combination of Modifications made by that Contributor
-with other software (except as part of the
-Contributor Version) or other devices; or (3) under
-Patent Claims infringed by Covered Software in the
-absence of Modifications made by that Contributor.
-
-3. Distribution Obligations.
-
-3.1. Availability of Source Code.
-
-Any Covered Software that You distribute or otherwise make
-available in Executable form must also be made available in
-Source Code form and that Source Code form must be
-distributed only under the terms of this License. You must
-include a copy of this License with every copy of the
-Source Code form of the Covered Software You distribute or
-otherwise make available. You must inform recipients of any
-such Covered Software in Executable form as to how they can
-obtain such Covered Software in Source Code form in a
-reasonable manner on or through a medium customarily used
-for software exchange.
-
-3.2. Modifications.
-
-The Modifications that You create or to which You
-contribute are governed by the terms of this License. You
-represent that You believe Your Modifications are Your
-original creation(s) and/or You have sufficient rights to
-grant the rights conveyed by this License.
-
-3.3. Required Notices.
-
-You must include a notice in each of Your Modifications
-that identifies You as the Contributor of the Modification.
-You may not remove or alter any copyright, patent or
-trademark notices contained within the Covered Software, or
-any notices of licensing or any descriptive text giving
-attribution to any Contributor or the Initial Developer.
-
-3.4. Application of Additional Terms.
-
-You may not offer or impose any terms on any Covered
-Software in Source Code form that alters or restricts the
-applicable version of this License or the recipients'
-rights hereunder. You may choose to offer, and to charge a
-fee for, warranty, support, indemnity or liability
-obligations to one or more recipients of Covered Software.
-However, you may do so only on Your own behalf, and not on
-behalf of the Initial Developer or any Contributor. You
-must make it absolutely clear that any such warranty,
-support, indemnity or liability obligation is offered by
-You alone, and You hereby agree to indemnify the Initial
-Developer and every Contributor for any liability incurred
-by the Initial Developer or such Contributor as a result of
-warranty, support, indemnity or liability terms You offer.
-
-3.5. Distribution of Executable Versions.
-
-You may distribute the Executable form of the Covered
-Software under the terms of this License or under the terms
-of a license of Your choice, which may contain terms
-different from this License, provided that You are in
-compliance with the terms of this License and that the
-license for the Executable form does not attempt to limit
-or alter the recipient's rights in the Source Code form
-from the rights set forth in this License. If You
-distribute the Covered Software in Executable form under a
-different license, You must make it absolutely clear that
-any terms which differ from this License are offered by You
-alone, not by the Initial Developer or Contributor. You
-hereby agree to indemnify the Initial Developer and every
-Contributor for any liability incurred by the Initial
-Developer or such Contributor as a result of any such terms
-You offer.
-
-3.6. Larger Works.
-
-You may create a Larger Work by combining Covered Software
-with other code not governed by the terms of this License
-and distribute the Larger Work as a single product. In such
-a case, You must make sure the requirements of this License
-are fulfilled for the Covered Software.
-
-4. Versions of the License.
-
-4.1. New Versions.
-
-Sun Microsystems, Inc. is the initial license steward and
-may publish revised and/or new versions of this License
-from time to time. Each version will be given a
-distinguishing version number. Except as provided in
-Section 4.3, no one other than the license steward has the
-right to modify this License.
-
-4.2. Effect of New Versions.
-
-You may always continue to use, distribute or otherwise
-make the Covered Software available under the terms of the
-version of the License under which You originally received
-the Covered Software. If the Initial Developer includes a
-notice in the Original Software prohibiting it from being
-distributed or otherwise made available under any
-subsequent version of the License, You must distribute and
-make the Covered Software available under the terms of the
-version of the License under which You originally received
-the Covered Software. Otherwise, You may also choose to
-use, distribute or otherwise make the Covered Software
-available under the terms of any subsequent version of the
-License published by the license steward.
-
-4.3. Modified Versions.
-
-When You are an Initial Developer and You want to create a
-new license for Your Original Software, You may create and
-use a modified version of this License if You: (a) rename
-the license and remove any references to the name of the
-license steward (except to note that the license differs
-from this License); and (b) otherwise make it clear that
-the license contains terms which differ from this License.
-
-5. DISCLAIMER OF WARRANTY.
-
-COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS"
-BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
-INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
-SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR
-PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND
-PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY
-COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE
-INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF
-ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
-WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
-ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS
-DISCLAIMER.
-
-6. TERMINATION.
-
-6.1. This License and the rights granted hereunder will
-terminate automatically if You fail to comply with terms
-herein and fail to cure such breach within 30 days of
-becoming aware of the breach. Provisions which, by their
-nature, must remain in effect beyond the termination of
-this License shall survive.
-
-6.2. If You assert a patent infringement claim (excluding
-declaratory judgment actions) against Initial Developer or
-a Contributor (the Initial Developer or Contributor against
-whom You assert such claim is referred to as "Participant")
-alleging that the Participant Software (meaning the
-Contributor Version where the Participant is a Contributor
-or the Original Software where the Participant is the
-Initial Developer) directly or indirectly infringes any
-patent, then any and all rights granted directly or
-indirectly to You by such Participant, the Initial
-Developer (if the Initial Developer is not the Participant)
-and all Contributors under Sections 2.1 and/or 2.2 of this
-License shall, upon 60 days notice from Participant
-terminate prospectively and automatically at the expiration
-of such 60 day notice period, unless if within such 60 day
-period You withdraw Your claim with respect to the
-Participant Software against such Participant either
-unilaterally or pursuant to a written agreement with
-Participant.
-
-6.3. If You assert a patent infringement claim against
-Participant alleging that the Participant Software directly
-or indirectly infringes any patent where such claim is
-resolved (such as by license or settlement) prior to the
-initiation of patent infringement litigation, then the
-reasonable value of the licenses granted by such Participant
-under Sections 2.1 or 2.2 shall be taken into account in
-determining the amount or value of any payment or license.
-
-6.4. In the event of termination under Sections 6.1 or 6.2
-above, all end user licenses that have been validly granted
-by You or any distributor hereunder prior to termination
-(excluding licenses granted to You by any distributor)
-shall survive termination.
-
-7. LIMITATION OF LIABILITY.
-
-UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
-(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE
-INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
-COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE
-LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR
-CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
-LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK
-STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
-COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
-INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
-LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL
-INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT
-APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO
-NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR
-CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT
-APPLY TO YOU.
-
-8. U.S. GOVERNMENT END USERS.
-
-The Covered Software is a "commercial item," as that term is
-defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial
-computer software" (as that term is defined at 48 C.F.R.
-§ 252.227-7014(a)(1)) and "commercial computer software
-documentation" as such terms are used in 48 C.F.R. 12.212 (Sept.
-1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1
-through 227.7202-4 (June 1995), all U.S. Government End Users
-acquire Covered Software with only those rights set forth herein.
-This U.S. Government Rights clause is in lieu of, and supersedes,
-any other FAR, DFAR, or other clause or provision that addresses
-Government rights in computer software under this License.
-
-9. MISCELLANEOUS.
-
-This License represents the complete agreement concerning subject
-matter hereof. If any provision of this License is held to be
-unenforceable, such provision shall be reformed only to the
-extent necessary to make it enforceable. This License shall be
-governed by the law of the jurisdiction specified in a notice
-contained within the Original Software (except to the extent
-applicable law, if any, provides otherwise), excluding such
-jurisdiction's conflict-of-law provisions. Any litigation
-relating to this License shall be subject to the jurisdiction of
-the courts located in the jurisdiction and venue specified in a
-notice contained within the Original Software, with the losing
-party responsible for costs, including, without limitation, court
-costs and reasonable attorneys' fees and expenses. The
-application of the United Nations Convention on Contracts for the
-International Sale of Goods is expressly excluded. Any law or
-regulation which provides that the language of a contract shall
-be construed against the drafter shall not apply to this License.
-You agree that You alone are responsible for compliance with the
-United States export administration regulations (and the export
-control laws and regulation of any other countries) when You use,
-distribute or otherwise make available any Covered Software.
-
-10. RESPONSIBILITY FOR CLAIMS.
-
-As between Initial Developer and the Contributors, each party is
-responsible for claims and damages arising, directly or
-indirectly, out of its utilization of rights under this License
-and You agree to work with Initial Developer and Contributors to
-distribute such responsibility on an equitable basis. Nothing
-herein is intended or shall be deemed to constitute any admission
-of liability.
-
-NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND
-DISTRIBUTION LICENSE (CDDL)
-
-The code released under the CDDL shall be governed by the laws
-of the State of California (excluding conflict-of-law provisions).
-Any litigation relating to this License shall be subject to the
-jurisdiction of the Federal Courts of the Northern District of
-California and the state courts of the State of California, with
-venue lying in Santa Clara County, California.
-
-
-The GNU General Public License (GPL)
-Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim
- copies of this license document, but changing it is not
- allowed.
-
- Preamble
-
-The licenses for most software are designed to take away
-your freedom to share and change it. By contrast, the GNU
-General Public License is intended to guarantee your freedom
-to share and change free software--to make sure the software
-is free for all its users. This General Public License
-applies to most of the Free Software Foundation's software
-and to any other program whose authors commit to using it.
-(Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can
-apply it to your programs, too.
-
-When we speak of free software, we are referring to freedom,
-not price. Our General Public Licenses are designed to make
-sure that you have the freedom to distribute copies of free
-software (and charge for this service if you wish), that you
-receive source code or can get it if you want it, that you
-can change the software or use pieces of it in new free
-programs; and that you know you can do these things.
-
-To protect your rights, we need to make restrictions that
-forbid anyone to deny you these rights or to ask you to
-surrender the rights. These restrictions translate to
-certain responsibilities for you if you distribute copies of
-the software, or if you modify it.
-
-For example, if you distribute copies of such a program,
-whether gratis or for a fee, you must give the recipients
-all the rights that you have. You must make sure that they,
-too, receive or can get the source code. And you must show
-them these terms so they know their rights.
-
-We protect your rights with two steps: (1) copyright the
-software, and (2) offer you this license which gives you
-legal permission to copy, distribute and/or modify the
-software.
-
-Also, for each author's protection and ours, we want to make
-certain that everyone understands that there is no warranty
-for this free software. If the software is modified by
-someone else and passed on, we want its recipients to know
-that what they have is not the original, so that any
-problems introduced by others will not reflect on the
-original authors' reputations.
-
-Finally, any free program is threatened constantly by
-software patents. We wish to avoid the danger that
-redistributors of a free program will individually obtain
-patent licenses, in effect making the program proprietary.
-To prevent this, we have made it clear that any patent must
-be licensed for everyone's free use or not licensed at all.
-
-The precise terms and conditions for copying, distribution
-and modification follow.
-
-TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND
-MODIFICATION
-
-0. This License applies to any program or other work which
-contains a notice placed by the copyright holder saying it
-may be distributed under the terms of this General Public
-License. The "Program", below, refers to any such program or
-work, and a "work based on the Program" means either the
-Program or any derivative work under copyright law: that is
-to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into
-another language. (Hereinafter, translation is included
-without limitation in the term "modification".) Each
-licensee is addressed as "you".
-
-Activities other than copying, distribution and modification
-are not covered by this License; they are outside its scope.
-The act of running the Program is not restricted, and the
-output from the Program is covered only if its contents
-constitute a work based on the Program (independent of
-having been made by running the Program). Whether that is
-true depends on what the Program does.
-
-1. You may copy and distribute verbatim copies of the
-Program's source code as you receive it, in any medium,
-provided that you conspicuously and appropriately publish on
-each copy an appropriate copyright notice and disclaimer of
-warranty; keep intact all the notices that refer to this
-License and to the absence of any warranty; and give any
-other recipients of the Program a copy of this License along
-with the Program.
-
-You may charge a fee for the physical act of transferring a
-copy, and you may at your option offer warranty protection
-in exchange for a fee.
-
-2. You may modify your copy or copies of the Program or any
-portion of it, thus forming a work based on the Program, and
-copy and distribute such modifications or work under the
-terms of Section 1 above, provided that you also meet all of
-these conditions:
-
- a) You must cause the modified files to carry prominent
- notices stating that you changed the files and the date
- of any change.
-
- b) You must cause any work that you distribute or
- publish, that in whole or in part contains or is derived
- from the Program or any part thereof, to be licensed as
- a whole at no charge to all third parties under the
- terms of this License.
-
- c) If the modified program normally reads commands
- interactively when run, you must cause it, when started
- running for such interactive use in the most ordinary
- way, to print or display an announcement including an
- appropriate copyright notice and a notice that there is
- no warranty (or else, saying that you provide a
- warranty) and that users may redistribute the program
- under these conditions, and telling the user how to view
- a copy of this License. (Exception: if the Program
- itself is interactive but does not normally print such
- an announcement, your work based on the Program is not
- required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the
-Program, and can be reasonably considered independent and
-separate works in themselves, then this License, and its
-terms, do not apply to those sections when you distribute
-them as separate works. But when you distribute the same
-sections as part of a whole which is a work based on the
-Program, the distribution of the whole must be on the terms
-of this License, whose permissions for other licensees
-extend to the entire whole, and thus to each and every part
-regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights
-or contest your rights to work written entirely by you;
-rather, the intent is to exercise the right to control the
-distribution of derivative or collective works based on the
-Program.
-
-In addition, mere aggregation of another work not based on
-the Program with the Program (or with a work based on the
-Program) on a volume of a storage or distribution medium
-does not bring the other work under the scope of this
-License.
-
-3. You may copy and distribute the Program (or a work based
-on it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you
-also do one of the following:
-
- a) Accompany it with the complete corresponding
- machine-readable source code, which must be distributed
- under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least
- three years, to give any third party, for a charge no
- more than your cost of physically performing source
- distribution, a complete machine-readable copy of the
- corresponding source code, to be distributed under the
- terms of Sections 1 and 2 above on a medium customarily
- used for software interchange; or,
-
- c) Accompany it with the information you received as to
- the offer to distribute corresponding source code. (This
- alternative is allowed only for noncommercial
- distribution and only if you received the program in
- object code or executable form with such an offer, in
- accord with Subsection b above.)
-
-The source code for a work means the preferred form of the
-work for making modifications to it. For an executable work,
-complete source code means all the source code for all
-modules it contains, plus any associated interface
-definition files, plus the scripts used to control
-compilation and installation of the executable. However, as
-a special exception, the source code distributed need not
-include anything that is normally distributed (in either
-source or binary form) with the major components (compiler,
-kernel, and so on) of the operating system on which the
-executable runs, unless that component itself accompanies
-the executable.
-
-If distribution of executable or object code is made by
-offering access to copy from a designated place, then
-offering equivalent access to copy the source code from the
-same place counts as distribution of the source code, even
-though third parties are not compelled to copy the source
-along with the object code.
-
-4. You may not copy, modify, sublicense, or distribute the
-Program except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense or distribute
-the Program is void, and will automatically terminate your
-rights under this License. However, parties who have
-received copies, or rights, from you under this License will
-not have their licenses terminated so long as such parties
-remain in full compliance.
-
-5. You are not required to accept this License, since you
-have not signed it. However, nothing else grants you
-permission to modify or distribute the Program or its
-derivative works. These actions are prohibited by law if you
-do not accept this License. Therefore, by modifying or
-distributing the Program (or any work based on the Program),
-you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or
-modifying the Program or works based on it.
-
-6. Each time you redistribute the Program (or any work based
-on the Program), the recipient automatically receives a
-license from the original licensor to copy, distribute or
-modify the Program subject to these terms and conditions.
-You may not impose any further restrictions on the
-recipients' exercise of the rights granted herein. You are
-not responsible for enforcing compliance by third parties to
-this License.
-
-7. If, as a consequence of a court judgment or allegation of
-patent infringement or for any other reason (not limited to
-patent issues), conditions are imposed on you (whether by
-court order, agreement or otherwise) that contradict the
-conditions of this License, they do not excuse you from the
-conditions of this License. If you cannot distribute so as
-to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a
-consequence you may not distribute the Program at all. For
-example, if a patent license would not permit royalty-free
-redistribution of the Program by all those who receive
-copies directly or indirectly through you, then the only way
-you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or
-unenforceable under any particular circumstance, the balance
-of the section is intended to apply and the section as a
-whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to
-infringe any patents or other property right claims or to
-contest validity of any such claims; this section has the
-sole purpose of protecting the integrity of the free
-software distribution system, which is implemented by public
-license practices. Many people have made generous
-contributions to the wide range of software distributed
-through that system in reliance on consistent application of
-that system; it is up to the author/donor to decide if he or
-she is willing to distribute software through any other
-system and a licensee cannot impose that choice.
-
-This section is intended to make thoroughly clear what is
-believed to be a consequence of the rest of this License.
-
-8. If the distribution and/or use of the Program is
-restricted in certain countries either by patents or by
-copyrighted interfaces, the original copyright holder who
-places the Program under this License may add an explicit
-geographical distribution limitation excluding those
-countries, so that distribution is permitted only in or
-among countries not thus excluded. In such case, this
-License incorporates the limitation as if written in the
-body of this License.
-
-9. The Free Software Foundation may publish revised and/or
-new versions of the General Public License from time to
-time. Such new versions will be similar in spirit to the
-present version, but may differ in detail to address new
-problems or concerns.
-
-Each version is given a distinguishing version number. If
-the Program specifies a version number of this License which
-applies to it and "any later version", you have the option
-of following the terms and conditions either of that version
-or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number
-of this License, you may choose any version ever published
-by the Free Software Foundation.
-
-10. If you wish to incorporate parts of the Program into
-other free programs whose distribution conditions are
-different, write to the author to ask for permission. For
-software which is copyrighted by the Free Software
-Foundation, write to the Free Software Foundation; we
-sometimes make exceptions for this. Our decision will be
-guided by the two goals of preserving the free status of all
-derivatives of our free software and of promoting the
-sharing and reuse of software generally.
-
-NO WARRANTY
-
-11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS
-NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
-COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM
-"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
-IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE
-OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
-DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED
-TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY
-WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED
-ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL,
-SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF
-THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT
-LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
-LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE
-PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH
-HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
-If you develop a new program, and you want it to be of the
-greatest possible use to the public, the best way to achieve
-this is to make it free software which everyone can
-redistribute and change under these terms.
-
-To do so, attach the following notices to the program. It is
-safest to attach them to the start of each source file to
-most effectively convey the exclusion of warranty; and each
-file should have at least the "copyright" line and a pointer
-to where the full notice is found.
-
- One line to give the program's name and a brief idea of
- what it does. Copyright (C)
-
- This program is free software; you can redistribute it
- and/or modify it under the terms of the GNU General
- Public License as published by the Free Software
- Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- This program is distributed in the hope that it will be
- useful, but WITHOUT ANY WARRANTY; without even the
- implied warranty of MERCHANTABILITY or FITNESS FOR A
- PARTICULAR PURPOSE. See the GNU General Public License
- for more details.
-
- You should have received a copy of the GNU General
- Public License along with this program; if not, write to
- the Free Software Foundation, Inc., 59 Temple Place,
- Suite 330, Boston, MA 02111-1307 USA
-
-Also add information on how to contact you by electronic and
-paper mail.
-
-If the program is interactive, make it output a short notice
-like this when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of
- author Gnomovision comes with ABSOLUTELY NO WARRANTY;
- for details type `show w'. This is free software, and
- you are welcome to redistribute it under certain
- conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show
-the appropriate parts of the General Public License. Of
-course, the commands you use may be called something other
-than `show w' and `show c'; they could even be mouse-clicks
-or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a
-programmer) or your school, if any, to sign a "copyright
-disclaimer" for the program, if necessary. Here is a sample;
-alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in
- the program `Gnomovision' (which makes passes at
- compilers) written by James Hacker.
-
- signature of Ty Coon, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating
-your program into proprietary programs. If your program is a
-subroutine library, you may consider it more useful to
-permit linking proprietary applications with the library. If
-this is what you want to do, use the GNU Library General
-Public License instead of this License.
-
-
-"CLASSPATH" EXCEPTION TO THE GPL VERSION 2
-
-
-Certain source files distributed by Sun Microsystems, Inc.
-are subject to the following clarification and special
-exception to the GPL Version 2, but only where Sun has expressly
-included in the particular source file's header the words
-"Sun designates this particular file as subject to the
-"Classpath" exception as provided by Sun in the License file
-that accompanied this code."
-
-Linking this library statically or dynamically with other
-modules is making a combined work based on this library.
-Thus, the terms and conditions of the GNU General Public
-License Version 2 cover the whole combination.
-
-As a special exception, the copyright holders of this
-library give you permission to link this library with
-independent modules to produce an executable, regardless of
-the license terms of these independent modules, and to copy
-and distribute the resulting executable under terms of your
-choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license
-of that module. An independent module is a module which is
-not derived from or based on this library. If you modify
-this library, you may extend this exception to your version
-of the library, but you are not obligated to do so. If you
-do not wish to do so, delete this exception statement from
-your version.
diff --git a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/ui/Bundle.properties b/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/ui/Bundle.properties
deleted file mode 100644
index 696d2cf50f56..000000000000
--- a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/ui/Bundle.properties
+++ /dev/null
@@ -1,49 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-LBL_InstallerPanel=Installer
-
-InstallerPanel.OSLabelWindows=W&indows
-InstallerPanel.OSLabelLinux=Li&nux
-InstallerPanel.OSLabelMacOS=M&ac OS X
-InstallerPanel.OSLabelSolaris=S&olaris
-
-InstallerPanel.Platforms.Label=Generate installers for:
-InstallerPanel.licenseLabel.text=Application &license:
-InstallerPanel_License.FileChooser.Title=Select License File...
-
-SuiteInstallerProjectProperties.license.type.no=No License
-SuiteInstallerProjectProperties.license.type.cddl=CDDL 1.0
-SuiteInstallerProjectProperties.license.type.cddl+gplv2=CDDL 1.0 + GPL v2 with ClassPath Exception
-SuiteInstallerProjectProperties.license.type.apache.v2=Apache License Version 2.0
-SuiteInstallerProjectProperties.license.type.custom=Select License File...
-#InstallerPanel.license.type.custom=Custom...
-
-#SuiteInstallerProjectProperties.license.file.no=
-SuiteInstallerProjectProperties.license.file.cddl=nbres:/org/netbeans/modules/apisupport/installer/resources/licenses/CDDL-1.0
-SuiteInstallerProjectProperties.license.file.cddl+gplv2=nbres:/org/netbeans/modules/apisupport/installer/resources/licenses/CDDL-GPL-2-CP
-SuiteInstallerProjectProperties.license.file.apache.v2=nbres:/org/netbeans/modules/apisupport/installer/resources/licenses/Apache-2.0
-InstallerPanel.pack200checkBox.text=Use pac&k200 compression
-InstallerPanel.Pack200.Description.Text=Note: Pack200 compression significantly (up to 70%) descreases installer size.
-
-InstallerPanel.OSLabelWindows.AccessibleContext.accessible=Generate installers for Windows platform
-InstallerPanel.OSLabelLinux.AccessibleContext.accessible=Generate installers for Linux platform
-InstallerPanel.OSLabelMacOS.AccessibleContext.accessible=Generate installers for Mac OS X platform
-InstallerPanel.OSLabelSolaris.AccessibleContext.accessible=Generate installers for Solaris platform
-InstallerPanel.jCheckBox5.AccessibleContext.accessibleDescription=Select to enable pack200 compression in generated installers
-InstallerPanel.licenseComboBox.AccessibleContext.accessibleName=Application license
-InstallerPanel.licenseComboBox.AccessibleContext.accessibleDescription=Choose the license which covers the application
diff --git a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/ui/ExtraPanel.java b/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/ui/ExtraPanel.java
deleted file mode 100644
index 68c6c0e82eb7..000000000000
--- a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/ui/ExtraPanel.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.netbeans.modules.apisupport.installer.ui;
-
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.io.IOException;
-import javax.swing.JComponent;
-import org.netbeans.api.project.Project;
-import org.netbeans.spi.project.ui.support.ProjectCustomizer;
-import org.openide.util.Lookup;
-import org.openide.util.NbBundle;
-import org.openide.util.Exceptions;
-
-
-@ProjectCustomizer.CompositeCategoryProvider.Registration(
- projectType="org-netbeans-modules-apisupport-project-suite",
- position=1000
-)
-public class ExtraPanel implements ProjectCustomizer.CompositeCategoryProvider {
-
- public @Override ProjectCustomizer.Category createCategory(Lookup context) {
- return ProjectCustomizer.Category.create(
- "Installer",
- NbBundle.getMessage(ExtraPanel.class, "LBL_InstallerPanel"),
- null,
- (ProjectCustomizer.Category[])null);
- }
-
- public @Override JComponent createComponent(ProjectCustomizer.Category category, Lookup context) {
- SuiteInstallerProjectProperties installerProjectProperties = new SuiteInstallerProjectProperties(context.lookup(Project.class));
- // use OkListener to create new configuration first
- //category.setOkButtonListener(new OkButtonListener(installerProjectProperties, context.lookup(Project.class)));
- category.setStoreListener(new SavePropsListener(installerProjectProperties));
- return new InstallerPanel(installerProjectProperties);
- }
-
- private static class SavePropsListener implements ActionListener {
-
- private SuiteInstallerProjectProperties installerProps;
-
- public SavePropsListener(SuiteInstallerProjectProperties props) {
- installerProps = props;
- }
-
- public @Override void actionPerformed(ActionEvent e) {
- try {
- installerProps.store();
- } catch (IOException ioe) {
- Exceptions.printStackTrace(ioe);
- }
- }
-}}
diff --git a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/ui/InstallerPanel.form b/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/ui/InstallerPanel.form
deleted file mode 100644
index 9e2d21e3e475..000000000000
--- a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/ui/InstallerPanel.form
+++ /dev/null
@@ -1,228 +0,0 @@
-
-
-
-
-
diff --git a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/ui/InstallerPanel.java b/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/ui/InstallerPanel.java
deleted file mode 100644
index ceddd40366e1..000000000000
--- a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/ui/InstallerPanel.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-package org.netbeans.modules.apisupport.installer.ui;
-
-/**
- *
- * @author Dmitry Lipin
- * @author Alexei Mokeev
- */
-public class InstallerPanel extends javax.swing.JPanel {
-
- private SuiteInstallerProjectProperties installerProps;
-
- /** Creates new form InstallerPanel */
- public InstallerPanel(SuiteInstallerProjectProperties props) {
- this.installerProps = props;
- initComponents();
-
- jCheckBox1.setModel(installerProps.windowsModel);
- jCheckBox2.setModel(installerProps.linuxModel);
- jCheckBox3.setModel(installerProps.macModel);
- jCheckBox4.setModel(installerProps.solarisModel);
-
- licenseComboBox.setModel(installerProps.licenseModel);
- }
-
- /** This method is called from within the constructor to
- * initialize the form.
- * WARNING: Do NOT modify this code. The content of this method is
- * always regenerated by the Form Editor.
- */
- @SuppressWarnings("unchecked")
- // //GEN-BEGIN:initComponents
- private void initComponents() {
-
- jLabel2 = new javax.swing.JLabel();
- jCheckBox1 = new javax.swing.JCheckBox();
- jCheckBox2 = new javax.swing.JCheckBox();
- jCheckBox3 = new javax.swing.JCheckBox();
- jCheckBox4 = new javax.swing.JCheckBox();
- jSeparator1 = new javax.swing.JSeparator();
- licenseLabel = new javax.swing.JLabel();
- licenseComboBox = new javax.swing.JComboBox();
- jCheckBox5 = new javax.swing.JCheckBox();
- jSeparator2 = new javax.swing.JSeparator();
- pack200Info = new javax.swing.JLabel();
-
- org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(InstallerPanel.class, "InstallerPanel.Platforms.Label")); // NOI18N
-
- org.openide.awt.Mnemonics.setLocalizedText(jCheckBox1, org.openide.util.NbBundle.getMessage(InstallerPanel.class, "InstallerPanel.OSLabelWindows")); // NOI18N
-
- org.openide.awt.Mnemonics.setLocalizedText(jCheckBox2, org.openide.util.NbBundle.getMessage(InstallerPanel.class, "InstallerPanel.OSLabelLinux")); // NOI18N
-
- org.openide.awt.Mnemonics.setLocalizedText(jCheckBox3, org.openide.util.NbBundle.getMessage(InstallerPanel.class, "InstallerPanel.OSLabelMacOS")); // NOI18N
-
- org.openide.awt.Mnemonics.setLocalizedText(jCheckBox4, org.openide.util.NbBundle.getMessage(InstallerPanel.class, "InstallerPanel.OSLabelSolaris")); // NOI18N
-
- licenseLabel.setLabelFor(licenseComboBox);
- org.openide.awt.Mnemonics.setLocalizedText(licenseLabel, org.openide.util.NbBundle.getMessage(InstallerPanel.class, "InstallerPanel.licenseLabel.text")); // NOI18N
-
- org.openide.awt.Mnemonics.setLocalizedText(jCheckBox5, org.openide.util.NbBundle.getMessage(InstallerPanel.class, "InstallerPanel.pack200checkBox.text")); // NOI18N
-
- org.openide.awt.Mnemonics.setLocalizedText(pack200Info, org.openide.util.NbBundle.getMessage(InstallerPanel.class, "InstallerPanel.Pack200.Description.Text")); // NOI18N
- pack200Info.setVerticalAlignment(javax.swing.SwingConstants.TOP);
- pack200Info.setFocusable(false);
-
- javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
- this.setLayout(layout);
- layout.setHorizontalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addContainerGap()
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 1122, Short.MAX_VALUE)
- .addGroup(layout.createSequentialGroup()
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addComponent(jLabel2)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(jCheckBox1)
- .addComponent(jCheckBox2)
- .addComponent(jCheckBox3)
- .addComponent(jCheckBox4))
- .addGap(53, 53, 53))
- .addGroup(layout.createSequentialGroup()
- .addComponent(licenseLabel)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(licenseComboBox, 0, 1027, Short.MAX_VALUE)))
- .addGap(0, 0, 0))))
- .addGroup(layout.createSequentialGroup()
- .addContainerGap()
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addComponent(jCheckBox5, javax.swing.GroupLayout.DEFAULT_SIZE, 1116, Short.MAX_VALUE)
- .addContainerGap())
- .addComponent(jSeparator2, javax.swing.GroupLayout.DEFAULT_SIZE, 1122, Short.MAX_VALUE)))
- .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
- .addGap(31, 31, 31)
- .addComponent(pack200Info, javax.swing.GroupLayout.DEFAULT_SIZE, 1091, Short.MAX_VALUE)
- .addContainerGap())
- );
- layout.setVerticalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addContainerGap()
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(jCheckBox1)
- .addComponent(jLabel2))
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(jCheckBox2)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(jCheckBox3)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(jCheckBox4)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(licenseLabel)
- .addComponent(licenseComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addGap(7, 7, 7)
- .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(jCheckBox5)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(pack200Info, javax.swing.GroupLayout.DEFAULT_SIZE, 26, Short.MAX_VALUE)
- .addGap(99, 99, 99))
- );
-
- jLabel2.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(InstallerPanel.class, "InstallerPanel.Platforms.Label")); // NOI18N
- jCheckBox1.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(InstallerPanel.class, "InstallerPanel.OSLabelWindows.AccessibleContext.accessible")); // NOI18N
- jCheckBox2.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(InstallerPanel.class, "InstallerPanel.OSLabelLinux.AccessibleContext.accessible")); // NOI18N
- jCheckBox3.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(InstallerPanel.class, "InstallerPanel.OSLabelMacOS.AccessibleContext.accessible")); // NOI18N
- jCheckBox4.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(InstallerPanel.class, "InstallerPanel.OSLabelSolaris.AccessibleContext.accessible")); // NOI18N
- licenseComboBox.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(InstallerPanel.class, "InstallerPanel.licenseComboBox.AccessibleContext.accessibleName")); // NOI18N
- licenseComboBox.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(InstallerPanel.class, "InstallerPanel.licenseComboBox.AccessibleContext.accessibleDescription")); // NOI18N
- jCheckBox5.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(InstallerPanel.class, "InstallerPanel.jCheckBox5.AccessibleContext.accessibleDescription")); // NOI18N
- }// //GEN-END:initComponents
-
-
- // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JCheckBox jCheckBox1;
- private javax.swing.JCheckBox jCheckBox2;
- private javax.swing.JCheckBox jCheckBox3;
- private javax.swing.JCheckBox jCheckBox4;
- private javax.swing.JCheckBox jCheckBox5;
- private javax.swing.JLabel jLabel2;
- private javax.swing.JSeparator jSeparator1;
- private javax.swing.JSeparator jSeparator2;
- private javax.swing.JComboBox licenseComboBox;
- private javax.swing.JLabel licenseLabel;
- private javax.swing.JLabel pack200Info;
- // End of variables declaration//GEN-END:variables
-
-
-}
diff --git a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/ui/LicenseComboBoxModel.java b/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/ui/LicenseComboBoxModel.java
deleted file mode 100644
index c41896f1598d..000000000000
--- a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/ui/LicenseComboBoxModel.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.netbeans.modules.apisupport.installer.ui;
-
-import java.io.File;
-import java.util.LinkedList;
-import java.util.List;
-import javax.swing.ComboBoxModel;
-import javax.swing.JFileChooser;
-import javax.swing.event.ListDataEvent;
-import javax.swing.event.ListDataListener;
-import org.netbeans.api.project.Project;
-import org.openide.filesystems.FileChooserBuilder;
-import org.openide.filesystems.FileUtil;
-import org.openide.util.NbBundle;
-
-/**
- *
- * @author Dmitry Lipin
- */
-public class LicenseComboBoxModel implements ComboBoxModel {
-
- private List listeners;
- private List names;
- private List types;
- private String selectedItem;
- private boolean selectedItemFromList;
- private Project suiteProject;
-
- public LicenseComboBoxModel(Project suiteProject, List names, List types) {
- this.suiteProject = suiteProject;
- this.names = new LinkedList();
- this.names.addAll(names);
-
- this.types = new LinkedList();
- this.types.addAll(types);
-
- this.listeners = new LinkedList();
-
- if (names.size() > 0) {
- this.selectedItem = names.get(0);
- this.selectedItemFromList = true;
- } else {
- this.selectedItem = "";
- this.selectedItemFromList = false;
- }
- }
-
- public List getTypes() {
- return types;
- }
-
- public List getNames() {
- return names;
- }
-
- public String getName() {
- if (selectedItemFromList) {
- return names.get(names.indexOf(selectedItem));
- } else {
- return selectedItem;
- }
- }
-
- // comboboxmodel ////////////////////////////////////////////////////////////
- public void setSelectedItem(Object item) {
- String oldSelectedItem = selectedItem;
- selectedItem = (String) item;
-
- if (names.indexOf(item) != -1) {
- if (types.get(names.indexOf(selectedItem)).equals(
- SuiteInstallerProjectProperties.LICENSE_TYPE_CUSTOM)) {
-
- File home = FileUtil.toFile(suiteProject.getProjectDirectory());
- File licenseFile = new FileChooserBuilder("installer-license-dir").setTitle(NbBundle.getMessage(LicenseComboBoxModel.class, "InstallerPanel_License.FileChooser.Title")).
- setDefaultWorkingDirectory(home).setFilesOnly(true).showOpenDialog();
- if (licenseFile != null) {
- names.add(licenseFile.getAbsolutePath());
- types.add(SuiteInstallerProjectProperties.LICENSE_TYPE_FILE);
- selectedItem = names.get(names.size() - 1);
- } else {
- selectedItem = oldSelectedItem;
- }
- }
- selectedItemFromList = true;
- } else {
- selectedItemFromList = false;
- }
-
- fireContentsChanged(-1);
- }
-
- public Object getSelectedItem() {
- return selectedItem;
- }
-
- public int getSize() {
- return names.size();
- }
-
- public Object getElementAt(int index) {
- return names.get(index);
- }
-
- public void addListDataListener(ListDataListener listener) {
- synchronized (listeners) {
- listeners.add(listener);
- }
- }
-
- public void removeListDataListener(ListDataListener listener) {
- synchronized (listeners) {
- listeners.remove(listener);
- }
- }
-
- // private //////////////////////////////////////////////////////////////////
- private void fireContentsChanged(int index) {
- final ListDataListener[] clone;
- synchronized (listeners) {
- clone = listeners.toArray(new ListDataListener[0]);
- }
-
- final ListDataEvent event = new ListDataEvent(
- this,
- ListDataEvent.CONTENTS_CHANGED,
- index,
- index);
-
- for (ListDataListener listener : clone) {
- listener.contentsChanged(event);
- }
- }
-}
-
diff --git a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/ui/SuiteInstallerProjectProperties.java b/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/ui/SuiteInstallerProjectProperties.java
deleted file mode 100644
index 828729cdf17a..000000000000
--- a/apisupport/apisupport.installer/src/org/netbeans/modules/apisupport/installer/ui/SuiteInstallerProjectProperties.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.netbeans.modules.apisupport.installer.ui;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.ResourceBundle;
-import java.util.prefs.Preferences;
-import javax.swing.JToggleButton;
-import org.netbeans.api.project.Project;
-import org.netbeans.api.project.ProjectUtils;
-import org.netbeans.spi.project.support.ant.PropertyUtils;
-import org.openide.filesystems.FileUtil;
-import org.openide.util.NbBundle;
-import org.openide.util.Utilities;
-
-/**
- *
- * @author avm
- */
-public class SuiteInstallerProjectProperties {
-
- public static final String GENERATE_FOR_WINDOWS = "os-windows";
- public static final String GENERATE_FOR_LINUX = "os-linux";
- public static final String GENERATE_FOR_SOLARIS = "os-solaris";
- public static final String GENERATE_FOR_MAC = "os-macosx";
-
- public static final String LICENSE_TYPE = "license-type";
- public static final String LICENSE_TYPE_NO = "no";
- public static final String LICENSE_TYPE_FILE = "file";
- public static final String LICENSE_TYPE_CUSTOM = "custom";
- public static final String LICENSE_FILE = "license-file";
-
- private final Project suiteProject;
- final JToggleButton.ToggleButtonModel windowsModel;
- final JToggleButton.ToggleButtonModel linuxModel;
- final JToggleButton.ToggleButtonModel solarisModel;
- final JToggleButton.ToggleButtonModel macModel;
- final LicenseComboBoxModel licenseModel;
-
- public SuiteInstallerProjectProperties(Project suiteProject) {
- this.suiteProject = suiteProject;
- Preferences prefs = prefs(suiteProject);
- windowsModel = new JToggleButton.ToggleButtonModel();
- windowsModel.setSelected(prefs.getBoolean(GENERATE_FOR_WINDOWS, Utilities.isWindows()));
- linuxModel = new JToggleButton.ToggleButtonModel();
- linuxModel.setSelected(prefs.getBoolean(GENERATE_FOR_LINUX, Utilities.getOperatingSystem() == Utilities.OS_LINUX));
- solarisModel = new JToggleButton.ToggleButtonModel();
- solarisModel.setSelected(prefs.getBoolean(GENERATE_FOR_SOLARIS, Utilities.getOperatingSystem() == Utilities.OS_SOLARIS));
- macModel = new JToggleButton.ToggleButtonModel();
- macModel.setSelected(prefs.getBoolean(GENERATE_FOR_MAC, Utilities.isMac()));
-
- // license model:
- ResourceBundle rb = NbBundle.getBundle(SuiteInstallerProjectProperties.class);
- Enumeration keys = rb.getKeys();
- String prefix = "SuiteInstallerProjectProperties.license.type.";
- List names = new ArrayList();
- List types = new ArrayList();
-
- while (keys.hasMoreElements()) {
- String key = keys.nextElement();
- if (key.startsWith(prefix)) {
- String type = key.substring(prefix.length());
- String value = NbBundle.getMessage(SuiteInstallerProjectProperties.class, key);
- if (type.equals(LICENSE_TYPE_NO)) {
- //No License is the first option
- names.add(0, value);
- types.add(0, type);
- } else {
- names.add(value);
- types.add(type);
- }
- }
- }
- licenseModel = new LicenseComboBoxModel(suiteProject, names, types);
-
- String licenseFileName = prefs.get(LICENSE_FILE, null);
- String licenseType = prefs.get(LICENSE_TYPE, null);
- if (licenseFileName != null) {
- File licenseFile = new File(licenseFileName);
- if (!licenseFile.isAbsolute()) {
- licenseFile = PropertyUtils.resolveFile(FileUtil.toFile(suiteProject.getProjectDirectory()), licenseFileName);
- }
-
- licenseModel.getNames().add(licenseFile.getAbsolutePath());
- licenseModel.getTypes().add(LICENSE_TYPE_FILE);
- String name = licenseModel.getNames().get(licenseModel.getNames().size() - 1);
- licenseModel.setSelectedItem(name);
- }
-
- else if (licenseType != null) {
- int index = licenseModel.getTypes().indexOf(licenseType);
- if (index != -1) {
- licenseModel.setSelectedItem(licenseModel.getNames().get(index));
- }
- }
- }
-
- public void store() throws IOException {
- Preferences prefs = prefs(suiteProject);
- prefs.putBoolean(GENERATE_FOR_WINDOWS, windowsModel.isSelected());
- prefs.putBoolean(GENERATE_FOR_LINUX, linuxModel.isSelected());
- prefs.putBoolean(GENERATE_FOR_SOLARIS, solarisModel.isSelected());
- prefs.putBoolean(GENERATE_FOR_MAC, macModel.isSelected());
- String licenseName = (String) licenseModel.getSelectedItem();
- if (licenseName != null) {
- int index = licenseModel.getNames().indexOf(licenseName);
- if (index != -1) {
- String type = licenseModel.getTypes().get(index);
- if (type.equals(LICENSE_TYPE_FILE)) {
- File suiteLocation = FileUtil.toFile(suiteProject.getProjectDirectory());
- File f = PropertyUtils.resolveFile(suiteLocation, licenseName);
- String rel = PropertyUtils.relativizeFile(suiteLocation, f);
- if (rel != null) {
- prefs.put(LICENSE_FILE, rel);
- } else {
- prefs.put(LICENSE_FILE, f.getAbsolutePath());
- }
- prefs.remove(LICENSE_TYPE);
- } else {
- prefs.put(LICENSE_TYPE, type);
- prefs.remove(LICENSE_FILE);
- }
- }
- }
- }
-
- public static Preferences prefs(Project suiteProject) {
- return ProjectUtils.getPreferences(suiteProject, SuiteInstallerProjectProperties.class, true);
- }
-
-}
diff --git a/apisupport/apisupport.kit/nbproject/project.xml b/apisupport/apisupport.kit/nbproject/project.xml
index 90dd446a617d..a7a6f9a64e61 100644
--- a/apisupport/apisupport.kit/nbproject/project.xml
+++ b/apisupport/apisupport.kit/nbproject/project.xml
@@ -37,12 +37,6 @@
1.10
-
- org.netbeans.modules.apisupport.installer
-
- 1.0
-
-
org.netbeans.modules.apisupport.project
diff --git a/harness/libs.nbi.ant/build.xml b/harness/libs.nbi.ant/build.xml
deleted file mode 100644
index 926a842863de..000000000000
--- a/harness/libs.nbi.ant/build.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-
-
-
-
-
-
- Builds, tests, and runs the project org.netbeans.libs.nbi.ant
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/harness/libs.nbi.ant/licenseinfo.xml b/harness/libs.nbi.ant/licenseinfo.xml
deleted file mode 100644
index 1680a996e9b4..000000000000
--- a/harness/libs.nbi.ant/licenseinfo.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
- stub/ext/engine/src/org/mycompany/installer/wizard/wizard-description-background-right.png
- stub/ext/engine/src/org/mycompany/installer/wizard/wizard-icon.png
- stub/ext/engine/src/org/mycompany/installer/wizard/wizard-description-background-left.png
- stub/ext/engine/src/org/mycompany/installer/wizard/components/panels/resources/welcome-left-top.png
- stub/ext/engine/src/org/mycompany/installer/wizard/components/panels/resources/welcome-left-bottom.png
- stub/ext/components/products/helloworld/data/icon.png
- stub/ext/components/products/helloworld/data/icon48.png
-
-
-
-
\ No newline at end of file
diff --git a/harness/libs.nbi.ant/manifest.mf b/harness/libs.nbi.ant/manifest.mf
deleted file mode 100644
index 53c00ff54b02..000000000000
--- a/harness/libs.nbi.ant/manifest.mf
+++ /dev/null
@@ -1,5 +0,0 @@
-Manifest-Version: 1.0
-AutoUpdate-Show-In-Client: false
-OpenIDE-Module: org.netbeans.libs.nbi.ant
-OpenIDE-Module-Localizing-Bundle: org/netbeans/libs/nbi/ant/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.50
diff --git a/harness/libs.nbi.ant/nbproject/project.properties b/harness/libs.nbi.ant/nbproject/project.properties
deleted file mode 100644
index 9214f6ed7dfd..000000000000
--- a/harness/libs.nbi.ant/nbproject/project.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-is.autoload=true
-javac.source=1.8
-javac.target=1.8
-javac.compilerargs=-Xlint -Xlint:-serial
-extra.module.files=\
- modules/ext/nbi-ant-tasks.jar,\
- modules/ext/nbi-registries-management.jar,\
- nbi/
-nbm.module.author=Dmitry Lipin
-
diff --git a/harness/libs.nbi.ant/nbproject/project.xml b/harness/libs.nbi.ant/nbproject/project.xml
deleted file mode 100644
index 850aa4fff388..000000000000
--- a/harness/libs.nbi.ant/nbproject/project.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
- org.netbeans.modules.apisupport.project
-
-
- org.netbeans.libs.nbi.ant
-
-
- org.netbeans.libs.nbi.engine
-
-
-
-
-
-
-
diff --git a/harness/libs.nbi.ant/src/org/netbeans/libs/nbi/ant/Bundle.properties b/harness/libs.nbi.ant/src/org/netbeans/libs/nbi/ant/Bundle.properties
deleted file mode 100644
index 71e0d276a877..000000000000
--- a/harness/libs.nbi.ant/src/org/netbeans/libs/nbi/ant/Bundle.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-OpenIDE-Module-Display-Category=Infrastructure
-OpenIDE-Module-Name=NBI Ant Library
diff --git a/harness/libs.nbi.ant/stub/build.properties b/harness/libs.nbi.ant/stub/build.properties
deleted file mode 100644
index f57f444f7fba..000000000000
--- a/harness/libs.nbi.ant/stub/build.properties
+++ /dev/null
@@ -1,43 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-output.dir=${basedir}/build
-jarsigner.enabled=false
-core.module.name=nbi
-ext.module.name=ext
-
-nbi.all.dir=${basedir}/nbi_all
-nbi.core.dir=${nbi.all.dir}/${core.module.name}
-nbi.ext.dir=${nbi.all.dir}/${ext.module.name}
-
-temp.file=${nbi.all.dir}/temp.ant.tmp
-environment.properties=${nbi.all.dir}/environment.properties
-
-context.path.token=/nbi/dev
-context.path.replacement=${context.path}
-
-context.dir.token=ROOT = new File\\(".*?"\\);
-context.dir.replacement=ROOT = new File\\("${context.dir}"\);
-
-custom.tasks.cls={nbi.ant.tasks.jar}${path.separator}{nbi.registries.management.jar}${path.separator}{nbi.engine.jar}
-nbi.engine.jar={nbi.engine.jar}
-
-jdk.home={generator-jdk-location-forward-slashes}
-bundles.release.dir={generated-installers-location-forward-slashes}
-bundle.files.prefix={generated-installers-prefix}
-
-target.platforms={product-platforms}
-main.product.uid={product-uid}
diff --git a/harness/libs.nbi.ant/stub/build.xml b/harness/libs.nbi.ant/stub/build.xml
deleted file mode 100644
index 1ca8dbfffb65..000000000000
--- a/harness/libs.nbi.ant/stub/build.xml
+++ /dev/null
@@ -1,222 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-checkout.sources=false
-sources.dir=${nbi.all.dir}
-cvs.module=ext
-
-release.to.server=false
-release.registry.dir=${output.dir}/registry-temp
-
-dont.build.custom.tasks=true
-custom.tasks.cls=${custom.tasks.cls}
-
-build.engine=false
-
-engine.dist.file.name=nbi-engine.jar
-engine.dist.file=${nbi.core.dir}/infra/build/engine/dist/nbi-engine.jar
-
-packaged.data.dir=${basedir}/cache/packaged
-downloads.cache.dir=${basedir}/cache/raw
-
-jarsigner.enabled=${jarsigner.enabled}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Installer(s) for [${target.platforms}] are available at ${bundles.release.dir}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/build.xml b/harness/libs.nbi.ant/stub/ext/components/products/helloworld/build.xml
deleted file mode 100644
index 170e916a2725..000000000000
--- a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/build.xml
+++ /dev/null
@@ -1,94 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- Builds, tests, and runs the project helloworld.
-
-
-
diff --git a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/data/Bundle.properties b/harness/libs.nbi.ant/stub/ext/components/products/helloworld/data/Bundle.properties
deleted file mode 100644
index bb4a014d52e1..000000000000
--- a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/data/Bundle.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-product.display.name={product-name}
-product.description={product-description}
diff --git a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/data/icon.png b/harness/libs.nbi.ant/stub/ext/components/products/helloworld/data/icon.png
deleted file mode 100644
index 1b3bcd61d25b..000000000000
Binary files a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/data/icon.png and /dev/null differ
diff --git a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/data/icon48.png b/harness/libs.nbi.ant/stub/ext/components/products/helloworld/data/icon48.png
deleted file mode 100644
index 8c62b4c0c4de..000000000000
Binary files a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/data/icon48.png and /dev/null differ
diff --git a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/manifest.mf b/harness/libs.nbi.ant/stub/ext/components/products/helloworld/manifest.mf
deleted file mode 100644
index 7dd53f8c12db..000000000000
--- a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/manifest.mf
+++ /dev/null
@@ -1 +0,0 @@
-Configuration-Logic-Class: org.mycompany.ConfigurationLogic
\ No newline at end of file
diff --git a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/nbproject/build-impl.xml b/harness/libs.nbi.ant/stub/ext/components/products/helloworld/nbproject/build-impl.xml
deleted file mode 100644
index 50e815a86198..000000000000
--- a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/nbproject/build-impl.xml
+++ /dev/null
@@ -1,1067 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Must set src.dir
- Must set test.src.dir
- Must set build.dir
- Must set dist.dir
- Must set build.classes.dir
- Must set dist.javadoc.dir
- Must set build.test.classes.dir
- Must set build.test.results.dir
- Must set build.classes.excludes
- Must set dist.jar
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Must set javac.includes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Must set JVM to use for profiling in profiler.info.jvm
- Must set profiler agent JVM arguments in profiler.info.jvmargs.agent
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Must select some files in the IDE or set javac.includes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- To run this application from the command line without Ant, try:
-
-
-
-
-
-
- java -cp "${run.classpath.with.dist.jar}" ${main.class}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- To run this application from the command line without Ant, try:
-
- java -jar "${dist.jar.resolved}"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Must select one file in the IDE or set run.class
-
-
-
- Must select one file in the IDE or set run.class
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Must select one file in the IDE or set debug.class
-
-
-
-
- Must select one file in the IDE or set debug.class
-
-
-
-
- Must set fix.includes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Must select one file in the IDE or set profile.class
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Must select some files in the IDE or set javac.includes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Some tests failed; see details above.
-
-
-
-
-
-
-
-
- Must select some files in the IDE or set test.includes
-
-
-
- Some tests failed; see details above.
-
-
-
-
- Must select one file in the IDE or set test.class
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Must select one file in the IDE or set applet.url
-
-
-
-
-
-
-
-
- Must select one file in the IDE or set applet.url
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/nbproject/genfiles.properties b/harness/libs.nbi.ant/stub/ext/components/products/helloworld/nbproject/genfiles.properties
deleted file mode 100644
index 825c2635797b..000000000000
--- a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/nbproject/genfiles.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-build.xml.data.CRC32=b5c7f54a
-build.xml.script.CRC32=16bbb630
-build.xml.stylesheet.CRC32=be360661
-# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
-# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=b5c7f54a
-nbproject/build-impl.xml.script.CRC32=568806dc
-nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.1.46
diff --git a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/nbproject/project.properties b/harness/libs.nbi.ant/stub/ext/components/products/helloworld/nbproject/project.properties
deleted file mode 100644
index d9e5b60ea253..000000000000
--- a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/nbproject/project.properties
+++ /dev/null
@@ -1,79 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-application.title=helloworld
-application.vendor=dlm198383
-build.classes.dir=${build.dir}/classes
-build.classes.excludes=**/*.java,**/*.form
-# This directory is removed when the project is cleaned:
-build.dir=build
-build.generated.dir=${build.dir}/generated
-build.generated.sources.dir=${build.dir}/generated-sources
-# Only compile against the classpath explicitly listed here:
-build.sysclasspath=ignore
-build.test.classes.dir=${build.dir}/test/classes
-build.test.results.dir=${build.dir}/test/results
-debug.classpath=\
- ${run.classpath}
-debug.test.classpath=\
- ${run.test.classpath}
-# This directory is removed when the project is cleaned:
-dist.dir=dist
-dist.jar=${dist.dir}/helloworld.jar
-dist.javadoc.dir=${dist.dir}/javadoc
-excludes=
-includes=**
-jar.compress=false
-javac.classpath=\
- ${reference.NBI_Engine.jar}
-# Space-separated list of extra javac options
-javac.compilerargs=
-javac.deprecation=false
-javac.source=1.8
-javac.target=1.8
-javac.test.classpath=\
- ${javac.classpath}:\
- ${build.classes.dir}:\
- ${libs.junit.classpath}:\
- ${libs.junit_4.classpath}
-javadoc.additionalparam=
-javadoc.author=false
-javadoc.encoding=${source.encoding}
-javadoc.noindex=false
-javadoc.nonavbar=false
-javadoc.notree=false
-javadoc.private=false
-javadoc.splitindex=true
-javadoc.use=true
-javadoc.version=false
-javadoc.windowtitle=
-meta.inf.dir=${src.dir}/META-INF
-platform.active=default_platform
-project.NBI_Engine=../../../../nbi/engine
-reference.NBI_Engine.jar=${project.NBI_Engine}/dist/nbi-engine.jar
-run.classpath=\
- ${javac.classpath}:\
- ${build.classes.dir}
-# Space-separated list of JVM arguments used when running the project
-# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
-# or test-sys-prop.name=value to set system properties for unit tests):
-run.jvmargs=
-run.test.classpath=\
- ${javac.test.classpath}:\
- ${build.test.classes.dir}
-source.encoding=UTF-8
-src.dir=src
-test.src.dir=test
diff --git a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/nbproject/project.xml b/harness/libs.nbi.ant/stub/ext/components/products/helloworld/nbproject/project.xml
deleted file mode 100644
index 548f82569823..000000000000
--- a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/nbproject/project.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
- org.netbeans.modules.java.j2seproject
-
-
- helloworld
- 1.6.5
-
-
-
-
-
-
-
-
-
- NBI_Engine
- jar
-
- jar
- clean
- jar
-
-
-
-
diff --git a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/src/org/mycompany/Bundle.properties b/harness/libs.nbi.ant/stub/ext/components/products/helloworld/src/org/mycompany/Bundle.properties
deleted file mode 100644
index 46926bbe0887..000000000000
--- a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/src/org/mycompany/Bundle.properties
+++ /dev/null
@@ -1,38 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-CL.app.name={product-simple-name}
-CL.desktop.shortcut.name={product-name}
-CL.desktop.shortcut.description=
-CL.desktop.shortcut.path=
-CL.unix.icon.name={product-icon-name}
-CL.unix.icon.resource=org/mycompany/{product-icon-name}
-
-
-CL.start.menu.shortcut.name={product-name}
-CL.start.menu.shortcut.name.macosx={product-name}
-CL.start.menu.shortcut.description=
-CL.start.menu.shortcut.path=
-
-CL.install.desktop=Creating shortcut on desktop
-CL.install.start.menu=Creating shortcut in start menu
-CL.uninstall.start.menu=Removing Start Menu entries
-CL.uninstall.desktop=Removing desktop shortcut
-CL.uninstall.remove.userdir=Removing {product-name} userdir
-
-CL.uninstall.error.start.menu=Cannot remove desktop shortcut
-CL.uninstall.error.desktop=Cannot remove Start Menu entries
-
diff --git a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/src/org/mycompany/ConfigurationLogic.java b/harness/libs.nbi.ant/stub/ext/components/products/helloworld/src/org/mycompany/ConfigurationLogic.java
deleted file mode 100644
index c0b0cc332b63..000000000000
--- a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/src/org/mycompany/ConfigurationLogic.java
+++ /dev/null
@@ -1,453 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.mycompany;
-
-import java.util.List;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Locale;
-import java.util.Map;
-import org.mycompany.wizard.panels.HelloWorldPanel;
-import org.mycompany.installer.utils.applications.NetBeansRCPUtils;
-import org.netbeans.installer.product.components.ProductConfigurationLogic;
-import org.netbeans.installer.product.components.Product;
-import org.netbeans.installer.utils.FileUtils;
-import org.netbeans.installer.utils.helper.RemovalMode;
-import org.netbeans.installer.utils.exceptions.InitializationException;
-import org.netbeans.installer.utils.exceptions.InstallationException;
-import org.netbeans.installer.utils.exceptions.UninstallationException;
-import org.netbeans.installer.utils.progress.Progress;
-import org.netbeans.installer.utils.system.shortcut.FileShortcut;
-import org.netbeans.installer.utils.system.shortcut.LocationType;
-import org.netbeans.installer.utils.system.shortcut.Shortcut;
-import org.netbeans.installer.utils.SystemUtils;
-import org.netbeans.installer.utils.LogManager;
-import org.netbeans.installer.utils.ResourceUtils;
-import org.netbeans.installer.utils.StreamUtils;
-import org.netbeans.installer.utils.StringUtils;
-import org.netbeans.installer.utils.exceptions.NativeException;
-import org.netbeans.installer.wizard.Wizard;
-import org.netbeans.installer.wizard.components.WizardComponent;
-
-public class ConfigurationLogic extends ProductConfigurationLogic {
-
- private List wizardComponents;
-
- // constructor //////////////////////////////////////////////////////////////////
- public ConfigurationLogic() throws InitializationException {
- wizardComponents = Wizard.loadWizardComponents(
- WIZARD_COMPONENTS_URI,
- getClass().getClassLoader());
- }
-
- public List getWizardComponents() {
- return wizardComponents;
- }
-
- @Override
- public boolean allowModifyMode() {
- return false;
- }
-
- @Override
- public void install(Progress progress) throws InstallationException {
- final Product product = getProduct();
- final File installLocation = product.getInstallationLocation();
- //final FilesList filesList = product.getInstalledFiles();
-
- if (SystemUtils.isMacOS()) {
- File f = new File(installLocation, ICON_MACOSX);
- if(!f.exists()) {
- try {
- FileUtils.writeFile(f,
- ResourceUtils.getResource(ICON_MACOSX_RESOURCE,
- getClass().getClassLoader()));
- getProduct().getInstalledFiles().add(f);
- } catch (IOException e) {
- LogManager.log(
- "... cannot handle icns icon " + f, e); // NOI18N
- }
- }
- }
-
-
-
- if (Boolean.parseBoolean(getProperty(HelloWorldPanel.CREATE_DESKTOP_SHORTCUT_PROPERTY))) {
- LogManager.logIndent(
- "creating the desktop shortcut for the application"); // NOI18N
- if (!SystemUtils.isMacOS()) {
- try {
- progress.setDetail(getString("CL.install.desktop")); // NOI18N
-
- if (SystemUtils.isCurrentUserAdmin()) {
- LogManager.log(
- "... current user is an administrator " + // NOI18N
- "-- creating the shortcut for all users"); // NOI18N
-
- SystemUtils.createShortcut(
- getDesktopShortcut(installLocation),
- LocationType.ALL_USERS_DESKTOP);
-
- product.setProperty(
- DESKTOP_SHORTCUT_LOCATION_PROPERTY,
- ALL_USERS_PROPERTY_VALUE);
- } else {
- LogManager.log(
- "... current user is an ordinary user " + // NOI18N
- "-- creating the shortcut for the current " + // NOI18N
- "user only"); // NOI18N
-
- SystemUtils.createShortcut(
- getDesktopShortcut(installLocation),
- LocationType.CURRENT_USER_DESKTOP);
-
- getProduct().setProperty(
- DESKTOP_SHORTCUT_LOCATION_PROPERTY,
- CURRENT_USER_PROPERTY_VALUE);
- }
- } catch (NativeException e) {
- LogManager.unindent();
-
- LogManager.log(
- getString("CL.install.error.desktop"), // NOI18N
- e);
- }
- } else {
- LogManager.log(
- "... skipping this step as we're on Mac OS"); // NOI18N
- }
- }
- LogManager.logUnindent(
- "... done"); // NOI18N
-
- /////////////////////////////////////////////
- // create start menu shortcut
- if (Boolean.parseBoolean(getProperty(HelloWorldPanel.CREATE_START_MENU_SHORTCUT_PROPERTY))) {
- LogManager.logIndent(
- "creating the start menu shortcut for the application"); // NOI18N
- try {
- progress.setDetail(getString("CL.install.start.menu")); // NOI18N
-
- if (SystemUtils.isCurrentUserAdmin()) {
- LogManager.log(
- "... current user is an administrator " + // NOI18N
- "-- creating the shortcut for all users"); // NOI18N
-
- SystemUtils.createShortcut(
- getStartMenuShortcut(installLocation),
- LocationType.ALL_USERS_START_MENU);
-
- getProduct().setProperty(
- START_MENU_SHORTCUT_LOCATION_PROPERTY,
- ALL_USERS_PROPERTY_VALUE);
- } else {
- LogManager.log(
- "... current user is an ordinary user " + // NOI18N
- "-- creating the shortcut for the current " + // NOI18N
- "user only"); // NOI18N
-
- SystemUtils.createShortcut(
- getStartMenuShortcut(installLocation),
- LocationType.CURRENT_USER_START_MENU);
-
- getProduct().setProperty(
- START_MENU_SHORTCUT_LOCATION_PROPERTY,
- CURRENT_USER_PROPERTY_VALUE);
- }
- } catch (NativeException e) {
- LogManager.log(
- getString("CL.install.error.start.menu"), // NOI18N
- e);
- }
- LogManager.logUnindent(
- "... done"); // NOI18N
- }
-
- }
-
- @Override
- public void uninstall(Progress progress) throws UninstallationException {
- final Product product = getProduct();
- final File installLocation = product.getInstallationLocation();
-
- //NetBeansUtils.warnNetbeansRunning(installLocation);
- /////////////////////////////////////////////////////////////////////////////
- if (Boolean.parseBoolean(getProperty(HelloWorldPanel.CREATE_START_MENU_SHORTCUT_PROPERTY))) {
- try {
- progress.setDetail(getString("CL.uninstall.start.menu")); // NOI18N
-
- final String shortcutLocation =
- getProduct().getProperty(START_MENU_SHORTCUT_LOCATION_PROPERTY);
-
- if ((shortcutLocation == null)
- || shortcutLocation.equals(CURRENT_USER_PROPERTY_VALUE)) {
- SystemUtils.removeShortcut(
- getStartMenuShortcut(installLocation),
- LocationType.CURRENT_USER_START_MENU,
- true);
- } else {
- SystemUtils.removeShortcut(
- getStartMenuShortcut(installLocation),
- LocationType.ALL_USERS_START_MENU,
- true);
- }
- } catch (NativeException e) {
- LogManager.log(
- getString("CL.uninstall.error.start.menu"), // NOI18N
- e);
- }
- }
-
- /////////////////////////////////////////////////////////////////////////////
- if (Boolean.parseBoolean(getProperty(HelloWorldPanel.CREATE_DESKTOP_SHORTCUT_PROPERTY))) {
- if (!SystemUtils.isMacOS()) {
- try {
- progress.setDetail(getString("CL.uninstall.desktop")); // NOI18N
-
- final String shortcutLocation = getProduct().getProperty(
- DESKTOP_SHORTCUT_LOCATION_PROPERTY);
-
- if ((shortcutLocation == null)
- || shortcutLocation.equals(CURRENT_USER_PROPERTY_VALUE)) {
- SystemUtils.removeShortcut(
- getDesktopShortcut(installLocation),
- LocationType.CURRENT_USER_DESKTOP,
- false);
- } else {
- SystemUtils.removeShortcut(
- getDesktopShortcut(installLocation),
- LocationType.ALL_USERS_DESKTOP,
- false);
- }
- } catch (NativeException e) {
- LogManager.log(
- getString("CL.uninstall.error.desktop"), // NOI18N
- e);
- }
- }
- }
-
-
- if (Boolean.getBoolean("remove.app.userdir")) {
- try {
- progress.setDetail(getString("CL.uninstall.remove.userdir")); // NOI18N
- LogManager.logIndent("Removing application`s userdir... ");
- File userDir = NetBeansRCPUtils.getApplicationUserDirFile(installLocation);
- LogManager.log("... application userdir location : " + userDir);
- if (FileUtils.exists(userDir) && FileUtils.canWrite(userDir)) {
- FileUtils.deleteFile(userDir, true);
- FileUtils.deleteEmptyParents(userDir);
- }
- LogManager.log("... application userdir totally removed");
- } catch (IOException e) {
- LogManager.log("Can`t remove application userdir", e);
- } finally {
- LogManager.unindent();
- }
- }
-
- /////////////////////////////////////////////////////////////////////////////
- //remove cluster/update files
- /*
- try {
- progress.setDetail(getString("CL.uninstall.update.files")); // NOI18N
- for(String cluster : CLUSTERS) {
- File updateDir = new File(installLocation, cluster + File.separator + "update");
- if ( updateDir.exists()) {
- FileUtils.deleteFile(updateDir, true);
- }
- }
- } catch (IOException e) {
- LogManager.log(
- getString("CL.uninstall.error.update.files"), // NOI18N
- e);
- }
- */
- /////////////////////////////////////////////////////////////////////////////
- progress.setPercentage(Progress.COMPLETE);
- }
-
- @Override
- public String getExecutable() {
- if (SystemUtils.isWindows()) {
- return EXECUTABLE_WINDOWS;
- } else {
- return EXECUTABLE_UNIX;
- }
- }
-
- @Override
- public String getIcon() {
- if (SystemUtils.isWindows()) {
- return ICON_WINDOWS;
- } else if (SystemUtils.isMacOS()) {
- return ICON_MACOSX;
- } else {
- return ICON_UNIX;
- }
- }
-
- public RemovalMode getRemovalMode() {
- return RemovalMode.LIST;
- }
-
- @Override
- public boolean registerInSystem() {
- return true;
- }
-
- @Override
- public boolean requireLegalArtifactSaving() {
- return false;
- }
-
- @Override
- public boolean requireDotAppForMacOs() {
- return true;
- }
-
- @Override
- public boolean wrapForMacOs() {
- return true;
- }
-
-
-
- private Shortcut getDesktopShortcut(final File directory) {
- return getShortcut(
- getStrings("CL.desktop.shortcut.name"), // NOI18N
- getStrings("CL.desktop.shortcut.description"), // NOI18N
- getString("CL.desktop.shortcut.path"), // NOI18N
- directory);
- }
-
- private Shortcut getStartMenuShortcut(final File directory) {
- if (SystemUtils.isMacOS()) {
- return getShortcut(
- getStrings("CL.start.menu.shortcut.name.macosx"), // NOI18N
- getStrings("CL.start.menu.shortcut.description"), // NOI18N
- getString("CL.start.menu.shortcut.path"), // NOI18N
- directory);
- } else {
- return getShortcut(
- getStrings("CL.start.menu.shortcut.name"), // NOI18N
- getStrings("CL.start.menu.shortcut.description"), // NOI18N
- getString("CL.start.menu.shortcut.path"), // NOI18N
- directory);
- }
- }
-
- private Shortcut getShortcut(
- final Map names,
- final Map descriptions,
- final String relativePath,
- final File location) {
- final File icon;
- final File executable;
-
- if (SystemUtils.isWindows()) {
- icon = new File(location, ICON_WINDOWS);
- } else if (SystemUtils.isMacOS()) {
- icon = new File(location, ICON_MACOSX);
- } else {
- icon = new File(location, ICON_UNIX);
- LogManager.log("... icon file: " + icon);
- if(!FileUtils.exists(icon)) {
- LogManager.log("... icon file does not exist: " + icon);
- InputStream is = null;
- is = ResourceUtils.getResource(ICON_UNIX_RESOURCE, this.getClass().getClassLoader());
- if(is!=null) {
- FileOutputStream fos =null;
- try {
- fos = new FileOutputStream(icon);
- StreamUtils.transferData(is, fos);
- is.close();
- fos.close();
- getProduct().getInstalledFiles().add(icon);
- } catch (IOException e) {
- LogManager.log(e);
- } finally {
- if(fos!=null) {
- try {
- fos.close();
- } catch (IOException e) {
- }
- }
- }
- }
- }
- }
-
- if (SystemUtils.isWindows()) {
- executable = new File(location, EXECUTABLE_WINDOWS);
- } else {
- executable = new File(location, EXECUTABLE_UNIX);
- }
- final String name = names.get(new Locale(StringUtils.EMPTY_STRING));
- final FileShortcut shortcut = new FileShortcut(name, executable);
- shortcut.setNames(names);
- shortcut.setDescriptions(descriptions);
- shortcut.setCategories(SHORTCUT_CATEGORIES);
- shortcut.setFileName(SHORTCUT_FILENAME);
- shortcut.setIcon(icon);
- shortcut.setRelativePath(relativePath);
- shortcut.setWorkingDirectory(location);
- shortcut.setModifyPath(true);
-
- return shortcut;
- }
- public static final String SHORTCUT_FILENAME =
- ResourceUtils.getString(ConfigurationLogic.class, "CL.app.name") + ".desktop"; // NOI18N
- public static final String[] SHORTCUT_CATEGORIES = new String[]{
- "Application"
- };
- public static final String BIN_SUBDIR =
- "bin/";
- public static final String EXECUTABLE_WINDOWS =
- BIN_SUBDIR
- + ResourceUtils.getString(ConfigurationLogic.class, "CL.app.name") + ".exe"; // NOI18N
- public static final String EXECUTABLE_UNIX =
- BIN_SUBDIR
- + ResourceUtils.getString(ConfigurationLogic.class, "CL.app.name"); // NOI18N
- public static final String ICON_WINDOWS =
- EXECUTABLE_WINDOWS;
- public static final String ICON_UNIX =
- ResourceUtils.getString(ConfigurationLogic.class,
- "CL.unix.icon.name"); // NOI18N
- public static final String ICON_UNIX_RESOURCE =
- ResourceUtils.getString(ConfigurationLogic.class,
- "CL.unix.icon.resource"); // NOI18N
- public static final String ICON_MACOSX =
- ResourceUtils.getString(ConfigurationLogic.class, "CL.app.name") + ".icns"; // NOI18N
- public static final String ICON_MACOSX_RESOURCE =
- "org/mycompany/" + ResourceUtils.getString(ConfigurationLogic.class, "CL.app.name") + ".icns"; // NOI18N
- public static final String WIZARD_COMPONENTS_URI =
- "resource:" + // NOI18N
- "org/mycompany/wizard.xml"; // NOI18N
- private static final String DESKTOP_SHORTCUT_LOCATION_PROPERTY =
- "desktop.shortcut.location"; // NOI18N
- private static final String START_MENU_SHORTCUT_LOCATION_PROPERTY =
- "start.menu.shortcut.location"; // NOI18N
- private static final String ALL_USERS_PROPERTY_VALUE =
- "all.users"; // NOI18N
- private static final String CURRENT_USER_PROPERTY_VALUE =
- "current.user"; // NOI18N
-}
diff --git a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/src/org/mycompany/wizard.xml b/harness/libs.nbi.ant/stub/ext/components/products/helloworld/src/org/mycompany/wizard.xml
deleted file mode 100644
index f06c42189af6..000000000000
--- a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/src/org/mycompany/wizard.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
diff --git a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/src/org/mycompany/wizard/panels/Bundle.properties b/harness/libs.nbi.ant/stub/ext/components/products/helloworld/src/org/mycompany/wizard/panels/Bundle.properties
deleted file mode 100644
index 96cb31b914f5..000000000000
--- a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/src/org/mycompany/wizard/panels/Bundle.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-P.title={product-name} Installation
-P.description=Choose destination folder.
-P.destination.label.text=&Install {product-name} to:
-P.destination.button.text=B&rowse.....
-
-P.create.desktop.shortcut=Create Desktop icon
-P.create.start.menu.shortcut.windows=Create Start menu entry
-P.create.start.menu.shortcut.unix=Create shortcut in Applications menu
-P.create.start.menu.shortcut.macosx=Create icon in Dock
-
-P.error.contains.non.ascii.chars=The specified installation location cannot contain non-ASCII characters.
diff --git a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/src/org/mycompany/wizard/panels/HelloWorldPanel.java b/harness/libs.nbi.ant/stub/ext/components/products/helloworld/src/org/mycompany/wizard/panels/HelloWorldPanel.java
deleted file mode 100644
index 8f010414dca2..000000000000
--- a/harness/libs.nbi.ant/stub/ext/components/products/helloworld/src/org/mycompany/wizard/panels/HelloWorldPanel.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.mycompany.wizard.panels;
-
-import java.awt.GridBagConstraints;
-import java.awt.Insets;
-import java.io.File;
-import java.nio.charset.Charset;
-import java.nio.charset.CharsetEncoder;
-import org.netbeans.installer.utils.ResourceUtils;
-import org.netbeans.installer.utils.StringUtils;
-import org.netbeans.installer.utils.SystemUtils;
-import org.netbeans.installer.utils.helper.swing.NbiCheckBox;
-import org.netbeans.installer.wizard.components.panels.DestinationPanel;
-import org.netbeans.installer.wizard.containers.SwingContainer;
-import org.netbeans.installer.wizard.ui.SwingUi;
-import org.netbeans.installer.wizard.ui.WizardUi;
-
-public class HelloWorldPanel extends DestinationPanel {
-
- public HelloWorldPanel() {
- setProperty(TITLE_PROPERTY,
- DEFAULT_TITLE);
- setProperty(DESCRIPTION_PROPERTY,
- DEFAULT_DESCRIPTION);
-
- setProperty(DESTINATION_LABEL_TEXT_PROPERTY,
- DEFAULT_DESTINATION_LABEL_TEXT);
- setProperty(DESTINATION_BUTTON_TEXT_PROPERTY,
- DEFAULT_DESTINATION_BUTTON_TEXT);
-
- setProperty(ERROR_CONTAINS_NON_ASCII_CHARS,
- DEFAULT_ERROR_CONTAINS_NON_ASCII_CHARS);
- }
-
- @Override
- public WizardUi getWizardUi() {
- if (wizardUi == null) {
- wizardUi = new HelloWorldPanelUi(this);
- }
-
- return wizardUi;
- }
-
- @Override
- public void initialize() {
- super.initialize();
- if(getWizard().getProperty(CREATE_DESKTOP_SHORTCUT_PROPERTY) == null) {
- getWizard().setProperty(CREATE_DESKTOP_SHORTCUT_PROPERTY, "" + true);
- }
- if(getWizard().getProperty(CREATE_START_MENU_SHORTCUT_PROPERTY) == null) {
- getWizard().setProperty(CREATE_START_MENU_SHORTCUT_PROPERTY, "" + true);
- }
- }
-
-
- public static class HelloWorldPanelUi extends DestinationPanelUi {
-
- protected HelloWorldPanel panel;
-
- public HelloWorldPanelUi(HelloWorldPanel panel) {
- super(panel);
-
-
- this.panel = panel;
- }
-
- @Override
- public SwingUi getSwingUi(SwingContainer container) {
- if (swingUi == null) {
- swingUi = new HelloWorldPanelSwingUi(panel, container);
- }
-
- return super.getSwingUi(container);
- }
- }
-
- public static class HelloWorldPanelSwingUi extends DestinationPanelSwingUi {
-
- protected HelloWorldPanel panel;
- private NbiCheckBox desktopShortcutComboBox;
- private NbiCheckBox startMenuShortcutComboBox;
-
- public HelloWorldPanelSwingUi(
- final HelloWorldPanel panel,
- final SwingContainer container) {
- super(panel, container);
-
- this.panel = panel;
-
- initComponents();
- }
-
- // protected ////////////////////////////////////////////////////////////////
- @Override
- protected void initialize() {
- desktopShortcutComboBox.setText(CREATE_DESKTOP_SHORTCUT_NAME);
- desktopShortcutComboBox.setSelected(false);
- if(Boolean.parseBoolean(panel.getWizard().getProperty(CREATE_DESKTOP_SHORTCUT_PROPERTY))) {
- desktopShortcutComboBox.doClick();
- }
-
- startMenuShortcutComboBox.setText(
- SystemUtils.isWindows() ? CREATE_START_MENU_SHORTCUT_NAME_WINDOWS :
- (SystemUtils.isMacOS() ? CREATE_START_MENU_SHORTCUT_NAME_MAC :
- CREATE_START_MENU_SHORTCUT_NAME_UNIX));
- startMenuShortcutComboBox.setSelected(false);
- if(Boolean.parseBoolean(panel.getWizard().getProperty(CREATE_START_MENU_SHORTCUT_PROPERTY))) {
- startMenuShortcutComboBox.doClick();
- }
-
- super.initialize();
- }
-
- @Override
- protected void saveInput() {
- super.saveInput();
- panel.getWizard().setProperty(
- CREATE_DESKTOP_SHORTCUT_PROPERTY,
- StringUtils.EMPTY_STRING + desktopShortcutComboBox.isSelected());
-
- panel.getWizard().setProperty(
- CREATE_START_MENU_SHORTCUT_PROPERTY,
- StringUtils.EMPTY_STRING + startMenuShortcutComboBox.isSelected());
- }
-
- @Override
- protected String validateInput() {
- String errorMessage = super.validateInput();
-
- if (errorMessage == null) {
- // #222846 - non-ascii characters in installation path
- File installationFolder = new File(getDestinationPath());
- CharsetEncoder encoder = Charset.forName("US-ASCII").newEncoder();
- if (!encoder.canEncode(installationFolder.getAbsolutePath())) {
- return StringUtils.format(panel.getProperty(ERROR_CONTAINS_NON_ASCII_CHARS));
- }
- }
-
- return errorMessage;
- }
-
- // private //////////////////////////////////////////////////////////////////
- private void initComponents() {
- // selectedLocationField ////////////////////////////////////////////////
- desktopShortcutComboBox = new NbiCheckBox();
- startMenuShortcutComboBox = new NbiCheckBox();
-
- // this /////////////////////////////////////////////////////////////////
- add(desktopShortcutComboBox, new GridBagConstraints(
- 0, 2, // x, y
- 2, 1, // width, height
- 1.0, 0.0, // weight-x, weight-y
- GridBagConstraints.LINE_START, // anchor
- GridBagConstraints.HORIZONTAL, // fill
- new Insets(15, 11, 0, 11), // padding
- 0, 0)); // padx, pady - ???
- add(startMenuShortcutComboBox, new GridBagConstraints(
- 0, 3, // x, y
- 2, 1, // width, height
- 1.0, 0.0, // weight-x, weight-y
- GridBagConstraints.LINE_START, // anchor
- GridBagConstraints.HORIZONTAL, // fill
- new Insets(7, 11, 0, 11), // padding
- 0, 0)); // padx, pady - ???
-
- }
- }
- /////////////////////////////////////////////////////////////////////////////////
- // Constants
- public static final String CREATE_DESKTOP_SHORTCUT_PROPERTY =
- "create.desktop.shortcut";
- public static final String CREATE_START_MENU_SHORTCUT_PROPERTY =
- "create.start.menu.shortcut";
- public static final String ERROR_CONTAINS_NON_ASCII_CHARS =
- "error.contains.non.ascii.chars"; // NOI18N
-
- public static final String DEFAULT_TITLE =
- ResourceUtils.getString(HelloWorldPanel.class,
- "P.title"); // NOI18N
- public static final String DEFAULT_DESCRIPTION =
- ResourceUtils.getString(HelloWorldPanel.class,
- "P.description"); // NOI18N
- public static final String DEFAULT_DESTINATION_LABEL_TEXT =
- ResourceUtils.getString(HelloWorldPanel.class,
- "P.destination.label.text"); // NOI18N
- public static final String DEFAULT_DESTINATION_BUTTON_TEXT =
- ResourceUtils.getString(HelloWorldPanel.class,
- "P.destination.button.text"); // NOI18N
- public static final String CREATE_DESKTOP_SHORTCUT_NAME =
- ResourceUtils.getString(HelloWorldPanel.class,
- "P.create.desktop.shortcut"); // NOI18N
- public static final String CREATE_START_MENU_SHORTCUT_NAME_WINDOWS =
- ResourceUtils.getString(HelloWorldPanel.class,
- "P.create.start.menu.shortcut.windows"); // NOI18N
- public static final String CREATE_START_MENU_SHORTCUT_NAME_UNIX =
- ResourceUtils.getString(HelloWorldPanel.class,
- "P.create.start.menu.shortcut.unix"); // NOI18N
- public static final String CREATE_START_MENU_SHORTCUT_NAME_MAC =
- ResourceUtils.getString(HelloWorldPanel.class,
- "P.create.start.menu.shortcut.macosx"); // NOI18N
- public static final String DEFAULT_ERROR_CONTAINS_NON_ASCII_CHARS =
- ResourceUtils.getString(HelloWorldPanel.class,
- "P.error.contains.non.ascii.chars"); // NOI18N
-}
diff --git a/harness/libs.nbi.ant/stub/ext/engine/build.properties b/harness/libs.nbi.ant/stub/ext/engine/build.properties
deleted file mode 100644
index 2e2b203395de..000000000000
--- a/harness/libs.nbi.ant/stub/ext/engine/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-jar.contents.list=data/engine.list
-jar.contents.includes=native/** org/** com/apple/** data/clioptions.list data/engine*.properties
diff --git a/harness/libs.nbi.ant/stub/ext/engine/build.xml b/harness/libs.nbi.ant/stub/ext/engine/build.xml
deleted file mode 100644
index 3127a3c77deb..000000000000
--- a/harness/libs.nbi.ant/stub/ext/engine/build.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ${engine.files}
-
-
-
-
-
-
diff --git a/harness/libs.nbi.ant/stub/ext/engine/manifest.mf b/harness/libs.nbi.ant/stub/ext/engine/manifest.mf
deleted file mode 100644
index 464ca3d3fe50..000000000000
--- a/harness/libs.nbi.ant/stub/ext/engine/manifest.mf
+++ /dev/null
@@ -1,2 +0,0 @@
-Manifest-Version: 1.0
-Main-Class: org.netbeans.installer.Installer
diff --git a/harness/libs.nbi.ant/stub/ext/engine/nbproject/build-impl.xml b/harness/libs.nbi.ant/stub/ext/engine/nbproject/build-impl.xml
deleted file mode 100644
index f2dc9cb94f54..000000000000
--- a/harness/libs.nbi.ant/stub/ext/engine/nbproject/build-impl.xml
+++ /dev/null
@@ -1,1416 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Must set src.dir
- Must set test.src.dir
- Must set build.dir
- Must set dist.dir
- Must set build.classes.dir
- Must set dist.javadoc.dir
- Must set build.test.classes.dir
- Must set build.test.results.dir
- Must set build.classes.excludes
- Must set dist.jar
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Must set javac.includes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- No tests executed.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Must set JVM to use for profiling in profiler.info.jvm
- Must set profiler agent JVM arguments in profiler.info.jvmargs.agent
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Must select some files in the IDE or set javac.includes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- To run this application from the command line without Ant, try:
-
- java -jar "${dist.jar.resolved}"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Must select one file in the IDE or set run.class
-
-
-
- Must select one file in the IDE or set run.class
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Must select one file in the IDE or set debug.class
-
-
-
-
- Must select one file in the IDE or set debug.class
-
-
-
-
- Must set fix.includes
-
-
-
-
-
-
-
-
-
- This target only works when run from inside the NetBeans IDE.
-
-
-
-
-
-
-
-
- Must select one file in the IDE or set profile.class
- This target only works when run from inside the NetBeans IDE.
-
-
-
-
-
-
-
-
- This target only works when run from inside the NetBeans IDE.
-
-
-
-
-
-
-
-
-
-
-
-
- This target only works when run from inside the NetBeans IDE.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Must select one file in the IDE or set run.class
-
-
-
-
-
- Must select some files in the IDE or set test.includes
-
-
-
-
- Must select one file in the IDE or set run.class
-
-
-
-
- Must select one file in the IDE or set applet.url
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Must select some files in the IDE or set javac.includes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Some tests failed; see details above.
-
-
-
-
-
-
-
-
- Must select some files in the IDE or set test.includes
-
-
-
- Some tests failed; see details above.
-
-
-
- Must select some files in the IDE or set test.class
- Must select some method in the IDE or set test.method
-
-
-
- Some tests failed; see details above.
-
-
-
-
- Must select one file in the IDE or set test.class
-
-
-
- Must select one file in the IDE or set test.class
- Must select some method in the IDE or set test.method
-
-
-
-
-
-
-
-
-
-
-
-
-
- Must select one file in the IDE or set applet.url
-
-
-
-
-
-
-
-
- Must select one file in the IDE or set applet.url
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/harness/libs.nbi.ant/stub/ext/engine/nbproject/genfiles.properties b/harness/libs.nbi.ant/stub/ext/engine/nbproject/genfiles.properties
deleted file mode 100644
index f72a7831f9c7..000000000000
--- a/harness/libs.nbi.ant/stub/ext/engine/nbproject/genfiles.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-build.xml.data.CRC32=8f661a73
-build.xml.script.CRC32=f2f0e306
-build.xml.stylesheet.CRC32=a12b3d02
-# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
-# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=a04276f0
-nbproject/build-impl.xml.script.CRC32=9d404b62
-nbproject/build-impl.xml.stylesheet.CRC32=cdba79fa@1.67.1.46
diff --git a/harness/libs.nbi.ant/stub/ext/engine/nbproject/project.properties b/harness/libs.nbi.ant/stub/ext/engine/nbproject/project.properties
deleted file mode 100644
index 4cb4b38da34e..000000000000
--- a/harness/libs.nbi.ant/stub/ext/engine/nbproject/project.properties
+++ /dev/null
@@ -1,81 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-application.title=NetBeans Installer Engine
-application.vendor=ks152834
-build.classes.dir=${build.dir}/classes
-build.classes.excludes=**/*.java,**/*.form
-# This directory is removed when the project is cleaned:
-build.dir=build
-build.generated.dir=${build.dir}/generated
-build.generated.sources.dir=${build.dir}/generated-sources
-# Only compile against the classpath explicitly listed here:
-build.sysclasspath=ignore
-build.test.classes.dir=${build.dir}/test/classes
-build.test.results.dir=${build.dir}/test/results
-debug.classpath=\
- ${run.classpath}
-debug.test.classpath=\
- ${run.test.classpath}
-# This directory is removed when the project is cleaned:
-dist.dir=dist
-dist.jar=${dist.dir}/nbi-engine.jar
-dist.javadoc.dir=${dist.dir}/javadoc
-excludes=
-file.reference.reglib-src=../../reglib/src
-includes=**
-jar.compress=false
-javac.classpath=\
- ${reference.NBI_Engine.jar}
-# Space-separated list of extra javac options
-javac.compilerargs=
-javac.deprecation=false
-javac.source=1.8
-javac.target=1.8
-javac.test.classpath=\
- ${javac.classpath}:\
- ${build.classes.dir}:\
- ${libs.junit.classpath}
-javadoc.additionalparam=
-javadoc.author=false
-javadoc.encoding=
-javadoc.noindex=false
-javadoc.nonavbar=false
-javadoc.notree=false
-javadoc.private=false
-javadoc.splitindex=true
-javadoc.use=true
-javadoc.version=false
-javadoc.windowtitle=
-main.class=org.netbeans.installer.Installer
-manifest.file=manifest.mf
-meta.inf.dir=${src.dir}/META-INF
-platform.active=default_platform
-project.NBI_Engine=../../../../nbi/engine
-project.NetBeans_Installer_Engine=../../../engine
-reference.NBI_Engine.jar=${project.NBI_Engine}/dist/nbi-engine.jar
-run.classpath=\
- ${build.classes.dir}
-# Space-separated list of JVM arguments used when running the project
-# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
-# or test-sys-prop.name=value to set system properties for unit tests):
-run.jvmargs=-Dnbi.product.bundled.registry.uri=file:/D:/temp/nbi-build/dist/registry-temp/registry.xml
-run.test.classpath=\
- ${javac.test.classpath}:\
- ${build.test.classes.dir}
-source.encoding=UTF-8
-src.dir=src
-test.src.dir=test
diff --git a/harness/libs.nbi.ant/stub/ext/engine/nbproject/project.xml b/harness/libs.nbi.ant/stub/ext/engine/nbproject/project.xml
deleted file mode 100644
index 0b626ab71ba6..000000000000
--- a/harness/libs.nbi.ant/stub/ext/engine/nbproject/project.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
- org.netbeans.modules.java.j2seproject
-
-
- HelloWorld Engine
- 1.6.5
-
-
-
-
-
-
-
-
-
- NBI_Engine
- jar
-
- jar
- clean
- jar
-
-
-
-
diff --git a/harness/libs.nbi.ant/stub/ext/engine/src/data/engine.properties b/harness/libs.nbi.ant/stub/ext/engine/src/data/engine.properties
deleted file mode 100644
index 33d305530a60..000000000000
--- a/harness/libs.nbi.ant/stub/ext/engine/src/data/engine.properties
+++ /dev/null
@@ -1,65 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-nbi.wizard.components.instance.uri=resource:org/mycompany/installer/wizard/wizard-components.xml
-nbi.wizard.ui.swing.frame.icon=resource:org/mycompany/installer/wizard/wizard-icon.png
-nbi.wizard.ui.swing.frame.title.prefix= {product-name} Installer
-nbi.wizard.ui.swing.frame.title.pattern={0}
-nbi.macosx.application.directory.name={product-name} Installer
-nbi.product.remove.corrupted.products.silently=true
-
-nbi.wizard.ui.swing.frame.head.right.image=resource:org/mycompany/installer/wizard/wizard-description-background-right.png
-nbi.wizard.ui.swing.frame.head.left.image=resource:org/mycompany/installer/wizard/wizard-description-background-left.png
-
-nbi.wizard.ui.swing.welcome.left.top.image=resource:org/mycompany/installer/wizard/components/panels/resources/welcome-left-top.png
-nbi.wizard.ui.swing.welcome.left.bottom.image=resource:org/mycompany/installer/wizard/components/panels/resources/welcome-left-bottom.png
-
-nbi.local.directory.path=$S{user.home}/.{product-uid}-installer
-
-nbi.wizard.ui.swing.frame.width.default=600
-nbi.wizard.ui.swing.frame.height.default=500
-nbi.wizard.ui.swing.frame.width.win.classic=588
-nbi.wizard.ui.swing.frame.height.win.classic=442
-nbi.wizard.ui.swing.frame.width.win.xp=600
-nbi.wizard.ui.swing.frame.height.win.xp=450
-nbi.wizard.ui.swing.frame.width.motif=624
-nbi.wizard.ui.swing.frame.height.motif=470
-nbi.wizard.ui.swing.frame.width.metal=624
-nbi.wizard.ui.swing.frame.height.metal=470
-nbi.wizard.ui.swing.frame.width.aqua=640
-nbi.wizard.ui.swing.frame.height.aqua=480
-nbi.wizard.ui.swing.frame.width.gtk=704
-nbi.wizard.ui.swing.frame.height.gtk=528
-nbi.wizard.ui.swing.frame.width.nimbus=624
-nbi.wizard.ui.swing.frame.height.nimbus=512
-
-
-nbi.wizard.ui.swing.frame.minimum.width.default=600
-nbi.wizard.ui.swing.frame.minimum.height.default=500
-nbi.wizard.ui.swing.frame.minimum.width.win.classic=588
-nbi.wizard.ui.swing.frame.minimum.height.win.classic=442
-nbi.wizard.ui.swing.frame.minimum.width.win.xp=600
-nbi.wizard.ui.swing.frame.minimum.height.win.xp=450
-nbi.wizard.ui.swing.frame.minimum.width.motif=624
-nbi.wizard.ui.swing.frame.minimum.height.motif=470
-nbi.wizard.ui.swing.frame.minimum.width.metal=624
-nbi.wizard.ui.swing.frame.minimum.height.metal=470
-nbi.wizard.ui.swing.frame.minimum.width.aqua=640
-nbi.wizard.ui.swing.frame.minimum.height.aqua=480
-nbi.wizard.ui.swing.frame.minimum.width.gtk=704
-nbi.wizard.ui.swing.frame.minimum.height.gtk=528
-nbi.wizard.ui.swing.frame.minimum.width.nimbus=624
-nbi.wizard.ui.swing.frame.minimum.height.nimbus=512
diff --git a/harness/libs.nbi.ant/stub/ext/engine/src/native/launcher/unix/i18n/launcher.properties b/harness/libs.nbi.ant/stub/ext/engine/src/native/launcher/unix/i18n/launcher.properties
deleted file mode 100644
index 8680edfab4f8..000000000000
--- a/harness/libs.nbi.ant/stub/ext/engine/src/native/launcher/unix/i18n/launcher.properties
+++ /dev/null
@@ -1,48 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-nlu.jvm.notfoundmessage=Java SE Development Kit (JDK) was not found on this computer\nJDK 7 is required for installing {product-name}. Make sure that the JDK is properly installed and run installer again.\nYou can specify valid JDK location using {0} installer argument.\n\nTo download the JDK, visit http://www.oracle.com/technetwork/java/javase/downloads/index.html
-nlu.jvm.usererror=Java Runtime Environment (JRE) was not found at the specified location {0}
-nlu.jvm.uncompatible=Unsupported JVM version at {0}.\nTry to specify another JVM location using parameter {1}
-nlu.freespace=There is not enough free disk space to extract installation data\n{0} MB of free disk space is required in a temporary folder.\nClean up the disk space and run installer again. You can specify a temporary folder with sufficient disk space using {1} installer argument
-nlu.integrity=\nInstaller file {0} seems to be corrupted
-nlu.missing.external.resource=Can`t run {product-name} Installer.\nAn external file with necessary data is required but missing:\n{0}
-nlu.cannot.create.tmpdir=Cannot create temporary directory {0}
-nlu.cannot.extract.bundled.jvm=Cannot extract bundled JVM
-nlu.cannot.unpack.jvm.file=Cannot unpack file {0}
-nlu.error.verify.bundled.jvm=Cannot verify bundled JVM, try to search JVM on the system
-
-nlu.running=Running the installer wizard...
-nlu.starting=Configuring the installer...
-nlu.extracting=Extracting installation data...
-nlu.prepare.jvm=Preparing bundled JVM ...
-nlu.jvm.search=Searching for JVM on the system...
-
-nlu.msg.usage=\nUsage:
-nlu.arg.javahome=\t{0}\t\tUsing java from for running application
-nlu.arg.verbose=\t{0}\t\tUse verbose output
-nlu.arg.output=\t{0}\t\tRedirect all output to file
-nlu.arg.disable.space.check=\t{0}\t\tDisable free space check
-nlu.arg.extract=\t{0}\t[dir]\tExtract all bundled data to .\n\t\t\t\tIf is not specified then extract to the current directory
-nlu.arg.tempdir=\t{0}\t\tUse for extracting temporary data
-nlu.arg.cpa=\t{0} \tAppend classpath with
-nlu.arg.cpp=\t{0} \tPrepend classpath with
-nlu.arg.locale=\t{0}\t\tOverride default locale with specified
-nlu.arg.silent=\t{0}\t\tRun installer silently
-nlu.arg.help=\t{0}\t\tShow this help
-
-
-nlu.java.application.name.macosx={product-name} Installer
diff --git a/harness/libs.nbi.ant/stub/ext/engine/src/native/launcher/windows/i18n/launcher.properties b/harness/libs.nbi.ant/stub/ext/engine/src/native/launcher/windows/i18n/launcher.properties
deleted file mode 100644
index a4c13cfb5cf1..000000000000
--- a/harness/libs.nbi.ant/stub/ext/engine/src/native/launcher/windows/i18n/launcher.properties
+++ /dev/null
@@ -1,51 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-nlw.jvm.notfoundmessage=Java SE Development Kit (JDK) was not found on this computer\nJDK 7 is required for installing {product-name}. Make sure that the JDK is properly installed and run installer again. You can specify valid JDK location using {0} installer argument.\n\nTo download the JDK, visit http://www.oracle.com/technetwork/java/javase/downloads/index.html
-nlw.jvm.usererror=Java Runtime Environment (JRE) was not found\nThere is no JRE at the specified location {0}
-nlw.jvm.unsupportedversion=Unsupported Java VM version\nThe Java VM at {0} has the unsupported version
-nlw.freespace=There is not enough free disk space to extract installation data\n{0} MB of free disk space is required in a temporary folder. Clean up the disk space and run installer again. You can specify a temporary folder with sufficient disk space using {1} installer argument
-nlw.tmpdir=Can't create temporary directory\nThe temporary directory for extracting data {0} was not created
-nlw.integrity=Installer file is corrupted\nInstaller file {0} seems to be corrupted
-nlw.output.error=Data extraction error\nCan't create file {0}!\nThe following error occured :\n{1}
-nlw.java.process.error=An error occured while running java process\n{0}
-nlw.missing.external.resource=Can`t run {product-name} Installer.\nAn external file with necessary data is required but missing:\n{0}
-nlw.bundled.jvm.extract.error=Cannot prepare bundled JVM to run the installer.\nMost probably the bundled JVM is not compatible with the current platform.
-nlw.bundled.jvm.verify.error=An error occured while verifying bundled JVM.\nMost probably the bundled JVM is not compatible with the current platform.
-
-nlw.arg.output={0} \n\tRedirect output to file
-nlw.arg.javahome={0} \n\tRun jar file using JVM from
-nlw.arg.verbose={0}\n\tUse verbose output
-nlw.arg.tempdir={0} \n\tUse for extracting data
-nlw.arg.extract={0} [directory]\n\tExtract all bundled data to the specific directory.\n\tIf directory is not specified then extract to the current directory
-nlw.arg.classpatha={0} \n\tAppend classpath with
-nlw.arg.classpathp={0} \n\tPrepend classpath with
-nlw.arg.disable.space.check={0}\n\tDisable free space check
-nlw.arg.locale={0} \n\tOverride system default locale with
-nlw.arg.silent={0} \n\tRun installer silently
-nlw.arg.help={0}\n\tShow help message
-
-
-nlw.msg.create.tmpdir=Creating temporary directory ...
-nlw.msg.extract=Extracting data ...
-nlw.msg.jvmsearch=Finding JVM on your system ...
-nlw.msg.setoptions=Setting command options ...
-nlw.msg.running=Running JVM ...
-nlw.msg.title=Please wait while the launcher prepares data to run the installer ...
-nlw.msg.messagebox.title={product-name} Installer
-nlw.msg.progress.title=Configuring the installer ...
-nlw.msg.button.error=Exit Installer
-nlw.msg.main.title={product-name} Installer
diff --git a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/utils/applications/Bundle.properties b/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/utils/applications/Bundle.properties
deleted file mode 100644
index 33168547e5ef..000000000000
--- a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/utils/applications/Bundle.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-# NetBeansRCPUtils.java
-NU.error.cannot.get.userdir=Can`t get application userdir from {0}
diff --git a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/utils/applications/NetBeansRCPUtils.java b/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/utils/applications/NetBeansRCPUtils.java
deleted file mode 100644
index 8aefbf2900ad..000000000000
--- a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/utils/applications/NetBeansRCPUtils.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.mycompany.installer.utils.applications;
-
-import java.io.File;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import org.netbeans.installer.utils.FileUtils;
-import org.netbeans.installer.utils.LogManager;
-import org.netbeans.installer.utils.ResourceUtils;
-import org.netbeans.installer.utils.StringUtils;
-import org.netbeans.installer.utils.SystemUtils;
-import org.netbeans.installer.utils.exceptions.NativeException;
-import org.netbeans.installer.utils.system.WindowsNativeUtils;
-import org.netbeans.installer.utils.system.WindowsNativeUtils;
-import org.netbeans.installer.utils.system.windows.WindowsRegistry;
-
-public class NetBeansRCPUtils {
-
-
- /**
- * Get resolved application user directory
- * @param appLocation Application home directory
- * @throws IOException if can`t get application default userdir
- */
- public static File getApplicationUserDirFile(File appLocation) throws IOException {
- String dir = getApplicationUserDir(appLocation);
- String userHome = System.getProperty("user.home");
- if(SystemUtils.isWindows()) {
- WindowsNativeUtils wnu = (WindowsNativeUtils) SystemUtils.getNativeUtils();
- WindowsRegistry reg = wnu.getWindowsRegistry();
- String key = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
- try {
- if(reg.keyExists(reg.HKCU, key) &&
- reg.valueExists(reg.HKCU, key, "AppData")) {
- userHome = reg.getStringValue(reg.HKCU, key, "AppData", false);
-
- }
- } catch (NativeException e) {
- LogManager.log(e);
- }
- }
- dir = dir.replace(USER_HOME_TOKEN, userHome);
- dir = dir.replace(APPNAME_TOKEN, getApplicationName(appLocation));
- return new File(dir);
- }
-
- /**
- * Get application user directory as it is written in application`s configuration file
- * @param appLocation Application home directory
- * @throws IOException if can`t get default userdir
- */
- public static String getApplicationUserDir(File appLocation) throws IOException {
- File []confFiles = new File(appLocation, "etc").listFiles(new FilenameFilter() {
-
- public boolean accept(File dir, String name) {
- return name.endsWith(".conf");
- }
- });
- File conf = null;
- if(confFiles.length == 1) {
- conf = confFiles[0];
- } else {
- for(File f : confFiles) {
- String prefix = f.getName().substring(0, f.getName().indexOf(".conf"));
- if((SystemUtils.isUnix() && new File(appLocation, "bin/" + prefix).exists()) ||
- (SystemUtils.isWindows() && new File(appLocation, "bin/" + prefix + ".exe").exists())) {
- conf = f;
- break;
- }
- }
- }
- if(conf == null) {
- return null;
- }
-
- String contents = FileUtils.readFile(conf);
- Matcher matcher = Pattern.compile(
- NEW_LINE_PATTERN + SPACES_PATTERN +
- (SystemUtils.isMacOS() ? DEFAULT_USERDIR_MAC : DEFAULT_USERDIR) +
- "\"(.*?)\"").matcher(contents);
- if(matcher.find() && matcher.groupCount() == 1) {
- return matcher.group(1);
- } else {
- throw new IOException(StringUtils.format(
- ERROR_CANNOT_GET_USERDIR_STRING,conf));
- }
- }
-
- /**
- * Get application name - i.e. in bin/.exe and etc/.conf
- * @param appLocation Application home directory
- */
- public static String getApplicationName(File appLocation) {
- File []confFiles = new File(appLocation, "etc").listFiles(new FilenameFilter() {
-
- public boolean accept(File dir, String name) {
- return name.endsWith(".conf");
- }
- });
-
- if(confFiles.length == 1) {
- String name = confFiles[0].getName();
- return name.substring(0, name.indexOf(".conf"));
- } else {
- for(File f : confFiles) {
- String name = f.getName();
- String prefix = name.substring(0, name.indexOf(".conf"));
- if((SystemUtils.isUnix() && new File(appLocation, "bin/" + prefix).exists()) ||
- (SystemUtils.isWindows() && new File(appLocation, "bin/" + prefix + ".exe").exists())) {
- return prefix;
- }
- }
- }
- return null;
- }
-
-
- /////////////////////////////////////////////////////////////////////////////////
- // Instance
- private NetBeansRCPUtils() {
- // does nothing
- }
-
- /////////////////////////////////////////////////////////////////////////////////
- // Constants
-
- public static final String NEW_LINE_PATTERN =
- "[\r\n|\n|\r]"; // NOI18N
- public static final String SPACES_PATTERN =
- "\\ *"; // NOI18N
-
- public static final String DEFAULT_USERDIR =
- "default_userdir="; // NOI18N
- public static final String DEFAULT_USERDIR_MAC =
- "default_mac_userdir="; // NOI18N
-
- public static final String USER_HOME_TOKEN =
- "${HOME}"; // NOI18N
- public static final String APPNAME_TOKEN =
- "${APPNAME}"; // NOI18N
-
- public static final String ERROR_CANNOT_GET_USERDIR_STRING =
- ResourceUtils.getString(NetBeansRCPUtils.class,
- "NU.error.cannot.get.userdir");//NOI18N
-
-
-}
diff --git a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/actions/Bundle.properties b/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/actions/Bundle.properties
deleted file mode 100644
index 514d36f636a6..000000000000
--- a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/actions/Bundle.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-IA.title=Installer Initialization
-IA.progress.title=Initialization in progress...
-IA.description=Please wait while initialization is completed.
\ No newline at end of file
diff --git a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/actions/InitializeAction.java b/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/actions/InitializeAction.java
deleted file mode 100644
index 42b46a52762e..000000000000
--- a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/actions/InitializeAction.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.mycompany.installer.wizard.components.actions;
-
-import org.netbeans.installer.product.Registry;
-import org.netbeans.installer.utils.StringUtils;
-import org.netbeans.installer.utils.helper.ErrorLevel;
-import org.netbeans.installer.utils.ErrorManager;
-import org.netbeans.installer.utils.ResourceUtils;
-import org.netbeans.installer.utils.progress.Progress;
-import org.netbeans.installer.wizard.components.WizardAction;
-import org.netbeans.installer.wizard.components.actions.*;
-
-public class InitializeAction extends WizardAction {
- /////////////////////////////////////////////////////////////////////////////////
- // Instance
- public InitializeAction() {
- setProperty(TITLE_PROPERTY,
- DEFAULT_TITLE);
- setProperty(DESCRIPTION_PROPERTY,
- DEFAULT_DESCRIPTION);
-
- downloadLogic = new DownloadConfigurationLogicAction();
- initReg = new InitializeRegistryAction();
- }
- private DownloadConfigurationLogicAction downloadLogic;
- private InitializeRegistryAction initReg;
-
- public void execute() {
- final Progress progress = new Progress();
-
- //getWizardUi().setProgress(progress);
-
-
- progress.setTitle(getProperty(PROGRESS_TITLE_PROPERTY));
-
- //progress.synchronizeDetails(false);
-
- if (initReg.canExecuteForward()) {
- initReg.setWizard(getWizard());
- initReg.execute();
- }
-
- if (downloadLogic.canExecuteForward()) {
- downloadLogic.setWizard(getWizard());
- downloadLogic.execute();
- }
- }
-
- @Override
- public boolean isCancelable() {
- return false;
- }
-
- public WizardActionUi getWizardUi() {
- return null; // this action does not have a ui
- }
-
- /////////////////////////////////////////////////////////////////////////////////
- // Constants
- public static final String DEFAULT_TITLE = ResourceUtils.getString(
- InitializeAction.class,
- "IA.title"); // NOI18N
- public static final String PROGRESS_TITLE_PROPERTY = ResourceUtils.getString(
- InitializeAction.class,
- "IA.progress.title"); // NOI18N
- public static final String DEFAULT_DESCRIPTION = ResourceUtils.getString(
- InitializeAction.class,
- "IA.description"); // NOI18N
-
-}
diff --git a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/panels/Bundle.properties b/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/panels/Bundle.properties
deleted file mode 100644
index 0eb223efcbd0..000000000000
--- a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/panels/Bundle.properties
+++ /dev/null
@@ -1,110 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-WP.title={product-name} Introduction
-WP.description={product-name} is a really good app
-WP.welcome.text=\
- Welcome to {product-name} Installer Wizard
\
- This program will install {product-name} application on your computer.
\
- Click Next to continue.
-WP.already.installed.text=\
-Welcome to {product-name} Installer Wizard
\
-{0} is already installed at {1}.
It is not possible to install it again.
\
-Click Exit to close this wizard.
-WP.already.installed.next.button.text=&Exit
-WP.incompatible.platform.text=\
-Welcome to {product-name} Installer Wizard
\
-The {0} installer was not designed to run on this operating system so it is not possible to install it. \
-Please run the installer for the appropriate platform.
\
-Click Exit to close this wizard.
-
-PoISP.title=Setup Complete
-PoISP.description=Click Finish to finish {product-name} setup.
-
-PoISP.message.text.success=\
- Installation Complete
\
- {0} has been installed on your computer.
-#NOI18N
-PoISP.message.content.type.success=text/html
-
-PoISP.message.text.warnings=\
-Installation Complete
\
-{0} has been installed on your computer but some not critical warnings were encountered.\
-
For more details consult the installation log file:
{1}
-
-PoISP.message.text.finish=Click Finish to close this wizard.
-PoISP.message.text.finish.content.type=text/html
-
-#NOI18N
-PoISP.message.content.type.warnings=text/html
-
-PoISP.message.text.errors=Installation Failed
\
- {0} has not been installed on your computer.
\
- Try to run installer again or consult the installation log file for more details:
{1}
-#NOI18N
-PoISP.message.content.type.errors=text/html
-
-PoISP.message.text.success.uninstall=\
- Uninstallation Complete
\
- {0} has been uninstalled.
-#NOI18N
-PoISP.message.content.type.success.uninstall=text/html
-
-PoISP.message.text.warnings.uninstall=\
- Uninstallation Complete
\
- {0} has been uninstalled with warnings.
\
- For more details consult the installation log file:
{1}
-#NOI18N
-PoISP.message.content.type.warnings.uninstall=text/html
-
-PoISP.message.text.errors.uninstall=Uninstallation Failed
\
-Uninstallation of {0} was not completed.
\
-Try to run uninstaller again or consult the uninstallation log file for more details:
{1}\
-
-#NOI18N
-PoISP.message.content.type.errors.uninstall=text/html
-
-PoISP.message.run.application.now=Launch {0} after the installer closes.
-
-PoISP.next.button.text=&Finish
-
-
-
-################################################################################
-# PreInstallSummaryPanel.java
-PrISP.title=Summary
-PrISP.description=Click Install to start the installation.
-PrISP.description.uninstall=Click Uninstall to start the uninstallation.
-
-PrISP.installation.folder={0} Installation Folder:
-PrISP.uninstall.list.label.text=
Click Uninstall to remove {0} from the system.
-PrISP.installation.size=Total Installation Size:
-PrISP.download.size=Total Download Size:
-
-PrISP.next.button.text=&Install
-PrISP.next.button.text.uninstall=&Uninstall
-
-PrISP.error.not.enough.space=Insufficient disk space for proper installation. Additional {1} is required in {0}.
-PrISP.error.cannot.check.space=Cannot check the free disk space
-PrISP.error.logic.access=Could not access product's configuration logic
-PrISP.error.fsroots=Cannot get the list of file system roots
-PrISP.error.non.existent.root={0} is set up to be installed to {1} which does not belong to any of the file system roots.
-PrISP.error.cannot.write=The wizard does not have write access to {1}, the installation directory of {0}. Please correct the permissions before proceeding.
-
-PrISP.remove.app.userdir.text=\
-\
-If you wish to remove the application settings directory that stores user configuration data for {0}, check the following option.
-PrISP.remove.app.userdir.checkbox=Remove directory {0}
diff --git a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/panels/PostInstallSummaryPanel.java b/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/panels/PostInstallSummaryPanel.java
deleted file mode 100644
index 5f685def5122..000000000000
--- a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/panels/PostInstallSummaryPanel.java
+++ /dev/null
@@ -1,433 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.mycompany.installer.wizard.components.panels;
-
-import java.awt.GridBagConstraints;
-import java.awt.Insets;
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
-import java.io.File;
-import java.io.IOException;
-import java.util.LinkedList;
-import java.util.List;
-import org.netbeans.installer.product.Registry;
-import org.netbeans.installer.product.components.Product;
-import org.netbeans.installer.product.components.ProductConfigurationLogic;
-import org.netbeans.installer.utils.LogManager;
-import org.netbeans.installer.utils.ResourceUtils;
-import org.netbeans.installer.utils.StringUtils;
-import org.netbeans.installer.utils.exceptions.InitializationException;
-import org.netbeans.installer.utils.helper.swing.NbiCheckBox;
-import org.netbeans.installer.utils.helper.swing.NbiTextPane;
-import org.netbeans.installer.wizard.components.WizardPanel;
-import org.netbeans.installer.wizard.containers.SwingContainer;
-import org.netbeans.installer.wizard.containers.SwingFrameContainer;
-import org.netbeans.installer.wizard.ui.SwingUi;
-import org.netbeans.installer.wizard.ui.WizardUi;
-import static org.netbeans.installer.utils.helper.DetailedStatus.INSTALLED_SUCCESSFULLY;
-import static org.netbeans.installer.utils.helper.DetailedStatus.INSTALLED_WITH_WARNINGS;
-import static org.netbeans.installer.utils.helper.DetailedStatus.FAILED_TO_INSTALL;
-import static org.netbeans.installer.utils.helper.DetailedStatus.UNINSTALLED_SUCCESSFULLY;
-import static org.netbeans.installer.utils.helper.DetailedStatus.UNINSTALLED_WITH_WARNINGS;
-import static org.netbeans.installer.utils.helper.DetailedStatus.FAILED_TO_UNINSTALL;
-
-public class PostInstallSummaryPanel extends WizardPanel {
- /////////////////////////////////////////////////////////////////////////////////
- // Instance
-
- public PostInstallSummaryPanel() {
- setProperty(TITLE_PROPERTY,
- DEFAULT_TITLE);
- setProperty(DESCRIPTION_PROPERTY,
- DEFAULT_DESCRIPTION);
-
- setProperty(MESSAGE_TEXT_SUCCESS_PROPERTY,
- DEFAULT_MESSAGE_TEXT_SUCCESS);
- setProperty(MESSAGE_CONTENT_TYPE_SUCCESS_PROPERTY,
- DEFAULT_MESSAGE_CONTENT_TYPE_SUCCESS);
- setProperty(MESSAGE_TEXT_WARNINGS_PROPERTY,
- DEFAULT_MESSAGE_TEXT_WARNINGS);
- setProperty(MESSAGE_CONTENT_TYPE_WARNINGS_PROPERTY,
- DEFAULT_MESSAGE_CONTENT_TYPE_WARNINGS);
- setProperty(MESSAGE_TEXT_ERRORS_PROPERTY,
- DEFAULT_MESSAGE_TEXT_ERRORS);
- setProperty(MESSAGE_CONTENT_TYPE_ERRORS_PROPERTY,
- DEFAULT_MESSAGE_CONTENT_TYPE_ERRORS);
-
- setProperty(MESSAGE_TEXT_SUCCESS_UNINSTALL_PROPERTY,
- DEFAULT_MESSAGE_TEXT_SUCCESS_UNINSTALL);
- setProperty(MESSAGE_CONTENT_TYPE_SUCCESS_UNINSTALL_PROPERTY,
- DEFAULT_MESSAGE_CONTENT_TYPE_SUCCESS_UNINSTALL);
- setProperty(MESSAGE_TEXT_WARNINGS_UNINSTALL_PROPERTY,
- DEFAULT_MESSAGE_TEXT_WARNINGS_UNINSTALL);
- setProperty(MESSAGE_CONTENT_TYPE_WARNINGS_UNINSTALL_PROPERTY,
- DEFAULT_MESSAGE_CONTENT_TYPE_WARNINGS_UNINSTALL);
- setProperty(MESSAGE_TEXT_ERRORS_UNINSTALL_PROPERTY,
- DEFAULT_MESSAGE_TEXT_ERRORS_UNINSTALL);
- setProperty(MESSAGE_CONTENT_TYPE_ERRORS_UNINSTALL_PROPERTY,
- DEFAULT_MESSAGE_CONTENT_TYPE_ERRORS_UNINSTALL);
-
-
- setProperty(NEXT_BUTTON_TEXT_PROPERTY,
- DEFAULT_NEXT_BUTTON_TEXT);
- }
-
- @Override
- public boolean isPointOfNoReturn() {
- return true;
- }
-
- @Override
- public WizardUi getWizardUi() {
- if (wizardUi == null) {
- wizardUi = new PostInstallSummaryPanelUi(this);
- }
-
- return wizardUi;
- }
-
- /////////////////////////////////////////////////////////////////////////////////
- // Inner Classes
- public static class PostInstallSummaryPanelUi extends WizardPanelUi {
-
- protected PostInstallSummaryPanel component;
-
- public PostInstallSummaryPanelUi(PostInstallSummaryPanel component) {
- super(component);
-
- this.component = component;
- }
-
- public SwingUi getSwingUi(SwingContainer container) {
- if (swingUi == null) {
- swingUi = new PostInstallSummaryPanelSwingUi(component, container);
- }
-
- return super.getSwingUi(container);
- }
- }
-
- public static class PostInstallSummaryPanelSwingUi extends WizardPanelSwingUi {
-
- protected PostInstallSummaryPanel component;
- private NbiTextPane messagePaneInstall;
- private NbiTextPane messagePaneUninstall;
-
-
- private NbiTextPane messagePaneFinish;
- private NbiCheckBox runAppNow;
- private Product app;
-
- public PostInstallSummaryPanelSwingUi(
- final PostInstallSummaryPanel component,
- final SwingContainer container) {
- super(component, container);
-
- this.component = component;
-
- initComponents();
- }
-
- protected void initializeContainer() {
- super.initializeContainer();
-
- // set up the back button
- container.getBackButton().setVisible(false);
- container.getBackButton().setEnabled(false);
-
- // set up the next (or finish) button
- container.getNextButton().setVisible(true);
- container.getNextButton().setEnabled(true);
-
- container.getNextButton().setText(
- component.getProperty(NEXT_BUTTON_TEXT_PROPERTY));
-
- // set up the cancel button
- container.getCancelButton().setVisible(false);
- container.getCancelButton().setEnabled(false);
- }
-
- @Override
- public void evaluateNextButtonClick() {
- container.getNextButton().setEnabled(false);
- final Product product = app;
- if (app != null) {
- ProductConfigurationLogic l = null;
- try {
- l = app.getLogic();
- } catch (InitializationException e) {
- }
- final File executable = l != null ? new File(app.getInstallationLocation(), l.getExecutable()) : null;
-
- if (executable != null && runAppNow.isSelected()) {
- LogManager.log("... running: " + executable.getAbsolutePath());
- ProcessBuilder pb = new ProcessBuilder(new String[]{executable.getAbsolutePath()});
- try {
- pb.start();
- } catch (IOException e) {
- LogManager.log(e);
- }
-
- }
- }
- super.evaluateNextButtonClick();
- }
-
- protected void initialize() {
- final Registry registry = Registry.getInstance();
- final List successfulInstall = registry.getProducts(INSTALLED_SUCCESSFULLY);
- final List warningInstall = registry.getProducts(INSTALLED_WITH_WARNINGS);
- final List errorInstall = registry.getProducts(FAILED_TO_INSTALL);
-
- final List successfulUninstall = registry.getProducts(UNINSTALLED_SUCCESSFULLY);
- final List warningUninstall = registry.getProducts(UNINSTALLED_WITH_WARNINGS);
- final List errorUninstall = registry.getProducts(FAILED_TO_UNINSTALL);
-
- if (errorInstall.size() > 0) {
- messagePaneInstall.setContentType(component.getProperty(MESSAGE_CONTENT_TYPE_ERRORS_PROPERTY));
- messagePaneInstall.setText(StringUtils.format(
- component.getProperty(MESSAGE_TEXT_ERRORS_PROPERTY),
- errorInstall.get(0).getDisplayName(),
- LogManager.getLogFile()));
- } else if (warningInstall.size() > 0) {
- messagePaneInstall.setContentType(component.getProperty(MESSAGE_CONTENT_TYPE_WARNINGS_PROPERTY));
- messagePaneInstall.setText(StringUtils.format(
- component.getProperty(MESSAGE_TEXT_WARNINGS_PROPERTY),
- warningInstall.get(0).getDisplayName(),
- LogManager.getLogFile()));
- } else if (successfulInstall.size() > 0) {
- messagePaneInstall.setContentType(component.getProperty(MESSAGE_CONTENT_TYPE_SUCCESS_PROPERTY));
- messagePaneInstall.setText(StringUtils.format(
- component.getProperty(MESSAGE_TEXT_SUCCESS_PROPERTY),
- successfulInstall.get(0).getDisplayName(),
- LogManager.getLogFile()));
- } else {
- messagePaneInstall.setVisible(false);
- }
-
- messagePaneFinish.setVisible(true);
- messagePaneFinish.setContentType(DEFAULT_MESSAGE_FINISH_PROCESS_CONTENT_TYPE);
- messagePaneFinish.setText(DEFAULT_MESSAGE_FINISH_PROCESS);
-
- if (errorUninstall.size() > 0) {
- messagePaneUninstall.setContentType(component.getProperty(MESSAGE_CONTENT_TYPE_ERRORS_UNINSTALL_PROPERTY));
- messagePaneUninstall.setText(StringUtils.format(
- component.getProperty(MESSAGE_TEXT_ERRORS_UNINSTALL_PROPERTY),
- errorUninstall.get(0).getDisplayName(),
- LogManager.getLogFile()));
- } else if (warningUninstall.size() > 0) {
- messagePaneUninstall.setContentType(component.getProperty(MESSAGE_CONTENT_TYPE_WARNINGS_UNINSTALL_PROPERTY));
- messagePaneUninstall.setText(StringUtils.format(
- component.getProperty(MESSAGE_TEXT_WARNINGS_UNINSTALL_PROPERTY),
- warningUninstall.get(0).getDisplayName(),
- LogManager.getLogFile()));
- } else if (successfulUninstall.size() > 0) {
- messagePaneUninstall.setContentType(component.getProperty(MESSAGE_CONTENT_TYPE_SUCCESS_UNINSTALL_PROPERTY));
- messagePaneUninstall.setText(StringUtils.format(
- component.getProperty(MESSAGE_TEXT_SUCCESS_UNINSTALL_PROPERTY),
- successfulUninstall.get(0).getDisplayName(),
- LogManager.getLogFile()));
- } else {
- messagePaneUninstall.setVisible(false);
- }
-
-
-
- final List products = new LinkedList();
- products.addAll(successfulInstall);
- products.addAll(warningInstall);
- runAppNow.setSelected(false);
- if (!products.isEmpty()) {
- runAppNow.setText(StringUtils.format(DEFAULT_MESSAGE_LAUNCH_APPLICATION_NOW,
- products.get(0).getDisplayName()));
- runAppNow.doClick();
- app = products.get(0);
- } else {
- runAppNow.setVisible(false);
- }
-
-
- }
-
- private void initComponents() {
- // messagePaneInstall ///////////////////////////////////////////////////
- messagePaneInstall = new NbiTextPane();
-
- // messagePaneUninstall /////////////////////////////////////////////////
- messagePaneUninstall = new NbiTextPane();
-
- // messagePaneRunApplication ///////////////////////////////////////////////////
-
-
- messagePaneFinish = new NbiTextPane();
-
- runAppNow = new NbiCheckBox();
-
-
- // this /////////////////////////////////////////////////////////////////
- add(messagePaneInstall, new GridBagConstraints(
- 0, 0, // x, y
- 1, 1, // width, height
- 1.0, 0.0, // weight-x, weight-y
- GridBagConstraints.PAGE_START, // anchor
- GridBagConstraints.HORIZONTAL, // fill
- new Insets(31, 11, 0, 11), // padding
- 0, 0)); // padx, pady - ???
- add(messagePaneUninstall, new GridBagConstraints(
- 0, 1, // x, y
- 1, 1, // width, height
- 1.0, 0.0, // weight-x, weight-y
- GridBagConstraints.PAGE_START, // anchor
- GridBagConstraints.BOTH, // fill
- new Insets(31, 11, 0, 11), // padding
- 0, 0)); // padx, pady - ???
-
- add(messagePaneFinish, new GridBagConstraints(
- 0, 3, // x, y
- 1, 1, // width, height
- 1.0, 1.0, // weight-x, weight-y
- GridBagConstraints.PAGE_START, // anchor
- GridBagConstraints.HORIZONTAL, // fill
- new Insets(11, 11, 0, 11), // padding
- 0, 0)); // padx, pady - ???
- /*
- add(new NbiPanel(), new GridBagConstraints(
- 0, 4, // x, y
- 1, 1, // width, height
- 1.0, 1.0, // weight-x, weight-y
- GridBagConstraints.CENTER, // anchor
- GridBagConstraints.BOTH, // fill
- new Insets(0, 11, 0, 11), // padding
- 0, 0)); // padx, pady - ???
- */
- add(runAppNow, new GridBagConstraints(
- 0, 4, // x, y
- 1, 1, // width, height
- 1.0, 1.0, // weight-x, weight-y
- GridBagConstraints.PAGE_START, // anchor
- GridBagConstraints.HORIZONTAL, // fill
- new Insets(11, 11, 0, 11), // padding
- 0, 0)); // padx, pady - ???
-
-
-
- if (container instanceof SwingFrameContainer) {
- final SwingFrameContainer sfc = (SwingFrameContainer) container;
- sfc.addWindowListener(new WindowAdapter() {
-
- @Override
- public void windowClosing(WindowEvent event) {
- SwingUi currentUi = component.getWizardUi().getSwingUi(container);
- if (currentUi != null) {
- if (!container.getCancelButton().isEnabled() && // cancel button is disabled
- !container.getCancelButton().isVisible() && // no cancel button at this panel
- !container.getBackButton().isVisible() && // no back button at this panel
- container.getNextButton().isVisible() && // next button is visible
- container.getNextButton().isEnabled()) { // and enabled
- currentUi.evaluateNextButtonClick();
- sfc.removeWindowListener(this);
- }
- }
- }
- });
- }
- }
- }
- /////////////////////////////////////////////////////////////////////////////////
- // Constants
- public static final String MESSAGE_TEXT_SUCCESS_PROPERTY =
- "message.text.success"; // NOI18N
- public static final String MESSAGE_CONTENT_TYPE_SUCCESS_PROPERTY =
- "message.content.type.success"; // NOI18N
- public static final String MESSAGE_TEXT_WARNINGS_PROPERTY =
- "message.text.warnings"; // NOI18N
- public static final String MESSAGE_CONTENT_TYPE_WARNINGS_PROPERTY =
- "message.content.type.warnings"; // NOI18N
- public static final String MESSAGE_TEXT_ERRORS_PROPERTY =
- "message.text.errors"; // NOI18N
- public static final String MESSAGE_CONTENT_TYPE_ERRORS_PROPERTY =
- "message.content.type.errors"; // NOI18N
- public static final String MESSAGE_TEXT_SUCCESS_UNINSTALL_PROPERTY =
- "message.text.success.uninstall"; // NOI18N
- public static final String MESSAGE_CONTENT_TYPE_SUCCESS_UNINSTALL_PROPERTY =
- "message.content.type.success.uninstall"; // NOI18N
- public static final String MESSAGE_TEXT_WARNINGS_UNINSTALL_PROPERTY =
- "message.text.warnings.uninstall"; // NOI18N
- public static final String MESSAGE_CONTENT_TYPE_WARNINGS_UNINSTALL_PROPERTY =
- "message.content.type.warnings.uninstall"; // NOI18N
- public static final String MESSAGE_TEXT_ERRORS_UNINSTALL_PROPERTY =
- "message.text.errors.uninstall"; // NOI18N
- public static final String MESSAGE_CONTENT_TYPE_ERRORS_UNINSTALL_PROPERTY =
- "message.content.type.errors.uninstall"; // NOI18N
- public static final String DEFAULT_MESSAGE_TEXT_SUCCESS =
- ResourceUtils.getString(PostInstallSummaryPanel.class,
- "PoISP.message.text.success"); // NOI18N
- public static final String DEFAULT_MESSAGE_CONTENT_TYPE_SUCCESS =
- ResourceUtils.getString(PostInstallSummaryPanel.class,
- "PoISP.message.content.type.success"); // NOI18N
- public static final String DEFAULT_MESSAGE_TEXT_WARNINGS =
- ResourceUtils.getString(PostInstallSummaryPanel.class,
- "PoISP.message.text.warnings"); // NOI18N
- public static final String DEFAULT_MESSAGE_CONTENT_TYPE_WARNINGS =
- ResourceUtils.getString(PostInstallSummaryPanel.class,
- "PoISP.message.content.type.warnings"); // NOI18N
- public static final String DEFAULT_MESSAGE_TEXT_ERRORS =
- ResourceUtils.getString(PostInstallSummaryPanel.class,
- "PoISP.message.text.errors"); // NOI18N
- public static final String DEFAULT_MESSAGE_CONTENT_TYPE_ERRORS =
- ResourceUtils.getString(PostInstallSummaryPanel.class,
- "PoISP.message.content.type.errors"); // NOI18N
- public static final String DEFAULT_MESSAGE_TEXT_SUCCESS_UNINSTALL =
- ResourceUtils.getString(PostInstallSummaryPanel.class,
- "PoISP.message.text.success.uninstall"); // NOI18N
- public static final String DEFAULT_MESSAGE_CONTENT_TYPE_SUCCESS_UNINSTALL =
- ResourceUtils.getString(PostInstallSummaryPanel.class,
- "PoISP.message.content.type.success.uninstall"); // NOI18N
- public static final String DEFAULT_MESSAGE_TEXT_WARNINGS_UNINSTALL =
- ResourceUtils.getString(PostInstallSummaryPanel.class,
- "PoISP.message.text.warnings.uninstall"); // NOI18N
- public static final String DEFAULT_MESSAGE_CONTENT_TYPE_WARNINGS_UNINSTALL =
- ResourceUtils.getString(PostInstallSummaryPanel.class,
- "PoISP.message.content.type.warnings.uninstall"); // NOI18N
- public static final String DEFAULT_MESSAGE_TEXT_ERRORS_UNINSTALL =
- ResourceUtils.getString(PostInstallSummaryPanel.class,
- "PoISP.message.text.errors.uninstall"); // NOI18N
- public static final String DEFAULT_MESSAGE_CONTENT_TYPE_ERRORS_UNINSTALL =
- ResourceUtils.getString(PostInstallSummaryPanel.class,
- "PoISP.message.content.type.errors.uninstall"); // NOI18N
-
- public static final String DEFAULT_TITLE = ResourceUtils.getString(
- PostInstallSummaryPanel.class,
- "PoISP.title"); // NOI18N
- public static final String DEFAULT_DESCRIPTION =
- ResourceUtils.getString(PostInstallSummaryPanel.class,
- "PoISP.description"); // NOI18N
- public static final String DEFAULT_NEXT_BUTTON_TEXT =
- ResourceUtils.getString(PostInstallSummaryPanel.class,
- "PoISP.next.button.text"); // NOI18N
- public static final String DEFAULT_MESSAGE_FINISH_PROCESS =
- ResourceUtils.getString(PostInstallSummaryPanel.class,
- "PoISP.message.text.finish"); // NOI18N
- public static final String DEFAULT_MESSAGE_FINISH_PROCESS_CONTENT_TYPE =
- ResourceUtils.getString(PostInstallSummaryPanel.class,
- "PoISP.message.text.finish.content.type"); // NOI18N
- public static final String DEFAULT_MESSAGE_LAUNCH_APPLICATION_NOW =
- ResourceUtils.getString(PostInstallSummaryPanel.class,
- "PoISP.message.run.application.now");//NOI18N
-}
diff --git a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/panels/PreInstallSummaryPanel.java b/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/panels/PreInstallSummaryPanel.java
deleted file mode 100644
index be0ed5448f2c..000000000000
--- a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/panels/PreInstallSummaryPanel.java
+++ /dev/null
@@ -1,594 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.mycompany.installer.wizard.components.panels;
-
-import java.awt.ComponentOrientation;
-import java.awt.GridBagConstraints;
-import java.awt.Insets;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.swing.border.EmptyBorder;
-import org.netbeans.installer.Installer;
-import org.netbeans.installer.product.Registry;
-import org.netbeans.installer.product.RegistryNode;
-import org.netbeans.installer.product.RegistryType;
-import org.netbeans.installer.product.components.Product;
-import org.netbeans.installer.utils.ErrorManager;
-import org.netbeans.installer.utils.FileUtils;
-import org.netbeans.installer.utils.LogManager;
-import org.netbeans.installer.utils.ResourceUtils;
-import org.netbeans.installer.utils.StringUtils;
-import org.netbeans.installer.utils.SystemUtils;
-import org.mycompany.installer.utils.applications.NetBeansRCPUtils;
-import org.netbeans.installer.utils.exceptions.NativeException;
-import org.netbeans.installer.utils.helper.swing.NbiCheckBox;
-import org.netbeans.installer.utils.helper.swing.NbiLabel;
-import org.netbeans.installer.utils.helper.swing.NbiPanel;
-import org.netbeans.installer.utils.helper.swing.NbiTextPane;
-import org.netbeans.installer.wizard.components.panels.ErrorMessagePanel;
-import org.netbeans.installer.wizard.components.panels.ErrorMessagePanel.ErrorMessagePanelSwingUi;
-import org.netbeans.installer.wizard.components.panels.ErrorMessagePanel.ErrorMessagePanelUi;
-import org.netbeans.installer.wizard.containers.SwingContainer;
-import org.netbeans.installer.wizard.ui.SwingUi;
-import org.netbeans.installer.wizard.ui.WizardUi;
-
-public class PreInstallSummaryPanel extends ErrorMessagePanel {
- /////////////////////////////////////////////////////////////////////////////////
- // Instance
-
- public PreInstallSummaryPanel() {
- setProperty(TITLE_PROPERTY,
- DEFAULT_TITLE);
- setProperty(DESCRIPTION_PROPERTY,
- DEFAULT_DESCRIPTION);
-
- setProperty(INSTALLATION_FOLDER_PROPERTY,
- DEFAULT_INSTALLATION_FOLDER);
-
- setProperty(UNINSTALL_LABEL_TEXT_PROPERTY,
- DEFAULT_UNINSTALL_LABEL_TEXT);
-
- setProperty(INSTALLATION_SIZE_PROPERTY,
- DEFAULT_INSTALLATION_SIZE);
- setProperty(DOWNLOAD_SIZE_PROPERTY,
- DEFAULT_DOWNLOAD_SIZE);
-
- setProperty(NEXT_BUTTON_TEXT_PROPERTY,
- DEFAULT_NEXT_BUTTON_TEXT);
-
- setProperty(ERROR_NOT_ENOUGH_SPACE_PROPERTY,
- DEFAULT_ERROR_NOT_ENOUGH_SPACE);
- setProperty(ERROR_CANNOT_CHECK_SPACE_PROPERTY,
- DEFAULT_ERROR_CANNOT_CHECK_SPACE);
- setProperty(ERROR_LOGIC_ACCESS_PROPERTY,
- DEFAULT_ERROR_LOGIC_ACCESS);
- setProperty(ERROR_FSROOTS_PROPERTY,
- DEFAULT_ERROR_FSROOTS);
- setProperty(ERROR_NON_EXISTENT_ROOT_PROPERTY,
- DEFAULT_ERROR_NON_EXISTENT_ROOT);
- setProperty(ERROR_CANNOT_WRITE_PROPERTY,
- DEFAULT_ERROR_CANNOT_WRITE);
- setProperty(REMOVE_APP_USERDIR_TEXT_PROPERTY,
- DEFAULT_REMOVE_APP_USERDIR_TEXT);
- setProperty(REMOVE_APP_USERDIR_CHECKBOX_PROPERTY,
- DEFAULT_REMOVE_APP_USERDIR_CHECKBOX);
-
- }
-
- @Override
- public WizardUi getWizardUi() {
- if (wizardUi == null) {
- wizardUi = new PreInstallSummaryPanelUi(this);
- }
-
- return wizardUi;
- }
-
- @Override
- public void initialize() {
- final List toInstall =
- Registry.getInstance().getProductsToInstall();
-
- if (toInstall.size() > 0) {
- setProperty(NEXT_BUTTON_TEXT_PROPERTY, DEFAULT_NEXT_BUTTON_TEXT);
- setProperty(DESCRIPTION_PROPERTY, DEFAULT_DESCRIPTION);
- } else {
- setProperty(NEXT_BUTTON_TEXT_PROPERTY, DEFAULT_NEXT_BUTTON_TEXT_UNINSTALL);
- setProperty(DESCRIPTION_PROPERTY, DEFAULT_DESCRIPTION_UNINSTALL);
- }
- }
-
- /////////////////////////////////////////////////////////////////////////////////
- // Inner Classes
- public static class PreInstallSummaryPanelUi extends ErrorMessagePanelUi {
-
- protected PreInstallSummaryPanel component;
-
- public PreInstallSummaryPanelUi(PreInstallSummaryPanel component) {
- super(component);
-
- this.component = component;
- }
-
- @Override
- public SwingUi getSwingUi(SwingContainer container) {
- if (swingUi == null) {
- swingUi = new PreInstallSummaryPanelSwingUi(component, container);
- }
-
- return super.getSwingUi(container);
- }
- }
-
- public static class PreInstallSummaryPanelSwingUi extends ErrorMessagePanelSwingUi {
-
- protected PreInstallSummaryPanel component;
- private NbiTextPane locationsPane;
- private NbiLabel uninstallListLabel;
- private NbiTextPane uninstallListPane;
- private NbiLabel installationSizeLabel;
- private NbiLabel installationSizeValue;
- private NbiLabel downloadSizeLabel;
- private NbiLabel downloadSizeValue;
- private NbiCheckBox removeUserdirCheckbox;
- private NbiTextPane removeUserdirPane;
- private NbiPanel spacer;
- private int gridy = 0;
-
- public PreInstallSummaryPanelSwingUi(
- final PreInstallSummaryPanel component,
- final SwingContainer container) {
- super(component, container);
-
- this.component = component;
- initComponents();
- }
-
- // protected ////////////////////////////////////////////////////////////////
- @Override
- protected void initializeContainer() {
- super.initializeContainer();
-
- container.getNextButton().setText(
- panel.getProperty(NEXT_BUTTON_TEXT_PROPERTY));
- }
-
- @Override
- protected void initialize() {
- final Registry registry = Registry.getInstance();
-
- final StringBuilder text = new StringBuilder();
- long installationSize = 0;
- long downloadSize = 0;
-
- for (Product product : registry.getProductsToInstall()) {
- installationSize += product.getRequiredDiskSpace();
- downloadSize += product.getDownloadSize();
-
-
- }
-
- // add top-level components like nb-base, glassfish, tomcat, jdk
- for (Product product : registry.getProductsToInstall()) {
- text.append(StringUtils.LF);
- text.append(StringUtils.format(panel.getProperty(INSTALLATION_FOLDER_PROPERTY),
- product.getDisplayName()));
- text.append(StringUtils.LF);
- text.append(" " + product.getInstallationLocation());
- text.append(StringUtils.LF);
- }
- locationsPane.setText(text);
-
- List toUninstall = registry.getProductsToUninstall();
- String uninstallLabelText = toUninstall.size() > 0 ? StringUtils.format(
- panel.getProperty(UNINSTALL_LABEL_TEXT_PROPERTY),
- toUninstall.get(0).getDisplayName()) : "";
-
- uninstallListLabel.setText(uninstallLabelText);
-
-
- installationSizeLabel.setText(
- panel.getProperty(INSTALLATION_SIZE_PROPERTY));
- installationSizeValue.setText(StringUtils.formatSize(installationSize));
-
- downloadSizeLabel.setText(
- panel.getProperty(DOWNLOAD_SIZE_PROPERTY));
- downloadSizeValue.setText(StringUtils.formatSize(downloadSize));
-
- if (registry.getProductsToInstall().size() == 0) {
- locationsPane.setVisible(false);
- installationSizeLabel.setVisible(false);
- installationSizeValue.setVisible(false);
- } else {
- locationsPane.setVisible(true);
- installationSizeLabel.setVisible(true);
- installationSizeValue.setVisible(true);
- }
-
- if (registry.getProductsToUninstall().size() == 0) {
- uninstallListLabel.setVisible(false);
- uninstallListPane.setVisible(false);
- } else {
- uninstallListLabel.setVisible(true);
- uninstallListPane.setVisible(true);
- }
-
- downloadSizeLabel.setVisible(false);
- downloadSizeValue.setVisible(false);
- for (RegistryNode remoteNode : registry.getNodes(RegistryType.REMOTE)) {
- if (remoteNode.isVisible()) {
- downloadSizeLabel.setVisible(true);
- downloadSizeValue.setVisible(true);
- }
- }
-
- if (Boolean.getBoolean(REMOVE_APP_USERDIR_PROPERTY)) {
- removeUserdirCheckbox.doClick();
- }
-
- removeUserdirCheckbox.setVisible(false);
- removeUserdirPane.setVisible(false);
-
- for (Product product : Registry.getInstance().getProductsToUninstall()) {
-
- try {
- File installLocation = product.getInstallationLocation();
- LogManager.log("... product installation directory: " + installLocation);
- File userDir = NetBeansRCPUtils.getApplicationUserDirFile(installLocation);
- LogManager.log("... product userdir: " + userDir);
- if (FileUtils.exists(userDir) && FileUtils.canWrite(userDir)) {
- removeUserdirCheckbox.setText(
- StringUtils.format(
- panel.getProperty(REMOVE_APP_USERDIR_CHECKBOX_PROPERTY),
- userDir.getAbsolutePath()));
- removeUserdirCheckbox.setBorder(new EmptyBorder(0, 0, 0, 0));
- removeUserdirCheckbox.setVisible(true);
-
- removeUserdirPane.setVisible(true);
- removeUserdirPane.setContentType("text/html");
-
- removeUserdirPane.setText(
- StringUtils.format(
- panel.getProperty(REMOVE_APP_USERDIR_TEXT_PROPERTY),
- product.getDisplayName()));
-
- }
- break;
- } catch (IOException e) {
- LogManager.log(e);
- }
-
- }
-
- //if(productCheckboxList!=null) {
- // for(Pair pair : productCheckboxList) {
- // pair.getSecond().doClick();
- // }
- //}
- super.initialize();
- }
-
- @Override
- protected String validateInput() {
- try {
- if (!Boolean.getBoolean(SystemUtils.NO_SPACE_CHECK_PROPERTY)) {
- final List roots =
- SystemUtils.getFileSystemRoots();
- final List toInstall =
- Registry.getInstance().getProductsToInstall();
- final Map spaceMap =
- new HashMap();
-
- LogManager.log("Available roots : " + StringUtils.asString(roots));
-
- File downloadDataDirRoot = FileUtils.getRoot(
- Installer.getInstance().getLocalDirectory(), roots);
- long downloadSize = 0;
- for (Product product : toInstall) {
- downloadSize += product.getDownloadSize();
- }
- // the critical check point - we download all the data
- spaceMap.put(downloadDataDirRoot, new Long(downloadSize));
- long lastDataSize = 0;
- for (Product product : toInstall) {
- final File installLocation = product.getInstallationLocation();
- final File root = FileUtils.getRoot(installLocation, roots);
- final long productSize = product.getRequiredDiskSpace();
-
- LogManager.log(" [" + root + "] <- " + installLocation);
-
- if (root != null) {
- Long ddSize = spaceMap.get(downloadDataDirRoot);
- // remove space that was freed after the remove of previos product data
- spaceMap.put(downloadDataDirRoot,
- Long.valueOf(ddSize - lastDataSize));
-
- // add space required for next product installation
- Long size = spaceMap.get(root);
- size = Long.valueOf(
- (size != null ? size.longValue() : 0L)
- + productSize);
- spaceMap.put(root, size);
- lastDataSize = product.getDownloadSize();
- } else {
- return StringUtils.format(
- panel.getProperty(ERROR_NON_EXISTENT_ROOT_PROPERTY),
- product, installLocation);
- }
- }
-
- for (Map.Entry it : spaceMap.entrySet()) {
- File root = it.getKey();
-
- try {
- final long availableSpace = SystemUtils.getFreeSpace(root);
- final long requiredSpace = it.getValue() + REQUIRED_SPACE_ADDITION;
-
- if (availableSpace < requiredSpace) {
- return StringUtils.format(
- panel.getProperty(ERROR_NOT_ENOUGH_SPACE_PROPERTY),
- root,
- StringUtils.formatSize(requiredSpace - availableSpace));
- }
- } catch (NativeException e) {
- ErrorManager.notifyError(
- panel.getProperty(ERROR_CANNOT_CHECK_SPACE_PROPERTY),
- e);
- }
- }
- }
-
- final List toUninstall =
- Registry.getInstance().getProductsToUninstall();
- for (Product product : toUninstall) {
- if (!FileUtils.canWrite(product.getInstallationLocation())) {
- return StringUtils.format(
- panel.getProperty(ERROR_CANNOT_WRITE_PROPERTY),
- product,
- product.getInstallationLocation());
- }
- }
-
- } catch (IOException e) {
- ErrorManager.notifyError(
- panel.getProperty(ERROR_FSROOTS_PROPERTY), e);
- }
-
- return null;
- }
-
- // private //////////////////////////////////////////////////////////////////
- private void initComponents() {
- gridy = 0;
-
- // locationsPane ////////////////////////////////////////////////////////
- locationsPane = new NbiTextPane();
-
- // uninstallListPane ////////////////////////////////////////////////////
- uninstallListPane = new NbiTextPane();
-
- // uninstallListLabel ///////////////////////////////////////////////////
- uninstallListLabel = new NbiLabel();
- uninstallListLabel.setLabelFor(uninstallListPane);
-
- // installationSizeValue ////////////////////////////////////////////////
- installationSizeValue = new NbiLabel();
- //installationSizeValue.setFocusable(true);
-
- // installationSizeLabel ////////////////////////////////////////////////
- installationSizeLabel = new NbiLabel();
- installationSizeLabel.setLabelFor(installationSizeValue);
-
- // downloadSizeValue ////////////////////////////////////////////////////
- downloadSizeValue = new NbiLabel();
- //downloadSizeValue.setFocusable(true);
-
- // downloadSizeLabel ////////////////////////////////////////////////////
- downloadSizeLabel = new NbiLabel();
- downloadSizeLabel.setLabelFor(downloadSizeValue);
-
- // spacer ///////////////////////////////////////////////////////////////
- spacer = new NbiPanel();
-
- // this /////////////////////////////////////////////////////////////////
- add(locationsPane, new GridBagConstraints(
- 0, gridy++, // x, y
- 1, 1, // width, height
- 1.0, 0.0, // weight-x, weight-y
- GridBagConstraints.PAGE_START, // anchor
- GridBagConstraints.HORIZONTAL, // fill
- new Insets(11, 11, 0, 11), // padding
- 0, 0)); // padx, pady - ???
- add(uninstallListLabel, new GridBagConstraints(
- 0, gridy++, // x, y
- 1, 1, // width, height
- 1.0, 0.0, // weight-x, weight-y
- GridBagConstraints.PAGE_START, // anchor
- GridBagConstraints.HORIZONTAL, // fill
- new Insets(11, 11, 0, 11), // padding
- 0, 0)); // padx, pady - ???
- add(uninstallListPane, new GridBagConstraints(
- 0, gridy++, // x, y
- 1, 1, // width, height
- 1.0, 0.0, // weight-x, weight-y
- GridBagConstraints.PAGE_START, // anchor
- GridBagConstraints.HORIZONTAL, // fill
- new Insets(0, 11, 0, 11), // padding
- 0, 0)); // padx, pady - ???
- int gridy0 = gridy;
- gridy++;
-
- removeUserdirPane = new NbiTextPane();
- add(removeUserdirPane, new GridBagConstraints(
- 0, gridy++, // x, y
- 1, 1, // width, height
- 1.0, 0.0, // weight-x, weight-y
- GridBagConstraints.PAGE_START, // anchor
- GridBagConstraints.HORIZONTAL, // fill
- new Insets(11, 11, 0, 11), // padding
- 0, 0)); // padx, pady - ???
-
- removeUserdirCheckbox = new NbiCheckBox();
- add(removeUserdirCheckbox, new GridBagConstraints(
- 0, gridy++, // x, y
- 1, 1, // width, height
- 1.0, 0.0, // weight-x, weight-y
- GridBagConstraints.PAGE_START, // anchor
- GridBagConstraints.HORIZONTAL, // fill
- new Insets(4, 20, 0, 11), // padding
- 0, 0)); // padx, pady - ???
-
- removeUserdirCheckbox.addActionListener(new ActionListener() {
-
- public void actionPerformed(ActionEvent e) {
- System.setProperty(REMOVE_APP_USERDIR_PROPERTY,
- "" + removeUserdirCheckbox.isSelected());
- }
- });
-
- add(installationSizeLabel, new GridBagConstraints(
- 0, gridy++, // x, y
- 1, 1, // width, height
- 1.0, 0.0, // weight-x, weight-y
- GridBagConstraints.LINE_START, // anchor
- GridBagConstraints.HORIZONTAL, // fill
- new Insets(22, 11, 0, 11), // padding
- 0, 0)); // padx, pady - ???
- add(installationSizeValue, new GridBagConstraints(
- 0, gridy++, // x, y
- 1, 1, // width, height
- 1.0, 0.0, // weight-x, weight-y
- GridBagConstraints.LINE_START, // anchor
- GridBagConstraints.HORIZONTAL, // fill
- new Insets(4, 22, 0, 11), // padding
- 0, 0)); // padx, pady - ???
- add(downloadSizeLabel, new GridBagConstraints(
- 0, gridy++, // x, y
- 1, 1, // width, height
- 1.0, 0.0, // weight-x, weight-y
- GridBagConstraints.LINE_START, // anchor
- GridBagConstraints.HORIZONTAL, // fill
- new Insets(4, 11, 0, 11), // padding
- 0, 0)); // padx, pady - ???
- add(downloadSizeValue, new GridBagConstraints(
- 0, gridy++, // x, y
- 1, 1, // width, height
- 1.0, 0.0, // weight-x, weight-y
- GridBagConstraints.LINE_START, // anchor
- GridBagConstraints.HORIZONTAL, // fill
- new Insets(4, 22, 0, 11), // padding
- 0, 0)); // padx, pady - ???
- add(spacer, new GridBagConstraints(
- 0, gridy + 10, // x, y
- 1, 1, // width, height
- 1.0, 1.0, // weight-x, weight-y
- GridBagConstraints.CENTER, // anchor
- GridBagConstraints.BOTH, // fill
- new Insets(0, 11, 0, 11), // padding
- 0, 0)); // padx, pady - ???
- }
- }
-/////////////////////////////////////////////////////////////////////////////////
-// Constants
- public static final String INSTALLATION_FOLDER_PROPERTY =
- "installation.folder"; // NOI18N
- public static final String UNINSTALL_LABEL_TEXT_PROPERTY =
- "uninstall.list.label.text"; // NOI18N
- public static final String INSTALLATION_SIZE_PROPERTY =
- "installation.size"; // NOI18N
- public static final String DOWNLOAD_SIZE_PROPERTY =
- "download.size"; // NOI18N
- public static final String ERROR_NOT_ENOUGH_SPACE_PROPERTY =
- "error.not.enough.space"; // NOI18N
- public static final String ERROR_CANNOT_CHECK_SPACE_PROPERTY =
- "error.cannot.check.space"; // NOI18N
- public static final String ERROR_LOGIC_ACCESS_PROPERTY =
- "error.logic.access"; // NOI18N
- public static final String ERROR_FSROOTS_PROPERTY =
- "error.fsroots"; // NOI18N
- public static final String ERROR_NON_EXISTENT_ROOT_PROPERTY =
- "error.non.existent.root"; // NOI18N
- public static final String ERROR_CANNOT_WRITE_PROPERTY =
- "error.cannot.write"; // NOI18N
- public static final String REMOVE_APP_USERDIR_PROPERTY =
- "remove.app.userdir";
- public static final String REMOVE_APP_USERDIR_TEXT_PROPERTY =
- "remove.app.userdir.text";
- public static final String REMOVE_APP_USERDIR_CHECKBOX_PROPERTY =
- "remove.app.userdir.checkbox";
- public static final String DEFAULT_TITLE =
- ResourceUtils.getString(PreInstallSummaryPanel.class,
- "PrISP.title"); // NOI18N
- public static final String DEFAULT_DESCRIPTION =
- ResourceUtils.getString(PreInstallSummaryPanel.class,
- "PrISP.description"); // NOI18N
- public static final String DEFAULT_DESCRIPTION_UNINSTALL =
- ResourceUtils.getString(PreInstallSummaryPanel.class,
- "PrISP.description.uninstall"); // NOI18N
- public static final String DEFAULT_INSTALLATION_FOLDER =
- ResourceUtils.getString(PreInstallSummaryPanel.class,
- "PrISP.installation.folder"); // NOI18N
- public static final String DEFAULT_UNINSTALL_LABEL_TEXT =
- ResourceUtils.getString(PreInstallSummaryPanel.class,
- "PrISP.uninstall.list.label.text"); // NOI18N
- public static final String DEFAULT_INSTALLATION_SIZE =
- ResourceUtils.getString(PreInstallSummaryPanel.class,
- "PrISP.installation.size"); // NOI18N
- public static final String DEFAULT_DOWNLOAD_SIZE =
- ResourceUtils.getString(PreInstallSummaryPanel.class,
- "PrISP.download.size"); // NOI18N
- public static final String DEFAULT_NEXT_BUTTON_TEXT =
- ResourceUtils.getString(PreInstallSummaryPanel.class,
- "PrISP.next.button.text"); // NOI18N
- public static final String DEFAULT_NEXT_BUTTON_TEXT_UNINSTALL =
- ResourceUtils.getString(PreInstallSummaryPanel.class,
- "PrISP.next.button.text.uninstall"); // NOI18N
- public static final String DEFAULT_ERROR_NOT_ENOUGH_SPACE =
- ResourceUtils.getString(PreInstallSummaryPanel.class,
- "PrISP.error.not.enough.space"); // NOI18N
- public static final String DEFAULT_ERROR_CANNOT_CHECK_SPACE =
- ResourceUtils.getString(PreInstallSummaryPanel.class,
- "PrISP.error.cannot.check.space");// NOI18N
- public static final String DEFAULT_ERROR_LOGIC_ACCESS =
- ResourceUtils.getString(PreInstallSummaryPanel.class,
- "PrISP.error.logic.access");// NOI18N
- public static final String DEFAULT_ERROR_FSROOTS =
- ResourceUtils.getString(PreInstallSummaryPanel.class,
- "PrISP.error.fsroots"); // NOI18N
- public static final String DEFAULT_ERROR_NON_EXISTENT_ROOT =
- ResourceUtils.getString(PreInstallSummaryPanel.class,
- "PrISP.error.non.existent.root"); // NOI18N
- public static final String DEFAULT_ERROR_CANNOT_WRITE =
- ResourceUtils.getString(PreInstallSummaryPanel.class,
- "PrISP.error.cannot.write"); // NOI18N
- public static final String DEFAULT_REMOVE_APP_USERDIR_TEXT =
- ResourceUtils.getString(PreInstallSummaryPanel.class,
- "PrISP.remove.app.userdir.text"); // NOI18N
-
- public static final String DEFAULT_REMOVE_APP_USERDIR_CHECKBOX =
- ResourceUtils.getString(PreInstallSummaryPanel.class,
- "PrISP.remove.app.userdir.checkbox"); // NOI18N
- public static final long REQUIRED_SPACE_ADDITION =
- 10L * 1024L * 1024L; // 10MB
-}
diff --git a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/panels/WelcomePanel.java b/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/panels/WelcomePanel.java
deleted file mode 100644
index f3a12e2a5488..000000000000
--- a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/panels/WelcomePanel.java
+++ /dev/null
@@ -1,309 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.mycompany.installer.wizard.components.panels;
-
-import java.awt.Component;
-import java.awt.Dimension;
-import java.awt.GridBagConstraints;
-import java.awt.Insets;
-import java.io.File;
-import java.util.List;
-import org.netbeans.installer.product.Registry;
-import org.netbeans.installer.product.components.Product;
-import org.netbeans.installer.utils.ErrorManager;
-import org.netbeans.installer.utils.LogManager;
-import org.netbeans.installer.utils.ResourceUtils;
-import org.netbeans.installer.utils.StringUtils;
-import org.netbeans.installer.utils.SystemUtils;
-import org.netbeans.installer.utils.exceptions.InitializationException;
-import org.netbeans.installer.utils.helper.Platform;
-import org.netbeans.installer.utils.helper.swing.NbiPanel;
-import org.netbeans.installer.utils.helper.swing.NbiTextPane;
-import org.netbeans.installer.wizard.components.panels.ErrorMessagePanel;
-import org.netbeans.installer.wizard.components.panels.ErrorMessagePanel.ErrorMessagePanelSwingUi;
-import org.netbeans.installer.wizard.components.panels.ErrorMessagePanel.ErrorMessagePanelUi;
-import org.netbeans.installer.wizard.containers.SwingContainer;
-import org.netbeans.installer.wizard.ui.SwingUi;
-import org.netbeans.installer.wizard.ui.WizardUi;
-
-public class WelcomePanel extends ErrorMessagePanel {
- /////////////////////////////////////////////////////////////////////////////////
- private Registry bundledRegistry;
- private Registry defaultRegistry;
-
- public WelcomePanel() {
- setProperty(TITLE_PROPERTY,
- DEFAULT_TITLE);
- setProperty(DESCRIPTION_PROPERTY,
- DEFAULT_DESCRIPTION);
-
- setProperty(WELCOME_TEXT_PROPERTY,
- DEFAULT_WELCOME_TEXT);
-
- setProperty(WELCOME_ALREADY_INSTALLED_TEXT_PROPERTY,
- DEFAULT_WELCOME_ALREADY_INSTALLED_TEXT);
- setProperty(WELCOME_ALREADY_INSTALLED_NEXT_BUTTON_TEXT_PROPERTY,
- DEFAULT_WELCOME_ALREADY_INSTALLED_NEXT_BUTTON_TEXT);
-
- try {
- defaultRegistry = Registry.getInstance();
- bundledRegistry = new Registry();
-
- final String bundledRegistryUri = System.getProperty(
- Registry.BUNDLED_PRODUCT_REGISTRY_URI_PROPERTY);
- if (bundledRegistryUri != null) {
- bundledRegistry.loadProductRegistry(bundledRegistryUri);
- } else {
- bundledRegistry.loadProductRegistry(
- Registry.DEFAULT_BUNDLED_PRODUCT_REGISTRY_URI);
- }
- } catch (InitializationException e) {
- ErrorManager.notifyError("Cannot load bundled registry", e);
- }
-
- }
-
- Registry getBundledRegistry() {
- return bundledRegistry;
- }
-
- @Override
- public WizardUi getWizardUi() {
- if (wizardUi == null) {
- wizardUi = new WelcomePanelUi(this);
- }
-
- return wizardUi;
- }
-
- @Override
- public boolean canExecuteForward() {
- return canExecute();
- }
-
- @Override
- public boolean canExecuteBackward() {
- return canExecute();
- }
-
- // private //////////////////////////////////////////////////////////////////////
- private boolean canExecute() {
- return bundledRegistry.getNodes().size() > 1;
- }
-
- /////////////////////////////////////////////////////////////////////////////////
- // Inner Classes
- public static class WelcomePanelUi extends ErrorMessagePanelUi {
-
- protected WelcomePanel component;
-
- public WelcomePanelUi(WelcomePanel component) {
- super(component);
-
- this.component = component;
- }
-
- @Override
- public SwingUi getSwingUi(SwingContainer container) {
- if (swingUi == null) {
- swingUi = new WelcomePanelSwingUi(component, container);
- }
-
- return super.getSwingUi(container);
- }
- }
-
- public static class WelcomePanelSwingUi extends ErrorMessagePanelSwingUi {
-
- protected WelcomePanel panel;
- private NbiTextPane textPane;
-
- private NbiPanel leftImagePanel;
- ValidatingThread validatingThread;
-
- public WelcomePanelSwingUi(
- final WelcomePanel component,
- final SwingContainer container) {
- super(component, container);
-
- this.panel = component;
-
- initComponents();
- }
-
- @Override
- public String getTitle() {
- return null; // the welcome page does not have a title
- }
-
- // protected ////////////////////////////////////////////////////////////////
- @Override
- protected void initializeContainer() {
- super.initializeContainer();
-
- container.getBackButton().setVisible(false);
- }
-
- @Override
- protected void initialize() {
-
- textPane.setContentType("text/html");
- textPane.setText(StringUtils.format(panel.getProperty(WELCOME_TEXT_PROPERTY)));
- List toInstall = Registry.getInstance().getProductsToInstall();
- if(toInstall.isEmpty()) {
- List list = panel.getBundledRegistry().getProducts();
- if(list.size() == 1) {
- if(SystemUtils.getCurrentPlatform().isCompatibleWith(list.get(0).getPlatforms())) {
- File installationLocation = list.get(0).getInstallationLocation();
- textPane.setText(
- StringUtils.format(
- panel.getProperty(WELCOME_ALREADY_INSTALLED_TEXT_PROPERTY),
- list.get(0).getDisplayName(),
- installationLocation.getAbsolutePath()));
- } else {
- textPane.setText(
- StringUtils.format(
- WELCOME_INCOMPATIBLE_PLATFORM_TEXT,
- list.get(0).getDisplayName()));
- }
- container.getCancelButton().setVisible(false);
- container.getNextButton().setText(panel.getProperty(
- WELCOME_ALREADY_INSTALLED_NEXT_BUTTON_TEXT_PROPERTY));
- }
- }
-
- super.initialize();
- }
-
- // private //////////////////////////////////////////////////////////////////
- private void initComponents() {
- // textPane /////////////////////////////////////////////////////////////
- textPane = new NbiTextPane();
-
- leftImagePanel = new NbiPanel();
- int width = 0;
- int height = 0;
- final String topLeftImage = SystemUtils.resolveString(
- System.getProperty(
- WELCOME_PAGE_LEFT_TOP_IMAGE_PROPERTY));
- final String bottomLeftImage = SystemUtils.resolveString(
- System.getProperty(
- WELCOME_PAGE_LEFT_BOTTOM_IMAGE_PROPERTY));
-
- int bottomAnchor = NbiPanel.ANCHOR_BOTTOM_LEFT;
-
- if (topLeftImage != null) {
- leftImagePanel.setBackgroundImage(topLeftImage, ANCHOR_TOP_LEFT);
- width = leftImagePanel.getBackgroundImage(NbiPanel.ANCHOR_TOP_LEFT).getIconWidth();
- height += leftImagePanel.getBackgroundImage(NbiPanel.ANCHOR_TOP_LEFT).getIconHeight();
- }
- if (bottomLeftImage != null) {
- leftImagePanel.setBackgroundImage(bottomLeftImage, bottomAnchor);
- width = leftImagePanel.getBackgroundImage(bottomAnchor).getIconWidth();
- height += leftImagePanel.getBackgroundImage(bottomAnchor).getIconHeight();
- }
-
- leftImagePanel.setPreferredSize(new Dimension(width, height));
- leftImagePanel.setMaximumSize(new Dimension(width, height));
- leftImagePanel.setMinimumSize(new Dimension(width, 0));
- leftImagePanel.setSize(new Dimension(width, height));
-
- leftImagePanel.setOpaque(false);
- // this /////////////////////////////////////////////////////////////////
- int dy = 0;
- add(leftImagePanel, new GridBagConstraints(
- 0, 0, // x, y
- 1, 100, // width, height
- 0.0, 1.0, // weight-x, weight-y
- GridBagConstraints.WEST, // anchor
- GridBagConstraints.VERTICAL, // fill
- new Insets(0, 0, 0, 0), // padding
- 0, 0)); // padx, pady - ???
- add(textPane, new GridBagConstraints(
- 1, dy++, // x, y
- 4, 1, // width, height
- 1.0, 0.0, // weight-x, weight-y
- GridBagConstraints.LINE_START, // anchor
- GridBagConstraints.HORIZONTAL, // fill
- new Insets(10, 11, 11, 11), // padding
- 0, 0)); // padx, pady - ???
-
- NbiTextPane separatorPane = new NbiTextPane();
-
- separatorPane = new NbiTextPane();
- add(separatorPane, new GridBagConstraints(
- 3, dy, // x, y
- 1, 1, // width, height
- 1.0, 0.0, // weight-x, weight-y
- GridBagConstraints.CENTER, // anchor
- GridBagConstraints.BOTH, // fill
- new Insets(0, 0, 0, 0), // padding
- 0, 0)); // padx, pady - ???
-
-
- // move error label after the left welcome image
- Component errorLabel = getComponent(0);
- getLayout().removeLayoutComponent(errorLabel);
- add(errorLabel, new GridBagConstraints(
- 1, 99, // x, y
- 99, 1, // width, height
- 1.0, 0.0, // weight-x, weight-y
- GridBagConstraints.CENTER, // anchor
- GridBagConstraints.HORIZONTAL, // fill
- new Insets(4, 11, 4, 0), // padding
- 0, 0)); // ??? (padx, pady)
-
-
- }
- }
- /////////////////////////////////////////////////////////////////////////////////
- // Constants
- public static final String DEFAULT_TITLE =
- ResourceUtils.getString(WelcomePanel.class,
- "WP.title");
- public static final String DEFAULT_DESCRIPTION =
- ResourceUtils.getString(WelcomePanel.class,
- "WP.description"); // NOI18N
- public static final String WELCOME_TEXT_PROPERTY =
- "welcome.text"; // NOI18N
- public static final String WELCOME_ALREADY_INSTALLED_TEXT_PROPERTY =
- "welcome.already.installed.text"; // NOI18N
- public static final String WELCOME_ALREADY_INSTALLED_NEXT_BUTTON_TEXT_PROPERTY =
- "welcome.already.installed.next.button.text";//NOI18N
- public static final String WELCOME_INCOMPATIBLE_PLATFORM_TEXT =
- ResourceUtils.getString(WelcomePanel.class,
- "WP.incompatible.platform.text");//NOI18N
-
- public static final String DEFAULT_WELCOME_ALREADY_INSTALLED_NEXT_BUTTON_TEXT =
- ResourceUtils.getString(WelcomePanel.class,
- "WP.already.installed.next.button.text");//NOI18N
-
- public static final String DEFAULT_WELCOME_TEXT =
- ResourceUtils.getString(WelcomePanel.class,
- "WP.welcome.text"); // NOI18N
-
- public static final String DEFAULT_WELCOME_ALREADY_INSTALLED_TEXT =
- ResourceUtils.getString(WelcomePanel.class,
- "WP.already.installed.text"); // NOI18N
-
- public static final String WELCOME_PAGE_LEFT_TOP_IMAGE_PROPERTY =
- "nbi.wizard.ui.swing.welcome.left.top.image";//NOI18N
- public static final String WELCOME_PAGE_LEFT_BOTTOM_IMAGE_PROPERTY =
- "nbi.wizard.ui.swing.welcome.left.bottom.image";//NOI18N
-}
diff --git a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/panels/resources/welcome-left-bottom.png b/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/panels/resources/welcome-left-bottom.png
deleted file mode 100644
index cc8d41418088..000000000000
Binary files a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/panels/resources/welcome-left-bottom.png and /dev/null differ
diff --git a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/panels/resources/welcome-left-top.png b/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/panels/resources/welcome-left-top.png
deleted file mode 100644
index 1e7a2a7c6a53..000000000000
Binary files a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/panels/resources/welcome-left-top.png and /dev/null differ
diff --git a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/sequences/Bundle.properties b/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/sequences/Bundle.properties
deleted file mode 100644
index 69c1e5866406..000000000000
--- a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/sequences/Bundle.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-# MainSequence.java
-MS.IA.title=Installation
-MS.IA.description=Please wait while the installer installs {product-name}.
diff --git a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/sequences/MainSequence.java b/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/sequences/MainSequence.java
deleted file mode 100644
index 9469efb2a73c..000000000000
--- a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/components/sequences/MainSequence.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.mycompany.installer.wizard.components.sequences;
-
-import org.netbeans.installer.wizard.components.sequences.ProductWizardSequence;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import org.mycompany.installer.wizard.components.panels.PostInstallSummaryPanel;
-import org.mycompany.installer.wizard.components.panels.PreInstallSummaryPanel;
-import org.netbeans.installer.product.components.Product;
-import org.netbeans.installer.product.Registry;
-import org.netbeans.installer.utils.ResourceUtils;
-import org.netbeans.installer.utils.helper.ExecutionMode;
-import org.netbeans.installer.wizard.components.WizardSequence;
-import org.netbeans.installer.wizard.components.actions.DownloadConfigurationLogicAction;
-import org.netbeans.installer.wizard.components.actions.DownloadInstallationDataAction;
-import org.netbeans.installer.wizard.components.actions.InstallAction;
-import org.netbeans.installer.wizard.components.actions.UninstallAction;
-import org.netbeans.installer.wizard.components.panels.LicensesPanel;
-
-public class MainSequence extends WizardSequence {
- /////////////////////////////////////////////////////////////////////////////////
- // Instance
-
- private DownloadConfigurationLogicAction downloadConfigurationLogicAction;
- private LicensesPanel licensesPanel;
- private PreInstallSummaryPanel preInstallSummaryPanel;
- private UninstallAction uninstallAction;
- private DownloadInstallationDataAction downloadInstallationDataAction;
- private InstallAction installAction;
- private PostInstallSummaryPanel postInstallSummaryPanel;
- private Map productSequences;
-
- public MainSequence() {
- downloadConfigurationLogicAction = new DownloadConfigurationLogicAction();
- licensesPanel = new LicensesPanel();
- preInstallSummaryPanel = new PreInstallSummaryPanel();
- uninstallAction = new UninstallAction();
- downloadInstallationDataAction = new DownloadInstallationDataAction();
- installAction = new InstallAction();
- postInstallSummaryPanel = new PostInstallSummaryPanel();
- productSequences = new HashMap();
-
- installAction.setProperty(InstallAction.TITLE_PROPERTY,
- DEFAULT_IA_TITLE);
- installAction.setProperty(InstallAction.DESCRIPTION_PROPERTY,
- DEFAULT_IA_DESCRIPTION);
- }
-
- @Override
- public void executeForward() {
- final Registry registry = Registry.getInstance();
- final List toInstall = registry.getProductsToInstall();
- final List toUninstall = registry.getProductsToUninstall();
-
- // remove all current children (if there are any), as the components
- // selection has probably changed and we need to rebuild from scratch
- getChildren().clear();
-
- // the set of wizard components differs greatly depending on the execution
- // mode - if we're installing, we ask for input, run a wizard sequence for
- // each selected component and then download and install; if we're creating
- // a bundle, we only need to download and package things
-
- if (toInstall.size() > 0) {
- addChild(downloadConfigurationLogicAction);
- addChild(licensesPanel);
-
- for (Product product : toInstall) {
- if (!productSequences.containsKey(product)) {
- productSequences.put(
- product,
- new ProductWizardSequence(product));
- }
-
- addChild(productSequences.get(product));
- }
- }
-
- addChild(preInstallSummaryPanel);
-
- if (toUninstall.size() > 0) {
- addChild(uninstallAction);
- }
-
- if (toInstall.size() > 0) {
- addChild(downloadInstallationDataAction);
- addChild(installAction);
- }
-
- addChild(postInstallSummaryPanel);
-
- super.executeForward();
- }
-
- @Override
- public boolean canExecuteForward() {
- return ExecutionMode.NORMAL == ExecutionMode.getCurrentExecutionMode() &&
- (Registry.getInstance().getProductsToInstall().size() > 0 ||
- Registry.getInstance().getProductsToUninstall().size() > 0);
- }
- /////////////////////////////////////////////////////////////////////////////////
- // Constants
- public static final String DEFAULT_IA_TITLE =
- ResourceUtils.getString(
- MainSequence.class,
- "MS.IA.title"); // NOI18N
- public static final String DEFAULT_IA_DESCRIPTION =
- ResourceUtils.getString(
- MainSequence.class,
- "MS.IA.description"); // NOI18N
-
-}
diff --git a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/wizard-components.xml b/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/wizard-components.xml
deleted file mode 100644
index 005253639f37..000000000000
--- a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/wizard-components.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/wizard-description-background-left.png b/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/wizard-description-background-left.png
deleted file mode 100644
index 931de16277a3..000000000000
Binary files a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/wizard-description-background-left.png and /dev/null differ
diff --git a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/wizard-description-background-right.png b/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/wizard-description-background-right.png
deleted file mode 100644
index 7470327df0f5..000000000000
Binary files a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/wizard-description-background-right.png and /dev/null differ
diff --git a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/wizard-icon.png b/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/wizard-icon.png
deleted file mode 100644
index 1b3bcd61d25b..000000000000
Binary files a/harness/libs.nbi.ant/stub/ext/engine/src/org/mycompany/installer/wizard/wizard-icon.png and /dev/null differ
diff --git a/harness/libs.nbi.ant/stub/ext/infra/build/engine/build.properties b/harness/libs.nbi.ant/stub/ext/infra/build/engine/build.properties
deleted file mode 100644
index e5e9451756dd..000000000000
--- a/harness/libs.nbi.ant/stub/ext/infra/build/engine/build.properties
+++ /dev/null
@@ -1,55 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-# path to the directory where the base build scripts library and properties
-# reside
-common.dir=../../../../.common
-
-# path to the local working directory; this directory which will be the target
-# for checking out the sources and will be used for the build process
-# * this path can be either absolute or relative in any unix environment,
-# however, only relative paths are supported on windows, as the cygwin scp
-# command does not properly handle colon in local paths
-work.dir=./build
-
-# path to the local distributive directory; this directory will contain the
-# distributive file, when (if) the build script finishes successfully
-dist.dir=./dist
-
-# path to the engine sources within the cvs module; it should be a relative
-# path from the module's root, e.g. for 'nbi/engine', where 'nbi is the module
-# name, the path should be 'engine'
-cvs.path=engine
-
-# name of the engine's distributive file
-engine.dist.file.name=nbi-engine.jar
-
-# we do not need to build anything native for the netbeans-specific engine, as it
-# does not contain any native components
-build.native=false
-
-# custom parameter for the netbeans project build script - in case of the netbeans
-# nbi engine - the location of the core engine jar file
-nb.custom.parameter=-Dreference.NBI_Engine.jar=${core.engine.dist.file}
-
-# sources parameters; a search-and-replace will be run over the sources after
-# check-out, replacing [token] => [value]; regular expressions are not allowed
-# * ${sources.params.length} - total number of the parameters
-# * indices should start with 1
-# * parameters are not i18n compliant
-
-sources.params.length=0
diff --git a/harness/libs.nbi.ant/stub/ext/infra/build/engine/build.xml b/harness/libs.nbi.ant/stub/ext/infra/build/engine/build.xml
deleted file mode 100644
index 0caaa1477554..000000000000
--- a/harness/libs.nbi.ant/stub/ext/infra/build/engine/build.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- In order to 'clean', 'checkout' and 'build' the engine use the
- 'build-all' target. To 'clean', 'checkout', 'build' and
- 'release' - use 'release-all'.
-
- For more details, please see the source of this build script.
-
-
-
diff --git a/harness/libs.nbi.ant/stub/ext/infra/build/products/helloworld/build.properties b/harness/libs.nbi.ant/stub/ext/infra/build/products/helloworld/build.properties
deleted file mode 100644
index 999c8a9b3fd6..000000000000
--- a/harness/libs.nbi.ant/stub/ext/infra/build/products/helloworld/build.properties
+++ /dev/null
@@ -1,137 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-# path to the directory where the base build scripts library and properties
-# reside
-common.dir=../../../../../.common
-
-# path to the local working directory; this directory which will be the target
-# for checking out the sources and will be used for the build process
-# * this path can be either absolute or relative in any unix environment,
-# however, only relative paths are supported on windows, as the cygwin scp
-# command does not properly handle colon in local paths
-work.dir=./build
-
-# path to the local distributive directory; this directory will contain the
-# distributive file, when (if) the build script finishes successfully
-dist.dir=./dist
-
-# path to the products's sources within the cvs module; it should be a relative
-# path from the module's root, e.g. for 'nbi/engine', where 'nbi is the module
-# name, the path should be 'engine'
-cvs.path=components/products/helloworld
-
-# core product properties:
-# * ${product.uid} - product "family" (e.g. nb-ide)
-# * ${product.version} - actual products' version; together with the uid it
-# forms the unique identifier for the product)
-# * ${product.platforms} - the list of platforms that are supported by this
-# product (note that this property is not related to native libraries)
-product.uid={product-uid}
-product.version=1.0.0.0.0
-product.platforms=generic
-
-# miscellaneous product properties:
-# * ${product.status} - default status that the product will have in the
-# registry. it is meant to be always "not-installed", unless you want
-# something really exotic
-# * ${product.offset} - order of the product's node among its parent's
-# children, the bigger the offset value, the further the product's node will
-# be
-# * ${product.expand} - whether to automatically expand the product's node in
-# the components tree or not; 'true'/'false'
-# * ${product.visible} - whether the product's node is visible or not (note
-# that this value will be modified at nbi runtime, 'true' may become 'false'
-# if the product is filtered out); 'true'/'false'
-# * ${product.features} - list of features that this porduct belongs to; the
-# list should be space-separated
-product.status=not-installed
-product.offset=20000
-product.expand=false
-product.visible=true
-product.features=
-
-# list of configuration logic jar files; normally the first one would be the
-# distributive file of the product's netbeans project
-# * ${product.logic.length} - total number of the files
-# * indices should start with 1
-product.logic.length=1
-product.logic.1.path=${nbproject.dist.dir}/${nbproject.dist.file.name}
-
-# list of product installation data files
-# * ${product.data.length} - total number of the files
-# * ${product.data.N.uri} - uri at which the installation data file is located
-# * ${product.data.N.zip} - whether the data file is a zip archive which needs to
-# be extracted or it is a file that should be used directly; 'true'/'false'
-# * indices should start with 1
-product.data.length=1
-product.data.1.zip=true
-product.data.1.path={product-data-path}
-product.data.sub.dir={product-data-sub-dir}
-
-# modificator for the required disk space parameter; the core value will be the
-# sum of unzipped unstallation data files
-# * the measurement unit is one byte
-product.disk.space.modificator=0
-
-# product's requirements (i.e. other products that should be installed
-# in order for this product to succesfully install and function)
-# * ${product.requirements.length} - total number of the requirements
-# * indices should start with 1
-product.requirements.length=0
-#product.requirements.1.uid=
-#product.requirements.1.version-lower=
-#product.requirements.1.version-upper=
-
-# product's conflicts (i.e. other products that prevent this product from
-# functioning correctly, and thus cannot be installed together with it)
-# * ${product.conflicts.length} - total number of the conflicts
-# * indices should start with 1
-product.conflicts.length=0
-#product.conflicts.1.uid=
-#product.conflicts.1.version-lower=
-#product.conflicts.1.version-upper=
-
-# other products that should be installed prior to this product; these
-# dependencies do not imply that the dependent product will be installed at
-# all, but if both the current and the dependent product are selected for
-# installation, the latter will be installed first
-# * ${product.install-afters.length} - total number of the install-afters
-# * indices should start with 1
-product.install-afters.length=0
-#product.install-afters.1.uid=
-
-# additional product's properties; these will appear in the product's
-# descriptor and in the registry in the form of
-# value tags.
-# * ${product.properties.length} - total number of the properties
-# * indices should start with 1
-# * properties are not i18n compliant
-product.properties.length=3
-product.properties.1.name=installation.location
-product.properties.1.value=$N{install}/{product-install-directory-name}
-product.properties.2.name=installation.location.windows
-product.properties.2.value=$N{install}/{product-install-directory-name-windows}
-product.properties.3.name=installation.location.macosx
-product.properties.3.value=$N{install}/{product-install-directory-name-macosx}.app
-
-# sources parameters; a search-and-replace will be run over the sources after
-# check-out, replacing [token] => [value]; regular expressions are not allowed
-# * ${sources.params.length} - total number of the parameters
-# * indices should start with 1
-# * parameters are not i18n compliant
-sources.params.length=0
\ No newline at end of file
diff --git a/harness/libs.nbi.ant/stub/ext/infra/build/products/helloworld/build.xml b/harness/libs.nbi.ant/stub/ext/infra/build/products/helloworld/build.xml
deleted file mode 100644
index 2e9554907439..000000000000
--- a/harness/libs.nbi.ant/stub/ext/infra/build/products/helloworld/build.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- In order to 'clean', 'checkout' and 'build' the group use the
- 'build-all' target. To 'clean', 'checkout', 'build' and
- 'release' - use 'release-all'.
-
- For more details, please see the source of this build script.
-
-
-
diff --git a/harness/libs.nbi.ant/stub/template.xml b/harness/libs.nbi.ant/stub/template.xml
deleted file mode 100644
index ec39c97b82fd..000000000000
--- a/harness/libs.nbi.ant/stub/template.xml
+++ /dev/null
@@ -1,216 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/harness/libs.nbi.ant/stub/tmpl.properties b/harness/libs.nbi.ant/stub/tmpl.properties
deleted file mode 100644
index aee69ff5592a..000000000000
--- a/harness/libs.nbi.ant/stub/tmpl.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-suite.location=C:/Documents and Settings/Lipin/My Documents/NetBeansProjects/MyApp
-
-nbi.cluster.location=D:/space/NB-IDE/proto/nbbuild/netbeans/extra
-
-nbi.stub.location=${nbi.cluster.location}/nbi/stub
-nbi.stub.common.location=${nbi.cluster.location}/nbi/.common
-nbi.ant.tasks.jar=${nbi.cluster.location}/modules/ext/nbi-ant-tasks.jar
-nbi.registries.management.jar=${nbi.cluster.location}/modules/ext/nbi-registries-management.jar
-nbi.engine.jar=${nbi.cluster.location}/modules/ext/nbi-engine.jar
-
-generate.installer.for.platforms=windows linux macosx
-
-generator-jdk-location-forward-slashes=C:/Program Files/Java/jdk1.5.0_16
-
-suite.nbi.product.uid=myapp
diff --git a/harness/libs.nbi.engine/build.xml b/harness/libs.nbi.engine/build.xml
deleted file mode 100644
index b5c4319b3e77..000000000000
--- a/harness/libs.nbi.engine/build.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-
-
-
- Builds, tests, and runs the project org.netbeans.libs.nbi.engine
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/harness/libs.nbi.engine/external/binaries-list b/harness/libs.nbi.engine/external/binaries-list
deleted file mode 100644
index a9e21b6156c3..000000000000
--- a/harness/libs.nbi.engine/external/binaries-list
+++ /dev/null
@@ -1,17 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-2B892D9E648A792EDB0F705378E06F84C322E208 nbi.engine-external-binaries-11.zip
diff --git a/harness/libs.nbi.engine/external/nbi.engine-external-binaries-11-license.txt b/harness/libs.nbi.engine/external/nbi.engine-external-binaries-11-license.txt
deleted file mode 100644
index 8112b9fd870b..000000000000
--- a/harness/libs.nbi.engine/external/nbi.engine-external-binaries-11-license.txt
+++ /dev/null
@@ -1,387 +0,0 @@
-Name: NetBeans Installer Binaries
-Description: NetBeans Installer Binaries
-Version: 11
-License: CDDL-1.0
-Source: https://netbeans.org/
-Origin: NetBeans
-
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-1. Definitions.
-
-1.1. "Contributor" means each individual or entity that
-creates or contributes to the creation of Modifications.
-
-1.2. "Contributor Version" means the combination of the
-Original Software, prior Modifications used by a
-Contributor (if any), and the Modifications made by that
-particular Contributor.
-
-1.3. "Covered Software" means (a) the Original Software, or
-(b) Modifications, or (c) the combination of files
-containing Original Software with files containing
-Modifications, in each case including portions thereof.
-
-1.4. "Executable" means the Covered Software in any form
-other than Source Code.
-
-1.5. "Initial Developer" means the individual or entity
-that first makes Original Software available under this
-License.
-
-1.6. "Larger Work" means a work which combines Covered
-Software or portions thereof with code not governed by the
-terms of this License.
-
-1.7. "License" means this document.
-
-1.8. "Licensable" means having the right to grant, to the
-maximum extent possible, whether at the time of the initial
-grant or subsequently acquired, any and all of the rights
-conveyed herein.
-
-1.9. "Modifications" means the Source Code and Executable
-form of any of the following:
-
-A. Any file that results from an addition to,
-deletion from or modification of the contents of a
-file containing Original Software or previous
-Modifications;
-
-B. Any new file that contains any part of the
-Original Software or previous Modification; or
-
-C. Any new file that is contributed or otherwise made
-available under the terms of this License.
-
-1.10. "Original Software" means the Source Code and
-Executable form of computer software code that is
-originally released under this License.
-
-1.11. "Patent Claims" means any patent claim(s), now owned
-or hereafter acquired, including without limitation,
-method, process, and apparatus claims, in any patent
-Licensable by grantor.
-
-1.12. "Source Code" means (a) the common form of computer
-software code in which modifications are made and (b)
-associated documentation included in or with such code.
-
-1.13. "You" (or "Your") means an individual or a legal
-entity exercising rights under, and complying with all of
-the terms of, this License. For legal entities, "You"
-includes any entity which controls, is controlled by, or is
-under common control with You. For purposes of this
-definition, "control" means (a) the power, direct or
-indirect, to cause the direction or management of such
-entity, whether by contract or otherwise, or (b) ownership
-of more than fifty percent (50%) of the outstanding shares
-or beneficial ownership of such entity.
-
-2. License Grants.
-
-2.1. The Initial Developer Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and
-subject to third party intellectual property claims, the
-Initial Developer hereby grants You a world-wide,
-royalty-free, non-exclusive license:
-
-(a) under intellectual property rights (other than
-patent or trademark) Licensable by Initial Developer,
-to use, reproduce, modify, display, perform,
-sublicense and distribute the Original Software (or
-portions thereof), with or without Modifications,
-and/or as part of a Larger Work; and
-
-(b) under Patent Claims infringed by the making,
-using or selling of Original Software, to make, have
-made, use, practice, sell, and offer for sale, and/or
-otherwise dispose of the Original Software (or
-portions thereof).
-
-(c) The licenses granted in Sections 2.1(a) and (b)
-are effective on the date Initial Developer first
-distributes or otherwise makes the Original Software
-available to a third party under the terms of this
-License.
-
-(d) Notwithstanding Section 2.1(b) above, no patent
-license is granted: (1) for code that You delete from
-the Original Software, or (2) for infringements
-caused by: (i) the modification of the Original
-Software, or (ii) the combination of the Original
-Software with other software or devices.
-
-2.2. Contributor Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and
-subject to third party intellectual property claims, each
-Contributor hereby grants You a world-wide, royalty-free,
-non-exclusive license:
-
-(a) under intellectual property rights (other than
-patent or trademark) Licensable by Contributor to
-use, reproduce, modify, display, perform, sublicense
-and distribute the Modifications created by such
-Contributor (or portions thereof), either on an
-unmodified basis, with other Modifications, as
-Covered Software and/or as part of a Larger Work; and
-
-(b) under Patent Claims infringed by the making,
-using, or selling of Modifications made by that
-Contributor either alone and/or in combination with
-its Contributor Version (or portions of such
-combination), to make, use, sell, offer for sale,
-have made, and/or otherwise dispose of: (1)
-Modifications made by that Contributor (or portions
-thereof); and (2) the combination of Modifications
-made by that Contributor with its Contributor Version
-(or portions of such combination).
-
-(c) The licenses granted in Sections 2.2(a) and
-2.2(b) are effective on the date Contributor first
-distributes or otherwise makes the Modifications
-available to a third party.
-
-(d) Notwithstanding Section 2.2(b) above, no patent
-license is granted: (1) for any code that Contributor
-has deleted from the Contributor Version; (2) for
-infringements caused by: (i) third party
-modifications of Contributor Version, or (ii) the
-combination of Modifications made by that Contributor
-with other software (except as part of the
-Contributor Version) or other devices; or (3) under
-Patent Claims infringed by Covered Software in the
-absence of Modifications made by that Contributor.
-
-3. Distribution Obligations.
-
-3.1. Availability of Source Code.
-
-Any Covered Software that You distribute or otherwise make
-available in Executable form must also be made available in
-Source Code form and that Source Code form must be
-distributed only under the terms of this License. You must
-include a copy of this License with every copy of the
-Source Code form of the Covered Software You distribute or
-otherwise make available. You must inform recipients of any
-such Covered Software in Executable form as to how they can
-obtain such Covered Software in Source Code form in a
-reasonable manner on or through a medium customarily used
-for software exchange.
-
-3.2. Modifications.
-
-The Modifications that You create or to which You
-contribute are governed by the terms of this License. You
-represent that You believe Your Modifications are Your
-original creation(s) and/or You have sufficient rights to
-grant the rights conveyed by this License.
-
-3.3. Required Notices.
-
-You must include a notice in each of Your Modifications
-that identifies You as the Contributor of the Modification.
-You may not remove or alter any copyright, patent or
-trademark notices contained within the Covered Software, or
-any notices of licensing or any descriptive text giving
-attribution to any Contributor or the Initial Developer.
-
-3.4. Application of Additional Terms.
-
-You may not offer or impose any terms on any Covered
-Software in Source Code form that alters or restricts the
-applicable version of this License or the recipients'
-rights hereunder. You may choose to offer, and to charge a
-fee for, warranty, support, indemnity or liability
-obligations to one or more recipients of Covered Software.
-However, you may do so only on Your own behalf, and not on
-behalf of the Initial Developer or any Contributor. You
-must make it absolutely clear that any such warranty,
-support, indemnity or liability obligation is offered by
-You alone, and You hereby agree to indemnify the Initial
-Developer and every Contributor for any liability incurred
-by the Initial Developer or such Contributor as a result of
-warranty, support, indemnity or liability terms You offer.
-
-3.5. Distribution of Executable Versions.
-
-You may distribute the Executable form of the Covered
-Software under the terms of this License or under the terms
-of a license of Your choice, which may contain terms
-different from this License, provided that You are in
-compliance with the terms of this License and that the
-license for the Executable form does not attempt to limit
-or alter the recipient's rights in the Source Code form
-from the rights set forth in this License. If You
-distribute the Covered Software in Executable form under a
-different license, You must make it absolutely clear that
-any terms which differ from this License are offered by You
-alone, not by the Initial Developer or Contributor. You
-hereby agree to indemnify the Initial Developer and every
-Contributor for any liability incurred by the Initial
-Developer or such Contributor as a result of any such terms
-You offer.
-
-3.6. Larger Works.
-
-You may create a Larger Work by combining Covered Software
-with other code not governed by the terms of this License
-and distribute the Larger Work as a single product. In such
-a case, You must make sure the requirements of this License
-are fulfilled for the Covered Software.
-
-4. Versions of the License.
-
-4.1. New Versions.
-
-Sun Microsystems, Inc. is the initial license steward and
-may publish revised and/or new versions of this License
-from time to time. Each version will be given a
-distinguishing version number. Except as provided in
-Section 4.3, no one other than the license steward has the
-right to modify this License.
-
-4.2. Effect of New Versions.
-
-You may always continue to use, distribute or otherwise
-make the Covered Software available under the terms of the
-version of the License under which You originally received
-the Covered Software. If the Initial Developer includes a
-notice in the Original Software prohibiting it from being
-distributed or otherwise made available under any
-subsequent version of the License, You must distribute and
-make the Covered Software available under the terms of the
-version of the License under which You originally received
-the Covered Software. Otherwise, You may also choose to
-use, distribute or otherwise make the Covered Software
-available under the terms of any subsequent version of the
-License published by the license steward.
-
-4.3. Modified Versions.
-
-When You are an Initial Developer and You want to create a
-new license for Your Original Software, You may create and
-use a modified version of this License if You: (a) rename
-the license and remove any references to the name of the
-license steward (except to note that the license differs
-from this License); and (b) otherwise make it clear that
-the license contains terms which differ from this License.
-
-5. DISCLAIMER OF WARRANTY.
-
-COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS"
-BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
-INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
-SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR
-PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND
-PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY
-COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE
-INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF
-ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
-WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
-ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS
-DISCLAIMER.
-
-6. TERMINATION.
-
-6.1. This License and the rights granted hereunder will
-terminate automatically if You fail to comply with terms
-herein and fail to cure such breach within 30 days of
-becoming aware of the breach. Provisions which, by their
-nature, must remain in effect beyond the termination of
-this License shall survive.
-
-6.2. If You assert a patent infringement claim (excluding
-declaratory judgment actions) against Initial Developer or
-a Contributor (the Initial Developer or Contributor against
-whom You assert such claim is referred to as "Participant")
-alleging that the Participant Software (meaning the
-Contributor Version where the Participant is a Contributor
-or the Original Software where the Participant is the
-Initial Developer) directly or indirectly infringes any
-patent, then any and all rights granted directly or
-indirectly to You by such Participant, the Initial
-Developer (if the Initial Developer is not the Participant)
-and all Contributors under Sections 2.1 and/or 2.2 of this
-License shall, upon 60 days notice from Participant
-terminate prospectively and automatically at the expiration
-of such 60 day notice period, unless if within such 60 day
-period You withdraw Your claim with respect to the
-Participant Software against such Participant either
-unilaterally or pursuant to a written agreement with
-Participant.
-
-6.3. In the event of termination under Sections 6.1 or 6.2
-above, all end user licenses that have been validly granted
-by You or any distributor hereunder prior to termination
-(excluding licenses granted to You by any distributor)
-shall survive termination.
-
-7. LIMITATION OF LIABILITY.
-
-UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
-(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE
-INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
-COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE
-LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR
-CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
-LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK
-STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
-COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
-INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
-LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL
-INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT
-APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO
-NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR
-CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT
-APPLY TO YOU.
-
-8. U.S. GOVERNMENT END USERS.
-
-The Covered Software is a "commercial item," as that term is
-defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial
-computer software" (as that term is defined at 48 C.F.R.
-252.227-7014(a)(1)) and "commercial computer software
-documentation" as such terms are used in 48 C.F.R. 12.212 (Sept.
-1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1
-through 227.7202-4 (June 1995), all U.S. Government End Users
-acquire Covered Software with only those rights set forth herein.
-This U.S. Government Rights clause is in lieu of, and supersedes,
-any other FAR, DFAR, or other clause or provision that addresses
-Government rights in computer software under this License.
-
-9. MISCELLANEOUS.
-
-This License represents the complete agreement concerning subject
-matter hereof. If any provision of this License is held to be
-unenforceable, such provision shall be reformed only to the
-extent necessary to make it enforceable. This License shall be
-governed by the law of the jurisdiction specified in a notice
-contained within the Original Software (except to the extent
-applicable law, if any, provides otherwise), excluding such
-jurisdiction's conflict-of-law provisions. Any litigation
-relating to this License shall be subject to the jurisdiction of
-the courts located in the jurisdiction and venue specified in a
-notice contained within the Original Software, with the losing
-party responsible for costs, including, without limitation, court
-costs and reasonable attorneys' fees and expenses. The
-application of the United Nations Convention on Contracts for the
-International Sale of Goods is expressly excluded. Any law or
-regulation which provides that the language of a contract shall
-be construed against the drafter shall not apply to this License.
-You agree that You alone are responsible for compliance with the
-United States export administration regulations (and the export
-control laws and regulation of any other countries) when You use,
-distribute or otherwise make available any Covered Software.
-
-10. RESPONSIBILITY FOR CLAIMS.
-
-As between Initial Developer and the Contributors, each party is
-responsible for claims and damages arising, directly or
-indirectly, out of its utilization of rights under this License
-and You agree to work with Initial Developer and Contributors to
-distribute such responsibility on an equitable basis. Nothing
-herein is intended or shall be deemed to constitute any admission
-of liability.
diff --git a/harness/libs.nbi.engine/manifest.mf b/harness/libs.nbi.engine/manifest.mf
deleted file mode 100644
index 0b6b0283c15e..000000000000
--- a/harness/libs.nbi.engine/manifest.mf
+++ /dev/null
@@ -1,6 +0,0 @@
-Manifest-Version: 1.0
-AutoUpdate-Show-In-Client: false
-OpenIDE-Module: org.netbeans.libs.nbi.engine
-OpenIDE-Module-Localizing-Bundle: org/netbeans/libs/nbi/engine/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.49
-
diff --git a/harness/libs.nbi.engine/nbproject/project.properties b/harness/libs.nbi.engine/nbproject/project.properties
deleted file mode 100644
index 4c45742d5702..000000000000
--- a/harness/libs.nbi.engine/nbproject/project.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-is.autoload=true
-javac.source=1.8
-javac.compilerargs=-Xlint -Xlint:-serial
-extra.module.files=modules/ext/nbi-engine.jar
-nbm.module.author=Dmitry Lipin
diff --git a/harness/libs.nbi.engine/nbproject/project.xml b/harness/libs.nbi.engine/nbproject/project.xml
deleted file mode 100644
index 481c2ad270e5..000000000000
--- a/harness/libs.nbi.engine/nbproject/project.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
- org.netbeans.modules.apisupport.project
-
-
- org.netbeans.libs.nbi.engine
-
-
-
-
-
diff --git a/harness/libs.nbi.engine/src/org/netbeans/libs/nbi/engine/Bundle.properties b/harness/libs.nbi.engine/src/org/netbeans/libs/nbi/engine/Bundle.properties
deleted file mode 100644
index 68caab183c23..000000000000
--- a/harness/libs.nbi.engine/src/org/netbeans/libs/nbi/engine/Bundle.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-OpenIDE-Module-Display-Category=Infrastructure
-OpenIDE-Module-Name=NBI Engine Library
diff --git a/nbbuild/cluster.properties b/nbbuild/cluster.properties
index a09de03bb69e..954116eeca75 100644
--- a/nbbuild/cluster.properties
+++ b/nbbuild/cluster.properties
@@ -720,8 +720,6 @@ nb.cluster.apisupport.depends=\
nb.cluster.harness
nb.cluster.apisupport=\
apisupport.ant,\
- apisupport.installer,\
- apisupport.installer.maven,\
apisupport.kit,\
apisupport.project,\
apisupport.refactoring,\
@@ -897,8 +895,6 @@ nb.cluster.harness=\
apisupport.harness,\
jellytools.platform,\
jemmy,\
- libs.nbi.ant,\
- libs.nbi.engine,\
nbjunit,\
o.n.insane
diff --git a/nbi/engine/build.properties b/nbi/engine/build.properties
deleted file mode 100644
index 6b57b2f5d548..000000000000
--- a/nbi/engine/build.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-ignore.native=false
-native.dirname=native
-jar.contents.list=data/engine.list
-jar.contents.includes=native/** org/** com/apple/** data/clioptions.list data/engine*.properties
diff --git a/nbi/engine/build.xml b/nbi/engine/build.xml
deleted file mode 100644
index 808464172880..000000000000
--- a/nbi/engine/build.xml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ${engine.files}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/nbi/engine/external/applemenu-external-desktop-classes-8.2-license.txt b/nbi/engine/external/applemenu-external-desktop-classes-8.2-license.txt
deleted file mode 100644
index f7a0f76927c7..000000000000
--- a/nbi/engine/external/applemenu-external-desktop-classes-8.2-license.txt
+++ /dev/null
@@ -1,389 +0,0 @@
-Name: External Desktop Classes
-Description: Provides java.awt.desktop classes to support compilation on JDK 8.
-Version: 8.2
-License: CDDL-1.0
-Source: file://applemenu-external-desktop-classes-8.2.zip
-Origin: NetBeans
-Type: compile-time
-Comment: Allows to build code leveraging JDK 9's java.awt.desktop classes on JDK 8.
-
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-1. Definitions.
-
-1.1. "Contributor" means each individual or entity that
-creates or contributes to the creation of Modifications.
-
-1.2. "Contributor Version" means the combination of the
-Original Software, prior Modifications used by a
-Contributor (if any), and the Modifications made by that
-particular Contributor.
-
-1.3. "Covered Software" means (a) the Original Software, or
-(b) Modifications, or (c) the combination of files
-containing Original Software with files containing
-Modifications, in each case including portions thereof.
-
-1.4. "Executable" means the Covered Software in any form
-other than Source Code.
-
-1.5. "Initial Developer" means the individual or entity
-that first makes Original Software available under this
-License.
-
-1.6. "Larger Work" means a work which combines Covered
-Software or portions thereof with code not governed by the
-terms of this License.
-
-1.7. "License" means this document.
-
-1.8. "Licensable" means having the right to grant, to the
-maximum extent possible, whether at the time of the initial
-grant or subsequently acquired, any and all of the rights
-conveyed herein.
-
-1.9. "Modifications" means the Source Code and Executable
-form of any of the following:
-
-A. Any file that results from an addition to,
-deletion from or modification of the contents of a
-file containing Original Software or previous
-Modifications;
-
-B. Any new file that contains any part of the
-Original Software or previous Modification; or
-
-C. Any new file that is contributed or otherwise made
-available under the terms of this License.
-
-1.10. "Original Software" means the Source Code and
-Executable form of computer software code that is
-originally released under this License.
-
-1.11. "Patent Claims" means any patent claim(s), now owned
-or hereafter acquired, including without limitation,
-method, process, and apparatus claims, in any patent
-Licensable by grantor.
-
-1.12. "Source Code" means (a) the common form of computer
-software code in which modifications are made and (b)
-associated documentation included in or with such code.
-
-1.13. "You" (or "Your") means an individual or a legal
-entity exercising rights under, and complying with all of
-the terms of, this License. For legal entities, "You"
-includes any entity which controls, is controlled by, or is
-under common control with You. For purposes of this
-definition, "control" means (a) the power, direct or
-indirect, to cause the direction or management of such
-entity, whether by contract or otherwise, or (b) ownership
-of more than fifty percent (50%) of the outstanding shares
-or beneficial ownership of such entity.
-
-2. License Grants.
-
-2.1. The Initial Developer Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and
-subject to third party intellectual property claims, the
-Initial Developer hereby grants You a world-wide,
-royalty-free, non-exclusive license:
-
-(a) under intellectual property rights (other than
-patent or trademark) Licensable by Initial Developer,
-to use, reproduce, modify, display, perform,
-sublicense and distribute the Original Software (or
-portions thereof), with or without Modifications,
-and/or as part of a Larger Work; and
-
-(b) under Patent Claims infringed by the making,
-using or selling of Original Software, to make, have
-made, use, practice, sell, and offer for sale, and/or
-otherwise dispose of the Original Software (or
-portions thereof).
-
-(c) The licenses granted in Sections 2.1(a) and (b)
-are effective on the date Initial Developer first
-distributes or otherwise makes the Original Software
-available to a third party under the terms of this
-License.
-
-(d) Notwithstanding Section 2.1(b) above, no patent
-license is granted: (1) for code that You delete from
-the Original Software, or (2) for infringements
-caused by: (i) the modification of the Original
-Software, or (ii) the combination of the Original
-Software with other software or devices.
-
-2.2. Contributor Grant.
-
-Conditioned upon Your compliance with Section 3.1 below and
-subject to third party intellectual property claims, each
-Contributor hereby grants You a world-wide, royalty-free,
-non-exclusive license:
-
-(a) under intellectual property rights (other than
-patent or trademark) Licensable by Contributor to
-use, reproduce, modify, display, perform, sublicense
-and distribute the Modifications created by such
-Contributor (or portions thereof), either on an
-unmodified basis, with other Modifications, as
-Covered Software and/or as part of a Larger Work; and
-
-(b) under Patent Claims infringed by the making,
-using, or selling of Modifications made by that
-Contributor either alone and/or in combination with
-its Contributor Version (or portions of such
-combination), to make, use, sell, offer for sale,
-have made, and/or otherwise dispose of: (1)
-Modifications made by that Contributor (or portions
-thereof); and (2) the combination of Modifications
-made by that Contributor with its Contributor Version
-(or portions of such combination).
-
-(c) The licenses granted in Sections 2.2(a) and
-2.2(b) are effective on the date Contributor first
-distributes or otherwise makes the Modifications
-available to a third party.
-
-(d) Notwithstanding Section 2.2(b) above, no patent
-license is granted: (1) for any code that Contributor
-has deleted from the Contributor Version; (2) for
-infringements caused by: (i) third party
-modifications of Contributor Version, or (ii) the
-combination of Modifications made by that Contributor
-with other software (except as part of the
-Contributor Version) or other devices; or (3) under
-Patent Claims infringed by Covered Software in the
-absence of Modifications made by that Contributor.
-
-3. Distribution Obligations.
-
-3.1. Availability of Source Code.
-
-Any Covered Software that You distribute or otherwise make
-available in Executable form must also be made available in
-Source Code form and that Source Code form must be
-distributed only under the terms of this License. You must
-include a copy of this License with every copy of the
-Source Code form of the Covered Software You distribute or
-otherwise make available. You must inform recipients of any
-such Covered Software in Executable form as to how they can
-obtain such Covered Software in Source Code form in a
-reasonable manner on or through a medium customarily used
-for software exchange.
-
-3.2. Modifications.
-
-The Modifications that You create or to which You
-contribute are governed by the terms of this License. You
-represent that You believe Your Modifications are Your
-original creation(s) and/or You have sufficient rights to
-grant the rights conveyed by this License.
-
-3.3. Required Notices.
-
-You must include a notice in each of Your Modifications
-that identifies You as the Contributor of the Modification.
-You may not remove or alter any copyright, patent or
-trademark notices contained within the Covered Software, or
-any notices of licensing or any descriptive text giving
-attribution to any Contributor or the Initial Developer.
-
-3.4. Application of Additional Terms.
-
-You may not offer or impose any terms on any Covered
-Software in Source Code form that alters or restricts the
-applicable version of this License or the recipients'
-rights hereunder. You may choose to offer, and to charge a
-fee for, warranty, support, indemnity or liability
-obligations to one or more recipients of Covered Software.
-However, you may do so only on Your own behalf, and not on
-behalf of the Initial Developer or any Contributor. You
-must make it absolutely clear that any such warranty,
-support, indemnity or liability obligation is offered by
-You alone, and You hereby agree to indemnify the Initial
-Developer and every Contributor for any liability incurred
-by the Initial Developer or such Contributor as a result of
-warranty, support, indemnity or liability terms You offer.
-
-3.5. Distribution of Executable Versions.
-
-You may distribute the Executable form of the Covered
-Software under the terms of this License or under the terms
-of a license of Your choice, which may contain terms
-different from this License, provided that You are in
-compliance with the terms of this License and that the
-license for the Executable form does not attempt to limit
-or alter the recipient's rights in the Source Code form
-from the rights set forth in this License. If You
-distribute the Covered Software in Executable form under a
-different license, You must make it absolutely clear that
-any terms which differ from this License are offered by You
-alone, not by the Initial Developer or Contributor. You
-hereby agree to indemnify the Initial Developer and every
-Contributor for any liability incurred by the Initial
-Developer or such Contributor as a result of any such terms
-You offer.
-
-3.6. Larger Works.
-
-You may create a Larger Work by combining Covered Software
-with other code not governed by the terms of this License
-and distribute the Larger Work as a single product. In such
-a case, You must make sure the requirements of this License
-are fulfilled for the Covered Software.
-
-4. Versions of the License.
-
-4.1. New Versions.
-
-Sun Microsystems, Inc. is the initial license steward and
-may publish revised and/or new versions of this License
-from time to time. Each version will be given a
-distinguishing version number. Except as provided in
-Section 4.3, no one other than the license steward has the
-right to modify this License.
-
-4.2. Effect of New Versions.
-
-You may always continue to use, distribute or otherwise
-make the Covered Software available under the terms of the
-version of the License under which You originally received
-the Covered Software. If the Initial Developer includes a
-notice in the Original Software prohibiting it from being
-distributed or otherwise made available under any
-subsequent version of the License, You must distribute and
-make the Covered Software available under the terms of the
-version of the License under which You originally received
-the Covered Software. Otherwise, You may also choose to
-use, distribute or otherwise make the Covered Software
-available under the terms of any subsequent version of the
-License published by the license steward.
-
-4.3. Modified Versions.
-
-When You are an Initial Developer and You want to create a
-new license for Your Original Software, You may create and
-use a modified version of this License if You: (a) rename
-the license and remove any references to the name of the
-license steward (except to note that the license differs
-from this License); and (b) otherwise make it clear that
-the license contains terms which differ from this License.
-
-5. DISCLAIMER OF WARRANTY.
-
-COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS"
-BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
-INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED
-SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR
-PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND
-PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY
-COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE
-INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF
-ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
-WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
-ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS
-DISCLAIMER.
-
-6. TERMINATION.
-
-6.1. This License and the rights granted hereunder will
-terminate automatically if You fail to comply with terms
-herein and fail to cure such breach within 30 days of
-becoming aware of the breach. Provisions which, by their
-nature, must remain in effect beyond the termination of
-this License shall survive.
-
-6.2. If You assert a patent infringement claim (excluding
-declaratory judgment actions) against Initial Developer or
-a Contributor (the Initial Developer or Contributor against
-whom You assert such claim is referred to as "Participant")
-alleging that the Participant Software (meaning the
-Contributor Version where the Participant is a Contributor
-or the Original Software where the Participant is the
-Initial Developer) directly or indirectly infringes any
-patent, then any and all rights granted directly or
-indirectly to You by such Participant, the Initial
-Developer (if the Initial Developer is not the Participant)
-and all Contributors under Sections 2.1 and/or 2.2 of this
-License shall, upon 60 days notice from Participant
-terminate prospectively and automatically at the expiration
-of such 60 day notice period, unless if within such 60 day
-period You withdraw Your claim with respect to the
-Participant Software against such Participant either
-unilaterally or pursuant to a written agreement with
-Participant.
-
-6.3. In the event of termination under Sections 6.1 or 6.2
-above, all end user licenses that have been validly granted
-by You or any distributor hereunder prior to termination
-(excluding licenses granted to You by any distributor)
-shall survive termination.
-
-7. LIMITATION OF LIABILITY.
-
-UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
-(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE
-INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
-COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE
-LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR
-CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
-LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK
-STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
-COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
-INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
-LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL
-INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT
-APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO
-NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR
-CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT
-APPLY TO YOU.
-
-8. U.S. GOVERNMENT END USERS.
-
-The Covered Software is a "commercial item," as that term is
-defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial
-computer software" (as that term is defined at 48 C.F.R.
-252.227-7014(a)(1)) and "commercial computer software
-documentation" as such terms are used in 48 C.F.R. 12.212 (Sept.
-1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1
-through 227.7202-4 (June 1995), all U.S. Government End Users
-acquire Covered Software with only those rights set forth herein.
-This U.S. Government Rights clause is in lieu of, and supersedes,
-any other FAR, DFAR, or other clause or provision that addresses
-Government rights in computer software under this License.
-
-9. MISCELLANEOUS.
-
-This License represents the complete agreement concerning subject
-matter hereof. If any provision of this License is held to be
-unenforceable, such provision shall be reformed only to the
-extent necessary to make it enforceable. This License shall be
-governed by the law of the jurisdiction specified in a notice
-contained within the Original Software (except to the extent
-applicable law, if any, provides otherwise), excluding such
-jurisdiction's conflict-of-law provisions. Any litigation
-relating to this License shall be subject to the jurisdiction of
-the courts located in the jurisdiction and venue specified in a
-notice contained within the Original Software, with the losing
-party responsible for costs, including, without limitation, court
-costs and reasonable attorneys' fees and expenses. The
-application of the United Nations Convention on Contracts for the
-International Sale of Goods is expressly excluded. Any law or
-regulation which provides that the language of a contract shall
-be construed against the drafter shall not apply to this License.
-You agree that You alone are responsible for compliance with the
-United States export administration regulations (and the export
-control laws and regulation of any other countries) when You use,
-distribute or otherwise make available any Covered Software.
-
-10. RESPONSIBILITY FOR CLAIMS.
-
-As between Initial Developer and the Contributors, each party is
-responsible for claims and damages arising, directly or
-indirectly, out of its utilization of rights under this License
-and You agree to work with Initial Developer and Contributors to
-distribute such responsibility on an equitable basis. Nothing
-herein is intended or shall be deemed to constitute any admission
-of liability.
diff --git a/nbi/engine/external/binaries-list b/nbi/engine/external/binaries-list
deleted file mode 100644
index b647ba5d6883..000000000000
--- a/nbi/engine/external/binaries-list
+++ /dev/null
@@ -1,17 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-1D14F4B56AD34841339698565B17BBAE755B0E61 applemenu-external-desktop-classes-8.2.zip
diff --git a/nbi/engine/lib/readme.txt b/nbi/engine/lib/readme.txt
deleted file mode 100644
index 1226c7dbb4ca..000000000000
--- a/nbi/engine/lib/readme.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-here I put some libs for implementing testserver.
-Currently TestServer Jetty-based so that's why here such jars.
\ No newline at end of file
diff --git a/nbi/engine/manifest.mf b/nbi/engine/manifest.mf
deleted file mode 100644
index 464ca3d3fe50..000000000000
--- a/nbi/engine/manifest.mf
+++ /dev/null
@@ -1,2 +0,0 @@
-Manifest-Version: 1.0
-Main-Class: org.netbeans.installer.Installer
diff --git a/nbi/engine/native/build.properties b/nbi/engine/native/build.properties
deleted file mode 100644
index 5959d932626a..000000000000
--- a/nbi/engine/native/build.properties
+++ /dev/null
@@ -1,68 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#ignore.native=
-
-native.dist.dir=dist
-
-native.jnilib.dir=jnilib
-native.launcher.dir=launcher
-native.cleaner.dir=cleaner
-
-# Native Library properties
-native.jnilib.dir.windows=${native.jnilib.dir}/windows
-native.jnilib.dir.linux=${native.jnilib.dir}/linux
-native.jnilib.dir.solaris-x86=${native.jnilib.dir}/solaris-x86
-native.jnilib.dir.solaris-sparc=${native.jnilib.dir}/solaris-sparc
-native.jnilib.dir.macosx=${native.jnilib.dir}/macosx
-
-native.jnilib.file.windows.i386=windows-x86.dll
-native.jnilib.file.windows.amd64=windows-x64.dll
-native.jnilib.file.windows.ia64=windows-ia64.dll
-native.jnilib.file.linux.i386=linux.so
-native.jnilib.file.linux.amd64=linux-amd64.so
-native.jnilib.file.solaris-x86=solaris-x86.so
-native.jnilib.file.solaris-sparc=solaris-sparc.so
-native.jnilib.file.solaris-amd64=solaris-amd64.so
-native.jnilib.file.solaris-sparcv9=solaris-sparcv9.so
-native.jnilib.file.macosx=macosx.dylib
-
-
-# Native Launcher Properties
-native.launcher.windows.dir=${native.launcher.dir}/windows
-native.launcher.windows.stub.file=nlw.exe
-native.launcher.windows.stub.src=${native.launcher.windows.dir}/dist/${native.launcher.windows.stub.file}
-native.launcher.windows.stub.dst.dir=${native.launcher.windows.dir}
-native.launcher.windows.i18n.dir=${native.launcher.windows.dir}/i18n
-
-native.launcher.unix.dir=${native.launcher.dir}/unix
-native.launcher.unix.stub.file=launcher.sh
-native.launcher.unix.stub.src=${native.launcher.unix.dir}/src/${native.launcher.unix.stub.file}
-native.launcher.unix.stub.dst.dir=${native.launcher.unix.dir}
-native.launcher.unix.i18n.dir=${native.launcher.unix.dir}/i18n
-
-
-# Native on-exit cleaner properties
-native.cleaner.windows.dir=${native.cleaner.dir}/windows
-native.cleaner.windows.srcdir=${native.cleaner.windows.dir}/dist
-native.cleaner.windows.file=cleaner.exe
-
-native.cleaner.unix.dir=${native.cleaner.dir}/unix
-native.cleaner.unix.srcdir=${native.cleaner.unix.dir}/src
-native.cleaner.unix.file=cleaner.sh
diff --git a/nbi/engine/native/build.xml b/nbi/engine/native/build.xml
deleted file mode 100644
index 58c97a60ee6c..000000000000
--- a/nbi/engine/native/build.xml
+++ /dev/null
@@ -1,146 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/nbi/engine/native/cleaner/unix/src/cleaner.sh b/nbi/engine/native/cleaner/unix/src/cleaner.sh
deleted file mode 100644
index cfae216ebe20..000000000000
--- a/nbi/engine/native/cleaner/unix/src/cleaner.sh
+++ /dev/null
@@ -1,92 +0,0 @@
-#!/bin/sh
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-deleteFiles() {
- testSymlinkErr=`test -L / > /dev/null`
- if [ -z "$testSymlinkErr" ] ; then
- isSymlink=-L
- else
- isSymlink=-h
- fi
-
- #wait for main thread to finish...
- sleep 3
- waitOnError=1
- tryTimes=3
- list="$1"
- if [ -n "$list" ] && [ -f "$list" ] ; then
- #echo "Using list file : $list"
- itemsNumber=`wc -l $list | sed "s/^\ *//;s/\ .*//" 2>/dev/null`
- #echo "Total items : $itemsNumber"
- counter=1
- try=$tryTimes
- allitems=`cat "$list" 2>/dev/null`
- if [ -f "$list" ] ; then
- #echo "... remove cleaner list $list"
- rm -f "$list"
- fi
- while [ $counter -le $itemsNumber ] ; do
- file=`echo "$allitems" | sed -n "${counter}p" 2>/dev/null`
- #echo "entry : $file"
- result=1
- if [ -n "$file" ] ; then
- #echo "... file not zero"
- if [ $isSymlink "$file" ] || [ -f "$file" ] ; then
- # file or symlink
- #echo "deleting [F] $file"
- rm -f "$file" 2>/dev/null 1>&2
- if [ $? -ne 0 ] ; then
- #echo "... can't delete $file"
- result=0
- fi
- elif [ -d "$file" ] ; then
- # directory
- #echo "deleting [D] $file"
- rmdir "$file" 2>/dev/null 1>&2
- if [ $? -ne 0 ] ; then
- result=0
- #echo "... can't delete $file"
- fi
- fi
- fi
- if [ 0 -eq $result ] ; then
- # try to remove it again after a short wait
- if [ $try -gt 0 ] ; then
- try=`expr "$try" - 1`
- sleep $waitOnError
- else
- #can`t delete.. skip it
- result=1
- fi
-
- fi
- if [ 1 -eq $result ] ; then
- counter=`expr "$counter" + 1`
- try=$tryTimes
- fi
- done
- fi
- if [ -f "$0" ] ; then
- #echo "... remove cleaner itself $0"
- rm -f "$0"
- fi
-}
-
-deleteFiles "$@"
diff --git a/nbi/engine/native/cleaner/windows/Makefile b/nbi/engine/native/cleaner/windows/Makefile
deleted file mode 100644
index 98cf53c0c227..000000000000
--- a/nbi/engine/native/cleaner/windows/Makefile
+++ /dev/null
@@ -1,79 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-# Environment
-MKDIR=mkdir
-CP=cp
-CCADMIN=CCadmin
-RANLIB=ranlib
-
-
-# build
-build: .build-pre .build-impl .build-post
-
-.build-pre:
-# Add your pre 'build' code here...
-
-.build-post:
-# Add your post 'build' code here...
-
-
-# clean
-clean: .clean-pre .clean-impl .clean-post
-
-.clean-pre:
-# Add your pre 'clean' code here...
-
-.clean-post:
-# Add your post 'clean' code here...
-
-
-# clobber
-clobber: .clobber-pre .clobber-impl .clobber-post
-
-.clobber-pre:
-# Add your pre 'clobber' code here...
-
-.clobber-post:
-# Add your post 'clobber' code here...
-
-
-# all
-all: .all-pre .all-impl .all-post
-
-.all-pre:
-# Add your pre 'all' code here...
-
-.all-post:
-# Add your post 'all' code here...
-
-
-# help
-help: .help-pre .help-impl .help-post
-
-.help-pre:
-# Add your pre 'help' code here...
-
-.help-post:
-# Add your post 'help' code here...
-
-
-
-# include project implementation makefile
-include nbproject/Makefile-impl.mk
diff --git a/nbi/engine/native/cleaner/windows/Makefile-vc b/nbi/engine/native/cleaner/windows/Makefile-vc
deleted file mode 100644
index b9edda92cf0e..000000000000
--- a/nbi/engine/native/cleaner/windows/Makefile-vc
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-#
-
-
-!include <$(PLATFORM_SDK)/include/win32.mak>
-
-# define the compiler and linker for all the platforms
-CC32="$(VC_2005)\Bin\cl.exe"
-L32="$(VC_2005)\Bin\link.exe"
-
-BUILD_DIR32=.\build\32bit
-OUTPUT_FILE32=.\dist\cleaner.exe
-
-CC32_OPTS=/O1 /Os \
- /I "$(VC_2005)\include" \
- /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_CRT_SECURE_NO_DEPRECATE" \
- /FD /GS-\
- /Fo"$(BUILD_DIR32)\\" /Fd"$(BUILD_DIR32)\vc80.pdb" \
- /W3 /nologo /c /Wp64 /TC /errorReport:prompt
-
-LINKING_LIBRARIES=\
- shell32.lib \
- kernel32.lib
-
-L32_OPTS=\
- /OUT:$(OUTPUT_FILE32) \
- /INCREMENTAL:NO \
- /LIBPATH:"$(PLATFORM_SDK)\Lib" \
- /MANIFEST:NO \
- /NODEFAULTLIB \
- /SUBSYSTEM:WINDOWS \
- /OPT:REF /OPT:ICF \
- /MACHINE:X86 \
- /ERRORREPORT:PROMPT \
- /ENTRY:WinMain \
- $(LINKING_LIBRARIES)
-
-all: init build-32
-
-clean:
-
-
-init:
- - md $(BUILD_DIR32)
- - md .\dist
-
- del /Q /S $(BUILD_DIR32)
- del /Q $(OUTPUT_FILE32)
-
-build-32:
- Set CPU=i386
- Set Lib=%VC_2005%\Lib;%PLATFORM_SDK%\Lib;%Lib%
- Set Include=%PLATFORM_SDK%\Include;%Include%
- Set Path=%PLATFORM_SDK%\Bin;%PLATFORM_SDK%\Bin\WinNT;%VC_2005_PATH%;%path%
- Set APPVER=5.01
- Set TARGETOS=WINNT
-
- $(CC32) $(CC32_OPTS) .\src\main.c
- $(L32) $(L32_OPTS) $(BUILD_DIR32)\main.obj
diff --git a/nbi/engine/native/cleaner/windows/nbproject/configurations.xml b/nbi/engine/native/cleaner/windows/nbproject/configurations.xml
deleted file mode 100644
index b16b62813592..000000000000
--- a/nbi/engine/native/cleaner/windows/nbproject/configurations.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-
-
-
-
-
-
- src/main.c
-
-
-
-
-
-
- Makefile
-
-
- Makefile
- 0
-
-
-
- Cygwin
- true
- true
- false
- 3
-
-
-
-
- true
-
- -lshell32 -lkernel32
-
- -mno-cygwin -mwindows
-
-
- -
- 0
-
-
-
-
- Cygwin
- true
- true
- false
- 3
-
-
-
- 5
-
-
- 5
-
-
- 5
-
-
-
-
-
-
- -
- 0
-
-
-
-
diff --git a/nbi/engine/native/cleaner/windows/nbproject/project.properties b/nbi/engine/native/cleaner/windows/nbproject/project.properties
deleted file mode 100644
index 3807b675d79a..000000000000
--- a/nbi/engine/native/cleaner/windows/nbproject/project.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
diff --git a/nbi/engine/native/cleaner/windows/nbproject/project.xml b/nbi/engine/native/cleaner/windows/nbproject/project.xml
deleted file mode 100644
index ded3e3c3ca38..000000000000
--- a/nbi/engine/native/cleaner/windows/nbproject/project.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
- org.netbeans.modules.cnd.makeproject
-
-
- NBI Native Cleaner : Windows
- 0
-
-
-
diff --git a/nbi/engine/native/cleaner/windows/src/main.c b/nbi/engine/native/cleaner/windows/src/main.c
deleted file mode 100644
index 43271ffcd8c1..000000000000
--- a/nbi/engine/native/cleaner/windows/src/main.c
+++ /dev/null
@@ -1,482 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include
-#include
-
-
-/*
- * cleaner.exe
- *
- * Deletes a list of files/folders.
- *
- * The command line syntax is:
- *
- * arg1: File name containing a list of files/folders to delete.
- *
- * Requirements for arg1:
- * - The arg1 file name MUST be fully qualified. (or be in the same directory
- * as the cleaner.exe executable)
- * - The file MUST use Windows line ending (CRLF)
- * - The file MUST be encoded in UTF-16. The NBI Engine will produce
- * this file in Java charset "UNICODE" which effectively means
- * UCS-2 BigEndian BOM. Such file will work just fine.
- * - Each line in the file is expected to contain a fully qualified file
- * or folder name. The entry can be
- * - a local file/folder name, e.g. "C:\foo\bar", up to a maximum of 32767
- * chars and thus not subject to the original Windows limitation
- * of 260 chars for a path name.
- * - a UNC, e.g. "\\servername\sharename\foo\bar", subject to a
- * restriction of 260 chars.
- * - The list MUST be ordered so that the files in a folder are listed before
- * the folder itself. (it is not possible to delete a non-empty folder)
- *
- * Method of working:
- *
- * 1. After launch the content of command line arg1 is read into memory
- * as one big string.
- * 2. The string is chopped into a list by separating at the LINE_SEPARATOR.
- * 3. Sleep for 2 seconds to allow the launching process (the JVM) to exit.
- * 4. Loop over the list of files/folder to delete. Each file-delete operation
- * is spawned into a thread of its own up to a maximum of 64 threads.
- * Therefore the delete operations happens in parallel rather than in sequence.
- * If 64 threads have been spawned then wait for a thread to exit before
- * spawning a new one. (therefore never more than 64 threads)
- * For each file delete operation do the following:
- * - Check to see if the file exists (by getting its attributes)
- * - If file: delete file, if directory: delete directory (these are two
- * different calls in the Win32 API).
- * - Attempt to delete each file/dir up to 15 times sleeping for 200 ms
- * between each attempt.
- * 5. Wait for all file-delete threads to exit.
- * 6. Delete self, i.e. the "cleaner.exe" executable.
- * 7. End
- *
- * The arg1 file is not deleted. However it can be part of the list itself
- * if need be.
- *
- * Author: Dmitry Lipin, 2007
- *
- *
- *
- * Changes after transition to Apache:
- *
- * 14-SEP-2019 Lars Bruun-Hansen (lbruun@apache.org) :
- * Function comment headers added.
- * Main comment header added.
- *
- */
-
-
-// Retry functionality:
-// SLEEP_DELAY : millis between each attempt at a file delete
-// MAX_ATTEMPTS : how many times to attempt to delete a file
-const DWORD SLEEP_DELAY = 200;
-const DWORD MAX_ATTEMPTS = 15;
-const DWORD THREAD_FINISHED = 100;
-
-// Number of milliseconds to sleep at launch of the application.
-const DWORD INITIAL_DELAY = 2000; // 2 seconds seems to be enough to finish java process
-
-const WCHAR * LINE_SEPARATOR = L"\r\n";
-const WCHAR * UNC_PREFIX = L"\\\\?\\"; // Prefix for extended-length path in Win32 API
-const WCHAR * UNC_STD_PREFIX = L"\\\\"; // Prefix for UNC paths, for example: \\servername\share\foo\bar
-const DWORD UNC_PREFIX_LENGTH = 4;
-
-#ifdef _MSC_VER
-#define ZERO(x,y) SecureZeroMemory((x),(y));
-#else
-#define ZERO(x,y) ZeroMemory((x),(y));
-#endif
-
-
-/*
- * Search for the first occurrence of wcs2 within wcs1.
- * Returns a pointer to the first occurrence if found.
- * If not found, NULL is returned.
- */
-WCHAR * search( const WCHAR * wcs1, const WCHAR * wcs2) {
- WCHAR *cp = (WCHAR *) wcs1;
- WCHAR *s1, *s2;
-
- if ( !*wcs2) {
- return (WCHAR *)wcs1;
- }
-
- while (*cp) {
- s1 = cp;
- s2 = (WCHAR *) wcs2;
-
- while ( *s1 && *s2 && !(*s1-*s2) ) {
- s1++, s2++;
- }
- if (!*s2) {
- return(cp);
- }
- cp++;
- }
- return(NULL);
-}
-
-
-typedef struct _list {
- WCHAR * item;
- struct _list * next;
-} LIST;
-
-
-WCHAR * toWCHAR(char * charBuffer, DWORD size) {
- DWORD i=0;
- WCHAR * buffer;
- BOOL hasBOM = (*charBuffer == '\xFF' && *(charBuffer+1) == '\xFE');
- BOOL hasReverseBOM = (*charBuffer == '\xFE' && *(charBuffer+1) == '\xFF');
-
- char * realStringPtr = charBuffer;
- if (hasBOM || hasReverseBOM) {
- size-= 2;
- realStringPtr+= 2;
- if(hasReverseBOM) {
- char c;
- for (i = 0 ; i < size/2 ; i++) {
- c = charBuffer [2 * i] ;
- charBuffer [2 * i] = charBuffer [2 * i + 1] ;
- charBuffer [2 * i + 1] = c;
- }
- }
- }
-
- buffer = (WCHAR*) LocalAlloc(LPTR, sizeof(WCHAR) * (size/2+1));
- ZERO(buffer, sizeof(WCHAR) * (size/2+1));
- for(i=0;i 0) {
- result ++;
- }
- }
- return result;
-}
-
-/*
- * Produces a string array, 'list', from 'str' by splitting the string
- * at each occurrence of LINE_SEPARATOR.
- *
- * [IN] str: the input
- * [OUT] list: string array
- * [OUT] number: number of elements in 'list'
- *
- */
-void getLines(WCHAR *str, WCHAR *** list, DWORD * number) {
- WCHAR *ptr = str;
- WCHAR *ptr2 = NULL;
- DWORD length = 0;
- DWORD sepLength = lstrlenW(LINE_SEPARATOR);
- DWORD counter = 0;
- *number = getLinesNumber(str);
- *list = (WCHAR**) LocalAlloc(LPTR, sizeof(WCHAR*) * (*number));
-
- if(ptr!=NULL) {
- while(counter < (*number)) {
- DWORD i = 0 ;
- if((ptr2 = search(ptr, LINE_SEPARATOR))!=NULL) {
- ptr2 = search(ptr, LINE_SEPARATOR) + sepLength;
- length = lstrlenW(ptr) - lstrlenW(ptr2) - sepLength;
- (*list) [counter ] = (WCHAR*) LocalAlloc(LPTR, sizeof(WCHAR*)*(length+1));
- ZERO((*list) [counter ], sizeof(WCHAR*)*(length+1));
- for(i=0;i 0) {
- (*list)[counter ] = (WCHAR*) LocalAlloc(LPTR, sizeof(WCHAR*)*(length+1));
- ZERO((*list) [counter ], sizeof(WCHAR*)*(length+1));
- for(i=0;i=2) {
- WCHAR * buffer = toWCHAR(charBuffer, size + 2);
- getLines(buffer, list, number);
- LocalFree(buffer);
- }
- LocalFree(charBuffer);
-}
-
-void deleteFile(WCHAR * filePath) {
- BOOL canDelete = TRUE;
- DWORD count = 0 ;
- WIN32_FILE_ATTRIBUTE_DATA attrs;
- DWORD filePathLength = lstrlenW(filePath);
- DWORD prefixLength = (filePath == search(filePath, UNC_STD_PREFIX)) ? 0 : UNC_PREFIX_LENGTH;
- DWORD length = filePathLength + prefixLength + 1;
- WCHAR * file = (WCHAR*) LocalAlloc(LPTR, sizeof(WCHAR) * length);
- DWORD i=0;
- for(i=0;i0) {
- getFreeIndexForNextThread(runningThreads, MAXIMUM_THREADS, &threadCounter);
- runningThreads [threadCounter] = CreateThread( NULL, 0, &deleteFileThread, (LPVOID) file, 0, &dwThread );
- threadCounter++;
- if(threadCounter==MAXIMUM_THREADS) allThreadsUsed = 1;
- }
- }
- }
-
- WaitForMultipleObjects(allThreadsUsed ? MAXIMUM_THREADS : threadCounter,
- runningThreads, TRUE, INFINITE);
-
- for(i=0;i
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/nbi/engine/native/cleaner/windows/vcproject/NBI Native Cleaner.vcproj.user b/nbi/engine/native/cleaner/windows/vcproject/NBI Native Cleaner.vcproj.user
deleted file mode 100644
index a5ca4f998dec..000000000000
--- a/nbi/engine/native/cleaner/windows/vcproject/NBI Native Cleaner.vcproj.user
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/nbi/engine/native/jnilib/.common/src/CommonUtils.c b/nbi/engine/native/jnilib/.common/src/CommonUtils.c
deleted file mode 100644
index b66eccd085c5..000000000000
--- a/nbi/engine/native/jnilib/.common/src/CommonUtils.c
+++ /dev/null
@@ -1,384 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include
-#include
-#include
-#include
-
-
-#include "CommonUtils.h"
-
-jbyteArray getStringBytes(JNIEnv* jEnv, jstring jString) {
- jbyteArray result = NULL;
-
- if (jString != NULL) {
- jmethodID jGetBytesMethod = (*jEnv)->GetMethodID(jEnv, (*jEnv)->GetObjectClass(jEnv, jString), "getBytes", "()[B");
-
- if (jGetBytesMethod != NULL) {
- jbyteArray jBuffer = (jbyteArray) (*jEnv)->CallObjectMethod(jEnv, jString, jGetBytesMethod);
-
- if (jBuffer != NULL) {
- jsize jLength = (*jEnv)->GetArrayLength(jEnv, jBuffer);
-
- result = (*jEnv)->NewByteArray(jEnv, jLength + 1);
- if (jLength != 0) {
- jbyte* jChars = (*jEnv)->GetByteArrayElements(jEnv, jBuffer, NULL);
- (*jEnv)->SetByteArrayRegion(jEnv, result, 0, jLength, jChars);
- (*jEnv)->ReleaseByteArrayElements(jEnv, jBuffer, jChars, JNI_ABORT);
- }
- (*jEnv)->DeleteLocalRef(jEnv, jBuffer);
- }
- //(*jEnv)->DeleteLocalRef(jEnv, getBytesMethod);
- }
- }
-
- return result;
-}
-
-
-jstring newStringFromJByteArray(JNIEnv* jEnv, jbyteArray jByteArray, int length) {
- jstring result = NULL;
-
- jclass jStringClass = (*jEnv)->FindClass(jEnv, "java/lang/String");
- if (jStringClass != NULL) {
- jmethodID jStringConstructor = (*jEnv)->GetMethodID(jEnv, jStringClass, "", "([BII)V");
-
- if (jStringConstructor != NULL) {
- result = (jstring) (*jEnv)->NewObject(jEnv, jStringClass, jStringConstructor, jByteArray, 0, length);
- //(*jEnv)->DeleteLocalRef(jEnv, stringConstructor);
- }
- (*jEnv)->DeleteLocalRef(jEnv, jStringClass);
- }
-
- return result;
-}
-
-
-jstring newStringFromJCharArray(JNIEnv* jEnv, jcharArray jCharArray, int length) {
- jstring result = NULL;
-
- jclass jStringClass = (*jEnv)->FindClass(jEnv, "java/lang/String");
- if (jStringClass != NULL) {
- jmethodID jStringConstructor = (*jEnv)->GetMethodID(jEnv, jStringClass, "", "([CII)V");
-
- if (jStringConstructor != NULL) {
- result = (jstring) (*jEnv)->NewObject(jEnv, jStringClass, jStringConstructor, jCharArray, 0, length);
- }
- (*jEnv)->DeleteLocalRef(jEnv, jStringClass);
- }
-
- return result;
-}
-
-jstring getString(JNIEnv* jEnv, const char* chars) {
- return (jstring) getStringWithLength(jEnv, chars, (int) STRLEN(chars));
-}
-
-jstring getStringW(JNIEnv* jEnv, const wchar_t * chars) {
- return (jstring) getStringWithLengthW(jEnv, chars, (int) WCSLEN(chars));
-}
-
-jstring getStringWithLength(JNIEnv* jEnv, const char* chars, int length) {
- jstring result = NULL;
-
- if (chars != NULL) {
- if (length == 0) {
- result = (*jEnv)->NewString(jEnv, (const jchar *) L"", 0);
- } else {
- jbyteArray jByteArray = (*jEnv)->NewByteArray(jEnv, length);
-
- if (jByteArray != NULL) {
- (*jEnv)->SetByteArrayRegion(jEnv, jByteArray, 0, length, (jbyte*) chars);
- result = newStringFromJByteArray(jEnv, jByteArray, length);
- (*jEnv)->DeleteLocalRef(jEnv, jByteArray);
- }
- }
- }
-
- return result;
-}
-
-
-jstring getStringWithLengthW(JNIEnv* jEnv, const wchar_t* chars, int length) {
- jstring result = NULL;
-
- if (chars != NULL) {
- if (length == 0) {
- result = (*jEnv)->NewString(jEnv, (const jchar *) L"", 0);
- } else {
- jcharArray jCharArray = (*jEnv)->NewCharArray(jEnv, length);
-
- if (jCharArray != NULL) {
- (*jEnv)->SetCharArrayRegion(jEnv, jCharArray, 0, length, (jchar*) chars);
- result = newStringFromJCharArray(jEnv, jCharArray, length);
- (*jEnv)->DeleteLocalRef(jEnv, jCharArray);
- }
- }
- }
-
- return result;
-}
-
-
-char* getChars(JNIEnv* jEnv, jstring jString) {
- char* result = NULL;
-
- jbyteArray jByteArray = getStringBytes(jEnv, jString);
- if (jByteArray != NULL) {
- jbyte* jBytes = (*jEnv)->GetByteArrayElements(jEnv, jByteArray, NULL);
-
- long index = 0;
- if (jBytes != NULL) {
- int length = (int) STRLEN((char*) jBytes);
-
- result = (char*) MALLOC(sizeof(char) * (length + 1));
- if (result != NULL) {
- ZERO(result, length);
- STRNCPY(result, (char*) jBytes, length);
- result[length] = 0;
- }
- (*jEnv)->ReleaseByteArrayElements(jEnv, jByteArray, jBytes, JNI_ABORT);
- }
- (*jEnv)->DeleteLocalRef(jEnv, jByteArray);
- }
-
- return result;
-}
-
-char* getStringFromMethod(JNIEnv* jEnv, jobject object, const char* methodName) {
- char* result = NULL;
-
- jclass clazz = (*jEnv)->GetObjectClass(jEnv, object);
- if (clazz != NULL) {
- jmethodID method = (*jEnv)->GetMethodID(jEnv, clazz, methodName, "()Ljava/lang/String;");
- if (method != NULL) {
- jstring string = (jstring) (*jEnv)->CallObjectMethod(jEnv, object, method);
- if (string != NULL) {
- result = getChars(jEnv, string);
- (*jEnv)->DeleteLocalRef(jEnv, string);
- }
- //(*jEnv)->DeleteLocalRef(jEnv, method);
- }
- (*jEnv)->DeleteLocalRef(jEnv, clazz);
- }
-
- return result;
-}
-
-wchar_t * getWideStringFromMethod(JNIEnv* jEnv, jobject object, const char* methodName) {
- wchar_t* result = NULL;
-
- jclass clazz = (*jEnv)->GetObjectClass(jEnv, object);
- if (clazz != NULL) {
- jmethodID method = (*jEnv)->GetMethodID(jEnv, clazz, methodName, "()Ljava/lang/String;");
- if (method != NULL) {
- jstring string = (jstring) (*jEnv)->CallObjectMethod(jEnv, object, method);
- if (string != NULL) {
- result = getWideChars(jEnv, string);
- (*jEnv)->DeleteLocalRef(jEnv, string);
- }
- //(*jEnv)->DeleteLocalRef(jEnv, method);
- }
- (*jEnv)->DeleteLocalRef(jEnv, clazz);
- }
-
- return result;
-}
-
-jboolean isInstanceOf(JNIEnv* jEnv, jobject object, const char* className) {
- jboolean result = 0;
- jclass clazz = clazz = (*jEnv)->FindClass(jEnv, className);
-
- if (clazz != NULL) {
- result = (*jEnv)->IsInstanceOf(jEnv, object, clazz);
- (*jEnv)->DeleteLocalRef(jEnv, clazz);
- }
- return result;
-}
-
-jint getIntFromMethod(JNIEnv* jEnv, jobject object, const char* methodName) {
- jint value = 0;
-
- jclass clazz = (*jEnv)->GetObjectClass(jEnv, object);
- if (clazz != NULL) {
- jmethodID method = (*jEnv)->GetMethodID(jEnv, clazz, methodName, "()I");
- if (method != NULL) {
- value = (*jEnv)->CallIntMethod(jEnv, object, method);
- }
- (*jEnv)->DeleteLocalRef(jEnv, clazz);
- }
-
- return value;
-}
-
-void throwException(JNIEnv* jEnv, const char* message) {
- jclass clazz = (*jEnv)->FindClass(jEnv, "org/netbeans/installer/utils/exceptions/NativeException");
- if (clazz != NULL) {
- (*jEnv)->ThrowNew(jEnv, clazz, message);
- (*jEnv)->DeleteLocalRef(jEnv, clazz);
- }
-}
-
-void writeLog(JNIEnv* jEnv, int level, const char* message) {
- const char* prefix = "[jni] ";
-
- jclass clazz = (*jEnv)->FindClass(jEnv, "org/netbeans/installer/utils/LogManager");
- if (clazz != NULL) {
- jmethodID method = (*jEnv)->GetStaticMethodID(jEnv, clazz, "log", "(ILjava/lang/String;)V");
- if (method != NULL) {
- jstring jMessage = NULL;
- int prefix_length = STRLEN(prefix);
- int message_length = STRLEN(message);
- char* string = (char*) MALLOC(sizeof(char) * (prefix_length + message_length + 1));
- int i = 0;
- for(i=0;iCallStaticVoidMethod(jEnv, clazz, method, (jint) level, jMessage);
- (*jEnv)->DeleteLocalRef(jEnv, jMessage);
- }
-
- FREE(string);
- //(*jEnv)->DeleteLocalRef(jEnv, method);
- }
- (*jEnv)->DeleteLocalRef(jEnv, clazz);
- }
-}
-
-int createDirs(JNIEnv* jEnv, jstring jPath) {
- int result = 0;
- jclass jFileClass = (*jEnv)->FindClass(jEnv, "java/io/File");
- if (jFileClass != NULL) {
- jmethodID jFileConstructor = (*jEnv)->GetMethodID(jEnv, jFileClass, "", "(Ljava/lang/String;)V");
- jmethodID jGetParentFileMethod = (*jEnv)->GetMethodID(jEnv, jFileClass, "getParentFile", "()Ljava/io/File;");
- jmethodID jExistsMethod = (*jEnv)->GetMethodID(jEnv, jFileClass, "exists", "()Z");
- jmethodID jMkdirsMethod = (*jEnv)->GetMethodID(jEnv, jFileClass, "mkdirs", "()Z");
-
- if ((jFileConstructor != NULL) && (jGetParentFileMethod != NULL) && (jExistsMethod != NULL) && (jMkdirsMethod != NULL)) {
- jobject jFile = (*jEnv)->NewObject(jEnv, jFileClass, jFileConstructor, jPath);
- if (jFile != NULL ) {
- if(!((*jEnv)->CallBooleanMethod(jEnv, jFile, jExistsMethod))) {
- jobject jParent = (*jEnv)->CallObjectMethod(jEnv, jFile, jGetParentFileMethod);
- if (jParent != NULL) {
- result = (*jEnv)->CallBooleanMethod(jEnv, jParent, jExistsMethod);
- if (!result) {
- result = (*jEnv)->CallBooleanMethod(jEnv, jParent, jMkdirsMethod);
- }
- (*jEnv)->DeleteLocalRef(jEnv, jParent);
- }
- } else {
- result = 1;
- }
- (*jEnv)->DeleteLocalRef(jEnv, jFile);
- }
- }
- (*jEnv)->DeleteLocalRef(jEnv, jFileClass);
- }
- return result;
-}
-
-int mkdirs(JNIEnv* jEnv, const char *path) {
- int result = 1;
- jstring jPath = getString(jEnv, path);
- if (jPath != NULL) {
- result = createDirs(jEnv, jPath);
- (*jEnv)->DeleteLocalRef(jEnv, jPath);
- }
- return result;
-}
-
-
-int mkdirsW(JNIEnv* jEnv, const wchar_t *path) {
- int result = 1;
- jstring jPath = getStringW(jEnv, path);
- if (jPath != NULL) {
- result = createDirs(jEnv, jPath);
- (*jEnv)->DeleteLocalRef(jEnv, jPath);
- }
-
- return result;
-}
-
-
-
-unsigned char* getByteFromMultiString(JNIEnv *jEnv, jobjectArray jObjectArray, unsigned long* size) {
- unsigned short * result = NULL;
-
- int totalLength = 0;
- unsigned int arrayLength = (*jEnv)->GetArrayLength(jEnv, jObjectArray);
- jstring jString = NULL;
-
- unsigned int i, j; // just counters
-
- for (i = 0; i < arrayLength; i++) {
- jString = (jstring) (*jEnv)->GetObjectArrayElement(jEnv, jObjectArray, i);
- totalLength += (*jEnv)->GetStringLength(jEnv, jString) + 1;
- }
- totalLength++; // add null to the end of array
-
- result = (unsigned short*) MALLOC(sizeof(unsigned short) * totalLength);
- if (result != NULL) {
- int index = 0 ;
-
- for (i = 0; i < arrayLength; i++) {
- jString = (jstring) (*jEnv)->GetObjectArrayElement(jEnv, jObjectArray, i);
-
- if (jString != NULL) {
- wchar_t * chars = getWideChars(jEnv, jString);
- if (chars != NULL) {
- for (j = 0; j < (WCSLEN(chars)); j++) {
- result[index++] = chars[j];
- }
-
- FREE(chars);
- }
- }
- result[index++] = '\0';
- }
- result[index++] = '\0'; //double \0 at the end
- }
- * size = sizeof(unsigned short) * totalLength;
- return (unsigned char*)result;
-}
-
-wchar_t * getWideChars(JNIEnv *jEnv, jstring jString) {
- if(jString==NULL) {
- return NULL;
- } else {
- long length = (*jEnv)->GetStringLength( jEnv, jString);
- const jchar * unicodeStr = (*jEnv)->GetStringChars( jEnv, jString, 0 );
- wchar_t * copy = (wchar_t *) MALLOC(sizeof(wchar_t) * (length + 1));
- ZERO(copy, sizeof(wchar_t)*(length + 1));
- WCSNCPY(copy, (const wchar_t *) unicodeStr, length + 1);
- (*jEnv)->ReleaseStringChars( jEnv, jString, unicodeStr);
- return copy;
- }
-
-}
diff --git a/nbi/engine/native/jnilib/.common/src/CommonUtils.h b/nbi/engine/native/jnilib/.common/src/CommonUtils.h
deleted file mode 100644
index 8824351a5cc6..000000000000
--- a/nbi/engine/native/jnilib/.common/src/CommonUtils.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include
-#include
-#include
-#ifdef _MSC_VER
-#include
-#endif
-
-#ifndef _CommonUtils_H
-#define _CommonUtils_H
-
-
-#ifdef _MSC_VER
-#define FREE(x) { if((x)!=NULL) { LocalFree(x); (x)=NULL;}}
-#else
-#define FREE(x) { if((x)!=NULL) { free(x); (x)=NULL;}}
-#endif
-
-#ifdef _MSC_VER
-#define MALLOC(x) LocalAlloc(LPTR, x)
-#else
-#define MALLOC(x) malloc(x)
-#endif
-
-
-#ifdef _MSC_VER
-#define ZERO(x,y) SecureZeroMemory((x),(y))
-#else
-#define ZERO(x,y) memset((x),0,(y))
-#endif
-
-
-#ifdef _MSC_VER
-#define STRLEN(x) lstrlenA(x)
-#else
-#define STRLEN(x) strlen(x)
-#endif
-
-
-#ifdef _MSC_VER
-#define WCSLEN(x) ((unsigned long)lstrlenW(x))
-#else
-#define WCSLEN(x) ((unsigned long)wcslen(x))
-#endif
-
-
-#ifdef _MSC_VER
-#define STRNCPY(x,y,z) lstrcpynA((x),(y),(z))
-#else
-#define STRNCPY(x,y,z) strncpy((x),(y),(z))
-#endif
-
-#ifdef _MSC_VER
-#define WCSNCPY(x,y,z) lstrcpynW((x),(y),(z))
-#else
-#define WCSNCPY(x,y,z) wcsncpy((x),(y),(z))
-#endif
-
-
-#define LOG_DEBUG 4
-#define LOG_MESSAGE 3
-#define LOG_WARNING 2
-#define LOG_ERROR 1
-#define LOG_CRITICAL 0
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-jbyteArray getStringBytes(JNIEnv* jEnv, jstring jString);
-
-jstring newStringFromJByteArray(JNIEnv* jEnv, jbyteArray jByteArray, int length);
-jstring newStringFromJCharArray(JNIEnv* jEnv, jcharArray jCharArray, int length);
-
-jstring getString (JNIEnv* jEnv, const char* chars);
-jstring getStringW(JNIEnv* jEnv, const wchar_t * chars);
-
-
-jstring getStringWithLength(JNIEnv* jEnv, const char* chars, int length);
-jstring getStringWithLengthW(JNIEnv* jEnv, const wchar_t * chars, int length);
-
-char* getChars(JNIEnv* jEnv, jstring jString);
-wchar_t * getWideChars(JNIEnv *jEnv, jstring str);
-
-char* getStringFromMethod(JNIEnv* jEnv, jobject object, const char* methodName);
-wchar_t* getWideStringFromMethod(JNIEnv* jEnv, jobject object, const char* methodName) ;
-
-jint getIntFromMethod(JNIEnv* jEnv, jobject object, const char* methodName);
-
-jboolean isInstanceOf(JNIEnv* jEnv, jobject object, const char* className);
-
-void throwException(JNIEnv* jEnv, const char* message);
-
-void writeLog(JNIEnv* jEnv, int level, const char* message);
-
-int mkdirs (JNIEnv* jEnv, const char *path);
-int mkdirsW(JNIEnv* jEnv, const wchar_t *path);
-
-unsigned char* getByteFromMultiString(JNIEnv *jEnv, jobjectArray jObjectArray, unsigned long* size);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _CommonUtils_H */
diff --git a/nbi/engine/native/jnilib/.unix/src/jni_UnixNativeUtils.c b/nbi/engine/native/jnilib/.unix/src/jni_UnixNativeUtils.c
deleted file mode 100644
index 437e270bbf60..000000000000
--- a/nbi/engine/native/jnilib/.unix/src/jni_UnixNativeUtils.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "../../.common/src/CommonUtils.h"
-#include "jni_UnixNativeUtils.h"
-
-
-jboolean statMode(const char *path, int *mode) {
- struct stat sb;
- if (stat(path, &sb) == 0) {
- *mode = sb.st_mode;
- return 1;
- } else {
- return 0;
- }
-}
-
-
-JNIEXPORT jlong JNICALL Java_org_netbeans_installer_utils_system_UnixNativeUtils_getFreeSpace0(JNIEnv* jEnv, jobject jObject, jstring jPath) {
- char* path = getChars(jEnv, jPath);
- jlong result = 0;
-
- struct statvfs fsstat;
- if(memset(&fsstat, 0, sizeof(struct statvfs)) != NULL) {
- if(statvfs(path, &fsstat) == 0) {
- result = (jlong) fsstat.f_frsize;
- result *= (jlong) fsstat.f_bfree;
- }
- }
-
-
- FREE(path);
- return result;
-}
-
-
-JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_UnixNativeUtils_setPermissions0(JNIEnv *jEnv, jobject jObject, jstring jPath, jint jMode, jint jChange) {
- char* path = getChars(jEnv, jPath);
- int currentMode = 0 ;
- char * msg = NULL;
- if(statMode(path, ¤tMode)) {
- switch (jChange) {
- case MODE_CHANGE_SET:
- currentMode |= (S_IRWXU | S_IRWXG | S_IRWXO);
- currentMode &= jMode;
- break;
- case MODE_CHANGE_ADD:
- currentMode |= jMode;
- break;
- case MODE_CHANGE_REMOVE:
- currentMode &= ~jMode;
- break;
- default:
- msg = (char*) malloc(sizeof(char) * 60);
- memset(msg, 0, sizeof(char) * 60);
- sprintf(msg, "Selected change mode (%ld) is not supported", jChange);
- throwException(jEnv, msg);
- FREE(msg);
- FREE(path);
- return;
- }
- chmod(path, currentMode);
- } else {
- throwException(jEnv, "Can`t get file current permissions");
- }
- FREE(path);
-}
-
-
-JNIEXPORT jint JNICALL Java_org_netbeans_installer_utils_system_UnixNativeUtils_getPermissions0(JNIEnv *jEnv, jobject jObject, jstring jPath) {
- char* path = getChars(jEnv, jPath);
- int currentMode;
- if(statMode(path, ¤tMode)) {
- return currentMode & (S_IRWXU | S_IRWXG | S_IRWXO);
- } else {
- throwException(jEnv, "Can`t get file current permissions");
- }
-
- FREE(path);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_UnixNativeUtils_isCurrentUserAdmin0 (JNIEnv *jEnv, jobject jObject) {
- return (geteuid()==0);
-}
diff --git a/nbi/engine/native/jnilib/.unix/src/jni_UnixNativeUtils.h b/nbi/engine/native/jnilib/.unix/src/jni_UnixNativeUtils.h
deleted file mode 100644
index 989e05da3446..000000000000
--- a/nbi/engine/native/jnilib/.unix/src/jni_UnixNativeUtils.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include
-/* Header for class org_netbeans_installer_utils_system_UnixNativeUtils */
-
-#ifndef _Included_org_netbeans_installer_utils_system_UnixNativeUtils
-#define _Included_org_netbeans_installer_utils_system_UnixNativeUtils
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#define MODE_RU 1L
-#define MODE_WU 2L
-#define MODE_EU 4L
-#define MODE_RG 8L
-#define MODE_WG 16L
-#define MODE_EG 32L
-#define MODE_RO 64L
-#define MODE_WO 128L
-#define MODE_EO 256L
-
-#define MODE_CHANGE_SET 1L
-#define MODE_CHANGE_ADD 2L
-#define MODE_CHANGE_REMOVE 4L
-
-
-
-/*
- * Class: org_netbeans_installer_utils_system_UnixNativeUtils
- * Method: getFreeSpace0
- * Signature: (Ljava/lang/String;)J
- */
-JNIEXPORT jlong JNICALL Java_org_netbeans_installer_utils_system_UnixNativeUtils_getFreeSpace0
- (JNIEnv *, jobject, jstring);
-
-/*
- * Class: org_netbeans_installer_utils_system_UnixNativeUtils
- * Method: setPermission0
- * Signature: (Ljava/lang/String;II)V
- */
-JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_UnixNativeUtils_setPermissions0
- (JNIEnv *, jobject, jstring, jint, jint);
-
-/*
- * Class: org_netbeans_installer_utils_system_UnixNativeUtils
- * Method: getPermissions0
- * Signature: (Ljava/lang/String;)I
- */
-JNIEXPORT jint JNICALL Java_org_netbeans_installer_utils_system_UnixNativeUtils_getPermissions0
- (JNIEnv *, jobject, jstring);
-
-/*
- * Class: org_netbeans_installer_utils_system_UnixNativeUtils
- * Method: isCurrentUserAdmin0
- * Signature: ()Z
- */
-JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_UnixNativeUtils_isCurrentUserAdmin0
- (JNIEnv *, jobject);
-
-
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/nbi/engine/native/jnilib/linux/Makefile b/nbi/engine/native/jnilib/linux/Makefile
deleted file mode 100644
index 516847d04159..000000000000
--- a/nbi/engine/native/jnilib/linux/Makefile
+++ /dev/null
@@ -1,109 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# There exist several targets which are by default empty and which can be
-# used for execution of your targets. These targets are usually executed
-# before and after some main targets. They are:
-#
-# .build-pre: called before 'build' target
-# .build-post: called after 'build' target
-# .clean-pre: called before 'clean' target
-# .clean-post: called after 'clean' target
-# .clobber-pre: called before 'clobber' target
-# .clobber-post: called after 'clobber' target
-# .all-pre: called before 'all' target
-# .all-post: called after 'all' target
-# .help-pre: called before 'help' target
-# .help-post: called after 'help' target
-#
-# Targets beginning with '.' are not intended to be called on their own.
-#
-# Main targets can be executed directly, and they are:
-#
-# build build a specific configuration
-# clean remove built files from a configuration
-# clobber remove all built files
-# all build all configurations
-# help print help mesage
-#
-# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
-# .help-impl are implemented in nbproject/makefile-impl.mk.
-#
-
-# Environment
-MKDIR=mkdir
-CP=cp
-CCADMIN=CCadmin
-RANLIB=ranlib
-
-
-# build
-build: .build-pre .build-impl .build-post
-
-.build-pre:
-# Add your pre 'build' code here...
-
-.build-post:
-# Add your post 'build' code here...
-
-
-# clean
-clean: .clean-pre .clean-impl .clean-post
-
-.clean-pre:
-# Add your pre 'clean' code here...
-
-.clean-post:
-# Add your post 'clean' code here...
-
-
-# clobber
-clobber: .clobber-pre .clobber-impl .clobber-post
-
-.clobber-pre:
-# Add your pre 'clobber' code here...
-
-.clobber-post:
-# Add your post 'clobber' code here...
-
-
-# all
-all: .all-pre .all-impl .all-post
-
-.all-pre:
-# Add your pre 'all' code here...
-
-.all-post:
-# Add your post 'all' code here...
-
-
-# help
-help: .help-pre .help-impl .help-post
-
-.help-pre:
-# Add your pre 'help' code here...
-
-.help-post:
-# Add your post 'help' code here...
-
-
-
-# include project implementation makefile
-include nbproject/Makefile-impl.mk
diff --git a/nbi/engine/native/jnilib/linux/nbproject/configurations.xml b/nbi/engine/native/jnilib/linux/nbproject/configurations.xml
deleted file mode 100644
index 9e8e8b1c983b..000000000000
--- a/nbi/engine/native/jnilib/linux/nbproject/configurations.xml
+++ /dev/null
@@ -1,183 +0,0 @@
-
-
-
-
-
-
- ../.common/src/CommonUtils.c
- ../.unix/src/jni_UnixNativeUtils.c
-
-
- ../.common/src/CommonUtils.h
- ../.unix/src/jni_UnixNativeUtils.h
-
-
-
-
- Makefile
-
-
- Makefile
- 0
-
-
-
- GNU
- true
- true
- false
- 2
-
-
-
- 0
- true
-
- /usr/java/include
- /usr/java/include/linux
-
- -shared -m32 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-
-
- 0
- true
-
- /usr/java/include
- /usr/java/include/linux
-
- -shared -m32 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-
-
-
- true
-
-
-
-
- -
- 0
-
- -
- 3
-
- -
- 0
-
- -
- 3
-
-
-
-
- GNU
- true
- true
- false
- 2
-
-
-
- 5
-
-
- 5
-
-
- 5
-
-
-
-
-
-
- -
- 0
-
- -
- 3
-
- -
- 0
-
- -
- 3
-
-
-
-
- GNU
- true
- true
- false
- 2
-
-
-
- 0
- true
- true
-
- /usr/java/include
- /usr/java/include/linux
-
- -shared -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-
-
- 0
- true
- true
-
- /usr/java/include
- /usr/java/include/linux
-
- -shared -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-
-
-
- true
-
-
-
-
- -
- 0
-
- -
- 3
-
- -
- 0
-
- -
- 3
-
-
-
-
diff --git a/nbi/engine/native/jnilib/linux/nbproject/project.properties b/nbi/engine/native/jnilib/linux/nbproject/project.properties
deleted file mode 100644
index 3807b675d79a..000000000000
--- a/nbi/engine/native/jnilib/linux/nbproject/project.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
diff --git a/nbi/engine/native/jnilib/linux/nbproject/project.xml b/nbi/engine/native/jnilib/linux/nbproject/project.xml
deleted file mode 100644
index 4e61d3b4e2b5..000000000000
--- a/nbi/engine/native/jnilib/linux/nbproject/project.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
- org.netbeans.modules.cnd.makeproject
-
-
- NBI Native Library: Linux
- 0
-
-
-
diff --git a/nbi/engine/native/jnilib/macosx/Makefile b/nbi/engine/native/jnilib/macosx/Makefile
deleted file mode 100644
index 516847d04159..000000000000
--- a/nbi/engine/native/jnilib/macosx/Makefile
+++ /dev/null
@@ -1,109 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# There exist several targets which are by default empty and which can be
-# used for execution of your targets. These targets are usually executed
-# before and after some main targets. They are:
-#
-# .build-pre: called before 'build' target
-# .build-post: called after 'build' target
-# .clean-pre: called before 'clean' target
-# .clean-post: called after 'clean' target
-# .clobber-pre: called before 'clobber' target
-# .clobber-post: called after 'clobber' target
-# .all-pre: called before 'all' target
-# .all-post: called after 'all' target
-# .help-pre: called before 'help' target
-# .help-post: called after 'help' target
-#
-# Targets beginning with '.' are not intended to be called on their own.
-#
-# Main targets can be executed directly, and they are:
-#
-# build build a specific configuration
-# clean remove built files from a configuration
-# clobber remove all built files
-# all build all configurations
-# help print help mesage
-#
-# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
-# .help-impl are implemented in nbproject/makefile-impl.mk.
-#
-
-# Environment
-MKDIR=mkdir
-CP=cp
-CCADMIN=CCadmin
-RANLIB=ranlib
-
-
-# build
-build: .build-pre .build-impl .build-post
-
-.build-pre:
-# Add your pre 'build' code here...
-
-.build-post:
-# Add your post 'build' code here...
-
-
-# clean
-clean: .clean-pre .clean-impl .clean-post
-
-.clean-pre:
-# Add your pre 'clean' code here...
-
-.clean-post:
-# Add your post 'clean' code here...
-
-
-# clobber
-clobber: .clobber-pre .clobber-impl .clobber-post
-
-.clobber-pre:
-# Add your pre 'clobber' code here...
-
-.clobber-post:
-# Add your post 'clobber' code here...
-
-
-# all
-all: .all-pre .all-impl .all-post
-
-.all-pre:
-# Add your pre 'all' code here...
-
-.all-post:
-# Add your post 'all' code here...
-
-
-# help
-help: .help-pre .help-impl .help-post
-
-.help-pre:
-# Add your pre 'help' code here...
-
-.help-post:
-# Add your post 'help' code here...
-
-
-
-# include project implementation makefile
-include nbproject/Makefile-impl.mk
diff --git a/nbi/engine/native/jnilib/macosx/nbproject/configurations.xml b/nbi/engine/native/jnilib/macosx/nbproject/configurations.xml
deleted file mode 100644
index 50ab41e33df8..000000000000
--- a/nbi/engine/native/jnilib/macosx/nbproject/configurations.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
-
- ../.common/src/CommonUtils.h
- ../.unix/src/jni_UnixNativeUtils.h
-
-
-
-
- ../.common/src/CommonUtils.c
- ../.unix/src/jni_UnixNativeUtils.c
-
-
- Makefile
-
-
- UTF-8
- Makefile
-
-
-
- GNU|GNU
- 4
-
-
-
- 0
- true
-
- /Library/Java/Home/include
-
- -arch i386 -arch ppc -arch ppc64 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -dynamiclib
-
-
- 0
- true
-
- /Library/Java/Home/include
-
- -arch i386 -arch ppc -arch ppc64 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -dynamiclib
-
-
-
-
-
- -Wl,-syslibroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -arch ppc64 -arch x86_64
-
-
- -
- 0
-
- -
- 3
-
- -
- 0
-
- -
- 3
-
-
-
-
- GNU|GNU
- 4
-
-
-
- 5
-
-
- 5
-
-
- 5
-
-
-
-
-
-
- -
- 0
-
- -
- 3
-
- -
- 0
-
- -
- 3
-
-
-
-
diff --git a/nbi/engine/native/jnilib/macosx/nbproject/project.properties b/nbi/engine/native/jnilib/macosx/nbproject/project.properties
deleted file mode 100644
index 3807b675d79a..000000000000
--- a/nbi/engine/native/jnilib/macosx/nbproject/project.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
diff --git a/nbi/engine/native/jnilib/macosx/nbproject/project.xml b/nbi/engine/native/jnilib/macosx/nbproject/project.xml
deleted file mode 100644
index 1825876f3cfd..000000000000
--- a/nbi/engine/native/jnilib/macosx/nbproject/project.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
- org.netbeans.modules.cnd.makeproject
-
-
- NBI Native Library: MacOS X
- 0
-
-
-
-
diff --git a/nbi/engine/native/jnilib/solaris-sparc/Makefile b/nbi/engine/native/jnilib/solaris-sparc/Makefile
deleted file mode 100644
index 516847d04159..000000000000
--- a/nbi/engine/native/jnilib/solaris-sparc/Makefile
+++ /dev/null
@@ -1,109 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# There exist several targets which are by default empty and which can be
-# used for execution of your targets. These targets are usually executed
-# before and after some main targets. They are:
-#
-# .build-pre: called before 'build' target
-# .build-post: called after 'build' target
-# .clean-pre: called before 'clean' target
-# .clean-post: called after 'clean' target
-# .clobber-pre: called before 'clobber' target
-# .clobber-post: called after 'clobber' target
-# .all-pre: called before 'all' target
-# .all-post: called after 'all' target
-# .help-pre: called before 'help' target
-# .help-post: called after 'help' target
-#
-# Targets beginning with '.' are not intended to be called on their own.
-#
-# Main targets can be executed directly, and they are:
-#
-# build build a specific configuration
-# clean remove built files from a configuration
-# clobber remove all built files
-# all build all configurations
-# help print help mesage
-#
-# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
-# .help-impl are implemented in nbproject/makefile-impl.mk.
-#
-
-# Environment
-MKDIR=mkdir
-CP=cp
-CCADMIN=CCadmin
-RANLIB=ranlib
-
-
-# build
-build: .build-pre .build-impl .build-post
-
-.build-pre:
-# Add your pre 'build' code here...
-
-.build-post:
-# Add your post 'build' code here...
-
-
-# clean
-clean: .clean-pre .clean-impl .clean-post
-
-.clean-pre:
-# Add your pre 'clean' code here...
-
-.clean-post:
-# Add your post 'clean' code here...
-
-
-# clobber
-clobber: .clobber-pre .clobber-impl .clobber-post
-
-.clobber-pre:
-# Add your pre 'clobber' code here...
-
-.clobber-post:
-# Add your post 'clobber' code here...
-
-
-# all
-all: .all-pre .all-impl .all-post
-
-.all-pre:
-# Add your pre 'all' code here...
-
-.all-post:
-# Add your post 'all' code here...
-
-
-# help
-help: .help-pre .help-impl .help-post
-
-.help-pre:
-# Add your pre 'help' code here...
-
-.help-post:
-# Add your post 'help' code here...
-
-
-
-# include project implementation makefile
-include nbproject/Makefile-impl.mk
diff --git a/nbi/engine/native/jnilib/solaris-sparc/nbproject/configurations.xml b/nbi/engine/native/jnilib/solaris-sparc/nbproject/configurations.xml
deleted file mode 100644
index 98c3b5ce6c33..000000000000
--- a/nbi/engine/native/jnilib/solaris-sparc/nbproject/configurations.xml
+++ /dev/null
@@ -1,283 +0,0 @@
-
-
-
-
-
-
- ../.common/src/CommonUtils.c
- ../.unix/src/jni_UnixNativeUtils.c
-
-
- ../.common/src/CommonUtils.h
- ../.unix/src/jni_UnixNativeUtils.h
-
-
-
-
- Makefile
-
-
- Makefile
- 0
-
-
-
- Sun12
- true
- true
- false
- 0
-
-
-
- 0
- true
-
- /usr/java/include
- /usr/java/include/solaris
-
- -m32 -shared -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -xO2 -Xa
-
-
- 0
- true
-
- /usr/java/include
- /usr/java/include/solaris
-
- -m32 -shared -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -xO2 -Xa
-
-
-
- true
- false
-
-
-
-
- -
- 0
-
- -
- 3
-
- -
- 0
-
- -
- 3
-
-
-
-
- GNU
- true
- true
- false
- 0
-
-
-
- 5
-
-
- 5
-
-
- 5
-
-
-
-
-
-
- -
- 0
-
- -
- 3
-
- -
- 0
-
- -
- 3
-
-
-
-
- Sun12
- true
- true
- false
- 0
-
-
-
- 0
- true
- true
-
- /usr/java/include
- /usr/java/include/solaris
-
- -fPIC -shared -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -xO2 -Xa
-
-
- 0
- true
- true
-
- /usr/java/include
- /usr/java/include/solaris
-
- -fPIC -shared -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -xO2 -Xa
-
-
-
- true
- false
-
-
-
-
- -
- 0
-
- -
- 3
-
- -
- 0
-
- -
- 3
-
-
-
-
- GNU
- true
- true
- false
- 0
-
-
-
- 0
- true
-
- /usr/java/include
- /usr/java/include/solaris
-
- -m32 -fPIC -shared -static-libgcc -mimpure-text -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-
-
- 0
- true
-
- /usr/java/include
- /usr/java/include/solaris
-
- -m32 -fPIC -shared -static-libgcc -mimpure-text -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-
-
-
- true
- false
-
-
-
-
- -
- 0
-
- -
- 3
-
- -
- 0
-
- -
- 3
-
-
-
-
- GNU
- true
- true
- false
- 0
-
-
-
- 0
- true
- true
-
- /usr/java/include
- /usr/java/include/solaris
-
- -fPIC -shared -static-libgcc -mimpure-text -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-
-
- 0
- true
- true
-
- /usr/java/include
- /usr/java/include/solaris
-
- -fPIC -shared -static-libgcc -mimpure-text -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-
-
-
- true
- false
-
-
-
-
- -
- 0
-
- -
- 3
-
- -
- 0
-
- -
- 3
-
-
-
-
diff --git a/nbi/engine/native/jnilib/solaris-sparc/nbproject/project.properties b/nbi/engine/native/jnilib/solaris-sparc/nbproject/project.properties
deleted file mode 100644
index 3807b675d79a..000000000000
--- a/nbi/engine/native/jnilib/solaris-sparc/nbproject/project.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
diff --git a/nbi/engine/native/jnilib/solaris-sparc/nbproject/project.xml b/nbi/engine/native/jnilib/solaris-sparc/nbproject/project.xml
deleted file mode 100644
index c6febe0b0561..000000000000
--- a/nbi/engine/native/jnilib/solaris-sparc/nbproject/project.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
- org.netbeans.modules.cnd.makeproject
-
-
- NBI Native Library: Solaris Sparc
- 0
-
-
-
diff --git a/nbi/engine/native/jnilib/solaris-x86/Makefile b/nbi/engine/native/jnilib/solaris-x86/Makefile
deleted file mode 100644
index 516847d04159..000000000000
--- a/nbi/engine/native/jnilib/solaris-x86/Makefile
+++ /dev/null
@@ -1,109 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# There exist several targets which are by default empty and which can be
-# used for execution of your targets. These targets are usually executed
-# before and after some main targets. They are:
-#
-# .build-pre: called before 'build' target
-# .build-post: called after 'build' target
-# .clean-pre: called before 'clean' target
-# .clean-post: called after 'clean' target
-# .clobber-pre: called before 'clobber' target
-# .clobber-post: called after 'clobber' target
-# .all-pre: called before 'all' target
-# .all-post: called after 'all' target
-# .help-pre: called before 'help' target
-# .help-post: called after 'help' target
-#
-# Targets beginning with '.' are not intended to be called on their own.
-#
-# Main targets can be executed directly, and they are:
-#
-# build build a specific configuration
-# clean remove built files from a configuration
-# clobber remove all built files
-# all build all configurations
-# help print help mesage
-#
-# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
-# .help-impl are implemented in nbproject/makefile-impl.mk.
-#
-
-# Environment
-MKDIR=mkdir
-CP=cp
-CCADMIN=CCadmin
-RANLIB=ranlib
-
-
-# build
-build: .build-pre .build-impl .build-post
-
-.build-pre:
-# Add your pre 'build' code here...
-
-.build-post:
-# Add your post 'build' code here...
-
-
-# clean
-clean: .clean-pre .clean-impl .clean-post
-
-.clean-pre:
-# Add your pre 'clean' code here...
-
-.clean-post:
-# Add your post 'clean' code here...
-
-
-# clobber
-clobber: .clobber-pre .clobber-impl .clobber-post
-
-.clobber-pre:
-# Add your pre 'clobber' code here...
-
-.clobber-post:
-# Add your post 'clobber' code here...
-
-
-# all
-all: .all-pre .all-impl .all-post
-
-.all-pre:
-# Add your pre 'all' code here...
-
-.all-post:
-# Add your post 'all' code here...
-
-
-# help
-help: .help-pre .help-impl .help-post
-
-.help-pre:
-# Add your pre 'help' code here...
-
-.help-post:
-# Add your post 'help' code here...
-
-
-
-# include project implementation makefile
-include nbproject/Makefile-impl.mk
diff --git a/nbi/engine/native/jnilib/solaris-x86/nbproject/configurations.xml b/nbi/engine/native/jnilib/solaris-x86/nbproject/configurations.xml
deleted file mode 100644
index 18c1468d911f..000000000000
--- a/nbi/engine/native/jnilib/solaris-x86/nbproject/configurations.xml
+++ /dev/null
@@ -1,283 +0,0 @@
-
-
-
-
-
-
- ../.common/src/CommonUtils.c
- ../.unix/src/jni_UnixNativeUtils.c
-
-
- ../.common/src/CommonUtils.h
- ../.unix/src/jni_UnixNativeUtils.h
-
-
-
-
- Makefile
-
-
- Makefile
- 0
-
-
-
- Sun12
- true
- true
- false
- 1
-
-
-
- 0
- true
-
- /usr/java/include
- /usr/java/include/solaris
-
- -m32 -fPIC -shared -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -xO2 -Xa
-
-
- 0
- true
-
- /usr/java/include
- /usr/java/include/solaris
-
- -m32 -fPIC -shared -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -xO2 -Xa
-
-
-
- true
- false
-
-
-
-
- -
- 0
-
- -
- 3
-
- -
- 0
-
- -
- 3
-
-
-
-
- GNU
- true
- true
- false
- 0
-
-
-
- 5
-
-
- 5
-
-
- 5
-
-
-
-
-
-
- -
- 0
-
- -
- 3
-
- -
- 0
-
- -
- 3
-
-
-
-
- Sun12
- true
- true
- false
- 1
-
-
-
- 0
- true
- true
-
- /usr/java/include
- /usr/java/include/solaris
-
- -KPIC -shared -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -xO2 -Xa
-
-
- 0
- true
- true
-
- /usr/java/include
- /usr/java/include/solaris
-
- -KPIC -shared -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -xO2 -Xa
-
-
-
- true
- false
-
-
-
-
- -
- 0
-
- -
- 3
-
- -
- 0
-
- -
- 3
-
-
-
-
- GNU
- true
- true
- false
- 1
-
-
-
- 0
- true
-
- /usr/java/include
- /usr/java/include/solaris
-
- -m32 -fPIC -static-libgcc -shared -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-
-
- 0
- true
-
- /usr/java/include
- /usr/java/include/solaris
-
- -m32 -fPIC -static-libgcc -shared -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-
-
-
- true
- false
-
-
-
-
- -
- 0
-
- -
- 3
-
- -
- 0
-
- -
- 3
-
-
-
-
- GNU
- true
- true
- false
- 1
-
-
-
- 0
- true
- true
-
- /usr/java/include
- /usr/java/include/solaris
-
- -fPIC -static-libgcc -shared -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-
-
- 0
- true
- true
-
- /usr/java/include
- /usr/java/include/solaris
-
- -fPIC -static-libgcc -shared -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-
-
-
- true
- false
-
-
-
-
- -
- 0
-
- -
- 3
-
- -
- 0
-
- -
- 3
-
-
-
-
diff --git a/nbi/engine/native/jnilib/solaris-x86/nbproject/project.properties b/nbi/engine/native/jnilib/solaris-x86/nbproject/project.properties
deleted file mode 100644
index 3807b675d79a..000000000000
--- a/nbi/engine/native/jnilib/solaris-x86/nbproject/project.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
diff --git a/nbi/engine/native/jnilib/solaris-x86/nbproject/project.xml b/nbi/engine/native/jnilib/solaris-x86/nbproject/project.xml
deleted file mode 100644
index fdb447727778..000000000000
--- a/nbi/engine/native/jnilib/solaris-x86/nbproject/project.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
- org.netbeans.modules.cnd.makeproject
-
-
- NBI Native Library: Solaris X86
- 0
-
-
-
diff --git a/nbi/engine/native/jnilib/windows/Makefile b/nbi/engine/native/jnilib/windows/Makefile
deleted file mode 100644
index 516847d04159..000000000000
--- a/nbi/engine/native/jnilib/windows/Makefile
+++ /dev/null
@@ -1,109 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# There exist several targets which are by default empty and which can be
-# used for execution of your targets. These targets are usually executed
-# before and after some main targets. They are:
-#
-# .build-pre: called before 'build' target
-# .build-post: called after 'build' target
-# .clean-pre: called before 'clean' target
-# .clean-post: called after 'clean' target
-# .clobber-pre: called before 'clobber' target
-# .clobber-post: called after 'clobber' target
-# .all-pre: called before 'all' target
-# .all-post: called after 'all' target
-# .help-pre: called before 'help' target
-# .help-post: called after 'help' target
-#
-# Targets beginning with '.' are not intended to be called on their own.
-#
-# Main targets can be executed directly, and they are:
-#
-# build build a specific configuration
-# clean remove built files from a configuration
-# clobber remove all built files
-# all build all configurations
-# help print help mesage
-#
-# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
-# .help-impl are implemented in nbproject/makefile-impl.mk.
-#
-
-# Environment
-MKDIR=mkdir
-CP=cp
-CCADMIN=CCadmin
-RANLIB=ranlib
-
-
-# build
-build: .build-pre .build-impl .build-post
-
-.build-pre:
-# Add your pre 'build' code here...
-
-.build-post:
-# Add your post 'build' code here...
-
-
-# clean
-clean: .clean-pre .clean-impl .clean-post
-
-.clean-pre:
-# Add your pre 'clean' code here...
-
-.clean-post:
-# Add your post 'clean' code here...
-
-
-# clobber
-clobber: .clobber-pre .clobber-impl .clobber-post
-
-.clobber-pre:
-# Add your pre 'clobber' code here...
-
-.clobber-post:
-# Add your post 'clobber' code here...
-
-
-# all
-all: .all-pre .all-impl .all-post
-
-.all-pre:
-# Add your pre 'all' code here...
-
-.all-post:
-# Add your post 'all' code here...
-
-
-# help
-help: .help-pre .help-impl .help-post
-
-.help-pre:
-# Add your pre 'help' code here...
-
-.help-post:
-# Add your post 'help' code here...
-
-
-
-# include project implementation makefile
-include nbproject/Makefile-impl.mk
diff --git a/nbi/engine/native/jnilib/windows/Makefile-vc b/nbi/engine/native/jnilib/windows/Makefile-vc
deleted file mode 100644
index 131aee1f0e10..000000000000
--- a/nbi/engine/native/jnilib/windows/Makefile-vc
+++ /dev/null
@@ -1,76 +0,0 @@
-#
-#
-
-
-!include <$(PLATFORM_SDK)/include/win32.mak>
-
-# define the compiler and linker for all the platforms
-CC32="$(VC_2005)\Bin\cl.exe"
-L32="$(VC_2005)\Bin\link.exe"
-
-CC32_OPTS=/O1 /Os /I "$(VC_2005)\include" /I "$(PLATFORM_SDK)\Include" /I "$(JAVA_HOME)\include" /I "$(JAVA_HOME)\include\win32" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "NBIJNILIBRARY_EXPORTS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_STATIC_CPPLIB" /D "_LITTLE_ENDIAN" /D "_WINDLL" /FD /MT /Fo".\build\32bit\\" /W3 /WX /c /Wp64 /Gd /TC
-L32_OPTS=/OUT:".\dist\windows-x86.dll" /INCREMENTAL:NO /LIBPATH:"$(PLATFORM_SDK)\Lib" /LIBPATH:"$(VC_2005)\lib" /DLL /MANIFEST:NO /IGNOREIDL /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /MACHINE:X86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
-
-
-CC64="$(PLATFORM_SDK)\Bin\win64\x86\AMD64\cl.exe"
-L64="$(PLATFORM_SDK)\Bin\win64\x86\AMD64\link.exe"
-
-CC64_OPTS=/O1 /Os /I "$(VC_2005)\include" /I "$(PLATFORM_SDK)\Include" /I "$(PLATFORM_SDK)\Include\win64\crt\amd64" /I "$(JAVA_HOME)\include" /I "$(JAVA_HOME)\include\win32" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "NBIJNILIBRARY_EXPORTS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_STATIC_CPPLIB" /D "_LITTLE_ENDIAN" /D "_WINDLL" /FD /MT /Fo".\build\64bit\\" /W3 /c /Wp64 /Gd /TC
-L64_OPTS=/OUT:".\dist\windows-x64.dll" /INCREMENTAL:NO /LIBPATH:"$(PLATFORM_SDK)\Lib\amd64" /LIBPATH:"$(VC_2005)\lib" /DLL /MANIFEST:NO /IGNOREIDL /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /MACHINE:AMD64 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib bufferoverflowU.lib
-
-CCIA64="$(PLATFORM_SDK)\Bin\win64\cl.exe"
-LIA64="$(PLATFORM_SDK)\Bin\win64\link.exe"
-
-CCIA64_OPTS=/O1 /Os /I "$(VC_2005)\include" /I "$(PLATFORM_SDK)\Include" /I "$(PLATFORM_SDK)\Include\win64\crt\amd64" /I "$(JAVA_HOME)\include" /I "$(JAVA_HOME)\include\win32" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "NBIJNILIBRARY_EXPORTS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_STATIC_CPPLIB" /D "_LITTLE_ENDIAN" /D "_WINDLL" /FD /MT /Fo".\build\ia64\\" /W3 /c /Wp64 /Gd /TC
-LIA64_OPTS=/OUT:".\dist\windows-ia64.dll" /INCREMENTAL:NO /LIBPATH:"$(PLATFORM_SDK)\Lib\ia64" /LIBPATH:"$(VC_2005)\lib" /DLL /MANIFEST:NO /IGNOREIDL /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /MACHINE:IA64 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib bufferoverflowU.lib
-
-
-all: init build-32 build-64 build-ia64
-
-init:
- - md .\build\32bit
- - md .\build\64bit
- - md .\build\ia64
- - md .\dist
-
- del /Q /S build
-
- del /Q .\dist\windows-x86.*
- del /Q .\dist\windows-x64.*
- del /Q .\dist\windows-ia64.*
-
-build-32:
- Set CPU=i386
- Set Lib=%PLATFORM_SDK%\Lib;%Lib%
- Set Include=%PLATFORM_SDK%\Include;%Include%
- Set Path=%PLATFORM_SDK%\Bin;%PLATFORM_SDK%\Bin\WinNT;%VC_2005_PATH%;%path%
- Set APPVER=5.01
- Set TARGETOS=WINNT
-
- $(CC32) $(CC32_OPTS) .\src\WindowsUtils.c .\src\jni_WindowsRegistry.c .\src\jni_WindowsNativeUtils.c .\..\.common\src\CommonUtils.c
- $(L32) $(L32_OPTS) ".\build\32bit\WindowsUtils.obj" ".\build\32bit\jni_WindowsRegistry.obj" ".\build\32bit\jni_WindowsNativeUtils.obj" ".\build\32bit\CommonUtils.obj"
-
-
-build-64:
- Set CPU=AMD64
- Set Lib=%PLATFORM_SDK%\Lib\AMD64;%PLATFORM_SDK%\Lib\AMD64\atlmfc;
- Set Include=%PLATFORM_SDK%\Include;%PLATFORM_SDK%\Include\crt;%PLATFORM_SDK%\Include\crt\sys;%PLATFORM_SDK%\Include\mfc;%PLATFORM_SDK%\Include\atl
- Set Path=%PLATFORM_SDK%\Bin\Win64\x86\AMD64;%PLATFORM_SDK%\Bin;%PLATFORM_SDK%\Bin\WinNT;%path%
- Set APPVER=5.02
- Set TARGETOS=WINNT
-
- $(CC64) $(CC64_OPTS) .\src\WindowsUtils.c .\src\jni_WindowsRegistry.c .\src\jni_WindowsNativeUtils.c .\..\.common\src\CommonUtils.c
- $(L64) $(L64_OPTS) ".\build\64bit\WindowsUtils.obj" ".\build\64bit\jni_WindowsRegistry.obj" ".\build\64bit\jni_WindowsNativeUtils.obj" ".\build\64bit\CommonUtils.obj"
-
-
-build-ia64:
- Set CPU=IA64
- Set Lib=%PLATFORM_SDK%\Lib\IA64;%PLATFORM_SDK%\Lib\IA64\atlmfc;
- Set Include=%PLATFORM_SDK%\Include;%PLATFORM_SDK%\Include\crt;%PLATFORM_SDK%\Include\crt\sys;%PLATFORM_SDK%\Include\mfc;%PLATFORM_SDK%\Include\atl
- Set Path=%PLATFORM_SDK%\Bin\Win64;%PLATFORM_SDK%\Bin;%PLATFORM_SDK%\Bin\WinNT;%path%
- Set APPVER=5.02
- Set TARGETOS=WINNT
-
- $(CCIA64) $(CCIA64_OPTS) .\src\WindowsUtils.c .\src\jni_WindowsRegistry.c .\src\jni_WindowsNativeUtils.c .\..\.common\src\CommonUtils.c
- $(LIA64) $(LIA64_OPTS) ".\build\ia64\WindowsUtils.obj" ".\build\ia64\jni_WindowsRegistry.obj" ".\build\ia64\jni_WindowsNativeUtils.obj" ".\build\ia64\CommonUtils.obj"
-
diff --git a/nbi/engine/native/jnilib/windows/Makefile-vc-wo-crt b/nbi/engine/native/jnilib/windows/Makefile-vc-wo-crt
deleted file mode 100644
index e344b286fbdb..000000000000
--- a/nbi/engine/native/jnilib/windows/Makefile-vc-wo-crt
+++ /dev/null
@@ -1,79 +0,0 @@
-#
-#
-
-
-!include <$(PLATFORM_SDK)/include/win32.mak>
-
-# define the compiler and linker for all the platforms
-CC32="$(VC_2005)\Bin\cl.exe"
-L32="$(VC_2005)\Bin\link.exe"
-
-L32_LIBS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
-CC32_OPTS=/GS- /O1 /Os /I "$(VC_2005)\include" /I "$(PLATFORM_SDK)\Include" /I "$(JAVA_HOME)\include" /I "$(JAVA_HOME)\include\win32" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "NBIJNILIBRARY_EXPORTS" /D "_LITTLE_ENDIAN" /D "_WINDLL" /FD /MD /Fo".\build\32bit\\" /W3 /WX /c /Wp64 /Gd /TC
-L32_OPTS=/NOENTRY /NODEFAULTLIB /OUT:".\dist\windows-x86.dll" /INCREMENTAL:NO /LIBPATH:"$(PLATFORM_SDK)\Lib" /LIBPATH:"$(VC_2005)\lib" /DLL /MANIFEST:NO /IGNOREIDL /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /MACHINE:X86 $(L32_LIBS)
-
-
-CC64="$(PLATFORM_SDK)\Bin\win64\x86\AMD64\cl.exe"
-L64="$(PLATFORM_SDK)\Bin\win64\x86\AMD64\link.exe"
-
-L64_LIBS=$(L32_LIBS)
-CC64_OPTS=/O1 /Os /GS- /I "$(VC_2005)\include" /I "$(PLATFORM_SDK)\Include" /I "$(PLATFORM_SDK)\Include\win64\crt\amd64" /I "$(JAVA_HOME)\include" /I "$(JAVA_HOME)\include\win32" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "NBIJNILIBRARY_EXPORTS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_LITTLE_ENDIAN" /D "_WINDLL" /FD /MD /Fo".\build\64bit\\" /W3 /c /Wp64 /Gd /TC
-L64_OPTS=/NOENTRY /NODEFAULTLIB /OUT:".\dist\windows-x64.dll" /INCREMENTAL:NO /LIBPATH:"$(PLATFORM_SDK)\Lib\amd64" /LIBPATH:"$(VC_2005)\lib" /DLL /MANIFEST:NO /IGNOREIDL /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /MACHINE:AMD64 $(L64_LIBS)
-
-CCIA64="$(PLATFORM_SDK)\Bin\win64\cl.exe"
-LIA64="$(PLATFORM_SDK)\Bin\win64\link.exe"
-
-LIA64_LIBS=$(L32_LIBS)
-CCIA64_OPTS=/O1 /Os /GS- /I "$(VC_2005)\include" /I "$(PLATFORM_SDK)\Include" /I "$(PLATFORM_SDK)\Include\win64\crt\amd64" /I "$(JAVA_HOME)\include" /I "$(JAVA_HOME)\include\win32" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "NBIJNILIBRARY_EXPORTS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_LITTLE_ENDIAN" /D "_WINDLL" /FD /MD /Fo".\build\ia64\\" /W3 /c /Wp64 /Gd /TC
-LIA64_OPTS=/NOENTRY /NODEFAULTLIB /OUT:".\dist\windows-ia64.dll" /INCREMENTAL:NO /LIBPATH:"$(PLATFORM_SDK)\Lib\ia64" /LIBPATH:"$(VC_2005)\lib" /DLL /MANIFEST:NO /IGNOREIDL /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /MACHINE:IA64 $(LIA64_LIBS)
-
-
-all: init build-32 build-64 build-ia64
-
-init:
- - md .\build\32bit
- - md .\build\64bit
- - md .\build\ia64
- - md .\dist
-
- del /Q /S build
-
- del /Q .\dist\windows-x86.*
- del /Q .\dist\windows-x64.*
- del /Q .\dist\windows-ia64.*
-
-build-32:
- Set CPU=i386
- Set Lib=%PLATFORM_SDK%\Lib;%Lib%
- Set Include=%PLATFORM_SDK%\Include;%Include%
- Set Path=%PLATFORM_SDK%\Bin;%PLATFORM_SDK%\Bin\WinNT;%VC_2005_PATH%;%path%
- Set APPVER=5.01
- Set TARGETOS=WINNT
-
- $(CC32) $(CC32_OPTS) .\src\WindowsUtils.c .\src\jni_WindowsRegistry.c .\src\jni_WindowsNativeUtils.c .\..\.common\src\CommonUtils.c
- $(L32) $(L32_OPTS) ".\build\32bit\WindowsUtils.obj" ".\build\32bit\jni_WindowsRegistry.obj" ".\build\32bit\jni_WindowsNativeUtils.obj" ".\build\32bit\CommonUtils.obj"
-
-
-build-64:
- Set CPU=AMD64
- Set Lib=%PLATFORM_SDK%\Lib\AMD64;%PLATFORM_SDK%\Lib\AMD64\atlmfc;
- Set Include=%PLATFORM_SDK%\Include;%PLATFORM_SDK%\Include\crt;%PLATFORM_SDK%\Include\crt\sys;%PLATFORM_SDK%\Include\mfc;%PLATFORM_SDK%\Include\atl
- Set Path=%PLATFORM_SDK%\Bin\Win64\x86\AMD64;%PLATFORM_SDK%\Bin;%PLATFORM_SDK%\Bin\WinNT;%path%
- Set APPVER=5.02
- Set TARGETOS=WINNT
-
- $(CC64) $(CC64_OPTS) .\src\WindowsUtils.c .\src\jni_WindowsRegistry.c .\src\jni_WindowsNativeUtils.c .\..\.common\src\CommonUtils.c
- $(L64) $(L64_OPTS) ".\build\64bit\WindowsUtils.obj" ".\build\64bit\jni_WindowsRegistry.obj" ".\build\64bit\jni_WindowsNativeUtils.obj" ".\build\64bit\CommonUtils.obj"
-
-
-build-ia64:
- Set CPU=IA64
- Set Lib=%PLATFORM_SDK%\Lib\IA64;%PLATFORM_SDK%\Lib\IA64\atlmfc;
- Set Include=%PLATFORM_SDK%\Include;%PLATFORM_SDK%\Include\crt;%PLATFORM_SDK%\Include\crt\sys;%PLATFORM_SDK%\Include\mfc;%PLATFORM_SDK%\Include\atl
- Set Path=%PLATFORM_SDK%\Bin\Win64;%PLATFORM_SDK%\Bin;%PLATFORM_SDK%\Bin\WinNT;%path%
- Set APPVER=5.02
- Set TARGETOS=WINNT
-
- $(CCIA64) $(CCIA64_OPTS) .\src\WindowsUtils.c .\src\jni_WindowsRegistry.c .\src\jni_WindowsNativeUtils.c .\..\.common\src\CommonUtils.c
- $(LIA64) $(LIA64_OPTS) ".\build\ia64\WindowsUtils.obj" ".\build\ia64\jni_WindowsRegistry.obj" ".\build\ia64\jni_WindowsNativeUtils.obj" ".\build\ia64\CommonUtils.obj"
-
diff --git a/nbi/engine/native/jnilib/windows/nbproject/configurations.xml b/nbi/engine/native/jnilib/windows/nbproject/configurations.xml
deleted file mode 100644
index b7731b5f037a..000000000000
--- a/nbi/engine/native/jnilib/windows/nbproject/configurations.xml
+++ /dev/null
@@ -1,179 +0,0 @@
-
-
-
-
-
-
- ../.common/src/CommonUtils.c
- src/jni_WindowsNativeUtils.c
- src/jni_WindowsRegistry.c
- src/WindowsUtils.c
-
-
- ../.common/src/CommonUtils.h
- src/jni_WindowsNativeUtils.h
- src/jni_WindowsRegistry.h
- src/WindowsUtils.h
-
-
-
-
- Makefile
-
-
- Makefile
- 0
-
-
-
- Cygwin
- true
- true
- false
- 3
-
-
-
- 0
- true
-
- /usr/java/include
- /usr/java/include/win32
-
- -mno-cygwin
-
-
- 0
- true
-
- /usr/java/include
- /usr/java/include\win32
-
- -mno-cygwin
-
-
-
- true
-
- -lole32
- -luuid
-
- -Wl,--add-stdcall-alias
-
-
- -
- 0
-
- -
- 3
-
- -
- 0
-
- -
- 3
-
- -
- 0
-
- -
- 3
-
- -
- 0
-
- -
- 3
-
-
-
-
- Cygwin
- true
- true
- false
- 3
-
-
-
- 0
- true
-
- /usr/java/include
- /usr/java/include/win32
-
- -mno-cygwin
-
-
- 0
- true
-
- /usr/java/include
- /usr/java/include\win32
-
- -mno-cygwin
-
-
-
- true
-
- -lole32
- -luuid
-
- -Wl,--add-stdcall-alias
-
-
- -
- 0
-
- -
- 3
-
- -
- 0
-
- -
- 3
-
- -
- 0
-
- -
- 3
-
- -
- 0
-
- -
- 3
-
-
-
-
diff --git a/nbi/engine/native/jnilib/windows/nbproject/project.properties b/nbi/engine/native/jnilib/windows/nbproject/project.properties
deleted file mode 100644
index 3807b675d79a..000000000000
--- a/nbi/engine/native/jnilib/windows/nbproject/project.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
diff --git a/nbi/engine/native/jnilib/windows/nbproject/project.xml b/nbi/engine/native/jnilib/windows/nbproject/project.xml
deleted file mode 100644
index 1aa64eba18a3..000000000000
--- a/nbi/engine/native/jnilib/windows/nbproject/project.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
- org.netbeans.modules.cnd.makeproject
-
-
- NBI Native Library: Windows
- 0
-
-
-
diff --git a/nbi/engine/native/jnilib/windows/src/WindowsUtils.c b/nbi/engine/native/jnilib/windows/src/WindowsUtils.c
deleted file mode 100644
index fe4972d35648..000000000000
--- a/nbi/engine/native/jnilib/windows/src/WindowsUtils.c
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "../../.common/src/CommonUtils.h"
-#include "WindowsUtils.h"
-#include "jni_WindowsRegistry.h"
-
-HKEY getHKEY(jint jSection) {
- switch (jSection) {
- case org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_CLASSES_ROOT:
- return HKEY_CLASSES_ROOT;
- case org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_CURRENT_USER:
- return HKEY_CURRENT_USER;
- case org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_LOCAL_MACHINE:
- return HKEY_LOCAL_MACHINE;
- case org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_USERS:
- return HKEY_USERS;
- case org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_CURRENT_CONFIG:
- return HKEY_CURRENT_CONFIG;
- case org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_DYN_DATA:
- return HKEY_DYN_DATA;
- case org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_PERFORMANCE_DATA:
- return HKEY_PERFORMANCE_DATA;
- default:
- return NULL;
- }
-}
-
-LONG getMode(jint jmode) {
- switch (jmode) {
- case org_netbeans_installer_utils_system_windows_WindowsRegistry_MODE_DEFAULT:
- return 0L;
- case org_netbeans_installer_utils_system_windows_WindowsRegistry_MODE_32BIT:
- return KEY_WOW64_32KEY;
- case org_netbeans_installer_utils_system_windows_WindowsRegistry_MODE_64BIT:
- return KEY_WOW64_64KEY;
- default:
- return 0L;
- }
-}
-
-
-int queryValue(int mode, HKEY section, const unsigned short* key, const unsigned short* name, DWORD* type, DWORD* size, byte** value, int expand) {
- int result = 1;
-
- HKEY hkey = 0;
- int tempType = 0;
- int tempSize = 0;
- byte* tempValue = NULL;
-
- if (RegOpenKeyExW(section, key, 0, KEY_QUERY_VALUE | mode, &hkey) == ERROR_SUCCESS) {
- if (RegQueryValueExW(hkey, name, NULL, (LPDWORD) &tempType, NULL, (LPDWORD) &tempSize) == ERROR_SUCCESS) {
- tempValue = (byte*) MALLOC(tempSize + 8);
-
- if (tempValue != NULL) {
- ZERO(tempValue, tempSize + 8);
-
- if (RegQueryValueExW(hkey, name, NULL, (LPDWORD) &tempType, tempValue, (LPDWORD) &tempSize) == ERROR_SUCCESS) {
- if (expand && (tempType == REG_EXPAND_SZ)) {
- int expandedSize = (int) WCSLEN((unsigned short*) tempValue) + 2;
- byte* expandedValue = (byte*) MALLOC(expandedSize * sizeof(wchar_t));
- int expandedCharsNumber = 0;
- ZERO(expandedValue, expandedSize);
- expandedCharsNumber = ExpandEnvironmentStringsW((unsigned short*) tempValue, (unsigned short*) expandedValue, tempSize);
- if (expandedCharsNumber > tempSize) {
- FREE(expandedValue);
- expandedValue = (byte*) MALLOC(expandedCharsNumber * sizeof(wchar_t));
- expandedCharsNumber = ExpandEnvironmentStringsW((unsigned short*) tempValue, (unsigned short*) expandedValue, expandedCharsNumber);
- }
-
- FREE(tempValue);
- tempValue = expandedValue;
- }
- } else {
- FREE(tempValue);
- result = 0;
- }
- }
- } else {
- result = 0;
- }
- } else {
- result = 0;
- }
-
- if (hkey != 0) {
- RegCloseKey(hkey);
- }
-
- if (type != NULL) {
- *type = tempType;
- }
- if (size != NULL) {
- *size = tempSize;
- }
- if ((value != NULL) && (tempValue != NULL)) {
- *value = tempValue;
- }
-
- return result;
-}
-
-int setValue(int mode, HKEY section, const unsigned short* key, const unsigned short* name, DWORD type, const byte* data, int size, int expand) {
- int result = 1;
-
- HKEY hkey = 0;
-
- if (RegOpenKeyExW(section, key, 0, KEY_SET_VALUE | mode, &hkey) == ERROR_SUCCESS) {
- if (!(RegSetValueExW(hkey, name, 0, type, data, size) == ERROR_SUCCESS)) {
- result = 0;
- }
- } else {
- result = 0;
- }
-
- if (hkey != 0) {
- RegCloseKey(hkey);
- }
-
- return result;
-}
diff --git a/nbi/engine/native/jnilib/windows/src/WindowsUtils.h b/nbi/engine/native/jnilib/windows/src/WindowsUtils.h
deleted file mode 100644
index 947c63e7482a..000000000000
--- a/nbi/engine/native/jnilib/windows/src/WindowsUtils.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "../../.common/src/CommonUtils.h"
-
-#ifndef _WindowsUtils_H
-#define _WindowsUtils_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-HKEY getHKEY(jint jSection);
-
-int queryValue(int mode, HKEY section, const unsigned short * key, const unsigned short * name, DWORD* type, DWORD* size, byte** value, int expand);
-
-int setValue(int mode, HKEY section, const unsigned short * key, const unsigned short * name, DWORD type, const byte* data, int size, int expand);
-
-LONG getMode(jint jmode);
-#ifdef __cplusplus
-}
-#endif
-#endif // _WindowsUtils_H
diff --git a/nbi/engine/native/jnilib/windows/src/jni_WindowsNativeUtils.c b/nbi/engine/native/jnilib/windows/src/jni_WindowsNativeUtils.c
deleted file mode 100644
index 6d7c60baa118..000000000000
--- a/nbi/engine/native/jnilib/windows/src/jni_WindowsNativeUtils.c
+++ /dev/null
@@ -1,400 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include
-#include
-#include
-#include
-#include
-
-#include "../../.common/src/CommonUtils.h"
-#include "WindowsUtils.h"
-#include "jni_WindowsNativeUtils.h"
-
-////////////////////////////////////////////////////////////////////////////////
-// Functions
-
-JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_isCurrentUserAdmin0(JNIEnv* jEnv, jobject jObject) {
- BOOL result = FALSE;
-
- PACL pACL = NULL;
- PSID psidAdmin = NULL;
- HANDLE token = NULL;
- HANDLE duplToken = NULL;
- PSECURITY_DESCRIPTOR adminDescriptor = NULL;
-
- SID_IDENTIFIER_AUTHORITY SystemSidAuthority = SECURITY_NT_AUTHORITY;
- DWORD aclSize;
-
- const DWORD ACCESS_READ = 1;
- const DWORD ACCESS_WRITE = 2;
-
- GENERIC_MAPPING mapping;
-
- PRIVILEGE_SET ps;
- DWORD status;
- DWORD structSize = sizeof(PRIVILEGE_SET);
-
- // MS KB 118626
- while (TRUE) {
- if (!OpenThreadToken(GetCurrentThread(), TOKEN_DUPLICATE | TOKEN_QUERY, TRUE, &token)) {
- if (GetLastError() != ERROR_NO_TOKEN) {
- throwException(jEnv, "Native error");
- break;
- }
-
- if (!OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE | TOKEN_QUERY, &token)) {
- throwException(jEnv, "Native error");
- break;
- }
- }
-
- if (!DuplicateToken(token, SecurityImpersonation, &duplToken)) {
- throwException(jEnv, "Native error");
- break;
- }
-
- if (!AllocateAndInitializeSid(&SystemSidAuthority, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &psidAdmin)) {
- throwException(jEnv, "Native error");
- break;
- }
-
- adminDescriptor = (PSECURITY_DESCRIPTOR) LocalAlloc(LPTR, SECURITY_DESCRIPTOR_MIN_LENGTH);
- if (adminDescriptor == NULL) {
- throwException(jEnv, "Native error");
- break;
- }
- if (!InitializeSecurityDescriptor(adminDescriptor, SECURITY_DESCRIPTOR_REVISION)) {
- throwException(jEnv, "Native error");
- break;
- }
-
- aclSize = sizeof(ACL) + sizeof(ACCESS_ALLOWED_ACE) + GetLengthSid(psidAdmin) - sizeof(DWORD);
-
- pACL = (PACL) LocalAlloc(LPTR, aclSize);
- if (pACL == NULL) {
- throwException(jEnv, "Native error");
- break;
- }
- if (!InitializeAcl(pACL, aclSize, ACL_REVISION2)) {
- throwException(jEnv, "Native error");
- break;
- }
-
- if (!AddAccessAllowedAce(pACL, ACL_REVISION2, ACCESS_READ | ACCESS_WRITE , psidAdmin)) {
- throwException(jEnv, "Native error");
- break;
- }
- if (!SetSecurityDescriptorDacl(adminDescriptor, TRUE, pACL, FALSE)) {
- throwException(jEnv, "Native error");
- break;
- }
-
- SetSecurityDescriptorGroup(adminDescriptor, psidAdmin, FALSE);
- SetSecurityDescriptorOwner(adminDescriptor, psidAdmin, FALSE);
-
- if (!IsValidSecurityDescriptor(adminDescriptor)) {
- throwException(jEnv, "Native error");
- break;
- }
-
- mapping.GenericRead = ACCESS_READ;
- mapping.GenericWrite = ACCESS_WRITE;
- mapping.GenericExecute = 0;
- mapping.GenericAll = ACCESS_READ | ACCESS_WRITE;
-
- if (!AccessCheck(adminDescriptor, duplToken, ACCESS_READ, &mapping, &ps, &structSize, &status, &result)) {
- throwException(jEnv, "Native error");
- break;
- }
-
- break;
- }
-
- if (pACL) {
- LocalFree(pACL);
- }
- if (adminDescriptor) {
- LocalFree(adminDescriptor);
- }
- if (psidAdmin) {
- FreeSid(psidAdmin);
- }
- if (duplToken) {
- CloseHandle(duplToken);
- }
- if (token) {
- CloseHandle(token);
- }
-
- return result;
-}
-
-JNIEXPORT jlong JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_getFreeSpace0(JNIEnv* jEnv, jobject jObject, jstring jPath) {
- WCHAR* path = getWideChars(jEnv, jPath);
- jlong size = 0;
- typedef struct int64s { unsigned long Low, High; } int64t;
- int64t bytes;
- if (GetDiskFreeSpaceExW(path, (PULARGE_INTEGER) &bytes, NULL, NULL)) {
- unsigned long h = bytes.High;
- // workaround of using missing _allmul function
- // replace multiplication by sum
- // (2^32 * high + low) = 2^32 + 2^32 + ... (bytes.High times total) + bytes.Low
- // can be relatively expensive on big sizes (peta bytes and more)
- while(h > 0) {
- h--;
- size+=4294967296L;
- }
- size+= bytes.Low;
- } else {
- throwException(jEnv, "Native error");
- }
-
- FREE(path);
-
- return size;
-}
-
-JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_createShortcut0(JNIEnv* jEnv, jobject jObject, jobject jShortcut) {
- unsigned short *shortcutPath = getWideStringFromMethod(jEnv, jShortcut, "getPath");
- unsigned short *targetPath = getWideStringFromMethod(jEnv, jShortcut, "getTargetPath");
- unsigned short *description = getWideStringFromMethod(jEnv, jShortcut, "getDescription");
- unsigned short *iconPath = getWideStringFromMethod(jEnv, jShortcut, "getIconPath");
- jint iconIndex = getIntFromMethod (jEnv, jShortcut, "getIconIndex");
- unsigned short *workingDirectory = getWideStringFromMethod(jEnv, jShortcut, "getWorkingDirectoryPath");
- unsigned short *arguments = getWideStringFromMethod(jEnv, jShortcut, "getArgumentsString");
-
- HRESULT tempResult;
- IShellLinkW* shell;
-
- HRESULT comStart = CoInitialize(NULL);
- int errorCode = 0;
-
- tempResult = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLinkW, (void **) &shell);
-
- if (SUCCEEDED(tempResult)) {
- IPersistFile *persistFile;
- // we will save the shell link in persistent storage
- tempResult = shell->lpVtbl->QueryInterface(shell, &IID_IPersistFile, (void **) &persistFile);
-
- if (SUCCEEDED(tempResult)) {
- tempResult = shell->lpVtbl->SetPath(shell, targetPath);
- if (!SUCCEEDED(tempResult)) {
- throwException(jEnv, "Native error (-2)");
- errorCode = -2;
- }
- // make sure description length is less than MAX_PATH
- if ((errorCode == 0) && (description != NULL)) {
- if (WCSLEN(description) < MAX_PATH) {
- if (!SUCCEEDED(shell->lpVtbl->SetDescription(shell, description))) {
- throwException(jEnv, "Native error (-3)");
- errorCode = -3;
- }
- } else {
- unsigned short *desc = (unsigned short *) MALLOC(sizeof(unsigned short) * MAX_PATH);
- ZERO(desc, sizeof(unsigned short) * MAX_PATH);
- desc = WCSNCPY(desc, description, MAX_PATH);
- if (!SUCCEEDED(shell->lpVtbl->SetDescription(shell, desc))) {
- throwException(jEnv, "Native error (-4)");
- errorCode = -4;
- }
- FREE(desc);
- }
- }
- if ((errorCode == 0) && (arguments != NULL)) {
- if (!SUCCEEDED(shell->lpVtbl->SetArguments(shell, arguments))) {
- throwException(jEnv, "Native error (-5)");
- errorCode = -5;
- }
- }
- if ((errorCode == 0) && (workingDirectory != NULL)) {
- if (!SUCCEEDED(shell->lpVtbl->SetWorkingDirectory(shell, workingDirectory))) {
- throwException(jEnv, "Native error (-6)");
- errorCode = -6;
- }
- }
- if ((errorCode == 0) && (iconPath != NULL)) {
- if (!SUCCEEDED(shell->lpVtbl->SetIconLocation(shell, iconPath, iconIndex))) {
- throwException(jEnv, "Native error (-7)");
- errorCode = -7;
- }
- }
- // use normal window.
- if (errorCode == 0) {
- if (!SUCCEEDED(shell->lpVtbl->SetShowCmd(shell, SW_NORMAL))) {
- throwException(jEnv, "Native error (-8)");
- errorCode = -8;
- }
- }
- if (errorCode == 0) {
- if (mkdirsW(jEnv, shortcutPath)) {
- if (!SUCCEEDED(persistFile->lpVtbl->Save(persistFile, shortcutPath, TRUE))) {
- throwException(jEnv, "Native error (-9)");
- errorCode = -9;
- }
- } else {
- throwException(jEnv, "Native error (-10)");
- errorCode = -10;
- }
- }
-
- if (errorCode == 0) {
- persistFile->lpVtbl->Release(persistFile);
- }
- } else {
- throwException(jEnv, "Native error (-11)");
- errorCode = -11;
- }
- shell->lpVtbl->Release(shell);
- } else {
- throwException(jEnv, "Native error (-12)");
- errorCode = -12;
- }
-
- if (comStart == S_OK) {
- CoUninitialize();
- }
-
- FREE(shortcutPath);
- FREE(targetPath);
- FREE(description);
- FREE(iconPath);
- FREE(workingDirectory);
- FREE(arguments);
-}
-
-JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_deleteFileOnReboot0(JNIEnv* jEnv, jobject jObject, jstring jPath) {
- unsigned short * path = getWideChars(jEnv, jPath);
-
- if (!MoveFileExW(path, NULL, MOVEFILE_DELAY_UNTIL_REBOOT)) {
- throwException(jEnv, "Native error");
- }
-
- FREE(path);
-}
-
-JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_createProcessWithoutHandles0(JNIEnv* jEnv, jobject jObject, jstring jCommand) {
- unsigned short * command = getWideChars(jEnv, jCommand);
- STARTUPINFOW si;
- PROCESS_INFORMATION pi;
-
- ZERO(&si, sizeof(si));
- si.cb = sizeof(si);
- ZERO(&pi, sizeof(pi));
- if(!CreateProcessW(NULL, // executable name - use command line
- command, // command line
- NULL, // process security attribute
- NULL, // thread security attribute
- FALSE, // inherits system handles
- 0, // no creation flags
- NULL, // use parent's environment block
- NULL, // use parent's starting directory
- &si, // (in) startup information
- &pi)) { // (out) process information
- throwException(jEnv, "Cannot create process.\n");
- }
-
-
- FREE(command);
-}
-JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_notifyAssociationChanged0(JNIEnv *jEnv, jobject jObj) {
- SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, 0, 0);
-}
-
-JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_notifyEnvironmentChanged0(JNIEnv *jEnv, jobject jObj) {
- /* maximum 1 sec timeout for each window in the system */
- DWORD dwReturnValue = 0;
- LRESULT result = SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM) "Environment", SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR) &dwReturnValue);
- return (result!=0);
-}
-
-
-JNIEXPORT jint JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_checkAccessTokenAccessLevel0(JNIEnv *jEnv, jobject jObj, jstring jPath, jint jLevel) {
- unsigned short * path = getWideChars(jEnv, jPath);
- PSECURITY_DESCRIPTOR pSD;
- DWORD nLength;
-
- PRIVILEGE_SET PrivilegeSet;
- DWORD PrivSetSize = sizeof (PRIVILEGE_SET);
-
- HANDLE hToken;
-
- GENERIC_MAPPING GenericMapping;
- DWORD DesiredAccess = (DWORD) jLevel ;
-
- BOOL bAccessGranted;
- DWORD GrantedAccess;
-
- // create memory for storing user's security descriptor
- GetFileSecurityW(path, OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, NULL, 0, &nLength);
-
- pSD = (PSECURITY_DESCRIPTOR) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, nLength);
-
- if (pSD == NULL) {
- throwException(jEnv, "Unable to allocate memory to store security descriptor.\n");
- return -1;
- }
- // Get the security descriptor
- if (!GetFileSecurityW(path, OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, pSD, nLength, &nLength)) {
- throwException(jEnv, "Unable to obtain security descriptor.\n");
- FREE(path);
- return (-3);
- }
- FREE(path);
-
- /* Perform security impersonation of the user and open */
- /* the resulting thread token. */
- if (!ImpersonateSelf(SecurityImpersonation)) {
- throwException(jEnv, "Unable to perform security impersonation.\n");
- HeapFree(GetProcessHeap(), 0, pSD);
- return (-4);
- }
-
- if (!OpenThreadToken(GetCurrentThread(), TOKEN_DUPLICATE | TOKEN_QUERY, FALSE, &hToken)) {
- throwException(jEnv, "Unable to get current thread's token.\n");
- HeapFree(GetProcessHeap(), 0, pSD);
- return (-5);
- }
- RevertToSelf();
-
- ZERO(&GenericMapping, sizeof (GENERIC_MAPPING));
-
- DesiredAccess = DesiredAccess | STANDARD_RIGHTS_READ;
- GenericMapping.GenericRead = FILE_GENERIC_READ;
-
- if(jLevel & FILE_WRITE_DATA) {
- GenericMapping.GenericWrite = FILE_GENERIC_WRITE;
- }
-
- MapGenericMask(&DesiredAccess, &GenericMapping);
-
- /* Perform access check using the token. */
- if (!AccessCheck(pSD, hToken, DesiredAccess, &GenericMapping, &PrivilegeSet, &PrivSetSize, &GrantedAccess, &bAccessGranted)) {
- throwException(jEnv, "Unable to perform access check.\n");
- CloseHandle(hToken);
- HeapFree(GetProcessHeap(), 0, pSD);
- return (-6);
- }
- /* Clean up. */
- HeapFree(GetProcessHeap(), 0, pSD);
- CloseHandle(hToken);
- return (bAccessGranted);
-}
-
-
diff --git a/nbi/engine/native/jnilib/windows/src/jni_WindowsNativeUtils.h b/nbi/engine/native/jnilib/windows/src/jni_WindowsNativeUtils.h
deleted file mode 100644
index 9ea87e707e2b..000000000000
--- a/nbi/engine/native/jnilib/windows/src/jni_WindowsNativeUtils.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include
-/* Header for class org_netbeans_installer_utils_system_WindowsNativeUtils */
-
-#ifndef _Included_org_netbeans_installer_utils_system_WindowsNativeUtils
-#define _Included_org_netbeans_installer_utils_system_WindowsNativeUtils
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#undef org_netbeans_installer_utils_system_WindowsNativeUtils_MIN_UID_INDEX
-#define org_netbeans_installer_utils_system_WindowsNativeUtils_MIN_UID_INDEX 1L
-
-#undef org_netbeans_installer_utils_system_WindowsNativeUtils_MAX_UID_INDEX
-#define org_netbeans_installer_utils_system_WindowsNativeUtils_MAX_UID_INDEX 100L
-
-/*
- * Class: org_netbeans_installer_utils_system_WindowsNativeUtils
- * Method: isCurrentUserAdmin0
- * Signature: ()Z
- */
-JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_isCurrentUserAdmin0
- (JNIEnv *, jobject);
-
-/*
- * Class: org_netbeans_installer_utils_system_WindowsNativeUtils
- * Method: getFreeSpace0
- * Signature: (Ljava/lang/String;)J
- */
-JNIEXPORT jlong JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_getFreeSpace0
- (JNIEnv *, jobject, jstring);
-
-/*
- * Class: org_netbeans_installer_utils_system_WindowsNativeUtils
- * Method: createShortcut0
- * Signature: (Lorg/netbeans/installer/utils/system/shortcut/FileShortcut;)V
- */
-JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_createShortcut0
- (JNIEnv *, jobject, jobject);
-
-
-/*
- * Class: org_netbeans_installer_utils_system_WindowsNativeUtils
- * Method: deleteFileOnReboot0
- * Signature: (Ljava/lang/String;)V
- */
-JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_deleteFileOnReboot0
- (JNIEnv *, jobject, jstring);
-
-/*
- * Class: org_netbeans_installer_utils_system_WindowsNativeUtils
- * Method: createProcessWithoutHandles0
- * Signature: (Ljava/lang/String;)V
- */
-JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_createProcessWithoutHandles0
- (JNIEnv *, jobject, jstring);
-
-
-/*
- * Class: org_netbeans_installer_utils_system_WindowsNativeUtils
- * Method: notifyAssociationChanged0
- * Signature: ()V
- */
-JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_notifyAssociationChanged0
- (JNIEnv *, jobject);
-
-
-/*
- * Class: org_netbeans_installer_utils_system_WindowsNativeUtils
- * Method: checkAccessTokenAccessLevel0
- * Signature: (Ljava/lang/String;I)I
- */
-JNIEXPORT jint JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_checkAccessTokenAccessLevel0
- (JNIEnv *, jobject, jstring, jint);
-
-
-/*
- * Class: org_netbeans_installer_utils_system_WindowsNativeUtils
- * Method: notifyEnvironmentChanged0
- * Signature: ()Z
- */
-JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_notifyEnvironmentChanged0
- (JNIEnv *, jobject);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/nbi/engine/native/jnilib/windows/src/jni_WindowsRegistry.c b/nbi/engine/native/jnilib/windows/src/jni_WindowsRegistry.c
deleted file mode 100644
index 3608bf029add..000000000000
--- a/nbi/engine/native/jnilib/windows/src/jni_WindowsRegistry.c
+++ /dev/null
@@ -1,632 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "../../.common/src/CommonUtils.h"
-#include "WindowsUtils.h"
-#include "jni_WindowsRegistry.h"
-
-////////////////////////////////////////////////////////////////////////////////
-// Globals
-
-// maximum length of a registry value
-const DWORD MAX_LEN_VALUE_NAME = 16383;
-
-////////////////////////////////////////////////////////////////////////////////
-// Functions
-
-JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_checkKeyAccess0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey, jint jLevel) {
- HKEY hkey = 0;
- unsigned short * key = getWideChars(jEnv, jKey);
-
- jboolean result = FALSE;
- REGSAM access = (jLevel==0) ? KEY_READ : KEY_ALL_ACCESS;
- result = (RegOpenKeyExW(getHKEY(jSection), key, 0, access | getMode(jMode), &hkey) == ERROR_SUCCESS);
-
- if (hkey != 0) {
- RegCloseKey(hkey);
- }
-
- FREE(key);
-
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_valueExists0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey, jstring jName) {
- HKEY hkey = 0;
- unsigned short * key = getWideChars(jEnv, jKey);
- unsigned short * value = getWideChars(jEnv, jName);
- jboolean result = FALSE;
- if (RegOpenKeyExW(getHKEY(jSection), key, 0, KEY_QUERY_VALUE | getMode(jMode), &hkey) == ERROR_SUCCESS) {
- result = (RegQueryValueExW(hkey, value, NULL, NULL, NULL, NULL) == ERROR_SUCCESS);
- } else {
- throwException(jEnv, "Cannot open key");
- }
-
- if (hkey != 0) {
- RegCloseKey(hkey);
- }
- FREE(key);
- FREE(value);
-
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_keyEmpty0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey) {
- HKEY hkey = 0;
- unsigned short* key = getWideChars(jEnv, jKey);
-
- DWORD subkeys = 1;
- DWORD values = 1;
- if (RegOpenKeyExW(getHKEY(jSection), key, 0, KEY_READ | getMode(jMode), &hkey) == ERROR_SUCCESS) {
- if (RegQueryInfoKeyW(hkey, NULL, NULL, NULL, &subkeys, NULL, NULL, &values, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) {
- throwException(jEnv, "Cannot read key data");
- }
- } else {
- throwException(jEnv, "Cannot open key");
- }
-
- if (hkey != 0) {
- RegCloseKey(hkey);
- }
-
- FREE(key);
-
- return (values + subkeys == 0);
-}
-
-JNIEXPORT jint JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_countSubKeys0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey) {
- HKEY hkey = 0;
- unsigned short* key = getWideChars(jEnv, jKey);
-
- DWORD count = 0;
- if (RegOpenKeyExW(getHKEY(jSection), key, 0, KEY_READ | getMode(jMode), &hkey) == ERROR_SUCCESS) {
- if(RegQueryInfoKeyW(hkey, NULL, NULL, NULL, &count, NULL, NULL, NULL, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) {
- throwException(jEnv, "Cannot read key data");
- }
- } else {
- throwException(jEnv, "Cannot open key");
- }
-
- if (hkey != 0) {
- RegCloseKey(hkey);
- }
-
- FREE(key);
-
- return count;
-}
-
-JNIEXPORT jint JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_countValues0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey) {
- HKEY hkey = 0;
- unsigned short* key = getWideChars(jEnv, jKey);
-
- DWORD count = 0;
- if (RegOpenKeyExW(getHKEY(jSection), key, 0, KEY_READ | getMode(jMode), &hkey) == ERROR_SUCCESS) {
- if (RegQueryInfoKeyW(hkey, NULL, NULL, NULL, NULL, NULL, NULL, &count, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) {
- throwException(jEnv, "Cannot read key data");
- }
- } else {
- throwException(jEnv, "Cannot open key");
- }
-
- if (hkey != 0) {
- RegCloseKey(hkey);
- }
-
- FREE(key);
-
- return count;
-}
-
-JNIEXPORT jobjectArray JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_getSubkeyNames0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey) {
- HKEY hkey = 0;
- unsigned short* key = getWideChars(jEnv, jKey);
- DWORD number = 0;
- int err = 0;
- int index = 0 ;
-
- unsigned short* buffer = (unsigned short*) MALLOC(sizeof(char) * MAX_LEN_VALUE_NAME);
-
- jobjectArray result = NULL;
- if (RegOpenKeyExW(getHKEY(jSection), key, 0, KEY_READ | getMode(jMode), &hkey) == ERROR_SUCCESS) {
- if (RegQueryInfoKeyW(hkey, NULL, NULL, NULL, &number, NULL, NULL, NULL, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) {
- jclass stringClazz = (*jEnv)->FindClass(jEnv, "java/lang/String");
- result = (*jEnv)->NewObjectArray(jEnv, number, stringClazz, NULL);
-
- do {
- DWORD size = MAX_LEN_VALUE_NAME;
- buffer[0] = 0;
-
- err = RegEnumKeyExW(hkey, index, buffer, &size, NULL, NULL, NULL, NULL);
- if (err == ERROR_SUCCESS) {
- (*jEnv)->SetObjectArrayElement(jEnv, result, index, getStringW(jEnv, buffer));
- } else {
- if (err != ERROR_NO_MORE_ITEMS) {
- throwException(jEnv, "Cannot get key names");
- }
- }
-
- index++;
- } while (err == ERROR_SUCCESS);
- } else {
- throwException(jEnv, "Cannot read key data");
- }
- } else {
- throwException(jEnv, "Cannot open key");
- }
-
- if (hkey != 0) {
- RegCloseKey(hkey);
- }
-
- FREE(key);
- FREE(buffer);
-
- return result;
-}
-
-JNIEXPORT jobjectArray JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_getValueNames0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey) {
- HKEY hkey = 0;
- unsigned short* key = getWideChars(jEnv, jKey);
- DWORD valuesCount = 0;
- int err = 0;
- int index = 0;
-
- unsigned short* buffer = (unsigned short*) MALLOC(sizeof(char) * MAX_LEN_VALUE_NAME);
-
- jobjectArray result = NULL;
- if (RegOpenKeyExW(getHKEY(jSection), key, 0, KEY_QUERY_VALUE | getMode(jMode), &hkey) == ERROR_SUCCESS) {
- if (RegQueryInfoKeyW(hkey, NULL, NULL, NULL, NULL, NULL, NULL, &valuesCount, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) {
- jclass stringClazz = (*jEnv)->FindClass(jEnv, "java/lang/String");
- result = (*jEnv)->NewObjectArray(jEnv, valuesCount, stringClazz, NULL);
-
- do {
- DWORD size = MAX_LEN_VALUE_NAME;
- buffer[0] = 0;
-
- err = RegEnumValueW(hkey, index, buffer, &size, NULL, NULL, NULL, NULL);
- if (err == ERROR_SUCCESS) {
- (*jEnv)->SetObjectArrayElement(jEnv, result, index, getStringW(jEnv, buffer));
- } else {
- if (err != ERROR_NO_MORE_ITEMS) {
- throwException(jEnv, "Cannot get value names");
- }
- }
-
- index++;
- } while (err == ERROR_SUCCESS);
- } else {
- throwException(jEnv, "Cannot read key data");
- }
- } else {
- throwException(jEnv, "Cannot open key");
- }
-
- if (hkey != 0) {
- RegCloseKey(hkey);
- }
-
- FREE(key);
- FREE(buffer);
-
- return result;
-}
-
-JNIEXPORT jint JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_getValueType0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey, jstring jName) {
- HKEY hkey =0;
- unsigned short* key = getWideChars(jEnv, jKey);
- unsigned short* value = getWideChars(jEnv, jName);
-
- DWORD type = REG_NONE;
- if (RegOpenKeyExW(getHKEY(jSection), key, 0, KEY_QUERY_VALUE | getMode(jMode), &hkey) == ERROR_SUCCESS) {
- if (RegQueryValueExW(hkey, value, NULL, &type, NULL, NULL) != ERROR_SUCCESS) {
- throwException(jEnv, "Cannot read value");
- }
- } else {
- throwException(jEnv, "Cannot open key");
- }
-
- if (hkey != 0) {
- RegCloseKey(hkey);
- }
-
- FREE(key);
- FREE(value);
-
- return type;
-}
-
-JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_createKey0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jParent, jstring jChild) {
- HKEY hkey = 0;
- HKEY newKey = 0;
- unsigned short* parent = getWideChars(jEnv, jParent);
- unsigned short* child = getWideChars(jEnv, jChild);
-
- if (RegOpenKeyExW(getHKEY(jSection), parent, 0, KEY_CREATE_SUB_KEY | getMode(jMode), &hkey) == ERROR_SUCCESS) {
- LONG result = RegCreateKeyExW(hkey, child, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_READ | KEY_WRITE | getMode(jMode), NULL, &newKey, NULL);
- if (result == ERROR_SUCCESS) {
- if (newKey != 0) {
- RegCloseKey(newKey);
- }
- } else if (result == ERROR_ACCESS_DENIED) {
- throwException(jEnv, "Could not create a new key (access denied)");
- } else {
- throwException(jEnv, "Could not create a new key");
- }
- } else {
- throwException(jEnv, "Could not open the parent key");
- }
-
- if (hkey != 0) {
- RegCloseKey(hkey);
- }
-
- FREE(parent);
- FREE(child);
-}
-
-JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_deleteKey0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jParent, jstring jChild) {
- HKEY hkey = 0;
- unsigned short* jParentS = getWideChars(jEnv, jParent);
- unsigned short* jChildS = getWideChars(jEnv, jChild);
-
-
- if (RegOpenKeyExW(getHKEY(jSection), jParentS, 0, KEY_READ | KEY_WRITE | getMode(jMode), &hkey) == ERROR_SUCCESS) {
- LONG mode = getMode(jMode);
- if(mode==0) {
- if (RegDeleteKeyW(hkey, jChildS) != ERROR_SUCCESS) {
- throwException(jEnv, "Could not delete key");
- }
- } else {
- typedef LONG (WINAPI *LPFN_REGDELETEKEYEXW) (HKEY, LPCWSTR, REGSAM, DWORD);
- LPFN_REGDELETEKEYEXW regDeleteKeyExW;
- HMODULE hModule = GetModuleHandle(TEXT("advapi32.dll"));
- if(hModule == NULL) {
- hModule = LoadLibraryA("advapi32.dll");
- }
- regDeleteKeyExW = (LPFN_REGDELETEKEYEXW) GetProcAddress(hModule,"RegDeleteKeyExW");
- if (NULL != regDeleteKeyExW) {
- if (regDeleteKeyExW(hkey, jChildS, mode, 0) != ERROR_SUCCESS) {
- throwException(jEnv, "Could not delete key");
- }
- } else {
- throwException(jEnv, "Cannot load function RegDeleteKeyExW");
- }
- }
- } else {
- throwException(jEnv, "Could not open the parent key");
- }
-
- if (hkey != 0) {
- RegCloseKey(hkey);
- }
-
- FREE(jParentS);
- FREE(jChildS);
-}
-
-JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_deleteValue0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey, jstring jName) {
- HKEY hkey = 0;
- unsigned short* key = getWideChars(jEnv, jKey);
- unsigned short* value = getWideChars(jEnv, jName);
-
- if (RegOpenKeyExW(getHKEY(jSection), key, 0, KEY_SET_VALUE | getMode(jMode) , &hkey) == ERROR_SUCCESS) {
- if (RegDeleteValueW(hkey, value) != ERROR_SUCCESS) {
- throwException(jEnv, "Cannot delete value");
- }
- } else {
- throwException(jEnv, "Canont open key");
- }
-
- if(hkey != 0) {
- RegCloseKey(hkey);
- }
-
- FREE(key);
- FREE(value);
-}
-
-JNIEXPORT jstring JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_getStringValue0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey, jstring jName, jboolean jExpand) {
- unsigned short* key = getWideChars(jEnv, jKey);
- unsigned short* name = getWideChars(jEnv, jName);
- DWORD type = REG_NONE;
- byte* value = NULL;
-
- jstring result = NULL;
-
- if (queryValue(getMode(jMode), getHKEY(jSection), key, name, &type, NULL, &value, jExpand)) {
- if (type == REG_SZ || type == REG_EXPAND_SZ) {
- result = getStringW(jEnv, (unsigned short*) value);
- } else {
- throwException(jEnv, "Value has wrong type");
- }
- } else {
- throwException(jEnv, "Cannot read value");
- }
-
- FREE(key);
- FREE(name);
- FREE(value);
-
- return result;
-}
-
-JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_setStringValue0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey, jstring jName, jstring jValue, jboolean jExpand) {
- unsigned short* key = getWideChars(jEnv, jKey);
- unsigned short* name = getWideChars(jEnv, jName);
- unsigned short* value = getWideChars(jEnv, jValue);
-
- if (!setValue(getMode(jMode), getHKEY(jSection), key, name, jExpand ? REG_EXPAND_SZ : REG_SZ, (byte*) value, ((int) WCSLEN(value)) * sizeof(unsigned short), 0)) {
- throwException(jEnv, "Could not set value");
- }
-
- FREE(key);
- FREE(name);
- FREE(value);
-}
-
-JNIEXPORT jint JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_get32BitValue0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey, jstring jName) {
- HKEY hkey = 0;
- unsigned short* key = getWideChars(jEnv, jKey);
- unsigned short* value = getWideChars(jEnv, jName);
-
- jint result = -1;
- if(RegOpenKeyExW(getHKEY(jSection), key, 0, KEY_QUERY_VALUE | getMode(jMode), &hkey) == ERROR_SUCCESS) {
- DWORD dwType = 0;
- DWORD dwValue = 0;
- DWORD dwBufSize = sizeof(dwValue);
-
- if (RegQueryValueExW(hkey, value, NULL, &dwType, (LPBYTE) &dwValue, &dwBufSize) == ERROR_SUCCESS) {
- if ((dwType == REG_DWORD) || (dwType == REG_DWORD_BIG_ENDIAN)) {
- result = dwValue;
- } else {
- throwException(jEnv, "Value is of wrong type");
- }
- } else {
- throwException(jEnv, "Cannot read key data");
- }
- } else {
- throwException(jEnv, "Could not open key");
- }
-
- if (hkey != 0) {
- RegCloseKey(hkey);
- }
-
- FREE(key);
- FREE(value);
-
- return result;
-}
-
-JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_set32BitValue0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey, jstring jName, jint jValue) {
- unsigned short* key = getWideChars(jEnv, jKey);
- unsigned short* name = getWideChars(jEnv, jName);
- DWORD dword = (DWORD) jValue;
- LPBYTE byteValue = (LPBYTE) &dword;
-
- if (!setValue(getMode(jMode),getHKEY(jSection), key, name, REG_DWORD, byteValue, sizeof(dword), 0)) {
- throwException(jEnv, "Cannot set value");
- }
-
- FREE(key);
- FREE(name);
-}
-
-JNIEXPORT jobjectArray JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_getMultiStringValue0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey, jstring jName) {
- HKEY hkey = 0;
- unsigned short* key = getWideChars(jEnv, jKey);
- unsigned short* value = getWideChars(jEnv, jName);
-
- int i, start, count, cnt;
- LONG regErr = 0;
- unsigned short* data = 0;
- jstring string;
- jclass strClass;
- DWORD dwType;
- DWORD size = 0;
-
- jarray result = 0;
- if(RegOpenKeyExW(getHKEY(jSection), key, 0, KEY_QUERY_VALUE | getMode(jMode), &hkey) == ERROR_SUCCESS) {
- if (RegQueryValueExW(hkey, value, NULL, &dwType, NULL, &size) == ERROR_SUCCESS) {
- if (dwType == REG_MULTI_SZ) {
- data = (unsigned short*) LocalAlloc(LPTR, size + 8);
-
- if (data != NULL) {
- if (RegQueryValueExW(hkey, value, NULL, &dwType, (byte*) data, &size) == ERROR_SUCCESS) {
- for (count = 0, i = 0; i < (int) size; i++) {
- if (data[i] == '\0') { // \0 - end of a single string
- count++;
- if (data[i + 1] == '\0') { // two \0 's in a row - end of all strings
- break;
- }
- }
- }
-
- strClass = (*jEnv)->FindClass(jEnv, "java/lang/String");
- if (strClass != NULL) {
- result = (*jEnv)->NewObjectArray(jEnv, (jsize) count, strClass, NULL);
- if (result != NULL) {
- for (cnt = 0, start = 0, i = 0; (i < (int) size) && (cnt < count); i++) {
- if (data[i] == '\0') {
- string = getStringWithLengthW(jEnv, &data[start], i - start);
-
- if (string != NULL) {
- (*jEnv)->SetObjectArrayElement(jEnv, (jobjectArray) result, (jsize) cnt++, string);
-
- start = i + 1;
- if (data[start] == '\0') {
- break;
- }
- } else {
- throwException(jEnv, "Cannot create an array element");
- break;
- }
- }
- }
- } else {
- throwException(jEnv, "Cannot create resulting array");
- }
- } else {
- throwException(jEnv, "Cannot find java.lang.String");
- }
- } else {
- throwException(jEnv, "Cannot read value data");
- }
- FREE(data);
- } else {
- throwException(jEnv, "Cannot allocate memory for value");
- }
- } else {
- throwException(jEnv, "Value is of wrong type");
- }
- } else {
- throwException(jEnv, "Cannot read key data");
- }
- } else {
- throwException(jEnv, "Cannot open key");
- }
-
- if (hkey != 0) {
- RegCloseKey(hkey);
- }
-
- FREE(key);
- FREE(value);
-
- return (jobjectArray) result;
-}
-
-JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_setMultiStringValue0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey, jstring jName, jobjectArray jValue) {
- unsigned short* key = getWideChars(jEnv, jKey);
- unsigned short* name = getWideChars(jEnv, jName);
- DWORD size = 0;
- BYTE* data = getByteFromMultiString(jEnv, jValue, &size);
-
- if (!setValue(getMode(jMode),getHKEY(jSection), key, name, REG_MULTI_SZ, data, size, 0)) {
- throwException(jEnv, "Cannot set value");
- }
-
- FREE(key);
- FREE(name);
- FREE(data);
-}
-
-JNIEXPORT jbyteArray JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_getBinaryValue0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey, jstring jName) {
- HKEY hkey = 0;
- unsigned short* key = getWideChars(jEnv, jKey);
- unsigned short* value = getWideChars(jEnv, jName);
-
- jbyteArray result = NULL;
- if (RegOpenKeyExW(getHKEY(jSection), key, 0, KEY_QUERY_VALUE | getMode(jMode), &hkey) == ERROR_SUCCESS) {
- DWORD dwType = 0;
- DWORD dwValue = 0;
- DWORD size = 0;
- BYTE* data = NULL;
-
- if (RegQueryValueExW(hkey, value, NULL, &dwType, NULL, &size) == ERROR_SUCCESS) {
- if (dwType == REG_BINARY || dwType == REG_NONE) {
- data = (BYTE*) LocalAlloc(LPTR, size + 8);
- if (RegQueryValueExW(hkey, value, NULL, &dwType, (BYTE*) data, &size) == ERROR_SUCCESS) {
- if (data != NULL) {
- result = (*jEnv)->NewByteArray(jEnv, (jsize) size);
- (*jEnv)->SetByteArrayRegion(jEnv, result, 0, (jsize) size, (jbyte*) data);
- }
- } else {
- throwException(jEnv, "Could not read key data");
- }
- FREE(data);
- } else {
- throwException(jEnv, "Value is of wrong type");
- }
- } else {
- throwException(jEnv, "Could not read key data");
- }
- } else {
- throwException(jEnv, "Could not open key");
- }
-
- if (hkey != 0) {
- RegCloseKey(hkey);
- }
-
- FREE(key);
- FREE(value);
-
- return result;
-}
-
-JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_setBinaryValue0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey, jstring jName, jbyteArray jValue) {
- unsigned short* key = getWideChars(jEnv, jKey);
- unsigned short* name = getWideChars(jEnv, jName);
- BYTE* data = (BYTE*) (*jEnv)->GetByteArrayElements(jEnv, jValue, 0);
- DWORD length = (*jEnv)->GetArrayLength(jEnv, jValue);
-
- if (!setValue(getMode(jMode),getHKEY(jSection), key, name, REG_BINARY, data, length, 0)) {
- throwException(jEnv, "Cannot set value");
- }
-
- FREE(key);
- FREE(name);
- if (data != NULL) {
- (*jEnv)->ReleaseByteArrayElements(jEnv, jValue, (jbyte*) data, JNI_ABORT);
- }
-}
-
-JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_setNoneValue0(JNIEnv *jEnv, jobject jobj, jint jMode, jint jSection, jstring jKey, jstring jName, jbyteArray jValue) {
- unsigned short* key = getWideChars(jEnv, jKey);
- unsigned short* name = getWideChars(jEnv, jName);
- BYTE* data = (BYTE*) (*jEnv)->GetByteArrayElements(jEnv, jValue, 0);
- DWORD length = (*jEnv)->GetArrayLength(jEnv, jValue);
-
- if (!setValue(getMode(jMode),getHKEY(jSection), key, name, REG_NONE, data, length, 0)) {
- throwException(jEnv, "Cannot set value");
- }
-
- FREE(key);
- FREE(name);
- if (data != NULL) {
- (*jEnv)->ReleaseByteArrayElements(jEnv, jValue, (jbyte*) data, JNI_ABORT);
- }
-}
-
-JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_IsWow64Process0(JNIEnv *jEnv, jobject jObject) {
- typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
- LPFN_ISWOW64PROCESS fnIsWow64Process;
- BOOL IsWow64 = FALSE;
-
- fnIsWow64Process = (LPFN_ISWOW64PROCESS)GetProcAddress(GetModuleHandle(TEXT("kernel32")),"IsWow64Process");
-
- if (NULL != fnIsWow64Process)
- {
- if (!fnIsWow64Process(GetCurrentProcess(),&IsWow64))
- {
- }
- }
- return IsWow64;
-}
diff --git a/nbi/engine/native/jnilib/windows/src/jni_WindowsRegistry.h b/nbi/engine/native/jnilib/windows/src/jni_WindowsRegistry.h
deleted file mode 100644
index 1bf9addca013..000000000000
--- a/nbi/engine/native/jnilib/windows/src/jni_WindowsRegistry.h
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include
-/* Header for class org_netbeans_installer_utils_system_windows_WindowsRegistry */
-
-#ifndef _Included_org_netbeans_installer_utils_system_windows_WindowsRegistry
-#define _Included_org_netbeans_installer_utils_system_windows_WindowsRegistry
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_CLASSES_ROOT
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_CLASSES_ROOT 0L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_CURRENT_USER
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_CURRENT_USER 1L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_LOCAL_MACHINE
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_LOCAL_MACHINE 2L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_USERS
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_USERS 3L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_CURRENT_CONFIG
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_CURRENT_CONFIG 4L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_DYN_DATA
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_DYN_DATA 5L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_PERFORMANCE_DATA
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_PERFORMANCE_DATA 6L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_PERFORMANCE_NLSTEXT
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_PERFORMANCE_NLSTEXT 7L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_PERFORMANCE_TEXT
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_PERFORMANCE_TEXT 8L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_HKCR
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_HKCR 0L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_HKCU
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_HKCU 1L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_HKLM
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_HKLM 2L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_NONE
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_NONE 0L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_SZ
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_SZ 1L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_EXPAND_SZ
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_EXPAND_SZ 2L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_BINARY
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_BINARY 3L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_DWORD_LITTLE_ENDIAN
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_DWORD_LITTLE_ENDIAN 4L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_DWORD
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_DWORD 4L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_DWORD_BIG_ENDIAN
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_DWORD_BIG_ENDIAN 5L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_LINK
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_LINK 6L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_MULTI_SZ
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_MULTI_SZ 7L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_RESOURCE_LIST
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_RESOURCE_LIST 8L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_FULL_RESOURCE_DESCRIPTOR
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_FULL_RESOURCE_DESCRIPTOR 9L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_RESOURCE_REQUIREMENTS_LIST
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_RESOURCE_REQUIREMENTS_LIST 10L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_QWORD_LITTLE_ENDIAN
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_QWORD_LITTLE_ENDIAN 11L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_QWORD
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_QWORD 11L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_MODE_DEFAULT
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_MODE_DEFAULT 0L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_MODE_32BIT
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_MODE_32BIT 1L
-#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_MODE_64BIT
-#define org_netbeans_installer_utils_system_windows_WindowsRegistry_MODE_64BIT 2L
-/*
- * Class: org_netbeans_installer_utils_system_windows_WindowsRegistry
- * Method: checkKeyAccess0
- * Signature: (IILjava/lang/String;I;)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_checkKeyAccess0
- (JNIEnv *, jobject, jint, jint, jstring, jint);
-
-/*
- * Class: org_netbeans_installer_utils_system_windows_WindowsRegistry
- * Method: valueExists0
- * Signature: (IILjava/lang/String;Ljava/lang/String;)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_valueExists0
- (JNIEnv *, jobject, jint, jint, jstring, jstring);
-
-/*
- * Class: org_netbeans_installer_utils_system_windows_WindowsRegistry
- * Method: keyEmpty0
- * Signature: (IILjava/lang/String;)Z
- */
-JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_keyEmpty0
- (JNIEnv *, jobject, jint, jint, jstring);
-
-/*
- * Class: org_netbeans_installer_utils_system_windows_WindowsRegistry
- * Method: countSubKeys0
- * Signature: (IILjava/lang/String;)I
- */
-JNIEXPORT jint JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_countSubKeys0
- (JNIEnv *, jobject, jint, jint, jstring);
-
-/*
- * Class: org_netbeans_installer_utils_system_windows_WindowsRegistry
- * Method: countValues0
- * Signature: (IILjava/lang/String;)I
- */
-JNIEXPORT jint JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_countValues0
- (JNIEnv *, jobject, jint, jint, jstring);
-
-/*
- * Class: org_netbeans_installer_utils_system_windows_WindowsRegistry
- * Method: getSubkeyNames0
- * Signature: (IILjava/lang/String;)[Ljava/lang/String;
- */
-JNIEXPORT jobjectArray JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_getSubkeyNames0
- (JNIEnv *, jobject, jint, jint, jstring);
-
-/*
- * Class: org_netbeans_installer_utils_system_windows_WindowsRegistry
- * Method: getValueNames0
- * Signature: (IILjava/lang/String;)[Ljava/lang/String;
- */
-JNIEXPORT jobjectArray JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_getValueNames0
- (JNIEnv *, jobject, jint, jint, jstring);
-
-/*
- * Class: org_netbeans_installer_utils_system_windows_WindowsRegistry
- * Method: getValueType0
- * Signature: (IILjava/lang/String;Ljava/lang/String;)I
- */
-JNIEXPORT jint JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_getValueType0
- (JNIEnv *, jobject, jint, jint, jstring, jstring);
-
-/*
- * Class: org_netbeans_installer_utils_system_windows_WindowsRegistry
- * Method: createKey0
- * Signature: (IILjava/lang/String;Ljava/lang/String;)V
- */
-JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_createKey0
- (JNIEnv *, jobject, jint, jint, jstring, jstring);
-
-/*
- * Class: org_netbeans_installer_utils_system_windows_WindowsRegistry
- * Method: deleteKey0
- * Signature: (IILjava/lang/String;Ljava/lang/String;)V
- */
-JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_deleteKey0
- (JNIEnv *, jobject, jint, jint, jstring, jstring);
-
-/*
- * Class: org_netbeans_installer_utils_system_windows_WindowsRegistry
- * Method: deleteValue0
- * Signature: (IILjava/lang/String;Ljava/lang/String;)V
- */
-JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_deleteValue0
- (JNIEnv *, jobject, jint, jint, jstring, jstring);
-
-/*
- * Class: org_netbeans_installer_utils_system_windows_WindowsRegistry
- * Method: getStringValue0
- * Signature: (IILjava/lang/String;Ljava/lang/String;Z)Ljava/lang/String;
- */
-JNIEXPORT jstring JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_getStringValue0
- (JNIEnv *, jobject, jint, jint, jstring, jstring, jboolean);
-
-/*
- * Class: org_netbeans_installer_utils_system_windows_WindowsRegistry
- * Method: setStringValue0
- * Signature: (IILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V
- */
-JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_setStringValue0
- (JNIEnv *, jobject, jint, jint, jstring, jstring, jstring, jboolean);
-
-/*
- * Class: org_netbeans_installer_utils_system_windows_WindowsRegistry
- * Method: get32BitValue0
- * Signature: (IILjava/lang/String;Ljava/lang/String;)I
- */
-JNIEXPORT jint JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_get32BitValue0
- (JNIEnv *, jobject, jint, jint, jstring, jstring);
-
-/*
- * Class: org_netbeans_installer_utils_system_windows_WindowsRegistry
- * Method: set32BitValue0
- * Signature: (IILjava/lang/String;Ljava/lang/String;I)V
- */
-JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_set32BitValue0
- (JNIEnv *, jobject, jint, jint, jstring, jstring, jint);
-
-/*
- * Class: org_netbeans_installer_utils_system_windows_WindowsRegistry
- * Method: getMultiStringValue0
- * Signature: (IILjava/lang/String;Ljava/lang/String;)[Ljava/lang/String;
- */
-JNIEXPORT jobjectArray JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_getMultiStringValue0
- (JNIEnv *, jobject, jint, jint, jstring, jstring);
-
-/*
- * Class: org_netbeans_installer_utils_system_windows_WindowsRegistry
- * Method: setMultiStringValue0
- * Signature: (IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;)V
- */
-JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_setMultiStringValue0
- (JNIEnv *, jobject, jint, jint, jstring, jstring, jobjectArray);
-
-/*
- * Class: org_netbeans_installer_utils_system_windows_WindowsRegistry
- * Method: getBinaryValue0
- * Signature: (IILjava/lang/String;Ljava/lang/String;)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_getBinaryValue0
- (JNIEnv *, jobject, jint, jint, jstring, jstring);
-
-/*
- * Class: org_netbeans_installer_utils_system_windows_WindowsRegistry
- * Method: setBinaryValue0
- * Signature: (IILjava/lang/String;Ljava/lang/String;[B)V
- */
-JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_setBinaryValue0
- (JNIEnv *, jobject, jint, jint, jstring, jstring, jbyteArray);
-
-/*
- * Class: org_netbeans_installer_utils_system_windows_WindowsRegistry
- * Method: setNoneValue0
- * Signature: (IILjava/lang/String;Ljava/lang/String;[B)V
- */
-JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_setNoneValue0
- (JNIEnv *, jobject, jint, jint, jstring, jstring, jbyteArray);
-
-/*
- * Class: org_netbeans_installer_utils_system_windows_WindowsRegistry
- * Method: IsWow64Process0
- * Signature: ()Z
- */
-JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_IsWow64Process0
- (JNIEnv *, jobject);
-
-
-#ifndef KEY_WOW64_32KEY
-#define KEY_WOW64_32KEY 0x0200
-#endif
-#ifndef KEY_WOW64_64KEY
-#define KEY_WOW64_64KEY 0x0100
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/nbi/engine/native/jnilib/windows/vcproject/NBI JNI Library.ncb b/nbi/engine/native/jnilib/windows/vcproject/NBI JNI Library.ncb
deleted file mode 100644
index 9057ebacbf8c..000000000000
--- a/nbi/engine/native/jnilib/windows/vcproject/NBI JNI Library.ncb
+++ /dev/null
@@ -1 +0,0 @@
-Microsoft C/C++ MSF 7.00
diff --git a/nbi/engine/native/jnilib/windows/vcproject/NBI JNI Library.sln b/nbi/engine/native/jnilib/windows/vcproject/NBI JNI Library.sln
deleted file mode 100644
index 4410e6f719f0..000000000000
--- a/nbi/engine/native/jnilib/windows/vcproject/NBI JNI Library.sln
+++ /dev/null
@@ -1,20 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual C++ Express 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NBI JNI Library", "NBI JNI Library.vcproj", "{AF9FBB45-6887-41CE-8DC2-915C5FB2AD45}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Default-32bit|Windows = Default-32bit|Windows
- Default-64bit|Windows = Default-64bit|Windows
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {AF9FBB45-6887-41CE-8DC2-915C5FB2AD45}.Default-32bit|Windows.ActiveCfg = Default-32bit|Win32
- {AF9FBB45-6887-41CE-8DC2-915C5FB2AD45}.Default-32bit|Windows.Build.0 = Default-32bit|Win32
- {AF9FBB45-6887-41CE-8DC2-915C5FB2AD45}.Default-64bit|Windows.ActiveCfg = Default-32bit|Win32
- {AF9FBB45-6887-41CE-8DC2-915C5FB2AD45}.Default-64bit|Windows.Build.0 = Default-32bit|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/nbi/engine/native/jnilib/windows/vcproject/NBI JNI Library.suo b/nbi/engine/native/jnilib/windows/vcproject/NBI JNI Library.suo
deleted file mode 100644
index 8a450573de0c..000000000000
Binary files a/nbi/engine/native/jnilib/windows/vcproject/NBI JNI Library.suo and /dev/null differ
diff --git a/nbi/engine/native/jnilib/windows/vcproject/NBI JNI Library.vcproj b/nbi/engine/native/jnilib/windows/vcproject/NBI JNI Library.vcproj
deleted file mode 100644
index 4cbd1b736b43..000000000000
--- a/nbi/engine/native/jnilib/windows/vcproject/NBI JNI Library.vcproj
+++ /dev/null
@@ -1,261 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/nbi/engine/native/jnilib/windows/vcproject/NBI JNI Library.vcproj.user b/nbi/engine/native/jnilib/windows/vcproject/NBI JNI Library.vcproj.user
deleted file mode 100644
index a5ca4f998dec..000000000000
--- a/nbi/engine/native/jnilib/windows/vcproject/NBI JNI Library.vcproj.user
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/nbi/engine/native/jnilib/windows/vcproject/vc80.idb b/nbi/engine/native/jnilib/windows/vcproject/vc80.idb
deleted file mode 100644
index 3169052dc2e3..000000000000
Binary files a/nbi/engine/native/jnilib/windows/vcproject/vc80.idb and /dev/null differ
diff --git a/nbi/engine/native/launcher/unix/i18n/launcher.properties b/nbi/engine/native/launcher/unix/i18n/launcher.properties
deleted file mode 100644
index 73e6c6e14319..000000000000
--- a/nbi/engine/native/launcher/unix/i18n/launcher.properties
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-nlu.jvm.notfoundmessage=Java SE Development Kit (JDK) was not found on this computer\nJDK 8 is required for installing the NetBeans IDE. Make sure that the JDK is properly installed and run installer again.\nYou can specify valid JDK location using {0} installer argument.\n\nTo download the JDK, visit http://www.oracle.com/technetwork/java/javase/downloads
-nlu.jvm.usererror=Java Runtime Environment (JRE) was not found at the specified location {0}
-nlu.jvm.uncompatible=Unsupported JVM version at {0}.\nTry to specify another JVM location using parameter {1}
-nlu.freespace=There is not enough free disk space to extract installation data\n{0} MB of free disk space is required in a temporary folder.\nClean up the disk space and run installer again. You can specify a temporary folder with sufficient disk space using {1} installer argument
-nlu.integrity=\nInstaller file {0} seems to be corrupted
-nlu.missing.external.resource=Can`t run NetBeans Installer.\nAn external file with necessary data is required but missing:\n{0}
-nlu.cannot.create.tmpdir=Cannot create temporary directory {0}
-nlu.cannot.extract.bundled.jvm=Cannot prepare bundled JVM to run the installer.\nMost probably the bundled JVM is not compatible with the current platform.\nSee FAQ at http://wiki.netbeans.org/FaqUnableToPrepareBundledJdk for more information.
-nlu.cannot.unpack.jvm.file=Cannot unpack file {0}
-nlu.error.verify.bundled.jvm=Cannot verify bundled JVM, try to search JVM on the system
-
-nlu.running=Running the installer wizard...
-nlu.starting=Configuring the installer...
-nlu.extracting=Extracting installation data...
-nlu.prepare.jvm=Preparing bundled JVM ...
-nlu.jvm.search=Searching for JVM on the system...
-
-nlu.msg.usage=\nUsage:
-nlu.arg.javahome=\t{0}\t\tUsing java from for running application
-nlu.arg.verbose=\t{0}\t\tUse verbose output
-nlu.arg.output=\t{0}\t\tRedirect all output to file
-nlu.arg.disable.space.check=\t{0}\t\tDisable free space check
-nlu.arg.extract=\t{0}\t[dir]\tExtract all bundled data to .\n\t\t\t\tIf is not specified then extract to the current directory
-nlu.arg.tempdir=\t{0}\t\tUse for extracting temporary data
-nlu.arg.cpa=\t{0} \tAppend classpath with
-nlu.arg.cpp=\t{0} \tPrepend classpath with
-nlu.arg.locale=\t{0}\t\tOverride default locale with specified
-nlu.arg.silent=\t{0}\t\tRun installer silently
-nlu.arg.help=\t{0}\t\tShow this help
-
-
-nlu.java.application.name.macosx=NetBeans IDE Installer
diff --git a/nbi/engine/native/launcher/unix/src/launcher.sh b/nbi/engine/native/launcher/unix/src/launcher.sh
deleted file mode 100644
index 5a6fc1323807..000000000000
--- a/nbi/engine/native/launcher/unix/src/launcher.sh
+++ /dev/null
@@ -1,1665 +0,0 @@
-#!/bin/sh
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-ARG_JAVAHOME="--javahome"
-ARG_VERBOSE="--verbose"
-ARG_OUTPUT="--output"
-ARG_EXTRACT="--extract"
-ARG_JAVA_ARG_PREFIX="-J"
-ARG_TEMPDIR="--tempdir"
-ARG_CLASSPATHA="--classpath-append"
-ARG_CLASSPATHP="--classpath-prepend"
-ARG_HELP="--help"
-ARG_SILENT="--silent"
-ARG_NOSPACECHECK="--nospacecheck"
-ARG_LOCALE="--locale"
-
-USE_DEBUG_OUTPUT=0
-PERFORM_FREE_SPACE_CHECK=1
-SILENT_MODE=0
-EXTRACT_ONLY=0
-SHOW_HELP_ONLY=0
-LOCAL_OVERRIDDEN=0
-APPEND_CP=
-PREPEND_CP=
-LAUNCHER_APP_ARGUMENTS=
-LAUNCHER_JVM_ARGUMENTS=
-ERROR_OK=0
-ERROR_TEMP_DIRECTORY=2
-ERROR_TEST_JVM_FILE=3
-ERROR_JVM_NOT_FOUND=4
-ERROR_JVM_UNCOMPATIBLE=5
-ERROR_EXTRACT_ONLY=6
-ERROR_INPUTOUPUT=7
-ERROR_FREESPACE=8
-ERROR_INTEGRITY=9
-ERROR_MISSING_RESOURCES=10
-ERROR_JVM_EXTRACTION=11
-ERROR_JVM_UNPACKING=12
-ERROR_VERIFY_BUNDLED_JVM=13
-
-VERIFY_OK=1
-VERIFY_NOJAVA=2
-VERIFY_UNCOMPATIBLE=3
-
-MSG_ERROR_JVM_NOT_FOUND="nlu.jvm.notfoundmessage"
-MSG_ERROR_USER_ERROR="nlu.jvm.usererror"
-MSG_ERROR_JVM_UNCOMPATIBLE="nlu.jvm.uncompatible"
-MSG_ERROR_INTEGRITY="nlu.integrity"
-MSG_ERROR_FREESPACE="nlu.freespace"
-MSG_ERROP_MISSING_RESOURCE="nlu.missing.external.resource"
-MSG_ERROR_TMPDIR="nlu.cannot.create.tmpdir"
-
-MSG_ERROR_EXTRACT_JVM="nlu.cannot.extract.bundled.jvm"
-MSG_ERROR_UNPACK_JVM_FILE="nlu.cannot.unpack.jvm.file"
-MSG_ERROR_VERIFY_BUNDLED_JVM="nlu.error.verify.bundled.jvm"
-
-MSG_RUNNING="nlu.running"
-MSG_STARTING="nlu.starting"
-MSG_EXTRACTING="nlu.extracting"
-MSG_PREPARE_JVM="nlu.prepare.jvm"
-MSG_JVM_SEARCH="nlu.jvm.search"
-MSG_ARG_JAVAHOME="nlu.arg.javahome"
-MSG_ARG_VERBOSE="nlu.arg.verbose"
-MSG_ARG_OUTPUT="nlu.arg.output"
-MSG_ARG_EXTRACT="nlu.arg.extract"
-MSG_ARG_TEMPDIR="nlu.arg.tempdir"
-MSG_ARG_CPA="nlu.arg.cpa"
-MSG_ARG_CPP="nlu.arg.cpp"
-MSG_ARG_DISABLE_FREE_SPACE_CHECK="nlu.arg.disable.space.check"
-MSG_ARG_LOCALE="nlu.arg.locale"
-MSG_ARG_SILENT="nlu.arg.silent"
-MSG_ARG_HELP="nlu.arg.help"
-MSG_USAGE="nlu.msg.usage"
-
-isSymlink=
-
-entryPoint() {
- initSymlinkArgument
- CURRENT_DIRECTORY=`pwd`
- LAUNCHER_NAME=`echo $0`
- parseCommandLineArguments "$@"
- initializeVariables
- setLauncherLocale
- debugLauncherArguments "$@"
- if [ 1 -eq $SHOW_HELP_ONLY ] ; then
- showHelp
- fi
-
- message "$MSG_STARTING"
- createTempDirectory
- checkFreeSpace "$TOTAL_BUNDLED_FILES_SIZE" "$LAUNCHER_EXTRACT_DIR"
-
- extractJVMData
- if [ 0 -eq $EXTRACT_ONLY ] ; then
- searchJava
- fi
-
- extractBundledData
- verifyIntegrity
-
- if [ 0 -eq $EXTRACT_ONLY ] ; then
- executeMainClass
- else
- exitProgram $ERROR_OK
- fi
-}
-
-initSymlinkArgument() {
- testSymlinkErr=`test -L / 2>&1 > /dev/null`
- if [ -z "$testSymlinkErr" ] ; then
- isSymlink=-L
- else
- isSymlink=-h
- fi
-}
-
-debugLauncherArguments() {
- debug "Launcher Command : $0"
- argCounter=1
- while [ $# != 0 ] ; do
- debug "... argument [$argCounter] = $1"
- argCounter=`expr "$argCounter" + 1`
- shift
- done
-}
-isLauncherCommandArgument() {
- case "$1" in
- $ARG_VERBOSE | $ARG_NOSPACECHECK | $ARG_OUTPUT | $ARG_HELP | $ARG_JAVAHOME | $ARG_TEMPDIR | $ARG_EXTRACT | $ARG_SILENT | $ARG_LOCALE | $ARG_CLASSPATHP | $ARG_CLASSPATHA)
- echo 1
- ;;
- *)
- echo 0
- ;;
- esac
-}
-
-parseCommandLineArguments() {
- while [ $# != 0 ]
- do
- case "$1" in
- $ARG_VERBOSE)
- USE_DEBUG_OUTPUT=1;;
- $ARG_NOSPACECHECK)
- PERFORM_FREE_SPACE_CHECK=0
- parseJvmAppArgument "$1"
- ;;
- $ARG_OUTPUT)
- if [ -n "$2" ] ; then
- OUTPUT_FILE="$2"
- if [ -f "$OUTPUT_FILE" ] ; then
- # clear output file first
- rm -f "$OUTPUT_FILE" > /dev/null 2>&1
- touch "$OUTPUT_FILE"
- fi
- shift
- fi
- ;;
- $ARG_HELP)
- SHOW_HELP_ONLY=1
- ;;
- $ARG_JAVAHOME)
- if [ -n "$2" ] ; then
- LAUNCHER_JAVA="$2"
- shift
- fi
- ;;
- $ARG_TEMPDIR)
- if [ -n "$2" ] ; then
- LAUNCHER_JVM_TEMP_DIR="$2"
- shift
- fi
- ;;
- $ARG_EXTRACT)
- EXTRACT_ONLY=1
- if [ -n "$2" ] && [ `isLauncherCommandArgument "$2"` -eq 0 ] ; then
- LAUNCHER_EXTRACT_DIR="$2"
- shift
- else
- LAUNCHER_EXTRACT_DIR="$CURRENT_DIRECTORY"
- fi
- ;;
- $ARG_SILENT)
- SILENT_MODE=1
- parseJvmAppArgument "$1"
- ;;
- $ARG_LOCALE)
- SYSTEM_LOCALE="$2"
- LOCAL_OVERRIDDEN=1
- parseJvmAppArgument "$1"
- ;;
- $ARG_CLASSPATHP)
- if [ -n "$2" ] ; then
- if [ -z "$PREPEND_CP" ] ; then
- PREPEND_CP="$2"
- else
- PREPEND_CP="$2":"$PREPEND_CP"
- fi
- shift
- fi
- ;;
- $ARG_CLASSPATHA)
- if [ -n "$2" ] ; then
- if [ -z "$APPEND_CP" ] ; then
- APPEND_CP="$2"
- else
- APPEND_CP="$APPEND_CP":"$2"
- fi
- shift
- fi
- ;;
-
- *)
- parseJvmAppArgument "$1"
- esac
- shift
- done
-}
-
-setLauncherLocale() {
- if [ 0 -eq $LOCAL_OVERRIDDEN ] ; then
- SYSTEM_LOCALE="$LANG"
- debug "Setting initial launcher locale from the system : $SYSTEM_LOCALE"
- else
- debug "Setting initial launcher locale using command-line argument : $SYSTEM_LOCALE"
- fi
-
- LAUNCHER_LOCALE="$SYSTEM_LOCALE"
-
- if [ -n "$LAUNCHER_LOCALE" ] ; then
- # check if $LAUNCHER_LOCALE is in UTF-8
- if [ 0 -eq $LOCAL_OVERRIDDEN ] ; then
- removeUTFsuffix=`echo "$LAUNCHER_LOCALE" | sed "s/\.UTF-8//"`
- isUTF=`ifEquals "$removeUTFsuffix" "$LAUNCHER_LOCALE"`
- if [ 1 -eq $isUTF ] ; then
- #set launcher locale to the default if the system locale name doesn`t containt UTF-8
- LAUNCHER_LOCALE=""
- fi
- fi
-
- localeChanged=0
- localeCounter=0
- while [ $localeCounter -lt $LAUNCHER_LOCALES_NUMBER ] ; do
- localeVar="$""LAUNCHER_LOCALE_NAME_$localeCounter"
- arg=`eval "echo \"$localeVar\""`
- if [ -n "$arg" ] ; then
- # if not a default locale
- # $comp length shows the difference between $SYSTEM_LOCALE and $arg
- # the less the length the less the difference and more coincedence
-
- comp=`echo "$SYSTEM_LOCALE" | sed -e "s/^${arg}//"`
- length1=`getStringLength "$comp"`
- length2=`getStringLength "$LAUNCHER_LOCALE"`
- if [ $length1 -lt $length2 ] ; then
- # more coincidence between $SYSTEM_LOCALE and $arg than between $SYSTEM_LOCALE and $arg
- compare=`ifLess "$comp" "$LAUNCHER_LOCALE"`
-
- if [ 1 -eq $compare ] ; then
- LAUNCHER_LOCALE="$arg"
- localeChanged=1
- debug "... setting locale to $arg"
- fi
- if [ -z "$comp" ] ; then
- # means that $SYSTEM_LOCALE equals to $arg
- break
- fi
- fi
- else
- comp="$SYSTEM_LOCALE"
- fi
- localeCounter=`expr "$localeCounter" + 1`
- done
- if [ $localeChanged -eq 0 ] ; then
- #set default
- LAUNCHER_LOCALE=""
- fi
- fi
-
-
- debug "Final Launcher Locale : $LAUNCHER_LOCALE"
-}
-
-escapeBackslash() {
- echo "$1" | sed "s/\\\/\\\\\\\/g"
-}
-
-ifLess() {
- arg1=`escapeBackslash "$1"`
- arg2=`escapeBackslash "$2"`
- compare=`awk 'END { if ( a < b ) { print 1 } else { print 0 } }' a="$arg1" b="$arg2" < /dev/null`
- echo $compare
-}
-
-formatVersion() {
- formatted=`echo "$1" | sed "s/-ea//g;s/-rc[0-9]*//g;s/-beta[0-9]*//g;s/-preview[0-9]*//g;s/-dp[0-9]*//g;s/-alpha[0-9]*//g;s/-fcs//g;s/_/./g;s/-/\./g"`
- formatted=`echo "$formatted" | sed "s/^\(\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\)\.b\([0-9][0-9]*\)/\1\.0\.\5/g"`
- formatted=`echo "$formatted" | sed "s/\.b\([0-9][0-9]*\)/\.\1/g"`
- echo "$formatted"
-
-}
-
-compareVersions() {
- current1=`formatVersion "$1"`
- current2=`formatVersion "$2"`
- compresult=
- #0 - equals
- #-1 - less
- #1 - more
-
- while [ -z "$compresult" ] ; do
- value1=`echo "$current1" | sed "s/\..*//g"`
- value2=`echo "$current2" | sed "s/\..*//g"`
-
-
- removeDots1=`echo "$current1" | sed "s/\.//g"`
- removeDots2=`echo "$current2" | sed "s/\.//g"`
-
- if [ 1 -eq `ifEquals "$current1" "$removeDots1"` ] ; then
- remainder1=""
- else
- remainder1=`echo "$current1" | sed "s/^$value1\.//g"`
- fi
- if [ 1 -eq `ifEquals "$current2" "$removeDots2"` ] ; then
- remainder2=""
- else
- remainder2=`echo "$current2" | sed "s/^$value2\.//g"`
- fi
-
- current1="$remainder1"
- current2="$remainder2"
-
- if [ -z "$value1" ] || [ 0 -eq `ifNumber "$value1"` ] ; then
- value1=0
- fi
- if [ -z "$value2" ] || [ 0 -eq `ifNumber "$value2"` ] ; then
- value2=0
- fi
- if [ "$value1" -gt "$value2" ] ; then
- compresult=1
- break
- elif [ "$value2" -gt "$value1" ] ; then
- compresult=-1
- break
- fi
-
- if [ -z "$current1" ] && [ -z "$current2" ] ; then
- compresult=0
- break
- fi
- done
- echo $compresult
-}
-
-ifVersionLess() {
- compareResult=`compareVersions "$1" "$2"`
- if [ -1 -eq $compareResult ] ; then
- echo 1
- else
- echo 0
- fi
-}
-
-ifVersionGreater() {
- compareResult=`compareVersions "$1" "$2"`
- if [ 1 -eq $compareResult ] ; then
- echo 1
- else
- echo 0
- fi
-}
-
-ifGreater() {
- arg1=`escapeBackslash "$1"`
- arg2=`escapeBackslash "$2"`
-
- compare=`awk 'END { if ( a > b ) { print 1 } else { print 0 } }' a="$arg1" b="$arg2" < /dev/null`
- echo $compare
-}
-
-ifEquals() {
- arg1=`escapeBackslash "$1"`
- arg2=`escapeBackslash "$2"`
-
- compare=`awk 'END { if ( a == b ) { print 1 } else { print 0 } }' a="$arg1" b="$arg2" < /dev/null`
- echo $compare
-}
-
-ifNumber()
-{
- result=0
- if [ -n "$1" ] ; then
- num=`echo "$1" | sed 's/[0-9]*//g' 2>/dev/null`
- if [ -z "$num" ] ; then
- result=1
- fi
- fi
- echo $result
-}
-getStringLength() {
- strlength=`awk 'END{ print length(a) }' a="$1" < /dev/null`
- echo $strlength
-}
-
-resolveRelativity() {
- if [ 1 -eq `ifPathRelative "$1"` ] ; then
- echo "$CURRENT_DIRECTORY"/"$1" | sed 's/\"//g' 2>/dev/null
- else
- echo "$1"
- fi
-}
-
-ifPathRelative() {
- param="$1"
- removeRoot=`echo "$param" | sed "s/^\\\///" 2>/dev/null`
- echo `ifEquals "$param" "$removeRoot"` 2>/dev/null
-}
-
-
-initializeVariables() {
- debug "Launcher name is $LAUNCHER_NAME"
- systemName=`uname`
- debug "System name is $systemName"
- isMacOSX=`ifEquals "$systemName" "Darwin"`
- isSolaris=`ifEquals "$systemName" "SunOS"`
- if [ 1 -eq $isSolaris ] ; then
- POSSIBLE_JAVA_EXE_SUFFIX="$POSSIBLE_JAVA_EXE_SUFFIX_SOLARIS"
- else
- POSSIBLE_JAVA_EXE_SUFFIX="$POSSIBLE_JAVA_EXE_SUFFIX_COMMON"
- fi
- if [ 1 -eq $isMacOSX ] ; then
- # set default userdir and cachedir on MacOS
- DEFAULT_USERDIR_ROOT="${HOME}/Library/Application Support/NetBeans"
- DEFAULT_CACHEDIR_ROOT="${HOME}/Library/Caches/NetBeans"
- else
- # set default userdir and cachedir on unix systems
- DEFAULT_USERDIR_ROOT=${HOME}/.netbeans
- DEFAULT_CACHEDIR_ROOT=${HOME}/.cache/netbeans
- fi
- systemInfo=`uname -a 2>/dev/null`
- debug "System Information:"
- debug "$systemInfo"
- debug ""
- DEFAULT_DISK_BLOCK_SIZE=512
- LAUNCHER_TRACKING_SIZE=$LAUNCHER_STUB_SIZE
- LAUNCHER_TRACKING_SIZE_BYTES=`expr "$LAUNCHER_STUB_SIZE" \* "$FILE_BLOCK_SIZE"`
- getLauncherLocation
-}
-
-parseJvmAppArgument() {
- param="$1"
- arg=`echo "$param" | sed "s/^-J//"`
- argEscaped=`escapeString "$arg"`
-
- if [ "$param" = "$arg" ] ; then
- LAUNCHER_APP_ARGUMENTS="$LAUNCHER_APP_ARGUMENTS $argEscaped"
- else
- LAUNCHER_JVM_ARGUMENTS="$LAUNCHER_JVM_ARGUMENTS $argEscaped"
- fi
-}
-
-getLauncherLocation() {
- # if file path is relative then prepend it with current directory
- LAUNCHER_FULL_PATH=`resolveRelativity "$LAUNCHER_NAME"`
- debug "... normalizing full path"
- LAUNCHER_FULL_PATH=`normalizePath "$LAUNCHER_FULL_PATH"`
- debug "... getting dirname"
- LAUNCHER_DIR=`dirname "$LAUNCHER_FULL_PATH"`
- debug "Full launcher path = $LAUNCHER_FULL_PATH"
- debug "Launcher directory = $LAUNCHER_DIR"
-}
-
-getLauncherSize() {
- lsOutput=`ls -l --block-size=1 "$LAUNCHER_FULL_PATH" 2>/dev/null`
- if [ $? -ne 0 ] ; then
- #default block size
- lsOutput=`ls -l "$LAUNCHER_FULL_PATH" 2>/dev/null`
- fi
- echo "$lsOutput" | awk ' { print $5 }' 2>/dev/null
-}
-
-verifyIntegrity() {
- size=`getLauncherSize`
- extractedSize=$LAUNCHER_TRACKING_SIZE_BYTES
- if [ 1 -eq `ifNumber "$size"` ] ; then
- debug "... check integrity"
- debug "... minimal size : $extractedSize"
- debug "... real size : $size"
-
- if [ $size -lt $extractedSize ] ; then
- debug "... integration check FAILED"
- message "$MSG_ERROR_INTEGRITY" `normalizePath "$LAUNCHER_FULL_PATH"`
- exitProgram $ERROR_INTEGRITY
- fi
- debug "... integration check OK"
- fi
-}
-showHelp() {
- msg0=`message "$MSG_USAGE"`
- msg1=`message "$MSG_ARG_JAVAHOME $ARG_JAVAHOME"`
- msg2=`message "$MSG_ARG_TEMPDIR $ARG_TEMPDIR"`
- msg3=`message "$MSG_ARG_EXTRACT $ARG_EXTRACT"`
- msg4=`message "$MSG_ARG_OUTPUT $ARG_OUTPUT"`
- msg5=`message "$MSG_ARG_VERBOSE $ARG_VERBOSE"`
- msg6=`message "$MSG_ARG_CPA $ARG_CLASSPATHA"`
- msg7=`message "$MSG_ARG_CPP $ARG_CLASSPATHP"`
- msg8=`message "$MSG_ARG_DISABLE_FREE_SPACE_CHECK $ARG_NOSPACECHECK"`
- msg9=`message "$MSG_ARG_LOCALE $ARG_LOCALE"`
- msg10=`message "$MSG_ARG_SILENT $ARG_SILENT"`
- msg11=`message "$MSG_ARG_HELP $ARG_HELP"`
- out "$msg0"
- out "$msg1"
- out "$msg2"
- out "$msg3"
- out "$msg4"
- out "$msg5"
- out "$msg6"
- out "$msg7"
- out "$msg8"
- out "$msg9"
- out "$msg10"
- out "$msg11"
- exitProgram $ERROR_OK
-}
-
-exitProgram() {
- if [ 0 -eq $EXTRACT_ONLY ] ; then
- if [ -n "$LAUNCHER_EXTRACT_DIR" ] && [ -d "$LAUNCHER_EXTRACT_DIR" ]; then
- debug "Removing directory $LAUNCHER_EXTRACT_DIR"
- rm -rf "$LAUNCHER_EXTRACT_DIR" > /dev/null 2>&1
- fi
- fi
- debug "exitCode = $1"
- exit $1
-}
-
-debug() {
- if [ $USE_DEBUG_OUTPUT -eq 1 ] ; then
- timestamp=`date '+%Y-%m-%d %H:%M:%S'`
- out "[$timestamp]> $1"
- fi
-}
-
-out() {
-
- if [ -n "$OUTPUT_FILE" ] ; then
- printf "%s\n" "$@" >> "$OUTPUT_FILE"
- elif [ 0 -eq $SILENT_MODE ] ; then
- printf "%s\n" "$@"
- fi
-}
-
-message() {
- msg=`getMessage "$@"`
- out "$msg"
-}
-
-
-createTempDirectory() {
- if [ 0 -eq $EXTRACT_ONLY ] ; then
- if [ -z "$LAUNCHER_JVM_TEMP_DIR" ] ; then
- if [ 0 -eq $EXTRACT_ONLY ] ; then
- if [ -n "$TEMP" ] && [ -d "$TEMP" ] ; then
- debug "TEMP var is used : $TEMP"
- LAUNCHER_JVM_TEMP_DIR="$TEMP"
- elif [ -n "$TMP" ] && [ -d "$TMP" ] ; then
- debug "TMP var is used : $TMP"
- LAUNCHER_JVM_TEMP_DIR="$TMP"
- elif [ -n "$TEMPDIR" ] && [ -d "$TEMPDIR" ] ; then
- debug "TEMPDIR var is used : $TEMPDIR"
- LAUNCHER_JVM_TEMP_DIR="$TEMPDIR"
- elif [ -d "/tmp" ] ; then
- debug "Using /tmp for temp"
- LAUNCHER_JVM_TEMP_DIR="/tmp"
- else
- debug "Using home dir for temp"
- LAUNCHER_JVM_TEMP_DIR="$HOME"
- fi
- else
- #extract only : to the curdir
- LAUNCHER_JVM_TEMP_DIR="$CURRENT_DIRECTORY"
- fi
- fi
- # if temp dir does not exist then try to create it
- if [ ! -d "$LAUNCHER_JVM_TEMP_DIR" ] ; then
- mkdir -p "$LAUNCHER_JVM_TEMP_DIR" > /dev/null 2>&1
- if [ $? -ne 0 ] ; then
- message "$MSG_ERROR_TMPDIR" "$LAUNCHER_JVM_TEMP_DIR"
- exitProgram $ERROR_TEMP_DIRECTORY
- fi
- fi
- debug "Launcher TEMP ROOT = $LAUNCHER_JVM_TEMP_DIR"
- subDir=`date '+%u%m%M%S'`
- subDir=`echo ".nbi-$subDir.tmp"`
- LAUNCHER_EXTRACT_DIR="$LAUNCHER_JVM_TEMP_DIR/$subDir"
- else
- #extracting to the $LAUNCHER_EXTRACT_DIR
- debug "Launcher Extracting ROOT = $LAUNCHER_EXTRACT_DIR"
- fi
-
- if [ ! -d "$LAUNCHER_EXTRACT_DIR" ] ; then
- mkdir -p "$LAUNCHER_EXTRACT_DIR" > /dev/null 2>&1
- if [ $? -ne 0 ] ; then
- message "$MSG_ERROR_TMPDIR" "$LAUNCHER_EXTRACT_DIR"
- exitProgram $ERROR_TEMP_DIRECTORY
- fi
- else
- debug "$LAUNCHER_EXTRACT_DIR is directory and exist"
- fi
- debug "Using directory $LAUNCHER_EXTRACT_DIR for extracting data"
-}
-extractJVMData() {
- debug "Extracting testJVM file data..."
- extractTestJVMFile
- debug "Extracting bundled JVMs ..."
- extractJVMFiles
- debug "Extracting JVM data done"
-}
-extractBundledData() {
- message "$MSG_EXTRACTING"
- debug "Extracting bundled jars data..."
- extractJars
- debug "Extracting other data..."
- extractOtherData
- debug "Extracting bundled data finished..."
-}
-
-setTestJVMClasspath() {
- testjvmname=`basename "$TEST_JVM_PATH"`
- removeClassSuffix=`echo "$testjvmname" | sed 's/\.class$//'`
- notClassFile=`ifEquals "$testjvmname" "$removeClassSuffix"`
-
- if [ -d "$TEST_JVM_PATH" ] ; then
- TEST_JVM_CLASSPATH="$TEST_JVM_PATH"
- debug "... testJVM path is a directory"
- elif [ $isSymlink "$TEST_JVM_PATH" ] && [ $notClassFile -eq 1 ] ; then
- TEST_JVM_CLASSPATH="$TEST_JVM_PATH"
- debug "... testJVM path is a link but not a .class file"
- else
- if [ $notClassFile -eq 1 ] ; then
- debug "... testJVM path is a jar/zip file"
- TEST_JVM_CLASSPATH="$TEST_JVM_PATH"
- else
- debug "... testJVM path is a .class file"
- TEST_JVM_CLASSPATH=`dirname "$TEST_JVM_PATH"`
- fi
- fi
- debug "... testJVM classpath is : $TEST_JVM_CLASSPATH"
-}
-
-extractTestJVMFile() {
- TEST_JVM_PATH=`resolveResourcePath "TEST_JVM_FILE"`
- extractResource "TEST_JVM_FILE"
- setTestJVMClasspath
-
-}
-
-installJVM() {
- message "$MSG_PREPARE_JVM"
- jvmFile=`resolveRelativity "$1"`
- jvmDir=`dirname "$jvmFile"`/_jvm
- debug "JVM Directory : $jvmDir"
- mkdir "$jvmDir" > /dev/null 2>&1
- if [ $? != 0 ] ; then
- message "$MSG_ERROR_EXTRACT_JVM"
- exitProgram $ERROR_JVM_EXTRACTION
- fi
- chmod +x "$jvmFile" > /dev/null 2>&1
- jvmFileEscaped=`escapeString "$jvmFile"`
- jvmDirEscaped=`escapeString "$jvmDir"`
- cd "$jvmDir"
- runCommand "$jvmFileEscaped"
- ERROR_CODE=$?
-
- cd "$CURRENT_DIRECTORY"
-
- if [ $ERROR_CODE != 0 ] ; then
- message "$MSG_ERROR_EXTRACT_JVM"
- exitProgram $ERROR_JVM_EXTRACTION
- fi
-
- files=`find "$jvmDir" -name "*.jar.pack.gz" -print`
- debug "Packed files : $files"
- f="$files"
- fileCounter=1;
- while [ -n "$f" ] ; do
- f=`echo "$files" | sed -n "${fileCounter}p" 2>/dev/null`
- debug "... next file is $f"
- if [ -n "$f" ] ; then
- debug "... packed file = $f"
- unpacked=`echo "$f" | sed s/\.pack\.gz//`
- debug "... unpacked file = $unpacked"
- fEsc=`escapeString "$f"`
- uEsc=`escapeString "$unpacked"`
- cmd="$jvmDirEscaped/bin/unpack200 -r $fEsc $uEsc"
- runCommand "$cmd"
- if [ $? != 0 ] ; then
- message "$MSG_ERROR_UNPACK_JVM_FILE" "$f"
- exitProgram $ERROR_JVM_UNPACKING
- fi
- fi
- fileCounter=`expr "$fileCounter" + 1`
- done
-
- verifyJVM "$jvmDir"
- if [ -z "$LAUNCHER_JAVA_EXE" ] ; then
- message "$MSG_ERROR_VERIFY_BUNDLED_JVM"
- exitProgram $ERROR_VERIFY_BUNDLED_JVM
- fi
-}
-
-resolveResourcePath() {
- resourcePrefix="$1"
- resourceVar="$""$resourcePrefix""_PATH"
- resourceName=`eval "echo \"$resourceVar\""`
- resourcePath=`resolveString "$resourceName"`
- echo "$resourcePath"
-
-}
-
-resolveResourceSize() {
- resourcePrefix="$1"
- resourceVar="$""$resourcePrefix""_SIZE"
- resourceSize=`eval "echo \"$resourceVar\""`
- echo "$resourceSize"
-}
-
-resolveResourceMd5() {
- resourcePrefix="$1"
- resourceVar="$""$resourcePrefix""_MD5"
- resourceMd5=`eval "echo \"$resourceVar\""`
- echo "$resourceMd5"
-}
-
-resolveResourceType() {
- resourcePrefix="$1"
- resourceVar="$""$resourcePrefix""_TYPE"
- resourceType=`eval "echo \"$resourceVar\""`
- echo "$resourceType"
-}
-
-extractResource() {
- debug "... extracting resource"
- resourcePrefix="$1"
- debug "... resource prefix id=$resourcePrefix"
- resourceType=`resolveResourceType "$resourcePrefix"`
- debug "... resource type=$resourceType"
- if [ $resourceType -eq 0 ] ; then
- resourceSize=`resolveResourceSize "$resourcePrefix"`
- debug "... resource size=$resourceSize"
- resourcePath=`resolveResourcePath "$resourcePrefix"`
- debug "... resource path=$resourcePath"
- extractFile "$resourceSize" "$resourcePath"
- resourceMd5=`resolveResourceMd5 "$resourcePrefix"`
- debug "... resource md5=$resourceMd5"
- checkMd5 "$resourcePath" "$resourceMd5"
- debug "... done"
- fi
- debug "... extracting resource finished"
-
-}
-
-extractJars() {
- counter=0
- while [ $counter -lt $JARS_NUMBER ] ; do
- extractResource "JAR_$counter"
- counter=`expr "$counter" + 1`
- done
-}
-
-extractOtherData() {
- counter=0
- while [ $counter -lt $OTHER_RESOURCES_NUMBER ] ; do
- extractResource "OTHER_RESOURCE_$counter"
- counter=`expr "$counter" + 1`
- done
-}
-
-extractJVMFiles() {
- javaCounter=0
- debug "... total number of JVM files : $JAVA_LOCATION_NUMBER"
- while [ $javaCounter -lt $JAVA_LOCATION_NUMBER ] ; do
- extractResource "JAVA_LOCATION_$javaCounter"
- javaCounter=`expr "$javaCounter" + 1`
- done
-}
-
-
-processJarsClasspath() {
- JARS_CLASSPATH=""
- jarsCounter=0
- while [ $jarsCounter -lt $JARS_NUMBER ] ; do
- resolvedFile=`resolveResourcePath "JAR_$jarsCounter"`
- debug "... adding jar to classpath : $resolvedFile"
- if [ ! -f "$resolvedFile" ] && [ ! -d "$resolvedFile" ] && [ ! $isSymlink "$resolvedFile" ] ; then
- message "$MSG_ERROP_MISSING_RESOURCE" "$resolvedFile"
- exitProgram $ERROR_MISSING_RESOURCES
- else
- if [ -z "$JARS_CLASSPATH" ] ; then
- JARS_CLASSPATH="$resolvedFile"
- else
- JARS_CLASSPATH="$JARS_CLASSPATH":"$resolvedFile"
- fi
- fi
-
- jarsCounter=`expr "$jarsCounter" + 1`
- done
- debug "Jars classpath : $JARS_CLASSPATH"
-}
-
-extractFile() {
- start=$LAUNCHER_TRACKING_SIZE
- size=$1 #absolute size
- name="$2" #relative part
- fullBlocks=`expr $size / $FILE_BLOCK_SIZE`
- fullBlocksSize=`expr "$FILE_BLOCK_SIZE" \* "$fullBlocks"`
- oneBlocks=`expr $size - $fullBlocksSize`
- oneBlocksStart=`expr "$start" + "$fullBlocks"`
-
- checkFreeSpace $size "$name"
- LAUNCHER_TRACKING_SIZE_BYTES=`expr "$LAUNCHER_TRACKING_SIZE" \* "$FILE_BLOCK_SIZE"`
-
- if [ 0 -eq $diskSpaceCheck ] ; then
- dir=`dirname "$name"`
- message "$MSG_ERROR_FREESPACE" "$size" "$ARG_TEMPDIR"
- exitProgram $ERROR_FREESPACE
- fi
-
- if [ 0 -lt "$fullBlocks" ] ; then
- # file is larger than FILE_BLOCK_SIZE
- dd if="$LAUNCHER_FULL_PATH" of="$name" \
- bs="$FILE_BLOCK_SIZE" count="$fullBlocks" skip="$start"\
- > /dev/null 2>&1
- LAUNCHER_TRACKING_SIZE=`expr "$LAUNCHER_TRACKING_SIZE" + "$fullBlocks"`
- LAUNCHER_TRACKING_SIZE_BYTES=`expr "$LAUNCHER_TRACKING_SIZE" \* "$FILE_BLOCK_SIZE"`
- fi
- if [ 0 -lt "$oneBlocks" ] ; then
- dd if="$LAUNCHER_FULL_PATH" of="$name.tmp.tmp" bs="$FILE_BLOCK_SIZE" count=1\
- skip="$oneBlocksStart"\
- > /dev/null 2>&1
-
- dd if="$name.tmp.tmp" of="$name" bs=1 count="$oneBlocks" seek="$fullBlocksSize"\
- > /dev/null 2>&1
-
- rm -f "$name.tmp.tmp"
- LAUNCHER_TRACKING_SIZE=`expr "$LAUNCHER_TRACKING_SIZE" + 1`
-
- LAUNCHER_TRACKING_SIZE_BYTES=`expr "$LAUNCHER_TRACKING_SIZE_BYTES" + "$oneBlocks"`
- fi
-}
-
-md5_program=""
-no_md5_program_id="no_md5_program"
-
-initMD5program() {
- if [ -z "$md5_program" ] ; then
- type digest >> /dev/null 2>&1
- if [ 0 -eq $? ] ; then
- md5_program="digest -a md5"
- else
- type md5sum >> /dev/null 2>&1
- if [ 0 -eq $? ] ; then
- md5_program="md5sum"
- else
- type gmd5sum >> /dev/null 2>&1
- if [ 0 -eq $? ] ; then
- md5_program="gmd5sum"
- else
- type md5 >> /dev/null 2>&1
- if [ 0 -eq $? ] ; then
- md5_program="md5 -q"
- else
- md5_program="$no_md5_program_id"
- fi
- fi
- fi
- fi
- debug "... program to check: $md5_program"
- fi
-}
-
-checkMd5() {
- name="$1"
- md5="$2"
- if [ 32 -eq `getStringLength "$md5"` ] ; then
- #do MD5 check
- initMD5program
- if [ 0 -eq `ifEquals "$md5_program" "$no_md5_program_id"` ] ; then
- debug "... check MD5 of file : $name"
- debug "... expected md5: $md5"
- realmd5=`$md5_program "$name" 2>/dev/null | sed "s/ .*//g"`
- debug "... real md5 : $realmd5"
- if [ 32 -eq `getStringLength "$realmd5"` ] ; then
- if [ 0 -eq `ifEquals "$md5" "$realmd5"` ] ; then
- debug "... integration check FAILED"
- message "$MSG_ERROR_INTEGRITY" `normalizePath "$LAUNCHER_FULL_PATH"`
- exitProgram $ERROR_INTEGRITY
- fi
- else
- debug "... looks like not the MD5 sum"
- fi
- fi
- fi
-}
-searchJavaEnvironment() {
- if [ -z "$LAUNCHER_JAVA_EXE" ] ; then
- # search java in the environment
-
- ptr="$POSSIBLE_JAVA_ENV"
- while [ -n "$ptr" ] && [ -z "$LAUNCHER_JAVA_EXE" ] ; do
- argJavaHome=`echo "$ptr" | sed "s/:.*//"`
- back=`echo "$argJavaHome" | sed "s/\\\//\\\\\\\\\//g"`
- end=`echo "$ptr" | sed "s/${back}://"`
- argJavaHome=`echo "$back" | sed "s/\\\\\\\\\//\\\//g"`
- ptr="$end"
- eval evaluated=`echo \\$$argJavaHome` > /dev/null
- if [ -n "$evaluated" ] ; then
- debug "EnvVar $argJavaHome=$evaluated"
- verifyJVM "$evaluated"
- fi
- done
- fi
-}
-
-installBundledJVMs() {
- if [ -z "$LAUNCHER_JAVA_EXE" ] ; then
- # search bundled java in the common list
- javaCounter=0
- while [ $javaCounter -lt $JAVA_LOCATION_NUMBER ] && [ -z "$LAUNCHER_JAVA_EXE" ] ; do
- fileType=`resolveResourceType "JAVA_LOCATION_$javaCounter"`
-
- if [ $fileType -eq 0 ] ; then # bundled->install
- argJavaHome=`resolveResourcePath "JAVA_LOCATION_$javaCounter"`
- installJVM "$argJavaHome"
- fi
- javaCounter=`expr "$javaCounter" + 1`
- done
- fi
-}
-
-searchJavaOnMacOs() {
- if [ -x "/usr/libexec/java_home" ]; then
- javaOnMacHome=`/usr/libexec/java_home --failfast`
- fi
-
- if [ ! -x "$javaOnMacHome/bin/java" -a -f "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java" ] ; then
- javaOnMacHome=`echo "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home"`
- fi
-
- verifyJVM "$javaOnMacHome"
-}
-
-searchJavaSystemDefault() {
- if [ -z "$LAUNCHER_JAVA_EXE" ] ; then
- debug "... check default java in the path"
- java_bin=`which java 2>&1`
- if [ $? -eq 0 ] && [ -n "$java_bin" ] ; then
- remove_no_java_in=`echo "$java_bin" | sed "s/no java in//g"`
- if [ 1 -eq `ifEquals "$remove_no_java_in" "$java_bin"` ] && [ -f "$java_bin" ] ; then
- debug "... java in path found: $java_bin"
- # java is in path
- java_bin=`resolveSymlink "$java_bin"`
- debug "... java real path: $java_bin"
- parentDir=`dirname "$java_bin"`
- if [ -n "$parentDir" ] ; then
- parentDir=`dirname "$parentDir"`
- if [ -n "$parentDir" ] ; then
- debug "... java home path: $parentDir"
- parentDir=`resolveSymlink "$parentDir"`
- debug "... java home real path: $parentDir"
- verifyJVM "$parentDir"
- fi
- fi
- fi
- fi
- fi
-}
-
-searchJavaSystemPaths() {
- if [ -z "$LAUNCHER_JAVA_EXE" ] ; then
- # search java in the common system paths
- javaCounter=0
- while [ $javaCounter -lt $JAVA_LOCATION_NUMBER ] && [ -z "$LAUNCHER_JAVA_EXE" ] ; do
- fileType=`resolveResourceType "JAVA_LOCATION_$javaCounter"`
- argJavaHome=`resolveResourcePath "JAVA_LOCATION_$javaCounter"`
-
- debug "... next location $argJavaHome"
-
- if [ $fileType -ne 0 ] ; then # bundled JVMs have already been proceeded
- argJavaHome=`escapeString "$argJavaHome"`
- locations=`ls -d -1 $argJavaHome 2>/dev/null`
- nextItem="$locations"
- itemCounter=1
- while [ -n "$nextItem" ] && [ -z "$LAUNCHER_JAVA_EXE" ] ; do
- nextItem=`echo "$locations" | sed -n "${itemCounter}p" 2>/dev/null`
- debug "... next item is $nextItem"
- nextItem=`removeEndSlashes "$nextItem"`
- if [ -n "$nextItem" ] ; then
- if [ -d "$nextItem" ] || [ $isSymlink "$nextItem" ] ; then
- debug "... checking item : $nextItem"
- verifyJVM "$nextItem"
- fi
- fi
- itemCounter=`expr "$itemCounter" + 1`
- done
- fi
- javaCounter=`expr "$javaCounter" + 1`
- done
- fi
-}
-
-searchJavaUserDefined() {
- if [ -z "$LAUNCHER_JAVA_EXE" ] ; then
- if [ -n "$LAUNCHER_JAVA" ] ; then
- verifyJVM "$LAUNCHER_JAVA"
-
- if [ $VERIFY_UNCOMPATIBLE -eq $verifyResult ] ; then
- message "$MSG_ERROR_JVM_UNCOMPATIBLE" "$LAUNCHER_JAVA" "$ARG_JAVAHOME"
- exitProgram $ERROR_JVM_UNCOMPATIBLE
- elif [ $VERIFY_NOJAVA -eq $verifyResult ] ; then
- message "$MSG_ERROR_USER_ERROR" "$LAUNCHER_JAVA"
- exitProgram $ERROR_JVM_NOT_FOUND
- fi
- fi
- fi
-}
-
-searchJavaInstallFolder() {
- installFolder="`dirname \"$0\"`"
- installFolder="`( cd \"$installFolder\" && pwd )`"
- installFolder="$installFolder/bin/jre"
- tempJreFolder="$TEST_JVM_CLASSPATH/_jvm"
-
- if [ -d "$installFolder" ] ; then
- #copy nested JRE to temp folder
- cp -r "$installFolder" "$tempJreFolder"
-
- verifyJVM "$tempJreFolder"
- fi
-}
-
-searchJava() {
- message "$MSG_JVM_SEARCH"
- if [ ! -f "$TEST_JVM_CLASSPATH" ] && [ ! $isSymlink "$TEST_JVM_CLASSPATH" ] && [ ! -d "$TEST_JVM_CLASSPATH" ]; then
- debug "Cannot find file for testing JVM at $TEST_JVM_CLASSPATH"
- message "$MSG_ERROR_JVM_NOT_FOUND" "$ARG_JAVAHOME"
- exitProgram $ERROR_TEST_JVM_FILE
- else
- searchJavaInstallFolder
- searchJavaUserDefined
- installBundledJVMs
- searchJavaEnvironment
- searchJavaSystemDefault
- searchJavaSystemPaths
- if [ 1 -eq $isMacOSX ] ; then
- searchJavaOnMacOs
- fi
- fi
-
- if [ -z "$LAUNCHER_JAVA_EXE" ] ; then
- message "$MSG_ERROR_JVM_NOT_FOUND" "$ARG_JAVAHOME"
- exitProgram $ERROR_JVM_NOT_FOUND
- fi
-}
-
-normalizePath() {
- argument="$1"
-
- # replace all /./ to /
- while [ 0 -eq 0 ] ; do
- testArgument=`echo "$argument" | sed 's/\/\.\//\//g' 2> /dev/null`
- if [ -n "$testArgument" ] && [ 0 -eq `ifEquals "$argument" "$testArgument"` ] ; then
- # something changed
- argument="$testArgument"
- else
- break
- fi
- done
-
- # replace XXX/../YYY to 'dirname XXX'/YYY
- while [ 0 -eq 0 ] ; do
- beforeDotDot=`echo "$argument" | sed "s/\/\.\.\/.*//g" 2> /dev/null`
- if [ 0 -eq `ifEquals "$beforeDotDot" "$argument"` ] && [ 0 -eq `ifEquals "$beforeDotDot" "."` ] && [ 0 -eq `ifEquals "$beforeDotDot" ".."` ] ; then
- esc=`echo "$beforeDotDot" | sed "s/\\\//\\\\\\\\\//g"`
- afterDotDot=`echo "$argument" | sed "s/^$esc\/\.\.//g" 2> /dev/null`
- parent=`dirname "$beforeDotDot"`
- argument=`echo "$parent""$afterDotDot"`
- else
- break
- fi
- done
-
- # replace XXX/.. to 'dirname XXX'
- while [ 0 -eq 0 ] ; do
- beforeDotDot=`echo "$argument" | sed "s/\/\.\.$//g" 2> /dev/null`
- if [ 0 -eq `ifEquals "$beforeDotDot" "$argument"` ] && [ 0 -eq `ifEquals "$beforeDotDot" "."` ] && [ 0 -eq `ifEquals "$beforeDotDot" ".."` ] ; then
- argument=`dirname "$beforeDotDot"`
- else
- break
- fi
- done
-
- # remove /. a the end (if the resulting string is not zero)
- testArgument=`echo "$argument" | sed 's/\/\.$//' 2> /dev/null`
- if [ -n "$testArgument" ] ; then
- argument="$testArgument"
- fi
-
- # replace more than 2 separators to 1
- testArgument=`echo "$argument" | sed 's/\/\/*/\//g' 2> /dev/null`
- if [ -n "$testArgument" ] ; then
- argument="$testArgument"
- fi
-
- echo "$argument"
-}
-
-resolveSymlink() {
- pathArg="$1"
- while [ $isSymlink "$pathArg" ] ; do
- ls=`ls -ld "$pathArg"`
- link=`expr "$ls" : '^.*-> \(.*\)$' 2>/dev/null`
-
- if expr "$link" : '^/' 2> /dev/null >/dev/null; then
- pathArg="$link"
- else
- pathArg="`dirname "$pathArg"`"/"$link"
- fi
- pathArg=`normalizePath "$pathArg"`
- done
- echo "$pathArg"
-}
-
-verifyJVM() {
- javaTryPath=`normalizePath "$1"`
- verifyJavaHome "$javaTryPath"
- if [ $VERIFY_OK -ne $verifyResult ] ; then
- savedResult=$verifyResult
-
- if [ 0 -eq $isMacOSX ] ; then
- #check private jre
- javaTryPath="$javaTryPath""/jre"
- verifyJavaHome "$javaTryPath"
- else
- #check MacOSX Home dir
- javaTryPath="$javaTryPath""/Home"
- verifyJavaHome "$javaTryPath"
- fi
-
- if [ $VERIFY_NOJAVA -eq $verifyResult ] ; then
- verifyResult=$savedResult
- fi
- fi
-}
-
-removeEndSlashes() {
- arg="$1"
- tryRemove=`echo "$arg" | sed 's/\/\/*$//' 2>/dev/null`
- if [ -n "$tryRemove" ] ; then
- arg="$tryRemove"
- fi
- echo "$arg"
-}
-
-checkJavaHierarchy() {
- # return 0 on no java
- # return 1 on jre
- # return 2 on jdk
-
- tryJava="$1"
- javaHierarchy=0
- if [ -n "$tryJava" ] ; then
- if [ -d "$tryJava" ] || [ $isSymlink "$tryJava" ] ; then # existing directory or a isSymlink
- javaBin="$tryJava"/"bin"
-
- if [ -d "$javaBin" ] || [ $isSymlink "$javaBin" ] ; then
- javaBinJavac="$javaBin"/"javac"
- if [ -f "$javaBinJavac" ] || [ $isSymlink "$javaBinJavac" ] ; then
- #definitely JDK as the JRE doesn`t contain javac
- javaHierarchy=2
- else
- #check if we inside JRE
- javaBinJava="$javaBin"/"java"
- if [ -f "$javaBinJava" ] || [ $isSymlink "$javaBinJava" ] ; then
- javaHierarchy=1
- fi
- fi
- fi
- fi
- fi
- if [ 0 -eq $javaHierarchy ] ; then
- debug "... no java there"
- elif [ 1 -eq $javaHierarchy ] ; then
- debug "... JRE there"
- elif [ 2 -eq $javaHierarchy ] ; then
- debug "... JDK there"
- fi
-}
-
-verifyJavaHome() {
- verifyResult=$VERIFY_NOJAVA
- java=`removeEndSlashes "$1"`
- debug "... verify : $java"
-
- java=`resolveSymlink "$java"`
- debug "... real path : $java"
-
- checkJavaHierarchy "$java"
-
- if [ 0 -ne $javaHierarchy ] ; then
- testJVMclasspath=`escapeString "$TEST_JVM_CLASSPATH"`
- testJVMclass=`escapeString "$TEST_JVM_CLASS"`
-
- pointer="$POSSIBLE_JAVA_EXE_SUFFIX"
- while [ -n "$pointer" ] && [ -z "$LAUNCHER_JAVA_EXE" ]; do
- arg=`echo "$pointer" | sed "s/:.*//"`
- back=`echo "$arg" | sed "s/\\\//\\\\\\\\\//g"`
- end=`echo "$pointer" | sed "s/${back}://"`
- arg=`echo "$back" | sed "s/\\\\\\\\\//\\\//g"`
- pointer="$end"
- javaExe="$java/$arg"
-
- if [ -x "$javaExe" ] ; then
- javaExeEscaped=`escapeString "$javaExe"`
- command="$javaExeEscaped -classpath $testJVMclasspath $testJVMclass"
-
- debug "Executing java verification command..."
- debug "$command"
- output=`eval "$command" 2>/dev/null`
- javaVersion=`echo "$output" | sed "2d;3d;4d;5d"`
- javaVmVersion=`echo "$output" | sed "1d;3d;4d;5d"`
- vendor=`echo "$output" | sed "1d;2d;4d;5d"`
- osname=`echo "$output" | sed "1d;2d;3d;5d"`
- osarch=`echo "$output" | sed "1d;2d;3d;4d"`
-
- debug "Java :"
- debug " executable = {$javaExe}"
- debug " javaVersion = {$javaVersion}"
- debug " javaVmVersion = {$javaVmVersion}"
- debug " vendor = {$vendor}"
- debug " osname = {$osname}"
- debug " osarch = {$osarch}"
- comp=0
-
- if [ -n "$javaVersion" ] && [ -n "$javaVmVersion" ] && [ -n "$vendor" ] && [ -n "$osname" ] && [ -n "$osarch" ] ; then
- debug "... seems to be java indeed"
- javaVersionEsc=`escapeBackslash "$javaVersion"`
- javaVmVersionEsc=`escapeBackslash "$javaVmVersion"`
- javaVersion=`awk 'END { idx = index(b,a); if(idx!=0) { print substr(b,idx,length(b)) } else { print a } }' a="$javaVersionEsc" b="$javaVmVersionEsc" < /dev/null`
-
- #remove build number
- javaVersion=`echo "$javaVersion" | sed 's/-.*$//;s/\ .*//'`
- verifyResult=$VERIFY_UNCOMPATIBLE
-
- if [ -n "$javaVersion" ] ; then
- debug " checking java version = {$javaVersion}"
- javaCompCounter=0
-
- while [ $javaCompCounter -lt $JAVA_COMPATIBLE_PROPERTIES_NUMBER ] && [ -z "$LAUNCHER_JAVA_EXE" ] ; do
- comp=1
- setJavaCompatibilityProperties_$javaCompCounter
- debug "Min Java Version : $JAVA_COMP_VERSION_MIN"
- debug "Max Java Version : $JAVA_COMP_VERSION_MAX"
- debug "Java Vendor : $JAVA_COMP_VENDOR"
- debug "Java OS Name : $JAVA_COMP_OSNAME"
- debug "Java OS Arch : $JAVA_COMP_OSARCH"
-
- if [ -n "$JAVA_COMP_VERSION_MIN" ] ; then
- compMin=`ifVersionLess "$javaVersion" "$JAVA_COMP_VERSION_MIN"`
- if [ 1 -eq $compMin ] ; then
- comp=0
- fi
- fi
-
- if [ -n "$JAVA_COMP_VERSION_MAX" ] ; then
- compMax=`ifVersionGreater "$javaVersion" "$JAVA_COMP_VERSION_MAX"`
- if [ 1 -eq $compMax ] ; then
- comp=0
- fi
- fi
- if [ -n "$JAVA_COMP_VENDOR" ] ; then
- debug " checking vendor = {$vendor}, {$JAVA_COMP_VENDOR}"
- subs=`echo "$vendor" | sed "s/${JAVA_COMP_VENDOR}//"`
- if [ `ifEquals "$subs" "$vendor"` -eq 1 ] ; then
- comp=0
- debug "... vendor incompatible"
- fi
- fi
-
- if [ -n "$JAVA_COMP_OSNAME" ] ; then
- debug " checking osname = {$osname}, {$JAVA_COMP_OSNAME}"
- subs=`echo "$osname" | sed "s/${JAVA_COMP_OSNAME}//"`
-
- if [ `ifEquals "$subs" "$osname"` -eq 1 ] ; then
- comp=0
- debug "... osname incompatible"
- fi
- fi
- if [ -n "$JAVA_COMP_OSARCH" ] ; then
- debug " checking osarch = {$osarch}, {$JAVA_COMP_OSARCH}"
- subs=`echo "$osarch" | sed "s/${JAVA_COMP_OSARCH}//"`
-
- if [ `ifEquals "$subs" "$osarch"` -eq 1 ] ; then
- comp=0
- debug "... osarch incompatible"
- fi
- fi
- if [ $comp -eq 1 ] ; then
- LAUNCHER_JAVA_EXE="$javaExe"
- LAUNCHER_JAVA="$java"
- verifyResult=$VERIFY_OK
- fi
- debug " compatible = [$comp]"
- javaCompCounter=`expr "$javaCompCounter" + 1`
- done
- fi
- fi
- fi
- done
- fi
-}
-
-checkFreeSpace() {
- size="$1"
- path="$2"
-
- if [ ! -d "$path" ] && [ ! $isSymlink "$path" ] ; then
- # if checking path is not an existing directory - check its parent dir
- path=`dirname "$path"`
- fi
-
- diskSpaceCheck=0
-
- if [ 0 -eq $PERFORM_FREE_SPACE_CHECK ] ; then
- diskSpaceCheck=1
- else
- # get size of the atomic entry (directory)
- freeSpaceDirCheck="$path"/freeSpaceCheckDir
- debug "Checking space in $path (size = $size)"
- mkdir -p "$freeSpaceDirCheck"
- # POSIX compatible du return size in 1024 blocks
- du --block-size=$DEFAULT_DISK_BLOCK_SIZE "$freeSpaceDirCheck" 1>/dev/null 2>&1
-
- if [ $? -eq 0 ] ; then
- debug " getting POSIX du with 512 bytes blocks"
- atomicBlock=`du --block-size=$DEFAULT_DISK_BLOCK_SIZE "$freeSpaceDirCheck" | awk ' { print $A }' A=1 2>/dev/null`
- else
- debug " getting du with default-size blocks"
- atomicBlock=`du "$freeSpaceDirCheck" | awk ' { print $A }' A=1 2>/dev/null`
- fi
- rm -rf "$freeSpaceDirCheck"
- debug " atomic block size : [$atomicBlock]"
-
- isBlockNumber=`ifNumber "$atomicBlock"`
- if [ 0 -eq $isBlockNumber ] ; then
- out "Can\`t get disk block size"
- exitProgram $ERROR_INPUTOUPUT
- fi
- requiredBlocks=`expr \( "$1" / $DEFAULT_DISK_BLOCK_SIZE \) + $atomicBlock` 1>/dev/null 2>&1
- if [ `ifNumber $1` -eq 0 ] ; then
- out "Can\`t calculate required blocks size"
- exitProgram $ERROR_INPUTOUPUT
- fi
- # get free block size
- column=4
- df -P --block-size="$DEFAULT_DISK_BLOCK_SIZE" "$path" 1>/dev/null 2>&1
- if [ $? -eq 0 ] ; then
- # gnu df, use POSIX output
- debug " getting GNU POSIX df with specified block size $DEFAULT_DISK_BLOCK_SIZE"
- availableBlocks=`df -P --block-size="$DEFAULT_DISK_BLOCK_SIZE" "$path" | sed "1d" | awk ' { print $A }' A=$column 2>/dev/null`
- else
- # try POSIX output
- df -P "$path" 1>/dev/null 2>&1
- if [ $? -eq 0 ] ; then
- debug " getting POSIX df with 512 bytes blocks"
- availableBlocks=`df -P "$path" | sed "1d" | awk ' { print $A }' A=$column 2>/dev/null`
- # try Solaris df from xpg4
- elif [ -x /usr/xpg4/bin/df ] ; then
- debug " getting xpg4 df with default-size blocks"
- availableBlocks=`/usr/xpg4/bin/df -P "$path" | sed "1d" | awk ' { print $A }' A=$column 2>/dev/null`
- # last chance to get free space
- else
- debug " getting df with default-size blocks"
- availableBlocks=`df "$path" | sed "1d" | awk ' { print $A }' A=$column 2>/dev/null`
- fi
- fi
- debug " available blocks : [$availableBlocks]"
- if [ `ifNumber "$availableBlocks"` -eq 0 ] ; then
- out "Can\`t get the number of the available blocks on the system"
- exitProgram $ERROR_INPUTOUTPUT
- fi
-
- # compare
- debug " required blocks : [$requiredBlocks]"
-
- if [ $availableBlocks -gt $requiredBlocks ] ; then
- debug "... disk space check OK"
- diskSpaceCheck=1
- else
- debug "... disk space check FAILED"
- fi
- fi
- if [ 0 -eq $diskSpaceCheck ] ; then
- mbDownSize=`expr "$size" / 1024 / 1024`
- mbUpSize=`expr "$size" / 1024 / 1024 + 1`
- mbSize=`expr "$mbDownSize" \* 1024 \* 1024`
- if [ $size -ne $mbSize ] ; then
- mbSize="$mbUpSize"
- else
- mbSize="$mbDownSize"
- fi
-
- message "$MSG_ERROR_FREESPACE" "$mbSize" "$ARG_TEMPDIR"
- exitProgram $ERROR_FREESPACE
- fi
-}
-
-prepareClasspath() {
- debug "Processing external jars ..."
- processJarsClasspath
-
- LAUNCHER_CLASSPATH=""
- if [ -n "$JARS_CLASSPATH" ] ; then
- if [ -z "$LAUNCHER_CLASSPATH" ] ; then
- LAUNCHER_CLASSPATH="$JARS_CLASSPATH"
- else
- LAUNCHER_CLASSPATH="$LAUNCHER_CLASSPATH":"$JARS_CLASSPATH"
- fi
- fi
-
- if [ -n "$PREPEND_CP" ] ; then
- debug "Appending classpath with [$PREPEND_CP]"
- PREPEND_CP=`resolveString "$PREPEND_CP"`
-
- if [ -z "$LAUNCHER_CLASSPATH" ] ; then
- LAUNCHER_CLASSPATH="$PREPEND_CP"
- else
- LAUNCHER_CLASSPATH="$PREPEND_CP":"$LAUNCHER_CLASSPATH"
- fi
- fi
- if [ -n "$APPEND_CP" ] ; then
- debug "Appending classpath with [$APPEND_CP]"
- APPEND_CP=`resolveString "$APPEND_CP"`
- if [ -z "$LAUNCHER_CLASSPATH" ] ; then
- LAUNCHER_CLASSPATH="$APPEND_CP"
- else
- LAUNCHER_CLASSPATH="$LAUNCHER_CLASSPATH":"$APPEND_CP"
- fi
- fi
- debug "Launcher Classpath : $LAUNCHER_CLASSPATH"
-}
-
-resolvePropertyStrings() {
- args="$1"
- escapeReplacedString="$2"
- propertyStart=`echo "$args" | sed "s/^.*\\$P{//"`
- propertyValue=""
- propertyName=""
-
- #Resolve i18n strings and properties
- if [ 0 -eq `ifEquals "$propertyStart" "$args"` ] ; then
- propertyName=`echo "$propertyStart" | sed "s/}.*//" 2>/dev/null`
- if [ -n "$propertyName" ] ; then
- propertyValue=`getMessage "$propertyName"`
-
- if [ 0 -eq `ifEquals "$propertyValue" "$propertyName"` ] ; then
- propertyName="\$P{$propertyName}"
- args=`replaceString "$args" "$propertyName" "$propertyValue" "$escapeReplacedString"`
- fi
- fi
- fi
-
- echo "$args"
-}
-
-
-resolveLauncherSpecialProperties() {
- args="$1"
- escapeReplacedString="$2"
- propertyValue=""
- propertyName=""
- propertyStart=`echo "$args" | sed "s/^.*\\$L{//"`
-
-
- if [ 0 -eq `ifEquals "$propertyStart" "$args"` ] ; then
- propertyName=`echo "$propertyStart" | sed "s/}.*//" 2>/dev/null`
-
-
- if [ -n "$propertyName" ] ; then
- case "$propertyName" in
- "nbi.launcher.tmp.dir")
- propertyValue="$LAUNCHER_EXTRACT_DIR"
- ;;
- "nbi.launcher.java.home")
- propertyValue="$LAUNCHER_JAVA"
- ;;
- "nbi.launcher.user.home")
- propertyValue="$HOME"
- ;;
- "nbi.launcher.parent.dir")
- propertyValue="$LAUNCHER_DIR"
- ;;
- *)
- propertyValue="$propertyName"
- ;;
- esac
- if [ 0 -eq `ifEquals "$propertyValue" "$propertyName"` ] ; then
- propertyName="\$L{$propertyName}"
- args=`replaceString "$args" "$propertyName" "$propertyValue" "$escapeReplacedString"`
- fi
- fi
- fi
- echo "$args"
-}
-
-resolveString() {
- args="$1"
- escapeReplacedString="$2"
- last="$args"
- repeat=1
-
- while [ 1 -eq $repeat ] ; do
- repeat=1
- args=`resolvePropertyStrings "$args" "$escapeReplacedString"`
- args=`resolveLauncherSpecialProperties "$args" "$escapeReplacedString"`
- if [ 1 -eq `ifEquals "$last" "$args"` ] ; then
- repeat=0
- fi
- last="$args"
- done
- echo "$args"
-}
-
-replaceString() {
- initialString="$1"
- fromString="$2"
- toString="$3"
- if [ -n "$4" ] && [ 0 -eq `ifEquals "$4" "false"` ] ; then
- toString=`escapeString "$toString"`
- fi
- fromString=`echo "$fromString" | sed "s/\\\//\\\\\\\\\//g" 2>/dev/null`
- toString=`echo "$toString" | sed "s/\\\//\\\\\\\\\//g" 2>/dev/null`
- replacedString=`echo "$initialString" | sed "s/${fromString}/${toString}/g" 2>/dev/null`
- echo "$replacedString"
-}
-
-prepareJVMArguments() {
- debug "Prepare JVM arguments... "
-
- jvmArgCounter=0
- debug "... resolving string : $LAUNCHER_JVM_ARGUMENTS"
- LAUNCHER_JVM_ARGUMENTS=`resolveString "$LAUNCHER_JVM_ARGUMENTS" true`
- debug "... resolved string : $LAUNCHER_JVM_ARGUMENTS"
- while [ $jvmArgCounter -lt $JVM_ARGUMENTS_NUMBER ] ; do
- argumentVar="$""JVM_ARGUMENT_$jvmArgCounter"
- arg=`eval "echo \"$argumentVar\""`
- debug "... jvm argument [$jvmArgCounter] [initial] : $arg"
- arg=`resolveString "$arg"`
- debug "... jvm argument [$jvmArgCounter] [resolved] : $arg"
- arg=`escapeString "$arg"`
- debug "... jvm argument [$jvmArgCounter] [escaped] : $arg"
- LAUNCHER_JVM_ARGUMENTS="$LAUNCHER_JVM_ARGUMENTS $arg"
- jvmArgCounter=`expr "$jvmArgCounter" + 1`
- done
- if [ ! -z "${DEFAULT_USERDIR_ROOT}" ] ; then
- debug "DEFAULT_USERDIR_ROOT: $DEFAULT_USERDIR_ROOT"
- LAUNCHER_JVM_ARGUMENTS="$LAUNCHER_JVM_ARGUMENTS -Dnetbeans.default_userdir_root=\"${DEFAULT_USERDIR_ROOT}\""
- fi
- if [ ! -z "${DEFAULT_CACHEDIR_ROOT}" ] ; then
- debug "DEFAULT_CACHEDIR_ROOT: $DEFAULT_CACHEDIR_ROOT"
- LAUNCHER_JVM_ARGUMENTS="$LAUNCHER_JVM_ARGUMENTS -Dnetbeans.default_cachedir_root=\"${DEFAULT_CACHEDIR_ROOT}\""
- fi
-
- debug "Final JVM arguments : $LAUNCHER_JVM_ARGUMENTS"
-}
-
-prepareAppArguments() {
- debug "Prepare Application arguments... "
-
- appArgCounter=0
- debug "... resolving string : $LAUNCHER_APP_ARGUMENTS"
- LAUNCHER_APP_ARGUMENTS=`resolveString "$LAUNCHER_APP_ARGUMENTS" true`
- debug "... resolved string : $LAUNCHER_APP_ARGUMENTS"
- while [ $appArgCounter -lt $APP_ARGUMENTS_NUMBER ] ; do
- argumentVar="$""APP_ARGUMENT_$appArgCounter"
- arg=`eval "echo \"$argumentVar\""`
- debug "... app argument [$appArgCounter] [initial] : $arg"
- arg=`resolveString "$arg"`
- debug "... app argument [$appArgCounter] [resolved] : $arg"
- arg=`escapeString "$arg"`
- debug "... app argument [$appArgCounter] [escaped] : $arg"
- LAUNCHER_APP_ARGUMENTS="$LAUNCHER_APP_ARGUMENTS $arg"
- appArgCounter=`expr "$appArgCounter" + 1`
- done
- debug "Final application arguments : $LAUNCHER_APP_ARGUMENTS"
-}
-
-
-runCommand() {
- cmd="$1"
- debug "Running command : $cmd"
- if [ -n "$OUTPUT_FILE" ] ; then
- #redirect all stdout and stderr from the running application to the file
- eval "$cmd" >> "$OUTPUT_FILE" 2>&1
- elif [ 1 -eq $SILENT_MODE ] ; then
- # on silent mode redirect all out/err to null
- eval "$cmd" > /dev/null 2>&1
- elif [ 0 -eq $USE_DEBUG_OUTPUT ] ; then
- # redirect all output to null
- # do not redirect errors there but show them in the shell output
- eval "$cmd" > /dev/null
- else
- # using debug output to the shell
- # not a silent mode but a verbose one
- eval "$cmd"
- fi
- return $?
-}
-
-executeMainClass() {
- prepareClasspath
- prepareJVMArguments
- prepareAppArguments
- debug "Running main jar..."
- message "$MSG_RUNNING"
- classpathEscaped=`escapeString "$LAUNCHER_CLASSPATH"`
- mainClassEscaped=`escapeString "$MAIN_CLASS"`
- launcherJavaExeEscaped=`escapeString "$LAUNCHER_JAVA_EXE"`
- tmpdirEscaped=`escapeString "$LAUNCHER_JVM_TEMP_DIR"`
-
- command="$launcherJavaExeEscaped $LAUNCHER_JVM_ARGUMENTS -Djava.io.tmpdir=$tmpdirEscaped -classpath $classpathEscaped $mainClassEscaped $LAUNCHER_APP_ARGUMENTS"
-
- debug "Running command : $command"
- runCommand "$command"
- exitCode=$?
- debug "... java process finished with code $exitCode"
- exitProgram $exitCode
-}
-
-escapeString() {
- echo "$1" | sed "s/\\\/\\\\\\\/g;s/\ /\\\\ /g;s/\"/\\\\\"/g;s/(/\\\\\(/g;s/)/\\\\\)/g;" # escape spaces, commas and parentheses
-}
-
-getMessage() {
- getLocalizedMessage_$LAUNCHER_LOCALE $@
-}
-
-POSSIBLE_JAVA_ENV="JAVA:JAVA_HOME:JAVAHOME:JAVA_PATH:JAVAPATH:JDK:JDK_HOME:JDKHOME:ANT_JAVA:"
-POSSIBLE_JAVA_EXE_SUFFIX_SOLARIS="bin/java:bin/sparcv9/java:"
-POSSIBLE_JAVA_EXE_SUFFIX_COMMON="bin/java:"
diff --git a/nbi/engine/native/launcher/windows/.dep.inc b/nbi/engine/native/launcher/windows/.dep.inc
deleted file mode 100644
index 4560e55af987..000000000000
--- a/nbi/engine/native/launcher/windows/.dep.inc
+++ /dev/null
@@ -1,5 +0,0 @@
-# This code depends on make tool being used
-DEPFILES=$(wildcard $(addsuffix .d, ${OBJECTFILES}))
-ifneq (${DEPFILES},)
-include ${DEPFILES}
-endif
diff --git a/nbi/engine/native/launcher/windows/Makefile b/nbi/engine/native/launcher/windows/Makefile
deleted file mode 100644
index 1debec653ff1..000000000000
--- a/nbi/engine/native/launcher/windows/Makefile
+++ /dev/null
@@ -1,109 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# There exist several targets which are by default empty and which can be
-# used for execution of your targets. These targets are usually executed
-# before and after some main targets. They are:
-#
-# .build-pre: called before 'build' target
-# .build-post: called after 'build' target
-# .clean-pre: called before 'clean' target
-# .clean-post: called after 'clean' target
-# .clobber-pre: called before 'clobber' target
-# .clobber-post: called after 'clobber' target
-# .all-pre: called before 'all' target
-# .all-post: called after 'all' target
-# .help-pre: called before 'help' target
-# .help-post: called after 'help' target
-#
-# Targets beginning with '.' are not intended to be called on their own.
-#
-# Main targets can be executed directly, and they are:
-#
-# build build a specific configuration
-# clean remove built files from a configuration
-# clobber remove all built files
-# all build all configurations
-# help print help mesage
-#
-# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
-# .help-impl are implemented in nbproject/makefile-impl.mk.
-#
-
-# Environment
-MKDIR=mkdir
-CP=cp
-CCADMIN=CCadmin
-RANLIB=ranlib
-RESCOMP=windres
-
-
-# build
-build: .build-pre .build-impl .build-post
-
-.build-pre:
- mkdir -p build
- windres -I resources -o build/icon.o -i resources/res.rc
-
-.build-post:
-# Add your post 'build' code here...
-
-
-# clean
-clean: .clean-pre .clean-impl .clean-post
-
-.clean-pre:
- rm -rf build/icon.o
-
-.clean-post:
-# Add your post 'clean' code here...
-
-
-# clobber
-clobber: .clobber-pre .clobber-impl .clobber-post
-
-.clobber-pre:
-# Add your pre 'clobber' code here...
-
-.clobber-post:
-# Add your post 'clobber' code here...
-
-
-# all
-all: .all-pre .all-impl .all-post
-
-.all-pre:
-# Add your pre 'all' code here...
-
-.all-post:
-# Add your post 'all' code here...
-
-
-# help
-help: .help-pre .help-impl .help-post
-
-.help-pre:
-# Add your pre 'help' code here...
-
-.help-post:
-# Add your post 'help' code here...
-
-# include project implementation makefile
-include nbproject/Makefile-impl.mk
diff --git a/nbi/engine/native/launcher/windows/Makefile-vc b/nbi/engine/native/launcher/windows/Makefile-vc
deleted file mode 100644
index 78bc6316edd1..000000000000
--- a/nbi/engine/native/launcher/windows/Makefile-vc
+++ /dev/null
@@ -1,92 +0,0 @@
-#
-#
-
-
-!include <$(PLATFORM_SDK)/include/win32.mak>
-
-# define the compiler and linker for all the platforms
-CC32="$(VC_2005)\Bin\cl.exe"
-L32="$(VC_2005)\Bin\link.exe"
-MT32="$(PLATFORM_SDK)\Bin\mt.exe"
-RC32="$(VC_2005)\Bin\rc.exe"
-
-BUILD_DIR32=.\build\32bit
-OUTPUT_FILE32=.\dist\nlw.exe
-MANIFEST_FILE32=.\resources\nlw.exe.manifest
-#Alternative manifest file - read more in resources\res.rc
-#MANIFEST_FILE32=.\resources\nlw-alt.exe.manifest
-
-SOURCE_FILES=\
- .\src\ExtractUtils.c \
- .\src\FileUtils.c \
- .\src\JavaUtils.c \
- .\src\Launcher.c \
- .\src\Main.c \
- .\src\ProcessUtils.c \
- .\src\RegistryUtils.c \
- .\src\StringUtils.c \
- .\src\SystemUtils.c
-
-
-CC32_OPTS=/O1 /Os \
- /I "$(VC_2005)\include" \
- /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_CRT_SECURE_NO_DEPRECATE" \
- /FD /EHsc /MT \
- /Fo"$(BUILD_DIR32)\\" /Fd"$(BUILD_DIR32)\vc80.pdb" \
- /W3 /nologo /c /Wp64 /TC /errorReport:prompt
-
-LINKING_LIBRARIES=\
- user32.lib\
- gdi32.lib \
- comdlg32.lib \
- comctl32.lib \
- advapi32.lib\
- shell32.lib \
- ole32.lib \
- oleaut32.lib \
- userenv.lib \
- libcmt.lib \
- kernel32.lib
-
-L32_OPTS=\
- /OUT:$(OUTPUT_FILE32) \
- /INCREMENTAL:NO \
- /LIBPATH:"$(PLATFORM_SDK)\Lib" \
- /MANIFEST \
- /MANIFESTFILE:"$(BUILD_DIR32)\nlw.exe.intermediate.manifest" \
- /NODEFAULTLIB \
- /SUBSYSTEM:WINDOWS \
- /OPT:REF /OPT:ICF \
- /MACHINE:X86 \
- /ERRORREPORT:PROMPT \
- $(LINKING_LIBRARIES)
-
-
-RC32_OPTS=\
- /I ".\resources" /fo $(BUILD_DIR32)\resources.obj
-
-
-all: init build-32
-
-clean:
-
-
-init:
- - md $(BUILD_DIR32)
- - md .\dist
-
- del /Q /S $(BUILD_DIR32)
- del /Q $(OUTPUT_FILE32)
-
-build-32:
- Set CPU=i386
- Set Lib=%VC_2005%\Lib;%PLATFORM_SDK%\Lib;%Lib%
- Set Include=%PLATFORM_SDK%\Include;%Include%
- Set Path=%PLATFORM_SDK%\Bin;%PLATFORM_SDK%\Bin\WinNT;%VC_2005_PATH%;%path%
- Set APPVER=5.01
- Set TARGETOS=WINNT
-
- $(CC32) $(CC32_OPTS) $(SOURCE_FILES)
- $(RC32) $(RC32_OPTS) resources/res.rc
- $(L32) $(L32_OPTS) $(BUILD_DIR32)\ExtractUtils.obj $(BUILD_DIR32)\FileUtils.obj $(BUILD_DIR32)\JavaUtils.obj $(BUILD_DIR32)\Launcher.obj $(BUILD_DIR32)\Main.obj $(BUILD_DIR32)\ProcessUtils.obj $(BUILD_DIR32)\RegistryUtils.obj $(BUILD_DIR32)\StringUtils.obj $(BUILD_DIR32)\SystemUtils.obj $(BUILD_DIR32)\resources.obj
- $(MT32) /outputresource:"$(OUTPUT_FILE32);#1" -manifest $(MANIFEST_FILE32) $(BUILD_DIR32)\nlw.exe.intermediate.manifest
diff --git a/nbi/engine/native/launcher/windows/Makefile-vc-wo-crt b/nbi/engine/native/launcher/windows/Makefile-vc-wo-crt
deleted file mode 100644
index 6a693f5cc19a..000000000000
--- a/nbi/engine/native/launcher/windows/Makefile-vc-wo-crt
+++ /dev/null
@@ -1,92 +0,0 @@
-#
-#
-
-
-!include <$(PLATFORM_SDK)/include/win32.mak>
-
-# define the compiler and linker for all the platforms
-CC32="$(VC_2005)\Bin\cl.exe"
-L32="$(VC_2005)\Bin\link.exe"
-MT32="$(PLATFORM_SDK)\Bin\mt.exe"
-RC32="$(VC_2005)\Bin\rc.exe"
-
-BUILD_DIR32=.\build\32bit
-OUTPUT_FILE32=.\dist\nlw.exe
-MANIFEST_FILE32=.\resources\nlw.exe.manifest
-#Alternative manifest file - read more in resources\res.rc
-#MANIFEST_FILE32=.\resources\nlw-alt.exe.manifest
-
-SOURCE_FILES=\
- .\src\ExtractUtils.c \
- .\src\FileUtils.c \
- .\src\JavaUtils.c \
- .\src\Launcher.c \
- .\src\Main.c \
- .\src\ProcessUtils.c \
- .\src\RegistryUtils.c \
- .\src\StringUtils.c \
- .\src\SystemUtils.c
-
-
-CC32_OPTS=/O1 /Os \
- /I "$(VC_2005)\include" \
- /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_CRT_SECURE_NO_DEPRECATE" \
- /FD /EHsc /GS- \
- /Fo"$(BUILD_DIR32)\\" /Fd"$(BUILD_DIR32)\vc80.pdb" \
- /W3 /nologo /c /Wp64 /TC /errorReport:prompt
-
-LINKING_LIBRARIES=\
- user32.lib\
- gdi32.lib \
- comdlg32.lib \
- comctl32.lib \
- advapi32.lib\
- shell32.lib \
- ole32.lib \
- oleaut32.lib \
- userenv.lib \
- kernel32.lib \
-
-L32_OPTS=\
- /OUT:$(OUTPUT_FILE32) \
- /INCREMENTAL:NO \
- /LIBPATH:"$(PLATFORM_SDK)\Lib" \
- /MANIFEST \
- /MANIFESTFILE:"$(BUILD_DIR32)\nlw.exe.intermediate.manifest" \
- /NODEFAULTLIB \
- /SUBSYSTEM:WINDOWS \
- /OPT:REF /OPT:ICF \
- /MACHINE:X86 \
- /ERRORREPORT:PROMPT \
- /ENTRY:MyMain \
- $(LINKING_LIBRARIES)
-
-
-RC32_OPTS=\
- /I ".\resources" /fo $(BUILD_DIR32)\resources.obj
-
-
-all: init build-32
-
-clean:
-
-
-init:
- - md $(BUILD_DIR32)
- - md .\dist
-
- del /Q /S $(BUILD_DIR32)
- del /Q $(OUTPUT_FILE32)
-
-build-32:
- Set CPU=i386
- Set Lib=%VC_2005%\Lib;%PLATFORM_SDK%\Lib;%Lib%
- Set Include=%PLATFORM_SDK%\Include;%Include%
- Set Path=%PLATFORM_SDK%\Bin;%PLATFORM_SDK%\Bin\WinNT;%VC_2005_PATH%;%path%
- Set APPVER=5.01
- Set TARGETOS=WINNT
-
- $(CC32) $(CC32_OPTS) $(SOURCE_FILES)
- $(RC32) $(RC32_OPTS) resources/res.rc
- $(L32) $(L32_OPTS) $(BUILD_DIR32)\ExtractUtils.obj $(BUILD_DIR32)\FileUtils.obj $(BUILD_DIR32)\JavaUtils.obj $(BUILD_DIR32)\Launcher.obj $(BUILD_DIR32)\Main.obj $(BUILD_DIR32)\ProcessUtils.obj $(BUILD_DIR32)\RegistryUtils.obj $(BUILD_DIR32)\StringUtils.obj $(BUILD_DIR32)\SystemUtils.obj $(BUILD_DIR32)\resources.obj
- $(MT32) /outputresource:"$(OUTPUT_FILE32);#1" -manifest $(MANIFEST_FILE32) $(BUILD_DIR32)\nlw.exe.intermediate.manifest
diff --git a/nbi/engine/native/launcher/windows/i18n/launcher.properties b/nbi/engine/native/launcher/windows/i18n/launcher.properties
deleted file mode 100644
index 70f24c5bcca7..000000000000
--- a/nbi/engine/native/launcher/windows/i18n/launcher.properties
+++ /dev/null
@@ -1,54 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-nlw.jvm.notfoundmessage=Java SE Development Kit (JDK) was not found on this computer\nJDK 8 or newer is required for installing the NetBeans IDE. Make sure that the JDK is properly installed and run installer again. You can specify valid JDK location using {0} installer argument.\n\nTo download the JDK, visit http://www.oracle.com/technetwork/java/javase/downloads
-nlw.jvm.usererror=Java Runtime Environment (JRE) was not found\nThere is no JRE at the specified location {0}
-nlw.jvm.unsupportedversion=Unsupported Java VM version\nThe Java VM at {0} has the unsupported version
-nlw.freespace=There is not enough free disk space to extract installation data\n{0} MB of free disk space is required in a temporary folder. Clean up the disk space and run installer again. You can specify a temporary folder with sufficient disk space using {1} installer argument
-nlw.tmpdir=Can't create temporary directory\nThe temporary directory for extracting data {0} was not created
-nlw.integrity=Installer file is corrupted\nInstaller file {0} seems to be corrupted
-nlw.output.error=Data extraction error\nCan't create file {0}!\nThe following error occured :\n{1}
-nlw.java.process.error=An error occured while running java process\n{0}
-nlw.missing.external.resource=Can`t run NetBeans Installer.\nAn external file with necessary data is required but missing:\n{0}
-nlw.bundled.jvm.extract.error=Cannot prepare bundled JVM to run the installer.\nMost probably the bundled JVM is not compatible with the current platform.
-nlw.bundled.jvm.verify.error=An error occured while verifying bundled JVM.\nMost probably the bundled JVM is not compatible with the current platform.
-
-nlw.arg.output={0} \n\tRedirect output to file
-nlw.arg.javahome={0} \n\tRun jar file using JVM from
-nlw.arg.verbose={0}\n\tUse verbose output
-nlw.arg.tempdir={0} \n\tUse for extracting data
-nlw.arg.extract={0} [directory]\n\tExtract all bundled data to the specific directory.\n\tIf directory is not specified then extract to the current directory
-nlw.arg.classpatha={0} \n\tAppend classpath with
-nlw.arg.classpathp={0} \n\tPrepend classpath with
-nlw.arg.disable.space.check={0}\n\tDisable free space check
-nlw.arg.locale={0} \n\tOverride system default locale with
-nlw.arg.silent={0} \n\tRun installer silently
-nlw.arg.help={0}\n\tShow help message
-
-
-nlw.msg.create.tmpdir=Creating temporary directory ...
-nlw.msg.extract=Extracting data ...
-nlw.msg.jvmsearch=Finding JVM on your system ...
-nlw.msg.setoptions=Setting command options ...
-nlw.msg.running=Running JVM ...
-nlw.msg.title=Please wait while the launcher prepares data to run the installer ...
-nlw.msg.messagebox.title=Apache NetBeans IDE Installer
-nlw.msg.progress.title=Configuring the installer ...
-nlw.msg.button.error=Exit Installer
-nlw.msg.main.title=Apache NetBeans IDE Installer
diff --git a/nbi/engine/native/launcher/windows/nbproject/configurations.xml b/nbi/engine/native/launcher/windows/nbproject/configurations.xml
deleted file mode 100644
index 095caed51c8e..000000000000
--- a/nbi/engine/native/launcher/windows/nbproject/configurations.xml
+++ /dev/null
@@ -1,107 +0,0 @@
-
-
-
-
-
- src/Errors.h
- src/ExtractUtils.h
- src/FileUtils.h
- src/JavaUtils.h
- src/Launcher.h
- src/Main.h
- src/ProcessUtils.h
- src/RegistryUtils.h
- src/StringUtils.h
- src/SystemUtils.h
- src/Types.h
-
-
- resources/res.rc
-
-
- src/ExtractUtils.c
- src/FileUtils.c
- src/JavaUtils.c
- src/Launcher.c
- src/Main.c
- src/ProcessUtils.c
- src/RegistryUtils.c
- src/StringUtils.c
- src/SystemUtils.c
-
-
- Makefile
-
-
- Makefile
-
-
-
- LOCAL_SOURCES
- Cygwin|Cygwin
-
-
-
- true
- -mno-cygwin
- 3
-
-
- true
-
-
-
- true
-
- -lole32 -luuid -lkernel32 -lcomctl32 -luserenv
-
- -mwindows -mno-cygwin build/icon.o
-
-
-
-
-
- LOCAL_SOURCES
- Cygwin|Cygwin
-
-
-
- 5
-
-
- 5
-
-
- 5
-
-
-
-
-
diff --git a/nbi/engine/native/launcher/windows/nbproject/project.properties b/nbi/engine/native/launcher/windows/nbproject/project.properties
deleted file mode 100644
index 3807b675d79a..000000000000
--- a/nbi/engine/native/launcher/windows/nbproject/project.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
diff --git a/nbi/engine/native/launcher/windows/nbproject/project.xml b/nbi/engine/native/launcher/windows/nbproject/project.xml
deleted file mode 100644
index 017b77b3f98e..000000000000
--- a/nbi/engine/native/launcher/windows/nbproject/project.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
- org.netbeans.modules.cnd.makeproject
-
-
- NBI Native Launcher : Windows
- 0
- c
-
- h
- UTF-8
-
-
-
-
- Debug
- 1
-
-
- Release
- 1
-
-
-
-
-
diff --git a/nbi/engine/native/launcher/windows/resources/icon.ico b/nbi/engine/native/launcher/windows/resources/icon.ico
deleted file mode 100644
index ec123c065723..000000000000
Binary files a/nbi/engine/native/launcher/windows/resources/icon.ico and /dev/null differ
diff --git a/nbi/engine/native/launcher/windows/resources/nlw-alt.exe.manifest b/nbi/engine/native/launcher/windows/resources/nlw-alt.exe.manifest
deleted file mode 100644
index 62fb856801cf..000000000000
--- a/nbi/engine/native/launcher/windows/resources/nlw-alt.exe.manifest
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/nbi/engine/native/launcher/windows/resources/nlw.exe.manifest b/nbi/engine/native/launcher/windows/resources/nlw.exe.manifest
deleted file mode 100644
index a22dcb9983d2..000000000000
--- a/nbi/engine/native/launcher/windows/resources/nlw.exe.manifest
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/nbi/engine/native/launcher/windows/resources/res.rc b/nbi/engine/native/launcher/windows/resources/res.rc
deleted file mode 100644
index 012c85ea01f1..000000000000
--- a/nbi/engine/native/launcher/windows/resources/res.rc
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-// Uncomment the following lines to add special "Vista" manifest under Cygwin using GCC and WINDRES
-// Seems that tools from MS Platform SDK/MS VS C++ 2005 EE (C compiler, resource compiler and manifest tool) ignore that
-// (so you can leave that uncommented for both tools at once) but I haven`t check that much.
-// PS. Currently uncommented - seems to be working with GCC compiler (checked by Martin Sladecek)
-#define RT_MANIFEST 24
-#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
-
-
-// Using of nlw.exe.manifest means that on Vista every installer/uninstaller (launcher, in general) invocation would require admin privileges which user would be asked for (evaluation dialog).
-// In that case the executable icon would have "shield" mark.
-// Using of nlw-alt.exe.manifest means that on Vista evaluation dialog is not displayed. To run it with admin right user have to execute "Run as Administrator" explicitely.
-// Without the build-it manifest the following issue can occur (reported Martin Sladecek):
-// When launcher would have "instal" in its name (uninstall.exe for instance), then - due to UAC and it`s method of checking "installer-like" names and code stamps - it would be executed with Administrator`s environment - it is would be different from the user that performed the installation.
-// Only one of the following lines should be commented, the other one should be uncommented.
-CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "nlw.exe.manifest"
-//CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "nlw-alt.exe.manifest"
-
-100 ICON DISCARDABLE "icon.ico"
-
diff --git a/nbi/engine/native/launcher/windows/src/Errors.h b/nbi/engine/native/launcher/windows/src/Errors.h
deleted file mode 100644
index 7955823d06b3..000000000000
--- a/nbi/engine/native/launcher/windows/src/Errors.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef _Errors_H
-#define _Errors_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#define ERROR_OK 0
-#define ERROR_INTEGRITY 1000
-#define ERROR_FREESPACE 1001
-#define ERROR_INPUTOUPUT 1002
-#define ERROR_JVM_UNCOMPATIBLE 1003
-#define ERROR_JVM_NOT_FOUND 1004
-#define ERROR_ON_EXECUTE_PROCESS 1005
-#define ERROR_PROCESS_TIMEOUT 1006
-#define ERROR_USER_TERMINATED 1007
-#define EXTERNAL_RESOURCE_MISSING 1008
-#define ERROR_BUNDLED_JVM_EXTRACTION 1009
-#define ERROR_BUNDLED_JVM_VERIFICATION 1010
-
-#define EXIT_CODE_EVENTS_INITIALIZATION_ERROR 1022
-#define EXIT_CODE_GUI_INITIALIZATION_ERROR 1023
-#define EXIT_CODE_STUB 1024
-#define EXIT_CODE_SYSTEM_ERROR 1025
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _Errors_H */
-
diff --git a/nbi/engine/native/launcher/windows/src/ExtractUtils.c b/nbi/engine/native/launcher/windows/src/ExtractUtils.c
deleted file mode 100644
index edbfa5543ace..000000000000
--- a/nbi/engine/native/launcher/windows/src/ExtractUtils.c
+++ /dev/null
@@ -1,761 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include
-#include
-#include
-#include
-#include
-#include "FileUtils.h"
-#include "StringUtils.h"
-#include "SystemUtils.h"
-#include "JavaUtils.h"
-#include "RegistryUtils.h"
-#include "ExtractUtils.h"
-#include "Launcher.h"
-#include "Main.h"
-
-const DWORD STUB_FILL_SIZE = 450000;
-
-void skipLauncherStub(LauncherProperties * props, DWORD stubSize) {
- HANDLE hFileRead = props->handler;
-
- if(hFileRead!=INVALID_HANDLE_VALUE) {
- // just read stub data.. no need to write it anywhere
- DWORD read = 0;
- char * offsetbuf = newpChar(stubSize);
- DWORD sizeLeft = stubSize;
- while(ReadFile(hFileRead, offsetbuf, sizeLeft, &read, 0) && sizeLeft && read) {
- sizeLeft-=read;
- addProgressPosition(props, read);
- if(sizeLeft==0) break;
- if(read==0) { // we need some more bytes to read but we can`t to read
- props->status = ERROR_INTEGRITY;
- break;
- }
- }
- FREE(offsetbuf);
- }
-}
-
-
-void skipStub(LauncherProperties * props) {
- if(props->isOnlyStub) {
- WCHAR * os;
- props->status = EXIT_CODE_STUB;
- os = appendStringW(NULL, L"It`s only the launcher stub.\nOS: ");
- if(is9x()) os = appendStringW(os, L"Windows 9x");
- if(isNT()) os = appendStringW(os, L"Windows NT");
- if(is2k()) os = appendStringW(os, L"Windows 2000");
- if(isXP()) os = appendStringW(os, L"Windows XP");
- if(is2003()) os = appendStringW(os, L"Windows 2003");
- if(isVista()) os = appendStringW(os, L"Windows Vista");
- if(is2008()) os = appendStringW(os, L"Windows 2008");
- if(is7()) os = appendStringW(os, L"Windows 7");
- if(IsWow64) os = appendStringW(os, L" x64");
- showMessageW(props, os , 0);
- FREE(os);
- } else {
- skipLauncherStub(props, STUB_FILL_SIZE);
- if(!isOK(props)) {
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 1,
- "Error! Can`t process launcher stub", 1);
- showErrorW(props, INTEGRITY_ERROR_PROP, 1, props->exeName);
- }
- }
-}
-
-void modifyRestBytes(SizedString* rest, DWORD start) {
-
- DWORD len = rest->length - start;
- char * restBytesNew = NULL;
-
- if(len>0) {
- DWORD i;
- restBytesNew = newpChar(len);
- for(i=start;ilength;i++) {
- restBytesNew[i-start] = (rest->bytes) [i];
- }
- }
- FREE(rest->bytes);
- rest->bytes = restBytesNew;
- rest->length = len;
-}
-
-DWORD readStringFromBuf(SizedString *rest, SizedString * result, DWORD isUnicode) {
- if((rest->length)!=0) {
- // we have smth in the restBytes that we have read but haven`t yet proceeded
- DWORD i=0;
- for(i=0;ilength;i++) {
- DWORD check = ((rest->bytes)[i]==0);
- if(isUnicode) {
- if ( (i/2)*2==i) {// i is even
- check = check && (i < rest->length-1 && ((rest->bytes)[i+1]==0));
- } else {
- check = 0;
- }
- }
- if( check ) { // we have found null character in the rest bytes
- result->bytes = appendStringN(NULL, 0, rest->bytes, i);
- result->length = i;
- modifyRestBytes(rest, i + 1 + isUnicode);
- return ERROR_OK;
- }
- }
- //here we have found no \0 character in the rest of bytes...
- }
- return ERROR_INPUTOUPUT;
-}
-
-void readString(LauncherProperties * props, SizedString * result, DWORD isUnicode) {
- DWORD * status = & props->status;
- HANDLE hFileRead = props->handler;
- SizedString * rest = props->restOfBytes;
- DWORD bufferSize = props->bufsize;
- DWORD read=0;
- char * buf = NULL;
-
- if(*status != ERROR_OK ) return;
-
- if(readStringFromBuf(rest, result, isUnicode)==ERROR_OK) {
- return;
- }
-
- //we need to read file for more data to find \0 character...
-
- buf = newpChar(bufferSize);
-
- while (ReadFile(hFileRead, buf, bufferSize, &read, 0) && read) {
- addProgressPosition(props, read);
- rest->bytes = appendStringN(rest->bytes, rest->length, buf, read);
- rest->length = rest->length + read;
- if(readStringFromBuf(rest, result, isUnicode)==ERROR_OK) {
- //if(result->bytes!=NULL) {
- //we have find \0 character
- break;
- }
- ZERO(buf, sizeof(char) * bufferSize);
- if(read==0) { // we have nothing to read.. smth wrong
- *status = ERROR_INTEGRITY;
- break;
- }
- }
- FREE(buf);
- return;
-}
-
-
-
-void readNumber(LauncherProperties * props, DWORD * result) {
- if(isOK(props)) {
-
- SizedString * numberString = createSizedString();
- DWORD i =0;
- DWORD number = 0;
-
- readString(props, numberString, 0);
- if(!isOK(props)) {
- freeSizedString(&numberString);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1,
- "Error!! Can`t read number string. Most probably integrity error.", 1);
- return;
- }
-
- if(numberString->bytes==NULL) {
- freeSizedString(&numberString);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1,
- "Error!! Can`t read number string (it can`t be NULL). Most probably integrity error.", 1);
- props->status = ERROR_INTEGRITY;
- return;
- }
-
-
- for(;ilength;i++) {
- char c = numberString->bytes[i];
- if(c>='0' && c<='9') {
- number = number * 10 + (c - '0');
- } else if(c==0) {
- // we have reached the end of number section
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1,
- "Can`t read number from string (it contains zero character):", 1);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, numberString->bytes, 1);
- props->status = ERROR_INTEGRITY;
- break;
- } else {
- // unexpected...
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1,
- "Can`t read number from string (unexpected error):", 1);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, numberString->bytes, 1);
- props->status = ERROR_INTEGRITY;
- break;
- }
- }
- freeSizedString(&numberString);
- *result = number;
- }
-}
-
-void readStringWithDebugW(LauncherProperties * props, WCHAR ** dest, char * paramName) {
- SizedString *sizedStr = createSizedString();
- if(paramName!=NULL) {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "Reading ", 0);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, paramName, 0);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, " : ", 0);
- }
- readString(props, sizedStr, 1);
- if(!isOK(props)) {
- freeSizedString(&sizedStr);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0,
- "[ERROR] Can`t read string !! Seems to be integrity error", 1);
- return;
- }
- *dest = createWCHAR(sizedStr);
- freeSizedString(&sizedStr);
- if(paramName!=NULL) {
- if((*dest)!=NULL) {
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, *dest, 1);
- } else {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "NULL", 1);
- }
- }
- return;
-}
-
-void readStringWithDebugA(LauncherProperties * props, char ** dest, char * paramName) {
- SizedString *sizedStr = createSizedString();
-
- if(paramName!=NULL) {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "Reading ", 0);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, paramName, 0);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, " : ", 0);
- }
- readString( props, sizedStr, 0);
- if(!isOK(props)) {
- freeSizedString(&sizedStr);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0,
- "[ERROR] Can`t read string!!! Seems to be integritiy error", 1);
- return;
- }
- *dest = appendString(NULL, sizedStr->bytes);
- if(paramName!=NULL) {
- if((*dest)==NULL) {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "NULL", 1);
- } else {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, *dest, 1);
- }
- }
- freeSizedString(&sizedStr);
- return;
-}
-
-
-void readNumberWithDebug(LauncherProperties * props, DWORD * dest, char * paramName) {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "Reading ", 0);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, paramName, 0);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, " : ", 0);
- readNumber(props, dest);
-
- if(!isOK(props)) {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0,
- "[ERROR] Can`t read number !!! Seems to be integrity error", 1);
- return;
- }
- writeDWORD(props, OUTPUT_LEVEL_DEBUG, 0, NULL, *dest, 1);
- return;
-}
-void readBigNumberWithDebug(LauncherProperties * props, int64t * dest, char * paramName) {
- DWORD low = 0;
- DWORD high = 0;
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "Reading ", 0);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, paramName, 0);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, " : ", 0);
-
- readNumber(props, &low);
- if(isOK(props)) {
- readNumber(props, &high);
- }
- if(!isOK(props)) {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0,
- "[ERROR] Can`t read number !!! Seems to be integrity error", 1);
- return;
- }
- dest->High = high;
- dest->Low = low;
- writeint64t(props, OUTPUT_LEVEL_DEBUG, 0, "", dest, 1);
-}
-
-// returns: ERROR_OK, ERROR_INPUTOUPUT, ERROR_INTEGRITY
-void extractDataToFile(LauncherProperties * props, WCHAR *output, int64t * fileSize, DWORD expectedCRC ) {
- if(isOK(props)) {
- DWORD * status = & props->status;
- HANDLE hFileRead = props->handler;
- int64t * size = fileSize;
- DWORD counter = 0;
- DWORD crc32 = -1L;
- HANDLE hFileWrite = CreateFileW(output, GENERIC_READ | GENERIC_WRITE, 0, 0, CREATE_ALWAYS, 0, hFileRead);
-
- if (hFileWrite == INVALID_HANDLE_VALUE) {
- WCHAR * err;
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "[ERROR] Can`t create file ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, output, 1);
-
- err = getErrorDescription(GetLastError());
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "Error description : ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, err, 1);
-
- showErrorW(props, OUTPUT_ERROR_PROP, 2, output, err);
- FREE(err);
- *status = ERROR_INPUTOUPUT;
- return;
- }
- if(props->restOfBytes->length!=0 && props->restOfBytes->bytes!=NULL) {
- //check if the data stored in restBytes is more than we neen
- // rest bytes contains much less than int64t so we operate here only bith low bits of size
- DWORD restBytesToWrite = (compare(size, props->restOfBytes->length)> 0 ) ? props->restOfBytes->length : size->Low;
- DWORD usedBytes = restBytesToWrite;
-
- char *ptr = props->restOfBytes->bytes;
-
- DWORD write = 0;
- while (restBytesToWrite >0) {
- WriteFile(hFileWrite, ptr, restBytesToWrite, &write, 0);
- update_crc32(&crc32, ptr, write);
- restBytesToWrite -= write;
- ptr +=write;
- }
- modifyRestBytes(props->restOfBytes, usedBytes);
- minus(size, usedBytes);
-
- }
-
-
- if(compare(size, 0) > 0 ) {
- DWORD bufferSize = props->bufsize;
- char * buf = newpChar(bufferSize);
- DWORD bufsize = (compare(size, bufferSize) > 0) ? bufferSize : size->Low;
- DWORD read = 0 ;
- // printf("Using buffer size: %u/%u\n", bufsize, bufferSize);
- while (ReadFile(hFileRead, buf, bufsize, &read, 0) && read && compare(size, 0) > 0) {
- addProgressPosition(props, read);
- WriteFile(hFileWrite, buf, read, &read, 0);
- update_crc32(&crc32, buf, read);
-
- minus(size, read);
-
- if((compare(size, bufsize)<0) && (compare(size, 0)>0) ) {
- bufsize = size->Low;
- }
- ZERO(buf, sizeof(char) * bufferSize);
- if(compare(size, 0)==0) {
- break;
- }
- if((counter ++) % 20 == 0) {
- if(isTerminated(props)) break;
- }
-
- }
- if((compare(size, 0)>0 || read==0) && !isTerminated(props)) {
- // we could not read requested size
- * status = ERROR_INTEGRITY;
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1,
- "Can`t read data from file : not enought data", 1);
- }
- FREE(buf);
- }
- CloseHandle(hFileWrite);
- crc32=~crc32;
- if(isOK(props) && crc32!=expectedCRC) {
- writeDWORD(props, OUTPUT_LEVEL_DEBUG, 0, "expected CRC : ", expectedCRC, 1);
- writeDWORD(props, OUTPUT_LEVEL_DEBUG, 0, "real CRC : ", crc32, 1);
- * status = ERROR_INTEGRITY;
-
- }
- }
-}
-
-//returns : ERROR_OK, ERROR_INTEGRITY, ERROR_FREE_SPACE
-void extractFileToDir(LauncherProperties * props, WCHAR ** resultFile) {
- WCHAR * fileName = NULL;
- int64t * fileLength = NULL;
- DWORD crc = 0;
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "Extracting file ...", 1);
- readStringWithDebugW( props, & fileName, "file name");
-
- fileLength = newint64_t(0, 0);
- readBigNumberWithDebug( props, fileLength, "file length ");
-
- readNumberWithDebug( props, &crc, "CRC32");
-
- if(!isOK(props)) return;
-
- if(fileName!=NULL) {
- DWORD i=0;
- WCHAR * dir;
- resolveString(props, &fileName);
-
- for(i=0;i status = ERROR_INTEGRITY;
- }
- FREE(fileLength);
- return;
-}
-
-
-void loadI18NStrings(LauncherProperties * props) {
- DWORD i=0;
- DWORD j=0;
- //read number of locales
-
- DWORD numberOfLocales = 0;
- DWORD numberOfProperties = 0;
-
- readNumberWithDebug(props, &numberOfLocales, "number of locales");
- if(!isOK(props)) return;
- if(numberOfLocales==0) {
- props->status = ERROR_INTEGRITY;
- return ;
- }
-
-
- readNumberWithDebug( props, &numberOfProperties, "i18n properties");
- if(!isOK(props)) return;
- if(numberOfProperties==0) {
- props->status = ERROR_INTEGRITY;
- return ;
- }
-
- props->i18nMessages = (I18NStrings * ) LocalAlloc(LPTR, sizeof(I18NStrings) * numberOfProperties);
-
- props->I18N_PROPERTIES_NUMBER = numberOfProperties;
- props->i18nMessages->properties = newppChar(props->I18N_PROPERTIES_NUMBER);
- props->i18nMessages->strings = newppWCHAR(props->I18N_PROPERTIES_NUMBER);
-
- for(i=0; isOK(props) && ii18nMessages->properties[i] = NULL;
- props->i18nMessages->strings[i] = NULL;
- propName = appendString(NULL, "property name ");
-
- propName = appendString(propName, number);
- FREE(number);
-
- readStringWithDebugA(props, & (props->i18nMessages->properties[i]), propName);
- FREE(propName);
- }
- if(isOK(props)) {
-
- DWORD isLocaleMatches;
- WCHAR * localeName;
- WCHAR * currentLocale = getLocaleName();
-
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "Current System Locale : ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, currentLocale, 1);
-
- if(props->userDefinedLocale!=NULL) { // using user-defined locale via command-line parameter
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "[CMD Argument] Try to use locale ", 0);
- writeMessageW(props, OUTPUT_LEVEL_NORMAL, 0, props->userDefinedLocale, 1);
- FREE(currentLocale);
- currentLocale = appendStringW(NULL, props->userDefinedLocale);
- }
-
- for(j=0;ji18nMessages->strings[i]);
- props->i18nMessages->strings[i] = appendStringW(NULL, value);
- }
- FREE(value);
- }
- FREE(localeName);
- }
- FREE(currentLocale);
- }
-}
-
-LauncherResource * newLauncherResource() {
- LauncherResource * file = (LauncherResource *) LocalAlloc(LPTR, sizeof(LauncherResource));
- file->path=NULL;
- file->resolved=NULL;
- file->type=0;
- return file;
-}
-WCHARList * newWCHARList(DWORD number) {
- WCHARList * list = (WCHARList*) LocalAlloc(LPTR, sizeof(WCHARList));
- list->size = number;
- if(number>0) {
- DWORD i=0;
- list->items = newppWCHAR(number);
- for(i=0;iitems[i] = NULL;
- }
- } else {
- list->items = NULL;
- }
- return list;
-}
-
-void freeWCHARList(WCHARList ** plist) {
- WCHARList * list;
- list = * plist;
- if(list!=NULL) {
- DWORD i=0;
- if(list->items!=NULL) {
- for(i=0;isize;i++) {
- FREE(list->items[i]);
- }
- FREE(list->items);
- }
- FREE(*plist);
- }
-}
-
-LauncherResourceList * newLauncherResourceList(DWORD number) {
- LauncherResourceList * list = (LauncherResourceList*) LocalAlloc(LPTR, sizeof(LauncherResourceList));
- list->size = number;
- if(number > 0) {
- DWORD i=0;
-
- list->items = (LauncherResource**) LocalAlloc(LPTR, sizeof(LauncherResource*) * number);
- for(i=0;iitems[i] = NULL;
- }
- } else {
- list->items = NULL;
- }
- return list;
-}
-
-void freeLauncherResource(LauncherResource ** file) {
- if(*file!=NULL) {
- FREE((*file)->path);
- FREE((*file)->resolved);
- FREE(*file);
-
- }
-}
-
-
-void extractLauncherResource(LauncherProperties * props, LauncherResource ** file, char * name) {
- char * typeStr = appendString(appendString(NULL, name), " type");
- * file = newLauncherResource();
-
- readNumberWithDebug( props, & ((*file)->type) , typeStr);
-
- if(isOK(props)) {
- FREE(typeStr);
-
- if((*file)->type==0) { //bundled
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, "... file is bundled", 1);
- extractFileToDir(props, & ((*file)->path));
- if(!isOK(props)) {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, "Error extracting file!", 1);
- return;
- } else {
- (*file)->resolved = appendStringW(NULL, (*file)->path);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "file was succesfully extracted to ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, (*file)->path, 1);
- }
- } else {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, "... file is external", 1);
- readStringWithDebugW(props, & ((*file)->path), name);
- if(!isOK(props)) {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, "Error reading ", 1);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, name, 1);
- }
- }
- } else {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, "Error reading ", 0);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, typeStr, 0);
- FREE(typeStr);
- }
-}
-
-void readWCHARList(LauncherProperties * props, WCHARList ** list, char * name) {
- DWORD number = 0;
- DWORD i =0;
- char * numberStr = appendString(appendString(NULL, "number of "), name);
-
- * list = NULL;
- readNumberWithDebug(props, &number, numberStr);
- FREE(numberStr);
-
- if(!isOK(props)) return;
-
- * list = newWCHARList(number);
- for(i=0;i < (*list)->size ;i++) {
- char * nextStr = appendString(appendString(NULL, "next item in "), name);
- readStringWithDebugW(props, &((*list)->items[i]), nextStr);
- FREE(nextStr);
- if(!isOK(props)) return;
- }
-}
-void readLauncherResourceList(LauncherProperties * props, LauncherResourceList ** list, char * name) {
- DWORD num = 0;
- DWORD i=0;
- char * numberStr = appendString(appendString(NULL, "number of "), name);
- readNumberWithDebug(props, &num, numberStr);
- FREE(numberStr);
- if(!isOK(props)) return;
-
- * list = newLauncherResourceList(num);
- for(i=0;i<(*list)->size;i++) {
- extractLauncherResource(props, & ((*list)->items[i]), "launcher resource");
- if(!isOK(props)) {
- char * str = appendString(appendString(NULL, "Error processing "), name);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, str, 1);
- FREE(str);
- break;
- }
- }
-}
-
-void readLauncherProperties(LauncherProperties * props) {
- DWORD i=0;
- char * str = NULL;
-
- readWCHARList(props, &(props->jvmArguments), "jvm arguments");
- if(!isOK(props)) return;
-
- readWCHARList(props, &(props->appArguments), "app arguments");
- if(!isOK(props)) return;
-
- readStringWithDebugW(props, &(props->mainClass), "Main Class");
- if(!isOK(props)) return;
-
- readStringWithDebugW(props, &(props->testJVMClass), "TestJVM Class");
- if(!isOK(props)) return;
-
- readNumberWithDebug( props, &(props->compatibleJavaNumber),
- "compatible java");
- if(!isOK(props)) return;
-
-
-
- if ( props->compatibleJavaNumber > 0 ) {
- props->compatibleJava = (JavaCompatible **) LocalAlloc(LPTR, sizeof(JavaCompatible *) * props->compatibleJavaNumber);
- for(i=0;icompatibleJavaNumber;i++) {
-
- props->compatibleJava [i] = newJavaCompatible() ;
-
- readStringWithDebugA(props, &str, "min java version");
- if(!isOK(props)) return;
- props->compatibleJava[i]->minVersion = getJavaVersionFromString(str, &props->status);
- FREE(str);
- if(!isOK(props)) return;
-
- str = NULL;
- readStringWithDebugA(props, &str, "max java version");
- if(!isOK(props)) return;
- props->compatibleJava[i]->maxVersion = getJavaVersionFromString(str, &props->status);
- FREE(str);
- if(!isOK(props)) return;
-
- readStringWithDebugA(props, &(props->compatibleJava[i]->vendor) ,
- "vendor");
- if(!isOK(props)) return;
-
- readStringWithDebugA(props, &(props->compatibleJava[i]->osName) ,
- "os name");
- if(!isOK(props)) return;
-
- readStringWithDebugA(props, &(props->compatibleJava[i]->osArch) ,
- "os arch");
- if(!isOK(props)) return;
-
- }
- }
- readNumberWithDebug( props, &props->bundledNumber, "bundled files");
- readBigNumberWithDebug(props, props->bundledSize, "bundled size");
-}
-
-void extractJVMData(LauncherProperties * props) {
- if(isOK(props)) {
-
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "Extracting JVM data... ", 1);
- extractLauncherResource(props, &(props->testJVMFile), "testJVM file");
- if(!isOK(props)) {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, "Error extracting testJVM file!", 1);
- return ;
- }
-
- readLauncherResourceList(props, &(props->jvms), "JVMs");
- }
-}
-
-void extractData(LauncherProperties *props) {
- if(isOK(props)) {
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "Extracting Bundled data... ", 1);
- readLauncherResourceList(props, &(props->jars), "bundled and external files");
- if(isOK(props)) {
- readLauncherResourceList(props, &(props->other), "other data");
- }
- }
-}
diff --git a/nbi/engine/native/launcher/windows/src/ExtractUtils.h b/nbi/engine/native/launcher/windows/src/ExtractUtils.h
deleted file mode 100644
index f816df879514..000000000000
--- a/nbi/engine/native/launcher/windows/src/ExtractUtils.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef _ExtractUtils_H
-#define _ExtractUtils_H
-
-#include
-#include "StringUtils.h"
-#include "JavaUtils.h"
-#include "Errors.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- extern const DWORD STUB_FILL_SIZE;
-
- void skipStub(LauncherProperties * props);
-
- void loadI18NStrings(LauncherProperties * props);
-
- WCHARList * newWCHARList(DWORD number) ;
- void readLauncherProperties(LauncherProperties * props);
- void freeWCHARList(WCHARList ** plist);
- void freeLauncherResource(LauncherResource ** file);
-
- void extractJVMData(LauncherProperties * props);
- void extractData(LauncherProperties *props);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ExtractUtils_H */
diff --git a/nbi/engine/native/launcher/windows/src/FileUtils.c b/nbi/engine/native/launcher/windows/src/FileUtils.c
deleted file mode 100644
index 6c36fd63f01e..000000000000
--- a/nbi/engine/native/launcher/windows/src/FileUtils.c
+++ /dev/null
@@ -1,593 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include "FileUtils.h"
-#include "StringUtils.h"
-
-HANDLE stdoutHandle = INVALID_HANDLE_VALUE;
-HANDLE stderrHandle = INVALID_HANDLE_VALUE;
-
-DWORD newLine = 1;
-const WCHAR * FILE_SEP = L"\\";
-
-const long CRC32_TABLE[256] = {
- 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535,
- 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd,
- 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d,
- 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec,
- 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4,
- 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c,
- 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac,
- 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f,
- 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab,
- 0xb6662d3d, 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f,
- 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb,
- 0x086d3d2d, 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
- 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea,
- 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, 0x4db26158, 0x3ab551ce,
- 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a,
- 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9,
- 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409,
- 0xce61e49f, 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81,
- 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739,
- 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
- 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, 0x8708a3d2, 0x1e01f268,
- 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0,
- 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8,
- 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
- 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef,
- 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703,
- 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7,
- 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a,
- 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae,
- 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
- 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, 0x88085ae6,
- 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45,
- 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d,
- 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5,
- 0x47b2cf7f, 0x30b5ffe9, 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605,
- 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
- 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
-};
-
-void writeTimeStamp(HANDLE hd, DWORD need) {
- DWORD written;
- if(need==1) {
- SYSTEMTIME t;
- char * yearStr;
- char * monthStr;
- char * dayStr;
- char * hourStr;
- char * minuteStr;
- char * secondStr;
- char * msStr;
- char * result = NULL;
- GetLocalTime(&t);
- yearStr = word2charN(t.wYear,2);
- monthStr = word2charN(t.wMonth,2);
- dayStr = word2charN(t.wDay,2);
- hourStr = word2charN(t.wHour,2);
- minuteStr = word2charN(t.wMinute,2);
- secondStr = word2charN(t.wSecond,2);
- msStr = word2charN(t.wMilliseconds,3);
-
- result = appendString(NULL, "[");
- result = appendString(result, yearStr);
- result = appendString(result, "-");
- result = appendString(result, monthStr);
- result = appendString(result, "-");
- result = appendString(result, dayStr);
- result = appendString(result, " ");
- result = appendString(result, hourStr);
- result = appendString(result, ":");
- result = appendString(result, minuteStr);
- result = appendString(result, ":");
- result = appendString(result, secondStr);
- result = appendString(result, ".");
- result = appendString(result, msStr);
- result = appendString(result, "]> ");
-
- WriteFile(hd, result, sizeof(char) * getLengthA(result), & written, NULL);
- FREE(result);
- FREE(yearStr);
- FREE(monthStr);
- FREE(dayStr);
-
- FREE(hourStr);
- FREE(minuteStr);
- FREE(secondStr);
- FREE(msStr);
- }
-}
-
-void writeMessageA(LauncherProperties * props, DWORD level, DWORD isErr, const char * message, DWORD needEndOfLine) {
- if(level>=props->outputLevel) {
- HANDLE hd = (isErr) ? props->stderrHandle : props->stdoutHandle;
- DWORD written;
- writeTimeStamp(hd, newLine);
- WriteFile(hd, message, sizeof(char) * getLengthA(message), & written, NULL);
- if(needEndOfLine>0) {
- newLine = 0;
- while((needEndOfLine--)>0) {
- writeMessageA(props, level, isErr, "\r\n", 0);
- newLine = 1;
- }
- flushHandle(hd);
- } else {
- newLine = 0;
- }
- }
-}
-
-void writeMessageW(LauncherProperties * props, DWORD level, DWORD isErr, const WCHAR * message, DWORD needEndOfLine) {
- if ( level >= props->outputLevel ) {
- char * msg = toChar(message);
- writeMessageA(props, level, isErr, msg, needEndOfLine);
- FREE(msg);
- }
-}
-void writeDWORD(LauncherProperties * props, DWORD level, DWORD isErr, const char * message, DWORD value, DWORD needEndOfLine) {
- char * dwordStr = DWORDtoCHAR(value);
- writeMessageA(props, level, isErr, message, 0);
- writeMessageA(props, level, isErr, dwordStr, needEndOfLine);
- FREE(dwordStr);
-}
-
-void writeint64t(LauncherProperties * props, DWORD level, DWORD isErr, const char * message, int64t * value, DWORD needEndOfLine) {
- char * str = int64ttoCHAR(value);
- writeMessageA(props, level, isErr, message, 0);
- writeMessageA(props, level, isErr, str, needEndOfLine);
- FREE(str);
-}
-void writeErrorA(LauncherProperties * props, DWORD level, DWORD isErr, const char * message, const WCHAR * param, DWORD errorCode) {
- WCHAR * err = getErrorDescription(errorCode);
- writeMessageA(props, level, isErr, message, 0);
- writeMessageW(props, level, isErr, param, 1);
- writeMessageW(props, level, isErr, err, 1);
- FREE(err);
-}
-
-void flushHandle(HANDLE hd) {
- FlushFileBuffers(hd);
-}
-
-int64t * getFreeSpace(WCHAR *path) {
- int64t bytes;
- int64t * result = newint64_t(0, 0);
- WCHAR * dst = appendStringW(NULL, path);
-
- while(!fileExists(dst)) {
- WCHAR * parent = getParentDirectory(dst);
- FREE(dst);
- dst = parent;
- if(dst==NULL) break;
- }
- if(dst==NULL) return result; // no parent ? strange
- if (GetDiskFreeSpaceExW(dst, (PULARGE_INTEGER) &bytes, NULL, NULL)) {
- result->High = bytes.High;
- result->Low = bytes.Low;
- }
- FREE(dst);
- return result;
-}
-
-void checkFreeSpace(LauncherProperties * props, WCHAR * tmpDir, int64t * size) {
- if(props->checkForFreeSpace) {
- int64t * space = getFreeSpace(tmpDir);
- DWORD result = 0;
- result = ((space->High > size->High) ||
- (space->High == size->High && space->Low >= size->Low));
-
- if(!result) {
- WCHAR * available = NULL;
- WCHAR * str = NULL;
- WCHAR * required = NULL;
- available = int64ttoWCHAR(space);
- required = int64ttoWCHAR(size);
- str = appendStringW(str, L"Not enough free space in ");
- str = appendStringW(str, tmpDir);
- str = appendStringW(str, L", available=");
- str = appendStringW(str, available);
- str = appendStringW(str, L", required=");
- str = appendStringW(str, required);
-
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 1, str, 1);
- FREE(str);
- FREE(available);
- FREE(required);
- props->status = ERROR_FREESPACE;
- }
- FREE(space);
- } else {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... free space checking is disabled", 1);
- }
-}
-
-DWORD fileExists(WCHAR *path) {
- WIN32_FILE_ATTRIBUTE_DATA attrs;
- return GetFileAttributesExW(path, GetFileExInfoStandard, &attrs);
-}
-
-DWORD isDirectory(WCHAR *path) {
- WIN32_FILE_ATTRIBUTE_DATA attrs;
- if(GetFileAttributesExW(path, GetFileExInfoStandard, &attrs)) {
- return (attrs.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY);
- }
- else {
- return 0;
- }
-}
-WCHAR * getParentDirectory(WCHAR * dir) {
- WCHAR * ptr = dir;
- WCHAR * res = NULL;
- while(1) {
- if(searchW(ptr, FILE_SEP)==NULL) {
- break;
- }
- ptr = searchW(ptr, FILE_SEP) + 1;
- }
- res = appendStringNW(NULL, 0, dir, getLengthW(dir) - getLengthW(ptr) - 1);
- return res;
-}
-WCHAR * normalizePath(WCHAR * dir) {
- WCHAR * directory = NULL;
- WCHAR * ptr1, *ptr2, *ptr3;
- DWORD i=0;
- DWORD len;
- ptr1 = searchW(dir, L":\\");
- ptr2 = searchW(dir, L":/");
- ptr3 = searchW(dir, L"\\\\");
- if(ptr1==NULL && ptr2==NULL && dir!=ptr3) { //relative path
- directory = appendStringW(getCurrentDirectory(), FILE_SEP);
- directory = appendStringW(directory, dir);
- } else {
- directory = appendStringW(NULL, dir);
- }
- len = getLengthW(directory);
-
- for(i=0;i status = ERROR_INPUTOUPUT;
- } else {
- SECURITY_ATTRIBUTES secattr;
- int64t * minSize = newint64_t(0, 0);
-
- secattr.nLength = sizeof(SECURITY_ATTRIBUTES);
- secattr.lpSecurityDescriptor = 0;
- secattr.bInheritHandle = 1;
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, "... creating directory itself... ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 1, directory, 1);
-
- checkFreeSpace(props, parent, minSize);
- FREE(minSize);
-
- if(isOK(props)) {
- props->status = (CreateDirectoryExW(parent, directory, &secattr)) ? ERROR_OK : ERROR_INPUTOUPUT;
- if(!isOK(props)) {
- props->status = (CreateDirectoryW(directory, &secattr)) ? ERROR_OK : ERROR_INPUTOUPUT;
- }
- props->status = (fileExists(directory)) ? ERROR_OK : ERROR_INPUTOUPUT;
-
- if(isOK(props)) {
- SetFileAttributesW(directory, parentAttrs);
- } else {
- writeErrorA(props, OUTPUT_LEVEL_DEBUG, 1, "Error! Can`t create directory : ", directory, GetLastError());
- }
- }
- }
- }
- FREE(parent);
- } else {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, " parent is NULL ", 1);
- props-> status = ERROR_INPUTOUPUT;
- }
-}
-
-#define a 16807 /* multiplier */
-#define m 2147483647L /* 2**31 - 1 */
-#define q 127773L /* m div a */
-#define r 2836 /* m mod a */
-
-long nextRandDigit(long seed)
-{
- unsigned long lo, hi;
-
- lo = a * (long)(seed & 0xFFFF);
- hi = a * (long)((unsigned long)seed >> 16);
- lo += (hi & 0x7FFF) << 16;
- if (lo > m)
- {
- lo &= m;
- ++lo;
- }
- lo += hi >> 15;
- if (lo > m)
- {
- lo &= m;
- ++lo;
- }
- return (long)lo;
-}
-
-void createTempDirectory(LauncherProperties * props, WCHAR * argTempDir, DWORD createRndSubDir) {
- WCHAR * t = (argTempDir!=NULL) ? appendStringW(NULL, argTempDir) : getSystemTemporaryDirectory();
-
- WCHAR * nbiTmp = normalizePath(t);
- FREE(t);
- if(createRndSubDir) {
- WCHAR * randString = newpWCHAR(6);
- DWORD i=0;
- DWORD initValue = GetTickCount() & 0x7FFFFFFF;
- long value = (long) initValue;
- nbiTmp = appendStringW(nbiTmp, L"\\NBI");
-
- for(i=0;i<5;i++) {
- value = nextRandDigit(value);
- randString[i] = '0' + (WCHAR) (value% 10);
- }
- nbiTmp = appendStringW(appendStringW(nbiTmp, randString), L".tmp");
- FREE(randString);
- }
-
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "Using temp directory for extracting data : ", 0);
- writeMessageW(props, OUTPUT_LEVEL_NORMAL, 0, nbiTmp, 1);
-
- if(fileExists(nbiTmp) ) {
- if(!isDirectory(nbiTmp)) {
- props->status = ERROR_INPUTOUPUT;
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, ".. exists but not a directory", 1);
- } else {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "Output directory already exist so don`t create it", 1);
- }
- }
- else {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "creating directory...", 1);
- createDirectory(props, nbiTmp);
- if(isOK(props)) {
- props->tmpDirCreated = 1;
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "Directory created : ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, nbiTmp, 1);
- // set hidden attribute
- if(createRndSubDir) {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, "Setting hidden attributes to ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 1, nbiTmp, 1);
-
- SetFileAttributesW(nbiTmp, GetFileAttributesW(nbiTmp) | FILE_ATTRIBUTE_HIDDEN);
- }
- } else {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, "Error! Can`t create nbi temp directory : ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 1, nbiTmp, 1);
- }
- }
- props->tmpDir = nbiTmp;
- return;
-}
-
-
-void deleteDirectory(LauncherProperties * props, WCHAR * dir) {
- DWORD attrs = GetFileAttributesW(dir);
- DWORD dwError;
- DWORD count = 0 ;
- if(attrs==INVALID_FILE_ATTRIBUTES) {
- writeErrorA(props, OUTPUT_LEVEL_DEBUG, 1, "Error! Can`t get attributes of the dir : ", dir, GetLastError());
- return;
- }
- if(!SetFileAttributesW(dir, attrs & FILE_ATTRIBUTE_NORMAL)) {
- writeErrorA(props, OUTPUT_LEVEL_DEBUG, 1, "Error! Can`t set attributes of the dir : ", dir, GetLastError());
- }
-
-
- if(attrs & FILE_ATTRIBUTE_DIRECTORY) {
- WIN32_FIND_DATAW FindFileData;
- HANDLE hFind = INVALID_HANDLE_VALUE;
-
- WCHAR * DirSpec = appendStringW(appendStringW(NULL, dir), L"\\*" );
-
- // Find the first file in the directory.
- hFind = FindFirstFileW(DirSpec, &FindFileData);
-
- if (hFind == INVALID_HANDLE_VALUE) {
- writeErrorA(props, OUTPUT_LEVEL_DEBUG, 1, "Error! Can`t file with pattern ", DirSpec, GetLastError());
- }
- else {
- // List all the other files in the directory.
- while (FindNextFileW(hFind, &FindFileData) != 0) {
- if(lstrcmpW(FindFileData.cFileName, L".")!=0 &&
- lstrcmpW(FindFileData.cFileName, L"..")!=0 ) {
- WCHAR * child = appendStringW(appendStringW(appendStringW(NULL, dir), FILE_SEP), FindFileData.cFileName);
- deleteDirectory(props, child);
- FREE(child);
- }
- }
-
- dwError = GetLastError();
- FindClose(hFind);
- if (dwError != ERROR_NO_MORE_FILES) {
- writeErrorA(props, OUTPUT_LEVEL_DEBUG, 1, "Error! Can`t find file with pattern : ", DirSpec, dwError);
- }
- }
-
- // 20 tries in 2 seconds to delete the directory
- while(!RemoveDirectoryW(dir) && count++ < 20) Sleep(100);
- FREE(DirSpec);
- }
- else {
- // 20 tries in 2 seconds to delete the file
- while(!DeleteFileW(dir) && count++ < 20) Sleep(100);
- }
-}
-
-
-
-
-WCHAR * getSystemTemporaryDirectory() {
- WCHAR * expanded = newpWCHAR(MAX_PATH);
- DWORD result;
- if(GetTempPathW(MAX_PATH, expanded)!=0) {
- return expanded;
- }
-
- result = GetEnvironmentVariableW(L"TEMP", expanded, MAX_PATH);
- if(result<=0 || result>MAX_PATH) {
- //writeOutputLn("Can`t find variable TEMP");
- result = GetEnvironmentVariableW(L"TMP", expanded, MAX_PATH);
- if(result<=0 || result>MAX_PATH) {
- //writeOutputLn("Can`t find variable TMP");
- result = GetEnvironmentVariableW(L"USERPROFILE", expanded, MAX_PATH);
- if(result>0 && result<=MAX_PATH) {
- expanded = appendStringW(expanded, L"\\Local Settings\\Temp");
- } else{
- WCHAR * curdir = getCurrentDirectory();
- ZERO(expanded, sizeof(WCHAR) * MAX_PATH);
- lstrcpynW(expanded, curdir, MAX_PATH);
- FREE(curdir);
- }
- }
- }
- return expanded;
-}
-
-WCHAR * getExePath() {
- WCHAR * szPath = newpWCHAR(MAX_PATH);
-
- if( !GetModuleFileNameW( NULL, szPath, MAX_PATH ) ) {
- FREE(szPath);
- return NULL;
- } else {
- return szPath;//appendStringNW(NULL, 0, szPath, getLengthW(szPath));
- }
-}
-
-
-WCHAR * getExeName() {
- WCHAR * szPath = newpWCHAR(MAX_PATH);
- WCHAR * result = NULL;
- if(GetModuleFileNameW( NULL, szPath, MAX_PATH )) {
- WCHAR * lastSlash = szPath;
- while(searchW(lastSlash, FILE_SEP)!=NULL) {
- lastSlash = searchW(lastSlash, FILE_SEP) + 1;
- }
- result = appendStringW(NULL, lastSlash);
- }
- FREE(szPath);
- return result;
-}
-
-WCHAR * getExeDirectory() {
- WCHAR * szPath = newpWCHAR(MAX_PATH);
- WCHAR * result = NULL;
- if(GetModuleFileNameW( NULL, szPath, MAX_PATH )) {
- WCHAR * lastSlash = szPath;
- while(searchW(lastSlash, FILE_SEP)!=NULL) {
- lastSlash = searchW(lastSlash, FILE_SEP) + 1;
- }
- result = appendStringNW(NULL, 0 , szPath,
- getLengthW(szPath) - getLengthW(lastSlash) - 1);
- }
- FREE(szPath);
- return result;
-}
-
-WCHAR * getCurrentDirectory() {
- WCHAR * buf = newpWCHAR(MAX_PATH);
-
- if(GetCurrentDirectoryW(MAX_PATH, buf)!=0) {
- return buf;
- } else {
- FREE(buf);
- return NULL;
- }
-}
-WCHAR * getCurrentUserHome() {
- HANDLE hUser;
- WCHAR * buf = NULL;
- if (OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hUser)) {
- DWORD size = MAX_PATH;
- buf = newpWCHAR(MAX_PATH);
- GetUserProfileDirectoryW(hUser, buf, &size);
- if (size > MAX_PATH) {
- FREE(buf);
- buf = newpWCHAR(size + 1);
- if(!GetUserProfileDirectoryW(hUser, buf, &size)) {
- FREE(buf);
- }
- }
- CloseHandle(hUser);
- }
- if(buf==NULL) {
- DWORD size = MAX_PATH;
- buf = newpWCHAR(size);
- size = GetEnvironmentVariableW(L"USERPROFILE", buf, MAX_PATH);
- if( size > MAX_PATH) {
- FREE(buf);
- buf = newpWCHAR(size + 1);
- GetEnvironmentVariableW(L"USERPROFILE", buf, size);
- } else if (size==0) {
- FREE(buf);
- }
- }
- return buf;
-}
-int64t * getFileSize(WCHAR * path) {
- WIN32_FILE_ATTRIBUTE_DATA wfad;
- int64t * res = newint64_t(0, 0);
- if (GetFileAttributesExW(path,
- GetFileExInfoStandard,
- &wfad)) {
- res->Low = wfad.nFileSizeLow;
- res->High = wfad.nFileSizeHigh ;
- }
- return res;
-}
-
-void update_crc32(DWORD * crc, char *ptr, DWORD size) {
- while( size-- ) *crc = CRC32_TABLE[(unsigned char) (*crc^*ptr++)] ^ (*crc>>8);
-}
diff --git a/nbi/engine/native/launcher/windows/src/FileUtils.h b/nbi/engine/native/launcher/windows/src/FileUtils.h
deleted file mode 100644
index 0b01ace4585a..000000000000
--- a/nbi/engine/native/launcher/windows/src/FileUtils.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef _FileUtils_H
-#define _FileUtils_H
-
-#include
-#include "Errors.h"
-#include "Types.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define OUTPUT_LEVEL_DEBUG 0
-#define OUTPUT_LEVEL_NORMAL 1
-
-
- extern const WCHAR * FILE_SEP;
- extern const long CRC32_TABLE[256];
- void update_crc32(DWORD * crc32, char * buf, DWORD size);
- int64t * getFreeSpace(WCHAR *path);
- int64t * getFileSize(WCHAR * path);
- void checkFreeSpace(LauncherProperties * props, WCHAR * tmpDir, int64t * size);
- WCHAR * getParentDirectory(WCHAR * dir);
- void createDirectory(LauncherProperties * props, WCHAR * directory);
- void createTempDirectory(LauncherProperties * props, WCHAR * argTempDir, DWORD createRndSubDir);
- void deleteDirectory(LauncherProperties * props,WCHAR * dir);
- WCHAR * getExePath();
- WCHAR * getExeName();
- WCHAR * getExeDirectory();
-
- WCHAR * getSystemTemporaryDirectory();
- DWORD isDirectory(WCHAR *path);
- WCHAR * getCurrentDirectory();
- WCHAR * getCurrentUserHome();
-
-
- void writeMessageW(LauncherProperties * props, DWORD level,DWORD isErr, const WCHAR * message, DWORD needEndOfLine);
- void writeMessageA(LauncherProperties * props,DWORD level, DWORD isErr, const char * message, DWORD needEndOfLine);
- void writeErrorA(LauncherProperties * props,DWORD level, DWORD isErr, const char * message, const WCHAR * param, DWORD errorCode);
- void writeDWORD(LauncherProperties * props,DWORD level, DWORD isErr, const char * message, DWORD value, DWORD needEndOfLine);
- void writeint64t(LauncherProperties * props,DWORD level, DWORD isErr, const char * message, int64t * value, DWORD needEndOfLine);
-
- void flushHandle(HANDLE hd);
- DWORD fileExists(WCHAR * path);
-
- #ifdef __cplusplus
-}
-#endif
-
-#endif /* _FileUtils_H */
diff --git a/nbi/engine/native/launcher/windows/src/JavaUtils.c b/nbi/engine/native/launcher/windows/src/JavaUtils.c
deleted file mode 100644
index 9e4245e018d8..000000000000
--- a/nbi/engine/native/launcher/windows/src/JavaUtils.c
+++ /dev/null
@@ -1,796 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include
-#include
-#include "JavaUtils.h"
-#include "RegistryUtils.h"
-#include "StringUtils.h"
-#include "SystemUtils.h"
-#include "FileUtils.h"
-#include "ProcessUtils.h"
-#include "Launcher.h"
-#include "Main.h"
-
-const DWORD JAVA_VERIFICATION_PROCESS_TIMEOUT = 10000; // 10sec
-const DWORD UNPACK200_EXTRACTION_TIMEOUT = 60000; //60 seconds on each file
-const DWORD JAVA_VERIFICATION_PROCESS_PRIORITY = NORMAL_PRIORITY_CLASS;
-const WCHAR * JAVA_EXE_SUFFIX = L"\\bin\\java.exe";
-const WCHAR * UNPACK200_EXE_SUFFIX = L"\\bin\\unpack200.exe";
-const WCHAR * JAVA_LIB_SUFFIX = L"\\lib";
-const WCHAR * PACK_GZ_SUFFIX = L".pack.gz";
-const WCHAR * JAR_PACK_GZ_SUFFIX = L".jar.pack.gz";
-
-const DWORD JVM_EXTRACTION_TIMEOUT = 180000; //180sec
-
-WCHAR * JAVA_REGISTRY_KEYS [] = {
- L"SOFTWARE\\JavaSoft\\Java Runtime Environment",
- L"SOFTWARE\\JavaSoft\\Java Development Kit",
- L"SOFTWARE\\JavaSoft\\JDK",
- L"SOFTWARE\\JRockit\\Java Runtime Environment",
- L"SOFTWARE\\JRockit\\Java Development Kit",
- L"SOFTWARE\\IBM\\Java Runtime Environment",
- L"SOFTWARE\\IBM\\Java2 Runtime Environment",
- L"SOFTWARE\\IBM\\Java Development Kit",
-};
-WCHAR * JAVA_HOME = L"JavaHome";
-WCHAR * CURRENT_VERSION = L"CurrentVersion";
-
-WCHAR * getJavaHomeValue(WCHAR *parentkey, WCHAR *subkey, BOOL access64key) {
- return getStringValuePC(HKEY_LOCAL_MACHINE, parentkey, subkey, JAVA_HOME, access64key);
-}
-
-
-WCHAR * getTestJVMFileName(WCHAR * testJVMFile) {
- WCHAR * filePtr = testJVMFile;
- WCHAR * testJavaClass = NULL;
-
- if(filePtr!=NULL) {
- WCHAR * dotClass = NULL;
- while(searchW(filePtr, L"\\")!=NULL) {
- filePtr = searchW(filePtr, L"\\");
- filePtr++;
- }
- dotClass = searchW(filePtr, L".class");
-
- if(dotClass!=NULL) {
- testJavaClass = appendStringNW(NULL, 0, filePtr, getLengthW(filePtr) - getLengthW(dotClass));
- }
- }
- return testJavaClass;
-}
-
-
-//returns 0 if equals, 1 if first > second, -1 if first < second
-char compareJavaVersion(JavaVersion * first, JavaVersion * second) {
- if(first==NULL) return (second==NULL) ? 0 : -1;
- if(second==NULL) return -1;
- if(first->major == second->major) {
- if(first->minor == second->minor) {
- if(first->micro == second->micro) {
- if(first->update == second->update) return 0;
- return (first->update > second->update) ? 1 : -1;
- }
- return (first->micro > second->micro) ? 1 : -1;
- }
- return (first->minor > second->minor) ? 1 : -1;
- } else {
- return (first->major > second->major) ? 1 : -1;
- }
-}
-DWORD isJavaCompatible(JavaProperties *currentJava, JavaCompatible ** compatibleJava, DWORD number) {
- JavaVersion * current = currentJava->version;
- DWORD i = 0 ;
-
- for(i=0;iminVersion) >= 0 &&
- compareJavaVersion(current, compatibleJava[i]->maxVersion) <= 0) ? check : 0;
-
- if (check) {
- if(compatibleJava[i]->vendor!=NULL) {
- check = (searchA(currentJava->vendor, compatibleJava[i]->vendor) != NULL) ? check : 0;
- }
- if (compatibleJava[i]->osName!=NULL) {
- check = (searchA(currentJava->osName, compatibleJava[i]->osName)!=NULL) ? check : 0;
- }
-
- if (compatibleJava[i]->osArch!=NULL) {
- check = (searchA(currentJava->osArch, compatibleJava[i]->osArch)!=NULL) ? check : 0;
- }
- if(check) {
- return 1;
- }
- }
- }
- return 0;
-}
-
-JavaVersion * getJavaVersionFromString(char * string, DWORD * result) {
- JavaVersion *vers = NULL;
- if(getLengthA(string)<3) {
- return vers;
- }
-
- const char *p = string;
-
- // get major
- long major = 0;
- while(*p!=0) {
- char c = *p++;
- if(c>='0' && c<='9') {
- major = (major) * 10 + c - '0';
- if (major > 999) return vers;
- continue;
- } else if(c=='.' || c=='+'){
- break;
- } else{
- return vers;
- }
- }
-
- // get minor
- long minor = 0;
- while(*p!=0) {
- char c = *p;
- if(c>='0' && c<='9') {
- minor = (minor) * 10 + c - '0';
- p++;
- continue;
- }
- break;
- }
-
- *result = ERROR_OK;
- vers = (JavaVersion*) LocalAlloc(LPTR, sizeof(JavaVersion));
- vers->major = major;
- vers->minor = minor;
- vers->micro = 0;
- vers->update = 0;
- ZERO(vers->build, 128);
-
- if(p[0]=='.') { // micro...
- p++;
- while(*p!=0) {
- char c = *p;
- if(c>='0' && c<='9') {
- vers->micro = (vers->micro) * 10 + c - '0';
- p++;
- continue;
- } else if(c=='_') {//update
- p++;
- while((c = *p) != 0) {
- p++;
- if(c>='0' && c<='9') {
- vers->update = (vers->update) * 10 + c - '0';
- continue;
- } else {
- break;
- }
- }
- } else {
- if(*p!=0) p++;
- }
- if(c=='-' && *p!=0) { // build number
- lstrcpyn(vers->build, p, min(127, getLengthA(p)+1));
- }
- break;
- }
- }
- return vers;
-}
-
-DWORD getJavaPropertiesFromOutput(LauncherProperties * props, char *str, JavaProperties ** javaProps) {
- DWORD separators = getLineSeparatorNumber(str);
- DWORD result = ERROR_INPUTOUPUT;
- * javaProps = NULL;
- if(separators == TEST_JAVA_PARAMETERS) {
- char * start;
- char * end;
- char * javaVersion;
- char * javaVmVersion;
- char * javaVendor;
- char * osName;
- char * osArch;
- char * string;
- JavaVersion * vers;
-
- start = str;
- end = searchA(start, "\n");
-
- javaVersion = appendStringN(NULL, 0, start, getLengthA(start) - getLengthA(end)-1);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, " java.version = ", 0);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, javaVersion, 1);
- start = end + 1;
- end = searchA(start, "\n");
-
-
- javaVmVersion = appendStringN(NULL, 0, start, getLengthA(start) - getLengthA(end)-1);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, " java.vm.version = ", 0);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, javaVmVersion, 1);
- start = end + 1;
- end = searchA(start, "\n");
-
- javaVendor = appendStringN(NULL, 0, start, getLengthA(start) - getLengthA(end)-1);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, " java.vendor = ", 0);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, javaVendor, 1);
- start = end + 1;
- end = searchA(start, "\n");
-
- osName = appendStringN(NULL, 0, start, getLengthA(start) - getLengthA(end)-1);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, " os.name = ", 0);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, osName, 1);
- start = end + 1;
- end = searchA(start, "\n");
-
- osArch = appendStringN(NULL, 0, start, getLengthA(start) - getLengthA(end)-1);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, " os.arch = ", 0);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, osArch, 2);
-
- string = javaVersion;
-
-
- if(javaVmVersion!=NULL) {
- string = searchA(javaVmVersion, javaVersion);
- if(string==NULL) {
- string = javaVersion;
- }
- }
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... getting java version from string : ", 0);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, string, 1);
-
- vers = getJavaVersionFromString(string, & result);
- if(javaProps != NULL) {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... some java there", 1);
- * javaProps = (JavaProperties *) LocalAlloc(LPTR, sizeof(JavaProperties));
- (*javaProps)->version = vers;
- (*javaProps)->vendor = javaVendor;
- (*javaProps)->osName = osName;
- (*javaProps)->osArch = osArch;
- (*javaProps)->javaHome = NULL;
- (*javaProps)->javaExe = NULL;
- } else {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... no java there", 1);
- FREE(javaVendor);
- FREE(osName);
- FREE(osArch);
- }
- FREE(javaVmVersion);
- FREE(javaVersion);
- }
- return result;
-}
-
-
-void getJavaProperties(WCHAR * location, LauncherProperties * props, JavaProperties ** javaProps) {
- WCHAR *testJavaClass = props->testJVMClass;
- WCHAR *javaExecutable = getJavaResource(location, JAVA_EXE_SUFFIX);
- WCHAR *libDirectory = getJavaResource(location, JAVA_LIB_SUFFIX);
-
- if(fileExists(javaExecutable) && testJavaClass!=NULL && isDirectory(libDirectory)) {
- WCHAR * command = NULL;
- HANDLE hRead;
- HANDLE hWrite;
-
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... java hierarchy there", 1);
- // \bin\java.exe exists
-
-
- appendCommandLineArgument(&command, javaExecutable);
- appendCommandLineArgument(&command, L"-classpath");
- appendCommandLineArgument(&command, props->testJVMFile->resolved);
- appendCommandLineArgument(&command, testJavaClass);
-
-
- CreatePipe(&hRead, &hWrite, NULL, 0);
- // Start the child process.
- executeCommand(props, command, NULL, JAVA_VERIFICATION_PROCESS_TIMEOUT, hWrite, INVALID_HANDLE_VALUE, JAVA_VERIFICATION_PROCESS_PRIORITY);
- if(props->status!= ERROR_ON_EXECUTE_PROCESS && props->status!= ERROR_PROCESS_TIMEOUT) {
- char * output = readHandle(hRead);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, " output :\n", 0);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, output, 1);
-
- props->status = getJavaPropertiesFromOutput(props, output, javaProps);
- if(props->status == ERROR_OK) {
- (*javaProps)->javaHome = appendStringW(NULL, location);
- (*javaProps)->javaExe = appendStringW(NULL, javaExecutable);
- }
- FREE(output);
- } else if(props->status == ERROR_PROCESS_TIMEOUT) {
- // java verification process finished by time out
- props->status = ERROR_INPUTOUPUT;
- }
- FREE(command);
- CloseHandle(hWrite);
- CloseHandle(hRead);
- } else {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... not a java hierarchy", 1);
- props->status = ERROR_INPUTOUPUT;
- }
- FREE(libDirectory);
- FREE(javaExecutable);
-}
-
-
-
-char * getJavaVersionFormatted(const JavaProperties * javaProps) {
- char *result = NULL;
- if(javaProps!=NULL) {
- JavaVersion * version = javaProps->version;
- if(version!=NULL) {
- char * majorStr = long2char(version->major);
- char * minorStr = long2char(version->minor);
- char * microStr = long2char(version->micro);
- result = appendString(result, majorStr);
- result = appendString(result, ".");
- result = appendString(result, minorStr);
- result = appendString(result, ".");
- result = appendString(result, microStr);
- FREE(majorStr);
- FREE(minorStr);
- FREE(microStr);
-
- if(version->update!=0) {
- char * updateStr = long2charN(version->update, 2);
- result = appendString(result, "_");
- result = appendString(result, updateStr);
- FREE(updateStr);
- }
- if(getLengthA(version->build) > 0) {
- result = appendString(result, "-");
- result = appendString(result, version->build);
- }
- }
- }
- return result;
-}
-
-
-JavaCompatible * newJavaCompatible() {
- JavaCompatible * props = (JavaCompatible *) LocalAlloc(LPTR, sizeof(JavaCompatible));
- props->minVersion = NULL;
- props->maxVersion = NULL;
- props->vendor = NULL;
- props->osName = NULL;
- return props;
-}
-
-void freeJavaProperties(JavaProperties ** props) {
- if(*props!=NULL) {
- FREE((*props)->version);
- FREE((*props)->javaHome);
- FREE((*props)->javaExe);
- FREE((*props)->vendor);
- FREE(*props);
- }
-}
-
-WCHAR * getJavaResource(WCHAR * location, const WCHAR * suffix) {
- return appendStringW(appendStringW(NULL, location), suffix);
-}
-
-
-void searchCurrentJavaRegistry(LauncherProperties * props, BOOL access64key) {
- DWORD i=0;
- WCHAR ** keys = JAVA_REGISTRY_KEYS;
- DWORD k=0;
- WCHAR * buffer = newpWCHAR(MAX_LEN_VALUE_NAME);
- HKEY rootKeys [2] = {HKEY_LOCAL_MACHINE, HKEY_CURRENT_USER};
- DWORD rootKeysNumber = sizeof(rootKeys)/sizeof(HKEY);
- DWORD keysNumber = sizeof(JAVA_REGISTRY_KEYS)/sizeof(WCHAR*);
- DWORD status = ERROR_OK;
-
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "Search java in CurrentVersion values...", 1);
-
-
- for ( k = 0; k < rootKeysNumber; k++) {
- for(i=0; i < keysNumber;i++) {
- if(isTerminated(props)) {
- return;
- }
- else {
-
- WCHAR * value = getStringValue(rootKeys[k], keys[i], CURRENT_VERSION, access64key);
- if(value!=NULL) {
- WCHAR *javaHome = getStringValuePC(rootKeys[k], keys[i], value, JAVA_HOME, access64key);
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "... ", 0);
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, (rootKeys[k]==HKEY_LOCAL_MACHINE) ? "HKEY_LOCAL_MACHINE" : "HKEY_CURRENT_USER", 0);
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "\\", 0);
- writeMessageW(props, OUTPUT_LEVEL_NORMAL, 0, keys[i], 0);
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "\\", 0);
- writeMessageW(props, OUTPUT_LEVEL_NORMAL, 0, CURRENT_VERSION, 0);
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "->", 0);
- writeMessageW(props, OUTPUT_LEVEL_NORMAL, 0, value, 0);
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "[", 0);
- writeMessageW(props, OUTPUT_LEVEL_NORMAL, 0, JAVA_HOME, 0);
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "] = ", 0);
- writeMessageW(props, OUTPUT_LEVEL_NORMAL, 0, javaHome, 1);
-
- FREE(value);
- trySetCompatibleJava(javaHome, props);
- FREE(javaHome);
- if(props->java!=NULL) {
- FREE(buffer);
- return;
- }
- }
- }
- }
- }
-
-
- // we found no CurrentVersion java... just search for other possible keys
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "Search java in other values...", 1);
-
-
- for(k=0;kjava!=NULL) {
- i = keysNumber; // to the end of cycles
- k = rootKeysNumber;
- break;
- }
-
- }
- index++;
- } while (err == ERROR_SUCCESS);
- }
- }
- if (hkey != 0) {
- RegCloseKey(hkey);
- }
- }
- }
- FREE(buffer);
- return;
-}
-
-
-void searchJavaFromEnvVariables(LauncherProperties * props) {
- static WCHAR * ENVS [] = {
- L"JAVA_HOME",
- L"JAVAHOME",
- L"JAVA_PATH",
- L"JDK_HOME",
- L"JDKHOME",
- L"ANT_JAVA",
- L"JAVA",
- L"JDK"
- };
-
- WCHAR buffer [MAX_PATH];
-
- int size = sizeof(ENVS)/sizeof(WCHAR *);
- int i=0;
- int ret;
-
- for(i=0;i 0 && ret <= MAX_PATH) {
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, " <", 0);
- writeMessageW(props, OUTPUT_LEVEL_NORMAL, 0, ENVS[i], 0);
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "> = ", 0);
- writeMessageW(props, OUTPUT_LEVEL_NORMAL, 0, buffer, 1);
- trySetCompatibleJava(buffer, props);
- if(props->java!=NULL) {
- break;
- }
- }
- }
-}
-
-
-
-
-void unpackJars(LauncherProperties * props, WCHAR * jvmDir, WCHAR * startDir, WCHAR * unpack200exe) {
- DWORD attrs;
- DWORD dwError;
- DWORD count = 0 ;
-
- if(!isOK(props)) return;
- attrs = GetFileAttributesW(startDir);
- if(attrs==INVALID_FILE_ATTRIBUTES) {
- writeErrorA(props, OUTPUT_LEVEL_DEBUG, 1, "Error! Can`t get attributes of the file : ", startDir, GetLastError());
- return;
- }
- if(attrs & FILE_ATTRIBUTE_DIRECTORY) { // is directory
- WIN32_FIND_DATAW FindFileData;
- HANDLE hFind = INVALID_HANDLE_VALUE;
-
- WCHAR * DirSpec = appendStringW(appendStringW(NULL, startDir), L"\\*" );
-
- // Find the first file in the directory.
- hFind = FindFirstFileW(DirSpec, &FindFileData);
-
- if (hFind == INVALID_HANDLE_VALUE) {
- writeErrorA(props, OUTPUT_LEVEL_DEBUG, 1, "Error! Can`t file with pattern ", DirSpec, GetLastError());
- }
- else {
- // List all the other files in the directory.
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... listing directory ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, startDir, 1);
-
- while (FindNextFileW(hFind, &FindFileData) != 0 && isOK(props)) {
- if(lstrcmpW(FindFileData.cFileName, L".")!=0 &&
- lstrcmpW(FindFileData.cFileName, L"..")!=0) {
- WCHAR * child = NULL;
-
- child = appendStringW(appendStringW(appendStringW(NULL, startDir), FILE_SEP), FindFileData.cFileName);
- if(isDirectory(child)) {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... directory : ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, child, 1);
- unpackJars(props, jvmDir, child, unpack200exe);
- } else if(searchW(FindFileData.cFileName, JAR_PACK_GZ_SUFFIX)!=NULL) {
- WCHAR * jarName = appendStringW(appendStringW(
- appendStringW(NULL, startDir), FILE_SEP),
- appendStringNW(NULL, 0, FindFileData.cFileName,
- getLengthW(FindFileData.cFileName) - getLengthW(PACK_GZ_SUFFIX)));
- WCHAR * unpackCommand = NULL;
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... packed jar : ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, child, 1);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... jar name : ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, jarName, 1);
-
-
- appendCommandLineArgument(&unpackCommand, unpack200exe);
- appendCommandLineArgument(&unpackCommand, L"-r"); // remove input file
- appendCommandLineArgument(&unpackCommand, child);
- appendCommandLineArgument(&unpackCommand, jarName);
-
- executeCommand(props, unpackCommand, NULL, UNPACK200_EXTRACTION_TIMEOUT, props->stdoutHandle, props->stderrHandle, NORMAL_PRIORITY_CLASS);
- FREE(unpackCommand);
- if(!isOK(props)) {
- if(props->status==ERROR_PROCESS_TIMEOUT) {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, "... could not unpack file : timeout", 1);
- } else {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, "... an error occured unpacking the file", 1);
- }
- props->exitCode = props->status;
- }
- FREE(jarName);
- }
- FREE(child);
- }
- }
-
- dwError = GetLastError();
- FindClose(hFind);
- if (dwError != ERROR_NO_MORE_FILES) {
- writeErrorA(props, OUTPUT_LEVEL_DEBUG, 1, "Error! Can`t find file with pattern : ", DirSpec, dwError);
- }
- }
- FREE(DirSpec);
- }
-
-}
-void installJVM(LauncherProperties * props, LauncherResource *jvm) {
- WCHAR * command = NULL;
- WCHAR * jvmDir = getParentDirectory(jvm->resolved);
-
- jvmDir = appendStringW(jvmDir, L"\\_jvm");
- createDirectory(props, jvmDir);
- if(!isOK(props)) {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, "... cannot create dir for JVM extraction :", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 1, jvmDir, 1);
- FREE(jvmDir);
- return;
- }
-
- appendCommandLineArgument(&command, jvm->resolved);
- appendCommandLineArgument(&command, L"-d");
- appendCommandLineArgument(&command, jvmDir);
-
- executeCommand(props, command, jvmDir, JVM_EXTRACTION_TIMEOUT, props->stdoutHandle, props->stderrHandle, NORMAL_PRIORITY_CLASS);
- FREE(command);
- if(!isOK(props)) {
- if(props->status==ERROR_PROCESS_TIMEOUT) {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, "... could not extract JVM : timeout", 1);
- } else {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, "... an error occured during running JVM extraction file", 1);
- }
- props->exitCode = props->status;
- } else {
- WCHAR * unpack200exe = appendStringW(appendStringW(NULL, jvmDir), UNPACK200_EXE_SUFFIX);
- if(fileExists(unpack200exe)) {
- unpackJars(props, jvmDir, jvmDir, unpack200exe);
- } else {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, "... no unpack200 command", 1);
- props->status = ERROR_BUNDLED_JVM_EXTRACTION;
- }
- if(!isOK(props)) {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, "Could not unpack200 the JVM jars", 1);
- }
- FREE(unpack200exe);
- }
- FREE(jvm->resolved);
- jvm->resolved = jvmDir;
-}
-
-void installBundledJVMs(LauncherProperties * props) {
- if ( props->jvms->size > 0 ) {
- DWORD i=0;
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "... search for bundled JVMs", 1);
- for(i=0;ijvms->size; i++) {
- if(props->jvms->items[i]->type==0 && !isTerminated(props)) {
- resolvePath(props, props->jvms->items[i]);
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "... install bundled JVM ", 0);
- writeMessageW(props, OUTPUT_LEVEL_NORMAL, 0, props->jvms->items[i]->resolved, 1);
- installJVM(props, props->jvms->items[i]);
- if(isTerminated(props)) return;
- if(isOK(props)) {
- trySetCompatibleJava(props->jvms->items[i]->resolved, props);
- if(props->java!=NULL) {
- break;
- } else {
- props->status = ERROR_BUNDLED_JVM_VERIFICATION;
- return;
- }
- }
- else {
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "... error occured during JVM extraction", 1);
- props->status = ERROR_BUNDLED_JVM_EXTRACTION;
- return;
- }
- }
- }
- }
-}
-void searchJavaInstallationFolder(LauncherProperties * props) {
- char executablePath [MAX_PATH];
- GetModuleFileName(0, executablePath, MAX_PATH);
- char * pch = strrchr(executablePath, '\\');
- char installationFolder [MAX_PATH]= "";
- int i = 0;
- int end = (int) (pch - executablePath);
- printf("%i", end);
- for(i; i < end; i++) {
- installationFolder[i] = executablePath[i];
- }
- strcat(installationFolder, "\\bin\\jre");
-
- // check if JRE is in installation folder
- WCHAR * nestedJreFolder = toWCHAR(installationFolder);
- if (!fileExists(nestedJreFolder)) {
- // if not exists - return
- return;
- }
-
- // if exists - copy to temp folder to run uninstaller on that jvm
- // to be able to delete jvm in installation folder
- WCHAR * tempJreFolder = NULL;
- tempJreFolder = appendStringW(tempJreFolder, props->testJVMFile->resolved);
- tempJreFolder = appendStringW(tempJreFolder, L"\\_jvm\\");
-
- WCHAR * command = NULL;
- appendCommandLineArgument(&command, L"xcopy");
- appendCommandLineArgument(&command, nestedJreFolder);
- appendCommandLineArgument(&command, tempJreFolder);
- appendCommandLineArgument(&command, L"/e");
- appendCommandLineArgument(&command, L"/y");
-
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, "Copying nested JRE to temp folder", 0);
-
- executeCommand(props, command, NULL, JVM_EXTRACTION_TIMEOUT, props->stdoutHandle, props->stderrHandle, NORMAL_PRIORITY_CLASS);
-
- if (fileExists(tempJreFolder)) {
- trySetCompatibleJava(tempJreFolder, props);
- }
-}
-void searchJavaSystemLocations(LauncherProperties * props) {
- if ( props->jvms->size > 0 ) {
- DWORD i=0;
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "Search jvm using some predefined locations", 1);
- for(i=0;ijvms->size && !isTerminated(props);i++) {
- resolvePath(props, props->jvms->items[i]);
- if(props->jvms->items[i]->type!=0) { // bundled JVMs are already checked
- trySetCompatibleJava(props->jvms->items[i]->resolved, props);
- if(props->java!=NULL) {
- break;
- }
- }
- }
- }
-}
-void findSystemJava(LauncherProperties *props) {
- // install bundled JVMs if any
- if(isTerminated(props)) return;
- installBundledJVMs(props);
-
- if(!isOK(props) || isTerminated(props)) return;
- // search in /bin/jre
- if(props->java==NULL) {
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "Search java in installation folder", 1);
- searchJavaInstallationFolder(props);
- }
- // search JVM in the system paths
- if(props->java==NULL) {
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "Search java in the system paths", 1);
- searchJavaSystemLocations(props);
- }
-
- if(isTerminated(props)) return;
- if(props->java==NULL) {
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "Search java in environment variables", 1);
- searchJavaFromEnvVariables(props);
- }
-
- // search JVM in the registry
- if(isTerminated(props)) return;
- if(props->java==NULL) {
- if(IsWow64) {
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "Search java in 64-bit registry", 1);
- searchCurrentJavaRegistry(props, 1);
- }
- if(props->java==NULL) {
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "Search java in 32-bit registry", 1);
- searchCurrentJavaRegistry(props, 0);
- }
- }
-}
-
-
-void printJavaProperties(LauncherProperties * props, JavaProperties * javaProps) {
- if(javaProps!=NULL) {
- char * jv = getJavaVersionFormatted(javaProps);
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "Current Java:", 1);
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, " javaHome: ", 0);
- writeMessageW(props, OUTPUT_LEVEL_NORMAL, 0, javaProps->javaHome, 1);
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, " javaExe: ", 0);
- writeMessageW(props, OUTPUT_LEVEL_NORMAL, 0, javaProps->javaExe, 1);
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, " version: ", 0);
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, jv, 1);
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, " vendor: ", 0);
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, javaProps->vendor, 1);
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, " os.name: ", 0);
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, javaProps->osName, 1);
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, " os.arch: ", 0);
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, javaProps->osArch, 1);
- FREE(jv);
- }
-}
diff --git a/nbi/engine/native/launcher/windows/src/JavaUtils.h b/nbi/engine/native/launcher/windows/src/JavaUtils.h
deleted file mode 100644
index fa9109d068c7..000000000000
--- a/nbi/engine/native/launcher/windows/src/JavaUtils.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef _JavaUtils_H
-#define _JavaUtils_H
-
-#include
-#include "Launcher.h"
-#include "Types.h"
-#include "Errors.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// java.version
-// java.vm.version
-// java.vendor
-// os.name
-// os.arch
-#define TEST_JAVA_PARAMETERS 5
-#define MAX_LEN_VALUE_NAME 16383
-
-WCHAR * getJavaResource(WCHAR * location, const WCHAR * suffix);
-
-void getJavaProperties(WCHAR * location, LauncherProperties * props, JavaProperties ** javaProps);
-
-void findSystemJava(LauncherProperties * props);
-
-JavaVersion * getJavaVersionFromString(char * string, DWORD * result);
-
-char compareJavaVersion(JavaVersion * first, JavaVersion * second);
-
-DWORD isJavaCompatible(JavaProperties *currentJava, JavaCompatible ** compatibleJava, DWORD number);
-
-void printJavaProperties(LauncherProperties * props, JavaProperties * javaProps);
-
-void freeJavaProperties(JavaProperties ** props);
-
-void installJVM(LauncherProperties * props, LauncherResource *jvm);
-
-JavaCompatible * newJavaCompatible();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _JavaUtils_H */
diff --git a/nbi/engine/native/launcher/windows/src/Launcher.c b/nbi/engine/native/launcher/windows/src/Launcher.c
deleted file mode 100644
index 95bdcbd45630..000000000000
--- a/nbi/engine/native/launcher/windows/src/Launcher.c
+++ /dev/null
@@ -1,1009 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include
-#include
-#include
-#include
-#include
-#include "FileUtils.h"
-#include "StringUtils.h"
-#include "JavaUtils.h"
-#include "RegistryUtils.h"
-#include "Launcher.h"
-#include "ProcessUtils.h"
-#include "StringUtils.h"
-#include "ExtractUtils.h"
-#include "Main.h"
-#include "shlobj.h"
-
-const DWORD NUMBER_OF_HELP_ARGUMENTS = 11;
-const DWORD READ_WRITE_BUFSIZE = 65536;
-const WCHAR * outputFileArg = L"--output";
-const WCHAR * javaArg = L"--javahome";
-const WCHAR * debugArg = L"--verbose";
-const WCHAR * tempdirArg = L"--tempdir";
-const WCHAR * classPathPrepend = L"--classpath-prepend";
-const WCHAR * classPathAppend = L"--classpath-append";
-const WCHAR * extractArg = L"--extract";
-const WCHAR * helpArg = L"--help";
-const WCHAR * helpOtherArg = L"/?";
-const WCHAR * silentArg = L"--silent";
-const WCHAR * nospaceCheckArg = L"--nospacecheck";
-const WCHAR * localeArg = L"--locale";
-
-const WCHAR * javaParameterPrefix = L"-J";
-
-const WCHAR * NEW_LINE = L"\n";
-
-const WCHAR * CLASSPATH_SEPARATOR = L";";
-const WCHAR * CLASS_SUFFIX = L".class";
-
-
-DWORD isLauncherArgument(LauncherProperties * props, WCHAR * value) {
- DWORD i=0;
- for(i=0;ilauncherCommandArguments->size;i++) {
- if(lstrcmpW(props->launcherCommandArguments->items[i], value)==0) {
- return 1;
- }
- }
- return 0;
-}
-
-DWORD getArgumentIndex(LauncherProperties * props, const WCHAR *arg, DWORD removeArgument) {
- WCHARList *cmd = props->commandLine;
- DWORD i=0;
- for(i=0;isize;i++) {
- if(cmd->items[i]!=NULL) { // argument has not been cleaned yet
- if(lstrcmpW(arg, cmd->items[i])==0) { //argument is the same as the desired
- if(removeArgument) FREE(cmd->items[i]); // free it .. we don`t need it anymore
- return i;
- }
- }
- }
- return cmd->size;
-}
-
-DWORD argumentExists(LauncherProperties * props, const WCHAR *arg, DWORD removeArgument) {
- DWORD index = getArgumentIndex(props, arg, removeArgument);
- return (index < props->commandLine->size);
-
-}
-WCHAR * getArgumentValue(LauncherProperties * props, const WCHAR *arg, DWORD removeArgument, DWORD mandatory) {
- WCHARList *cmd = props->commandLine;
- WCHAR * result = NULL;
- DWORD i = getArgumentIndex(props, arg, removeArgument);
- if((i+1) < cmd->size) {
- //we have at least one more argument
- if(mandatory || !isLauncherArgument(props, cmd->items[i+1])) {
- result = appendStringW(NULL, cmd->items[i+1]);
- if(removeArgument) FREE(cmd->items[i+1]);
- }
- }
- return result;
-}
-
-
-void setOutputFile(LauncherProperties * props, WCHAR *path) {
- HANDLE out = INVALID_HANDLE_VALUE ;
-
- out = CreateFileW(path, GENERIC_WRITE | GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, CREATE_ALWAYS, 0, 0);
- if(out!=INVALID_HANDLE_VALUE) {
- SetStdHandle(STD_OUTPUT_HANDLE, out);
- SetStdHandle(STD_ERROR_HANDLE, out);
- props->stdoutHandle = out;
- props->stderrHandle = out;
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "[CMD Argument] Redirect output to file : ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, path, 1);
- } else {
- WCHAR * err = NULL;
- DWORD code = GetLastError();
- props->status = ERROR_INPUTOUPUT;
- writeErrorA(props, OUTPUT_LEVEL_DEBUG, 1, "[CMD Argument] Can`t create file: ", path, code);
- err = getErrorDescription(code);
- showMessageW(props, L"Can`t redirect output to file!\n\nRequested file : %s\n%s", 2, path, err);
- FREE(err);
- }
-}
-
-void setOutput(LauncherProperties * props) {
- WCHAR * file = props->userDefinedOutput;
- if(file!=NULL) {
- DWORD exists = fileExists(file);
- if((exists && !isDirectory(file) )|| !exists) {
- setOutputFile(props, file);
- }
- }
-
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0,
- (props->outputLevel == OUTPUT_LEVEL_DEBUG) ?
- "[CMD Argument] Using debug output." :
- "Using normal output." , 1);
-
-}
-
-
-void loadLocalizationStrings(LauncherProperties *props) {
-
- // load localized messages
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "Loading I18N Strings.", 1);
- loadI18NStrings(props);
-
- if(!isOK(props)) {
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 1, "Error! Can`t load i18n strings!!", 1);
- showErrorW(props, INTEGRITY_ERROR_PROP, 1, props->exeName);
- }
-}
-
-void readDefaultRoots(LauncherProperties *props) {
- TCHAR appDataValueTChar[MAX_PATH];
- TCHAR localAppDataValueTChar[MAX_PATH];
- SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, 0, appDataValueTChar);
- SHGetFolderPath(NULL, CSIDL_LOCAL_APPDATA, NULL, 0, localAppDataValueTChar);
- WCHAR* appDataValue = toWCHAR(appDataValueTChar);
- WCHAR* localAppDataValue = toWCHAR(localAppDataValueTChar);
-
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "Reading Default Userdir and Cachedir roots...", 1);
-
- props->defaultUserDirRoot = appendStringW(appDataValue, toWCHAR("\\NetBeans"));
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "defaultUserDirRoot: ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, props->defaultUserDirRoot, 1);
-
- props->defaultCacheDirRoot = appendStringW(localAppDataValue, toWCHAR("\\NetBeans\\Cache"));
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "defaultCacheDirRoot: ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, props->defaultCacheDirRoot, 1);
-
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "End of Reading Default Roots.", 1);
-}
-
-void createTMPDir(LauncherProperties * props) {
- WCHAR * argTempDir = NULL;
- DWORD createRndSubDir = 1;
-
- if((argTempDir = props->userDefinedExtractDir) !=NULL) {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, "[CMD Argument] Extract data to directory: ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 1, argTempDir, 1);
- createRndSubDir = 0;
- } else if((argTempDir = props->userDefinedTempDir) !=NULL) {
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "[CMD Argument] Using tmp directory: ", 0);
- writeMessageW(props, OUTPUT_LEVEL_NORMAL, 0, argTempDir, 1);
- }
-
- createTempDirectory(props, argTempDir, createRndSubDir);
- if(!isOK(props)) {
- showErrorW(props, CANT_CREATE_TEMP_DIR_PROP, 1, props->tmpDir);
- }
-}
-
-void checkExtractionStatus(LauncherProperties *props) {
- if(props->status == ERROR_FREESPACE) {
- DWORD hiMB = props->bundledSize->High;
- DWORD lowMB = props->bundledSize->Low;
- DWORD hiMult = (hiMB!=0) ? ((MAXDWORD / 1024) + 1) / 1024 : 0;
- DWORD dw = hiMult * hiMB + lowMB / (1024 * 1024) + 1;
- WCHAR * size = DWORDtoWCHAR(dw);
-
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, "Error! Not enought free space !", 1);
- showErrorW(props, NOT_ENOUGH_FREE_SPACE_PROP, 2, size, tempdirArg);
- FREE(size);
- }
- else if(props->status == ERROR_INTEGRITY) {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, "Error! Can`t extract data from bundle. Seems to be integrirty error!", 1);
- showErrorW(props, INTEGRITY_ERROR_PROP, 1, props->exeName);
- }
-}
-
-
-void trySetCompatibleJava(WCHAR * location, LauncherProperties * props) {
- if(isTerminated(props)) return;
- if(location!=NULL) {
- JavaProperties * javaProps = NULL;
-
- if(inList(props->alreadyCheckedJava, location)) {
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "... already checked location ", 0);
- writeMessageW(props, OUTPUT_LEVEL_NORMAL, 0, location, 1);
- // return here and don`t proceed with private jre checking since it`s already checked as well
- return;
- } else {
- props->alreadyCheckedJava = addStringToList(props->alreadyCheckedJava, location);
- }
-
- getJavaProperties(location, props, &javaProps);
-
- if(isOK(props)) {
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "... some java at ", 0);
- writeMessageW(props, OUTPUT_LEVEL_NORMAL, 0, location, 1);
- // some java there, check compatibility
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "... checking compatibility of java : ", 0);
- writeMessageW(props, OUTPUT_LEVEL_NORMAL, 0, javaProps->javaHome, 1);
- if(isJavaCompatible(javaProps, props->compatibleJava, props->compatibleJavaNumber)) {
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "... compatible", 1);
- props->java = javaProps;
- } else {
- props->status = ERROR_JVM_UNCOMPATIBLE;
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "... uncompatible", 1);
- freeJavaProperties(&javaProps);
- }
- } else {
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "... no java at ", 0);
- writeMessageW(props, OUTPUT_LEVEL_NORMAL, 0, location, 1);
- if (props->status==ERROR_INPUTOUPUT) {
- props->status = ERROR_JVM_NOT_FOUND;
- }
- }
-
- if(props->status == ERROR_JVM_NOT_FOUND) { // check private JRE
- //DWORD privateJreStatus = props->status;
- WCHAR * privateJre = appendStringW(NULL, location);
- privateJre = appendStringW(privateJre, L"\\jre");
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "... check private jre at ", 0);
- writeMessageW(props, OUTPUT_LEVEL_NORMAL, 0, privateJre, 1);
-
- if(inList(props->alreadyCheckedJava, privateJre)) {
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "... already checked location ", 0);
- writeMessageW(props, OUTPUT_LEVEL_NORMAL, 0, privateJre, 1);
- } else {
- props->alreadyCheckedJava = addStringToList(props->alreadyCheckedJava, privateJre);
-
- getJavaProperties(privateJre, props, &javaProps);
- if(isOK(props)) {
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "... checking compatibility of private jre : ", 0);
- writeMessageW(props, OUTPUT_LEVEL_NORMAL, 0, javaProps->javaHome, 1);
- if(isJavaCompatible(javaProps, props->compatibleJava, props->compatibleJavaNumber)) {
- props->java = javaProps;
- props->status = ERROR_OK;
- } else {
- freeJavaProperties(&javaProps);
- props->status = ERROR_JVM_UNCOMPATIBLE;
- }
- } else if (props->status==ERROR_INPUTOUPUT) {
- props->status = ERROR_JVM_NOT_FOUND;
- }
- }
- FREE(privateJre);
- }
- } else {
- props->status = ERROR_JVM_NOT_FOUND;
- }
-}
-
-void resolveTestJVM(LauncherProperties * props) {
- WCHAR * testJVMFile = NULL;
- WCHAR * testJVMClassPath = NULL;
-
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "Resolving testJVM classpath...", 1);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... first step : ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, props->testJVMFile->path, 1);
- resolvePath(props, props->testJVMFile);
- testJVMFile = props->testJVMFile->resolved;
-
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... second : ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, props->testJVMFile->resolved, 1);
-
-
- if(isDirectory(testJVMFile)) { // the directory of the class file is set
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... testJVM is : directory ", 1);
- testJVMClassPath = appendStringW(NULL, testJVMFile);
- } else { // testJVMFile is either .class file or .jar/.zip file with the neccessary class file
- WCHAR * dir = getParentDirectory(testJVMFile);
- WCHAR * ptr = testJVMFile;
- do {
- ptr = searchW(ptr, CLASS_SUFFIX); // check if ptr contains .class
- if(ptr==NULL) { // .jar or .zip file
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... testJVM is : ZIP/JAR file", 1);
- testJVMClassPath = appendStringW(NULL, testJVMFile);
- break;
- }
- ptr += getLengthW(CLASS_SUFFIX); // shift to the right after the ".class"
-
- if(ptr==NULL || getLengthW(ptr)==0) { // .class was at the end of the ptr
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... testJVM is : .class file ", 1);
- testJVMClassPath = appendStringW(NULL, dir);
- break;
- }
- } while(1);
- FREE(dir);
- }
-
- FREE(props->testJVMFile->resolved);
- props->testJVMFile->resolved = testJVMClassPath;
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... resolved : ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, props->testJVMFile->resolved, 1);
-}
-
-void findSuitableJava(LauncherProperties * props) {
- if(!isOK(props)) return;
-
- //resolve testJVM file
- resolveTestJVM(props);
-
- if(!fileExists(props->testJVMFile->resolved)) {
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 1, "Can`t find TestJVM classpath : ", 0);
- writeMessageW(props, OUTPUT_LEVEL_NORMAL, 1, props->testJVMFile->resolved, 1);
- showErrorW(props, JVM_NOT_FOUND_PROP, 1, javaArg);
- props->status = ERROR_JVM_NOT_FOUND;
- return;
- } else if(!isTerminated(props)) {
-
- // try to get java location from command line arguments
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "", 1);
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "Finding JAVA...", 1);
-
- //WCHAR * java = NULL;
-
- if(props->userDefinedJavaHome!=NULL) { // using user-defined JVM via command-line parameter
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "[CMD Argument] Try to use java from ", 0);
- writeMessageW(props, OUTPUT_LEVEL_NORMAL, 0, props->userDefinedJavaHome, 1);
-
- trySetCompatibleJava(props->userDefinedJavaHome, props);
- if( props->status == ERROR_JVM_NOT_FOUND || props->status == ERROR_JVM_UNCOMPATIBLE) {
- const char * prop = (props->status == ERROR_JVM_NOT_FOUND) ?
- JVM_USER_DEFINED_ERROR_PROP :
- JVM_UNSUPPORTED_VERSION_PROP;
- showErrorW(props, prop, 1, props->userDefinedJavaHome);
- }
- } else { // no user-specified java argument
- findSystemJava(props);
- if( props->java ==NULL) {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, "... no java was found", 1);
- if(props->status == ERROR_BUNDLED_JVM_EXTRACTION) {
- showErrorW(props, BUNDLED_JVM_EXTRACT_ERROR_PROP, 1, javaArg);
- } else if(props->status == ERROR_BUNDLED_JVM_VERIFICATION) {
- showErrorW(props, BUNDLED_JVM_VERIFY_ERROR_PROP, 1, javaArg);
- } else {
- showErrorW(props, JVM_NOT_FOUND_PROP, 1, javaArg);
- props->status = ERROR_JVM_NOT_FOUND;
- }
- }
- }
-
- if(props->java!=NULL) {
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 1, "Compatible jvm was found on the system", 1);
- printJavaProperties(props, props->java);
- } else {
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 1, "No compatible jvm was found on the system", 1);
- }
- }
- return;
-}
-
-
-
-void resolveLauncherStringProperty(LauncherProperties * props, WCHAR ** result) {
- if(*result!=NULL) {
- WCHAR * propStart = searchW(*result, L"$P{");
- if(propStart!=NULL) {
- WCHAR * propEnd = searchW(propStart + 3, L"}");
- if(propEnd!=NULL) {
- WCHAR * propName;
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... resolving string property", 1);
- propName = appendStringNW(NULL, 0, propStart + 3 ,
- getLengthW(propStart + 3) - getLengthW(propEnd));
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... property name is : ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, propName, 1);
-
- if(propName!=NULL) {
- char * name = toChar(propName);
- const WCHAR * propValue = getI18nProperty(props, name);
- if(propValue!=NULL) {
- WCHAR * tmp = appendStringNW(NULL, 0, *result, getLengthW(*result) - getLengthW(propStart));
- tmp = appendStringW(tmp, propValue);
- tmp = appendStringW(tmp, propEnd + 1);
- FREE(*result);
- *result = tmp;
- }
- FREE(name);
- FREE(propName);
- }
- }
- }
- }
-}
-
-void resolveLauncherProperties(LauncherProperties * props, WCHAR **result) {
- if(*result != NULL) {
- WCHAR * propStart = searchW(*result, L"$L{");
- if(propStart!=NULL) {
- WCHAR * propEnd = searchW(propStart + 3, L"}");
- if(propEnd!=NULL) {
- WCHAR * propName = appendStringNW(NULL, 0, propStart + 3 , getLengthW(propStart + 3) - getLengthW(propEnd));
- if(propName!=NULL) {
- WCHAR * propValue = NULL;
-
- if(lstrcmpW(propName, L"nbi.launcher.tmp.dir")==0) {
- propValue = appendStringW(NULL, props->tmpDir); // launcher tmpdir
- } else if(lstrcmpW(propName, L"nbi.launcher.java.home")==0) {
- if(props->java!=NULL) {
- propValue = appendStringW(NULL, props->java->javaHome); // relative to javahome
- }
- } else if(lstrcmpW(propName, L"nbi.launcher.user.home")==0) {
- propValue = getCurrentUserHome();
- } else if(lstrcmpW(propName, L"nbi.launcher.parent.dir")==0) {
- propValue = appendStringW(NULL, props->exeDir); // launcher parent
- }
-
-
- if(propValue!=NULL) {
- WCHAR * tmp = appendStringNW(NULL, 0, *result, getLengthW(*result) - getLengthW(propStart));
- tmp = appendStringW(tmp, propValue);
- tmp = appendStringW(tmp, propEnd + 1);
- FREE(*result);
- FREE(propValue);
- *result = tmp;
- }
- }
- }
- }
- }
-
-}
-
-void resolveString(LauncherProperties * props, WCHAR ** result) {
- WCHAR * tmp = NULL;
-
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "Resolving string : ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, *result, 1);
- do {
- FREE(tmp);
- tmp = appendStringW(NULL, *result);
- //writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... step 1 : ", 0);
- //writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, *result, 1);
- resolveLauncherProperties(props, result);
- //writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... step 2 : ", 0);
- //writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, *result, 1);
- resolveLauncherStringProperty(props, result);
- //writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... step 3 : ", 0);
- //writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, *result, 1);
- } while(lstrcmpW(tmp, *result)!=0);
-
- FREE(tmp);
-
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, ".... resolved : ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, *result, 1);
-}
-
-void resolvePath(LauncherProperties * props, LauncherResource * file) {
- WCHAR * result = NULL;
- DWORD i=0;
-
- if(file==NULL) return;
- if(file->resolved!=NULL) return;
-
- file->resolved = appendStringW(NULL, file->path);
- resolveString(props, & (file->resolved));
-
- for(i=0;iresolved);i++) {
- if(file->resolved[i]==L'/') {
- file->resolved[i]=L'\\';
- }
- }
-}
-
-void setClasspathElements(LauncherProperties * props) {
- if(isOK(props)) {
- WCHAR * preCP = NULL;
- WCHAR * appCP = NULL;
- WCHAR *tmp = NULL;
- DWORD i = 0 ;
-
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "Modifying classpath ...", 1);
- // add some libraries to the beginning of the classpath
- while((preCP = getArgumentValue(props, classPathPrepend, 1, 1))!=NULL) {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... adding entry to the beginning of classpath : ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, preCP, 1);
- if (props->classpath != NULL) {
- preCP = appendStringW(preCP, CLASSPATH_SEPARATOR);
- }
- //WCHAR *last = props->classpath;
- resolveString(props, &preCP);
- tmp = appendStringW(preCP, props->classpath);
- FREE(props->classpath);
- props->classpath = tmp;
- }
-
-
- for(i=0;ijars->size;i++) {
- WCHAR * resolvedCpEntry = NULL;
- resolvePath(props, props->jars->items[i]);
- resolvedCpEntry = props->jars->items[i]->resolved;
- if(!fileExists(resolvedCpEntry)) {
- props->status = EXTERNAL_RESOURCE_MISSING;
- showErrorW(props, EXTERNAL_RESOURE_LACK_PROP, 1, resolvedCpEntry);
- return;
- }
- if (props->classpath != NULL) {
- props->classpath = appendStringW(props->classpath, CLASSPATH_SEPARATOR);
- }
- props->classpath = appendStringW(props->classpath, resolvedCpEntry);
- }
-
- // add some libraries to the end of the classpath
- while((appCP = getArgumentValue(props, classPathAppend, 1, 1))!=NULL) {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... adding entry to the end of classpath : ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, appCP, 1);
- if (props->classpath != NULL) {
- props->classpath = appendStringW(props->classpath, CLASSPATH_SEPARATOR);
- }
- resolveString(props, &appCP);
- props->classpath = appendStringW(props->classpath, appCP);
- FREE(appCP);
- }
-
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... finished", 1);
- }
-}
-
-void setAdditionalArguments(LauncherProperties * props) {
- if(isOK(props)) {
- WCHARList * cmd = props->commandLine;
- WCHAR ** javaArgs;
- WCHAR ** appArgs;
- DWORD i=0;
- DWORD jArg = 0; // java arguments number
- DWORD aArg = 0; // app arguments number
-
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0,
- "Parsing rest of command line arguments to add them to java or application parameters... ", 1);
-
- // get number for array creation
- for(i=0;isize;i++) {
- if(cmd->items[i]!=NULL) {
- if(searchW(cmd->items[i], javaParameterPrefix)!=NULL) {
- jArg++;
- } else {
- aArg++;
- }
- }
- }
-
- // handle DefaultUserDirRoot, DefaultCacheDirRoot - increasing array size
- jArg = jArg + 2;
-
- //fill the array
- if(jArg>0) {
- int size = jArg + props->jvmArguments->size;
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, DWORDtoCHAR(size), 1);
- javaArgs = newppWCHAR(jArg + props->jvmArguments->size);
- for (i=0;ijvmArguments->size;i++) {
- javaArgs[i] = props->jvmArguments->items[i];
- }
- FREE(props->jvmArguments->items);
-
- // cont. handle DefaultUserDirRoot, DefaultCacheDirRoot
- // * add -Dnetbeans.default_userdir_root
- // * add -Dnetbeans.default_cachedir_root
- javaArgs[i-2] = appendStringW(toWCHAR("-Dnetbeans.default_userdir_root="), props->defaultUserDirRoot);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "Added an JVM argument: ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, javaArgs[i-2], 1);
-
- javaArgs[i-1] = appendStringW(toWCHAR("-Dnetbeans.default_cachedir_root="), props->defaultCacheDirRoot);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "Added an JVM argument: ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, javaArgs[i-1], 1);
- } else {
- javaArgs = NULL;
- }
-
- if(aArg>0) {
- appArgs = newppWCHAR(aArg + props->appArguments->size);
- for (i=0; i < props->appArguments->size; i++) {
- appArgs [i]= props->appArguments->items[i];
- }
- FREE(props->appArguments->items);
- } else {
- appArgs = NULL;
- }
- jArg = aArg = 0;
-
- for(i=0;isize;i++) {
- if(cmd->items[i]!=NULL) {
- if(searchW(cmd->items[i], javaParameterPrefix)!=NULL) {
- javaArgs [ props->jvmArguments->size + jArg] = appendStringW(NULL, cmd->items[i] + getLengthW(javaParameterPrefix));
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... adding JVM argument : ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, javaArgs [ props->jvmArguments->size + jArg], 1);
- jArg ++ ;
- } else {
- appArgs [ props->appArguments->size + aArg] = appendStringW(NULL, cmd->items[i]);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... adding APP argument : ", 0);
- writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, appArgs [ props->appArguments->size + aArg], 1);
- aArg++;
- }
- FREE(cmd->items[i]);
- }
- }
- props->appArguments->size = props->appArguments->size + aArg;
- props->jvmArguments->size = props->jvmArguments->size + jArg;
- if(props->jvmArguments->items==NULL) props->jvmArguments->items = javaArgs;
- if(props->appArguments->items==NULL) props->appArguments->items = appArgs;
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... resolving jvm arguments", 1);
- for(i=0;ijvmArguments->size;i++) {
- resolveString(props, &props->jvmArguments->items[i]);
- }
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... resolving app arguments", 1);
- for(i=0;iappArguments->size;i++) {
- resolveString(props, &props->appArguments->items[i]);
- }
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... finished parsing parameters", 1);
- }
-}
-void appendCommandLineArgument( WCHAR ** command, const WCHAR * arg) {
- WCHAR * escapedString = escapeString(arg);
- *command = appendStringW(*command, escapedString);
- FREE(escapedString);
- *command = appendStringW(*command, L" ");
-}
-
-void setLauncherCommand(LauncherProperties *props) {
- if(!isOK(props)) return;
-
- if(props->java==NULL) {
- props->status = ERROR_JVM_NOT_FOUND;
- return;
- } else {
- WCHAR * command = NULL;
- WCHAR * javaIOTmpdir = NULL;
- DWORD i = 0;
-
- appendCommandLineArgument(&command, props->java->javaExe);
- command = appendStringW(command, L"-Djava.io.tmpdir=");
- javaIOTmpdir = getParentDirectory(props->tmpDir);
- appendCommandLineArgument(&command, javaIOTmpdir);
- FREE(javaIOTmpdir);
-
-
- for(i=0;ijvmArguments->size;i++) {
- appendCommandLineArgument(&command, props->jvmArguments->items[i]);
- }
-
- appendCommandLineArgument(&command, L"-classpath");
- appendCommandLineArgument(&command, props->classpath);
- appendCommandLineArgument(&command, props->mainClass);
-
- for(i=0;iappArguments->size; i++) {
- appendCommandLineArgument(&command, props->appArguments->items[i]);
- }
- props->command = command;
- }
-}
-
-void executeMainClass(LauncherProperties * props) {
- if(isOK(props) && !isTerminated(props)) {
- int64t * minSize = newint64_t(0, 0);
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "Executing main class", 1);
- checkFreeSpace(props, props->tmpDir, minSize);
- if(isOK(props)) {
- HANDLE hErrorRead;
- HANDLE hErrorWrite;
- char * error = NULL;
-
- CreatePipe(&hErrorRead, &hErrorWrite, NULL, 0);
- hideLauncherWindows(props);
- executeCommand(props, props->command, NULL, INFINITE, props->stdoutHandle, hErrorWrite, NORMAL_PRIORITY_CLASS);
- if(!isOK(props)) {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... an error occured during JVM running main class", 1);
- props->exitCode = props->status;
- } else {
- char * s = DWORDtoCHAR(props->exitCode);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... main class has finished its work. Exit code is ", 0);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, s, 1);
- FREE(s);
- }
-
- error = readHandle(hErrorRead);
- if(getLengthA(error)>1) {
- DWORD showMessage = 0;
- char * ptr = error;
- while(ptr!=NULL) {
- //Bug #105165 and #194242
- if((searchA(ptr, "Picked up ") == NULL && searchA(ptr, "fatal: Not a git repository") == NULL) && getLengthA(ptr) > 1) {
- showMessage = 1;
- break;
- }
- ptr = searchA(ptr, "\n");
- if(ptr!=NULL) ptr++;
- }
-
- if(showMessage && props->exitCode != 0) {
- WCHAR * errorW = toWCHAR(error);
- showMessageW(props, getI18nProperty(props, JAVA_PROCESS_ERROR_PROP), 1, errorW);
- FREE(errorW);
- } else {
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 1, error, 1);
- }
- }
- CloseHandle(hErrorWrite);
- CloseHandle(hErrorRead);
- FREE(error);
- Sleep(1);
- } else {
- props->status = ERROR_FREESPACE;
- props->exitCode = props->status;
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, "... there is not enough space in tmp dir to execute main jar", 1);
- }
- FREE(minSize);
- }
-}
-
-DWORD isOnlyHelp(LauncherProperties * props) {
- if(argumentExists(props, helpArg, 1) || argumentExists(props, helpOtherArg, 1)) {
-
- WCHARList * help = newWCHARList(NUMBER_OF_HELP_ARGUMENTS);
- DWORD counter = 0;
- WCHAR * helpString = NULL;
-
- help->items[counter++] = formatMessageW(getI18nProperty(props, ARG_JAVA_PROP), 1, javaArg);
- help->items[counter++] = formatMessageW(getI18nProperty(props, ARG_TMP_PROP), 1, tempdirArg);
- help->items[counter++] = formatMessageW(getI18nProperty(props, ARG_EXTRACT_PROP), 1, extractArg);
- help->items[counter++] = formatMessageW(getI18nProperty(props, ARG_OUTPUT_PROPERTY), 1, outputFileArg);
- help->items[counter++] = formatMessageW(getI18nProperty(props, ARG_DEBUG_PROP), 1, debugArg);
- help->items[counter++] = formatMessageW(getI18nProperty(props, ARG_CPA_PROP), 1, classPathAppend);
- help->items[counter++] = formatMessageW(getI18nProperty(props, ARG_CPP_PROP), 1, classPathPrepend);
- help->items[counter++] = formatMessageW(getI18nProperty(props, ARG_DISABLE_SPACE_CHECK), 1, nospaceCheckArg);
- help->items[counter++] = formatMessageW(getI18nProperty(props, ARG_LOCALE_PROP), 1, localeArg);
- help->items[counter++] = formatMessageW(getI18nProperty(props, ARG_SILENT_PROP), 1, silentArg);
- help->items[counter++] = formatMessageW(getI18nProperty(props, ARG_HELP_PROP), 1, helpArg);
-
-
- for(counter=0;counteritems[counter]), NEW_LINE);
- }
- freeWCHARList(&help);
- showMessageW(props, helpString, 0);
- FREE(helpString);
- return 1;
- }
- return 0;
-}
-
-DWORD isSilent(LauncherProperties * props) {
- return props->silentMode;
-}
-
-WCHARList * getCommandlineArguments() {
- int argumentsNumber = 0;
- int i=0;
- WCHAR ** commandLine = CommandLineToArgvW(GetCommandLineW(), &argumentsNumber);
- // the first is always the running program.. we don`t need it
- // it is that same as GetModuleFileNameW says
- WCHARList * commandsList = newWCHARList((DWORD) (argumentsNumber - 1) );
- for(i=0;iitems[i] = appendStringW(NULL, commandLine[i + 1]);
- }
-
- LocalFree(commandLine);
- return commandsList;
-}
-
-
-LauncherProperties * createLauncherProperties() {
- LauncherProperties *props = (LauncherProperties*)LocalAlloc(LPTR, sizeof(LauncherProperties));
- DWORD c = 0;
- props->launcherCommandArguments = newWCHARList(11);
- props->launcherCommandArguments->items[c++] = appendStringW(NULL, outputFileArg);
- props->launcherCommandArguments->items[c++] = appendStringW(NULL, javaArg);
- props->launcherCommandArguments->items[c++] = appendStringW(NULL, debugArg);
- props->launcherCommandArguments->items[c++] = appendStringW(NULL, tempdirArg);
- props->launcherCommandArguments->items[c++] = appendStringW(NULL, classPathPrepend);
- props->launcherCommandArguments->items[c++] = appendStringW(NULL, classPathAppend);
- props->launcherCommandArguments->items[c++] = appendStringW(NULL, extractArg);
- props->launcherCommandArguments->items[c++] = appendStringW(NULL, helpArg);
- props->launcherCommandArguments->items[c++] = appendStringW(NULL, helpOtherArg);
- props->launcherCommandArguments->items[c++] = appendStringW(NULL, silentArg);
- props->launcherCommandArguments->items[c++] = appendStringW(NULL, nospaceCheckArg);
-
- props->jvmArguments = NULL;
- props->appArguments = NULL;
- props->extractOnly = 0;
- props->mainClass = NULL;
- props->testJVMClass = NULL;
- props->classpath = NULL;
- props->jars = NULL;
- props->testJVMFile = NULL;
- props->tmpDir = NULL;
- props->tmpDirCreated = 0;
- props->compatibleJava=NULL;
- props->compatibleJavaNumber=0;
- props->java = NULL;
- props->command = NULL;
- props->jvms = NULL;
- props->other = NULL;
- props->alreadyCheckedJava = NULL;
- props->exePath = getExePath();
- props->exeName = getExeName();
- props->exeDir = getExeDirectory();
- props->handler = CreateFileW(props->exePath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
- props->bundledSize = newint64_t(0, 0);
- props->bundledNumber = 0;
- props->commandLine = getCommandlineArguments();
- props->status = ERROR_OK;
- props->exitCode = 0;
- props->outputLevel = argumentExists(props, debugArg, 1) ? OUTPUT_LEVEL_DEBUG : OUTPUT_LEVEL_NORMAL;
- props->stdoutHandle = GetStdHandle(STD_OUTPUT_HANDLE);
- props->stderrHandle = GetStdHandle(STD_ERROR_HANDLE);
- props->bufsize = READ_WRITE_BUFSIZE;
- props->restOfBytes = createSizedString();
- props->I18N_PROPERTIES_NUMBER = 0;
- props->i18nMessages = NULL;
- props->userDefinedJavaHome = getArgumentValue(props, javaArg, 1, 1);
- props->userDefinedTempDir = getArgumentValue(props, tempdirArg, 1, 1);
- props->userDefinedLocale = getArgumentValue(props, localeArg, 0, 1);
- props->userDefinedExtractDir = NULL;
- props->extractOnly = 0;
-
- if(argumentExists(props, extractArg, 0)) {
- props->userDefinedExtractDir = getArgumentValue(props, extractArg, 1, 0);
- if(props->userDefinedExtractDir==NULL) {// next argument is null or another launcher argument
- props->userDefinedExtractDir = getCurrentDirectory();
- }
- props->extractOnly = 1;
- }
- props->userDefinedOutput = getArgumentValue(props, outputFileArg, 1, 1);
- props->checkForFreeSpace = !argumentExists(props, nospaceCheckArg, 0);
- props->silentMode = argumentExists(props, silentArg, 0);
- props->launcherSize = getFileSize(props->exePath);
- props->isOnlyStub = (compare(props->launcherSize, STUB_FILL_SIZE) < 0);
- return props;
-}
-void freeLauncherResourceList(LauncherResourceList ** list) {
- if(*list!=NULL) {
- if((*list)->items!=NULL) {
- DWORD i=0;
- for(i=0;i<(*list)->size;i++) {
- freeLauncherResource(&((*list)->items[i]));
- }
- FREE((*list)->items);
- }
- FREE((*list));
- }
-}
-
-
-void freeLauncherProperties(LauncherProperties **props) {
- if((*props)!=NULL) {
- DWORD i=0;
- writeMessageA(*props, OUTPUT_LEVEL_DEBUG, 0, "Closing launcher properties", 1);
- freeWCHARList(& ( (*props)->appArguments));
- freeWCHARList(& ( (*props)->jvmArguments));
-
- FREE((*props)->mainClass);
- FREE((*props)->testJVMClass);
- FREE((*props)->classpath);
- freeLauncherResourceList(&((*props)->jars));
-
- freeLauncherResourceList(&((*props)->jvms));
-
- freeLauncherResourceList(&((*props)->other));
-
- freeLauncherResource(&((*props)->testJVMFile));
-
- FREE((*props)->tmpDir);
- for(i=0;i<(*props)->compatibleJavaNumber;i++) {
- JavaCompatible * jc = (*props)->compatibleJava[i];
- if(jc!=NULL) {
- FREE(jc->minVersion);
- FREE(jc->maxVersion);
- FREE(jc->vendor);
- FREE(jc->osName);
- FREE(jc->osArch);
- FREE((*props)->compatibleJava[i]);
- }
- }
- freeStringList(&((*props)->alreadyCheckedJava));
- FREE((*props)->compatibleJava);
- freeJavaProperties(&((*props)->java));
- FREE((*props)->userDefinedJavaHome);
- FREE((*props)->userDefinedTempDir);
- FREE((*props)->userDefinedExtractDir);
- FREE((*props)->userDefinedOutput);
- FREE((*props)->userDefinedLocale);
- FREE((*props)->command);
- FREE((*props)->exePath);
- FREE((*props)->exeDir);
- FREE((*props)->exeName);
- FREE((*props)->bundledSize);
- FREE((*props)->launcherSize);
- freeSizedString(&((*props)->restOfBytes));
-
- flushHandle((*props)->stdoutHandle);
- flushHandle((*props)->stderrHandle);
- CloseHandle((*props)->stdoutHandle);
- CloseHandle((*props)->stderrHandle);
-
- freeI18NMessages((*props));
- freeWCHARList(& ((*props)->launcherCommandArguments));
- freeWCHARList(& ((*props)->commandLine));
- CloseHandle((*props)->handler);
-
- FREE((*props));
- }
- return;
-}
-void printStatus(LauncherProperties * props) {
- char * s = DWORDtoCHAR(props->status);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... EXIT status : ", 0);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, s, 1);
- FREE(s);
- s = DWORDtoCHAR(props->exitCode);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... EXIT code : ", 0);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, s, 1);
- FREE(s);
-}
-
-void processLauncher(LauncherProperties * props) {
- setOutput(props);
- if(!isOK(props) || isTerminated(props)) return;
-
- setProgressRange(props, props->launcherSize);
- if(!isOK(props) || isTerminated(props)) return;
-
- skipStub(props);
- if(!isOK(props) || isTerminated(props)) return;
-
- readDefaultRoots(props);
- if(!isOK(props) || isTerminated(props)) return;
-
- loadLocalizationStrings(props);
- if(!isOK(props) || isTerminated(props)) return;
-
- if(isOnlyHelp(props)) return;
-
- setProgressTitleString(props, getI18nProperty(props, MSG_PROGRESS_TITLE));
- setMainWindowTitle(props, getI18nProperty(props, MAIN_WINDOW_TITLE));
- showLauncherWindows(props);
- if(!isOK(props) || isTerminated(props)) return;
-
- readLauncherProperties(props);
- checkExtractionStatus(props);
- if(!isOK(props) || isTerminated(props)) return;
-
- if(props->bundledNumber > 0) {
- createTMPDir(props);
- if(isOK(props)) {
- checkFreeSpace(props, props->tmpDir, props->bundledSize);
- checkExtractionStatus(props);
- }
- }
-
- if (isOK(props) ){
- extractJVMData(props);
- checkExtractionStatus(props);
- if (isOK(props) && !props->extractOnly && !isTerminated(props)) {
- findSuitableJava(props);
- }
-
- if (isOK(props) && !isTerminated(props)) {
- extractData(props);
- checkExtractionStatus(props);
- if (isOK(props) && (props->java!=NULL) && !isTerminated(props)) {
- setClasspathElements(props);
- if(isOK(props) && (props->java!=NULL) && !isTerminated(props)) {
- setAdditionalArguments(props);
- setLauncherCommand(props);
- Sleep(500);
- executeMainClass(props);
- }
- }
- }
- }
-
- if(!props->extractOnly && props->tmpDirCreated) {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... deleting temporary directory ", 1);
- deleteDirectory(props, props->tmpDir);
- }
-
-}
diff --git a/nbi/engine/native/launcher/windows/src/Launcher.h b/nbi/engine/native/launcher/windows/src/Launcher.h
deleted file mode 100644
index d06279553802..000000000000
--- a/nbi/engine/native/launcher/windows/src/Launcher.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef _Launcher_H
-#define _Launcher_H
-
-#include
-#include "Errors.h"
-#include "JavaUtils.h"
-#include "Types.h"
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- extern const WCHAR * NEW_LINE;
-
- LauncherProperties * createLauncherProperties();
- void freeLauncherProperties(LauncherProperties ** props);
-
- void printStatus(LauncherProperties * props);
- void trySetCompatibleJava(WCHAR * location, LauncherProperties * props);
- DWORD isSilent(LauncherProperties * props);
- DWORD isLauncherArgument(LauncherProperties * props, WCHAR * value);
- void processLauncher(LauncherProperties * props);
-
- void resolvePath(LauncherProperties * props, LauncherResource * file);
- void resolveString(LauncherProperties * props, WCHAR ** result);
- void resolveLauncherProperties(LauncherProperties * props, WCHAR **result);
- void appendCommandLineArgument( WCHAR ** command, const WCHAR * arg);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _Launcher_H */
diff --git a/nbi/engine/native/launcher/windows/src/Main.c b/nbi/engine/native/launcher/windows/src/Main.c
deleted file mode 100644
index 5a819eed0580..000000000000
--- a/nbi/engine/native/launcher/windows/src/Main.c
+++ /dev/null
@@ -1,672 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include
-#include
-#include
-#include
-#include "Launcher.h"
-#include "FileUtils.h"
-#include "StringUtils.h"
-#include "SystemUtils.h"
-#include "ExtractUtils.h"
-#include "Main.h"
-
-#define HAVE_WCHAR_H 1
-
-char mainClassName[80] = "Main NBI Window Class";
-char mainTitle [80] = "NBI Launcher";
-char showMessageTitle [] = "\n\n";
-HWND hwndPB = NULL;
-HWND hwndMain = NULL;
-HWND hwndErrorDetail = NULL;
-HWND hwndErrorTitle = NULL;
-HWND hwndButton = NULL;
-HWND hwndProgressTitle = NULL;
-
-HINSTANCE globalInstance = NULL;
-int64t * totalProgressSize = NULL;
-int64t * currentProgressSize = NULL;
-long steps = 1000;
-long lastCheckedStep = 0;
-int iCmdShowGlobal = 0;
-
-HANDLE initializationSuccess = NULL;
-HANDLE initializationFailed = NULL;
-HANDLE closingWindowsRequired = NULL;
-HANDLE closingWindowsConfirmed = NULL;
-HANDLE buttonPressed = NULL;
-
-#define BTN_EXIT 254
-
-LRESULT CALLBACK WndProc(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam) {
- switch (umsg) {
- case WM_CLOSE:
- SetEvent(closingWindowsRequired);
- DestroyWindow(hwndPB);
- DestroyWindow(hwndProgressTitle);
- DestroyWindow(hwndErrorDetail);
- DestroyWindow(hwndErrorTitle);
- DestroyWindow(hwndButton);
- DestroyWindow(hwnd);
- return 0;
-
- case WM_DESTROY:
- UnregisterClass(mainClassName, globalInstance);
- PostQuitMessage(0);
- return 0;
- case WM_COMMAND:
- if(LOWORD(wParam)==BTN_EXIT) {
- SetEvent(buttonPressed);
- return 0;
- }
- }
- return DefWindowProc(hwnd, umsg, wParam, lParam);
-}
-
-void initMainWindow(LauncherProperties * props, HINSTANCE hInstance) {
- if(!isSilent(props)) {
- int systemWidth = GetSystemMetrics(SM_CXSCREEN);
- int systemHeight = GetSystemMetrics(SM_CYSCREEN);
-
- int w = 460;
- int h = 200;
- int x = (systemWidth - w)/2;
- int y = (systemHeight - h)/2;
-
- InitCommonControls();
-
- hwndMain = CreateWindow(mainClassName, mainTitle,
- //WS_OVERLAPPED | WS_EX_TOOLWINDOW,
- WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | WS_MINIMIZEBOX /* | WS_THICKFRAME | WS_MAXIMIZEBOX*/
- ,
- x, y, w, h, NULL, NULL, hInstance, NULL);
- }
-}
-
-void initErrorTitleWindow(LauncherProperties *props, HINSTANCE hInstance) {
- if(!isSilent(props)) {
- RECT rcClient;
- int cyVScroll;
- cyVScroll = GetSystemMetrics(SM_CYVSCROLL);
- GetClientRect(hwndMain, &rcClient);
- hwndErrorTitle = CreateWindowExW(0, WC_STATICW, WC_STATICW, WS_CHILD,
- rcClient.left + 10, 15, rcClient.right - 20, 20, hwndMain, NULL, hInstance, NULL);
- if (hwndErrorTitle) {
- HFONT hFont = (HFONT) GetStockObject(DEFAULT_GUI_FONT);
- LOGFONT lfTitle;
- HFONT titleFont;
-
- GetObject(hFont, sizeof(lfTitle), &lfTitle);
- lfTitle.lfWeight = FW_ULTRABOLD;//OLD;
- lfTitle.lfHeight = lfTitle.lfHeight + 2 ;
- lfTitle.lfWidth = 0;
- titleFont = CreateFontIndirect(&lfTitle);
- SendMessage(hwndErrorTitle, WM_SETFONT, (WPARAM) titleFont , FALSE);
- //DeleteObject(titleFont );
- setErrorTitleString(props, NULL);
- }
- }
-}
-
-void initErrorDetailWindow(LauncherProperties *props, HINSTANCE hInstance) {
- if(!isSilent(props)) {
- RECT rcClient;
- int cyVScroll;
- cyVScroll = GetSystemMetrics(SM_CYVSCROLL);
- GetClientRect(hwndMain, &rcClient);
- hwndErrorDetail = CreateWindowExW(0, WC_STATICW, WC_STATICW, WS_CHILD ,
- rcClient.left + 10, 40, rcClient.right - 20, 80,
- hwndMain, NULL, hInstance, NULL);
- if (hwndErrorDetail) {
- LOGFONT lfDetail;
- HFONT detailFont;
- HFONT hFont = (HFONT) GetStockObject(DEFAULT_GUI_FONT);
- GetObject(hFont, sizeof(lfDetail), &lfDetail);
- lfDetail.lfHeight = lfDetail.lfHeight + 2;
- lfDetail.lfWidth = 0;
- detailFont = CreateFontIndirect(&lfDetail);
- SendMessage(hwndErrorDetail, WM_SETFONT, (WPARAM) detailFont, FALSE);
- //DeleteObject(detailFont);
- setErrorDetailString(props, NULL);
- }
- }
-}
-
-void initProgressTitleWindow(LauncherProperties *props, HINSTANCE hInstance) {
- if(!isSilent(props)) {
- RECT rcClient;
- int cyVScroll;
- int height = 20;
- cyVScroll = GetSystemMetrics(SM_CYVSCROLL);
- GetClientRect(hwndMain, &rcClient);
- hwndProgressTitle = CreateWindowExW(0, WC_STATICW, WC_STATICW, WS_CHILD | WS_VISIBLE ,
- rcClient.left + 10, (rcClient.bottom - cyVScroll)/2 - height, rcClient.right - 20, height,
- hwndMain, NULL, hInstance, NULL);
- if (hwndProgressTitle) {
- LOGFONT lfTitle;
- HFONT progressTitleFont;
- HFONT hFont = (HFONT) GetStockObject(DEFAULT_GUI_FONT);
- GetObject(hFont, sizeof(lfTitle), &lfTitle);
- lfTitle.lfHeight = lfTitle.lfHeight + 2;
- lfTitle.lfWidth = 0;
- progressTitleFont = CreateFontIndirect(&lfTitle);
- SendMessage(hwndProgressTitle, WM_SETFONT, (WPARAM) progressTitleFont, FALSE);
- //DeleteObject(detailFont);
- setProgressTitleString(props, NULL);
- }
- }
-}
-
-void initProgressWindow(LauncherProperties * props, HINSTANCE hInstance) {
- if(!isSilent(props)) {
- RECT rcClient;
- int cyVScroll;
- cyVScroll = GetSystemMetrics(SM_CYVSCROLL);
- GetClientRect(hwndMain, &rcClient);
- hwndPB = CreateWindowExW(0, PROGRESS_CLASSW, NULL, WS_CHILD | WS_VISIBLE | PBS_SMOOTH,
- rcClient.left + 10, (rcClient.bottom - cyVScroll)/2 , rcClient.right - 20, cyVScroll,
- hwndMain, NULL, hInstance, NULL);
- totalProgressSize->Low = 100;
- totalProgressSize->High = 0;
- }
-}
-
-void initExitButton(LauncherProperties * props, HINSTANCE hInstance) {
- if(!isSilent(props)) {
- RECT rcClient;
- //int cyVScroll = GetSystemMetrics(SM_CYVSCROLL);
- int buttonWidth = 180;
- int buttonHeight = 25;
-
- GetClientRect(hwndMain, &rcClient);
- hwndButton = CreateWindowExW(0, WC_BUTTONW, NULL,
- WS_CHILD | BS_DEFPUSHBUTTON | WS_TABSTOP | BS_PUSHBUTTON ,
- rcClient.right - 20 - buttonWidth, rcClient.bottom - 10 - buttonHeight, buttonWidth, buttonHeight,
- hwndMain, (HMENU)BTN_EXIT, hInstance, 0);
- if (hwndButton) {
- LOGFONT lfButton;
- HFONT buttonFont;
- HFONT hFont = (HFONT) GetStockObject(DEFAULT_GUI_FONT);
- GetObject(hFont, sizeof(lfButton), &lfButton);
- lfButton.lfHeight = lfButton.lfHeight + 2;
- lfButton.lfWidth = 0;
- buttonFont = CreateFontIndirect(&lfButton);
- SendMessage(hwndButton, WM_SETFONT, (WPARAM) buttonFont, FALSE);
- SetFocus(hwndButton);
- //DeleteObject(detailFont);
- setButtonString(props, NULL);
- UpdateWindow(hwndButton);
- }
- }
-}
-
-void showErrorW(LauncherProperties * props, const char * error, const DWORD varArgsNumber, ...) {
-
- WCHAR * errorTitle = NULL;
- WCHAR * errorMessage = NULL;
- DWORD totalLength = 0;
- DWORD counter=0;
- WCHAR * result = NULL;
- va_list ap;
-
- getI18nPropertyTitleDetail(props, error, & errorTitle, &errorMessage);
- totalLength=getLengthW(errorMessage);
-
- va_start(ap, varArgsNumber);
-
- while((counter++) 0) {
- if(!IsDialogMessage(hwndMain, & message)) {
- TranslateMessage(&message);
- DispatchMessage(&message);
- }
- }
- }
-}
-
-BOOL InitApplication(LauncherProperties * props, HINSTANCE hInstance) {
- if(isSilent(props)) {
- return TRUE;
- }
- else {
-
- WNDCLASSEX wndclass;
- wndclass.style = CS_HREDRAW | CS_VREDRAW;
- wndclass.lpfnWndProc = (WNDPROC)WndProc;
- wndclass.cbSize = sizeof(WNDCLASSEX);
- wndclass.cbClsExtra = 0;
- wndclass.cbWndExtra = 0;
- wndclass.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(100));
- wndclass.hIconSm = (HICON)LoadImage(GetModuleHandle(NULL),
- MAKEINTRESOURCE(100),
- IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
- wndclass.hInstance = hInstance;
- wndclass.hCursor = LoadCursor( 0, IDC_ARROW );
- wndclass.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
- wndclass.lpszMenuName = NULL;
- wndclass.lpszClassName = mainClassName;
- return RegisterClassEx(&wndclass);
- }
-}
-
-
-DWORD isTerminated(LauncherProperties * props) {
- if(props->status == ERROR_USER_TERMINATED) {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... already terminated", 1);
- return 1;
- }
- if (WAIT_OBJECT_0 == WaitForSingleObject(closingWindowsRequired, 0)) {
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... terminate signal!", 1);
- props->status = ERROR_USER_TERMINATED;
- return 1;
- }
- return 0;
-}
-
-void addProgressPosition(LauncherProperties * props, DWORD add) {
- if(isSilent(props)) return;
- if ( add > 0 ) {
- int64t *mult1 = NULL;
- int64t *mult2 = NULL;
- int64t *currMult = NULL;
- int comp1 = 0;
- int comp2 = 0;
- int goout = 0;
-
- plus(currentProgressSize, add);
- do {
- multiply(mult1 = newint64_t(totalProgressSize->Low, totalProgressSize->High), lastCheckedStep);
- multiply(mult2 = newint64_t(totalProgressSize->Low, totalProgressSize->High), lastCheckedStep + 1);
- multiply(currMult = newint64_t(currentProgressSize->Low, currentProgressSize->High), steps);
- comp1 = compareInt64t(currMult, mult1);
-
- if (comp1 == 0) {
- goout = 1;
- } else {
- comp2 = compareInt64t(currMult, mult2);
- if (comp2 == 0) {
- lastCheckedStep++;
- goout = 1;
- } else if (comp1 > 0 && comp2 < 0) {
- goout = 1;
- } else {
- lastCheckedStep++;
- }
- }
- FREE(mult1);
- FREE(mult2);
- FREE(currMult);
- if(lastCheckedStep >= steps) {
- lastCheckedStep = steps;
- goout = 1;
- }
- } while (!goout);
- SendMessage(hwndPB, PBM_SETPOS, lastCheckedStep, 0);
- }
-}
-
-void setProgressRange(LauncherProperties * props, int64t * range) {
- if(isSilent(props)) return;
- totalProgressSize->Low = range->Low;
- totalProgressSize->High = range->High;
- currentProgressSize->Low = 0;
- currentProgressSize->High = 0;
- lastCheckedStep = 0;
- SendMessage(hwndPB, PBM_SETRANGE, 0, MAKELPARAM(0, steps));
- SendMessage(hwndPB, PBM_SETSTEP, 1, 0);
-}
-
-void hide(LauncherProperties * props, HWND hwnd) {
- if(!isSilent(props) && hwndMain != NULL && hwnd!=NULL ) {
- ShowWindow(hwnd, SW_HIDE);
- UpdateWindow(hwnd);
- }
-}
-void show(LauncherProperties * props, HWND hwnd) {
- if(!isSilent(props) && hwndMain != NULL && hwnd!=NULL ) {
- ShowWindow(hwnd, iCmdShowGlobal);
- UpdateWindow(hwnd);
- }
-}
-
-void setProgressTitleString(LauncherProperties * props, const WCHAR * message) {
- if(isSilent(props)) return;
- SetWindowTextW(hwndProgressTitle, message);
- UpdateWindow(hwndProgressTitle);
- UpdateWindow(hwndMain);
-}
-
-void setErrorTitleString(LauncherProperties * props, const WCHAR * message) {
- if(isSilent(props)) return;
- SetWindowTextW(hwndErrorTitle, message);
- UpdateWindow(hwndErrorTitle);
- UpdateWindow(hwndMain);
-}
-
-void setErrorDetailString(LauncherProperties * props, const WCHAR * message) {
- if(isSilent(props)) return;
- SetWindowTextW(hwndErrorDetail, message);
- UpdateWindow(hwndErrorDetail);
- UpdateWindow(hwndMain);
-}
-
-void setButtonString(LauncherProperties * props, const WCHAR * message) {
- if(isSilent(props)) return;
- SetWindowTextW(hwndButton, message);
- UpdateWindow(hwndButton);
- UpdateWindow(hwndMain);
-}
-
-void setMainWindowTitle(LauncherProperties * props, const WCHAR * message) {
- if(isSilent(props)) return;
- SetWindowTextW(hwndMain, message);
- UpdateWindow(hwndMain);
-}
-
-void closeLauncherWindows(LauncherProperties * props) {
- if(isSilent(props)) return;
- SendMessage(hwndMain, WM_CLOSE, 0, 0);
-}
-
-
-void hideLauncherWindows(LauncherProperties * props) {
- if(isSilent(props)) return;
- if(hwndMain != NULL) {
- ShowWindow(hwndMain, HIDE_WINDOW);
- UpdateWindow(hwndMain);
- }
-}
-
-
-void showLauncherWindows(LauncherProperties * props) {
- if(isSilent(props)) return;
- ShowWindow(hwndMain, iCmdShowGlobal);
- SetForegroundWindow(hwndMain);
- UpdateWindow(hwndMain);
-}
-
-void showMessageW(LauncherProperties * props, const WCHAR* message, const DWORD varArgsNumber, ...) {
- DWORD totalLength = getLengthW(message);
- va_list ap;
- DWORD counter=0;
- WCHAR * result = NULL;
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, showMessageTitle, 0);
-
- va_start(ap, varArgsNumber);
-
- while((counter++)status;
- exitCode = props->exitCode;
- printStatus(props);
- freeLauncherProperties(&props);
- }
- }
- FREE(currentProgressSize);
- FREE(totalProgressSize);
- return (status==ERROR_OK) ? exitCode : status;
-}
-
-int WINAPI MyMain(void) {
- int exitCode;
- STARTUPINFO StartupInfo;
- StartupInfo.dwFlags = 0;
- GetStartupInfo( &StartupInfo );
- exitCode = WinMain(GetModuleHandle(NULL), NULL, NULL, StartupInfo.dwFlags & STARTF_USESHOWWINDOW ? StartupInfo.wShowWindow : SW_SHOWDEFAULT);
- ExitProcess(exitCode);
- return exitCode;
-}
diff --git a/nbi/engine/native/launcher/windows/src/Main.h b/nbi/engine/native/launcher/windows/src/Main.h
deleted file mode 100644
index 57c81ef8107d..000000000000
--- a/nbi/engine/native/launcher/windows/src/Main.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef _Main_H
-#define _Main_H
-
-#include
-#include "Errors.h"
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void addProgressPosition(LauncherProperties *props,DWORD add);
-void setProgressRange(LauncherProperties *props, int64t * size);
-void setErrorDetailString(LauncherProperties *props,const WCHAR * message);
-void setErrorTitleString(LauncherProperties *props,const WCHAR * message);
-void setButtonString(LauncherProperties *props,const WCHAR * message);
-void setProgressTitleString(LauncherProperties *props,const WCHAR * message);
-void setMainWindowTitle(LauncherProperties * props, const WCHAR * message);
-
-void showLauncherWindows(LauncherProperties *props);
-void closeLauncherWindows(LauncherProperties *props);
-void hideLauncherWindows(LauncherProperties *props);
-
-void hide(LauncherProperties *props,HWND hwnd);
-void show(LauncherProperties *props,HWND hwnd);
-
-DWORD isTerminated(LauncherProperties * props);
-
-void showErrorW(LauncherProperties *props, const char * error, const DWORD varArgsNumber, ...);
-
-void showMessageW(LauncherProperties *props,const WCHAR* message, const DWORD number, ...);
-//void showMessageA(LauncherProperties *props,const char * message, const DWORD varArgsNumber, ...);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _Main_H */
-
diff --git a/nbi/engine/native/launcher/windows/src/ProcessUtils.c b/nbi/engine/native/launcher/windows/src/ProcessUtils.c
deleted file mode 100644
index 0fcd9dd44e9f..000000000000
--- a/nbi/engine/native/launcher/windows/src/ProcessUtils.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include "ProcessUtils.h"
-#include "StringUtils.h"
-#include "FileUtils.h"
-
-
-const DWORD DEFAULT_PROCESS_TIMEOUT = 30000; //30 sec
-
-DWORD readBuf(HANDLE hRead, WCHAR * buf, DWORD * bytesRead, HANDLE hWrite) {
- ReadFile(hRead, buf, STREAM_BUF_LENGTH - 1, bytesRead, NULL);
-
- if((*bytesRead)>0 && hWrite!=INVALID_HANDLE_VALUE) {
- DWORD bytesWritten = 0;
- WriteFile(hWrite, buf, (*bytesRead), &bytesWritten, 0);
- }
- ZERO(buf, sizeof(buf));
- return 0;
-}
-
-DWORD readNextData(HANDLE hRead, WCHAR * buf, HANDLE hWrite) {
- DWORD bytesRead;
- DWORD bytesAvailable;
- ZERO(buf, sizeof(buf));
-
- PeekNamedPipe(hRead, buf, STREAM_BUF_LENGTH - 1, &bytesRead, &bytesAvailable, NULL);
- if (bytesRead != 0) {
- ZERO(buf, sizeof(buf));
- if (bytesAvailable >= STREAM_BUF_LENGTH) {
- while (bytesRead >= STREAM_BUF_LENGTH-1) {
- readBuf(hRead, buf, &bytesRead, hWrite);
- }
- }
- else {
- readBuf(hRead, buf, &bytesRead, hWrite);
- }
- return bytesRead;
- }
- return 0;
-}
-
-// get already running process stdout
-DWORD readProcessStream(PROCESS_INFORMATION pi, HANDLE currentProcessStdin, HANDLE currentProcessStdout, HANDLE currentProcessStderr, DWORD timeOut, HANDLE hWriteInput, HANDLE hWriteOutput, HANDLE hWriteError) {
- DWORD started = GetTickCount();
- WCHAR buf[STREAM_BUF_LENGTH];
- DWORD exitCode=0;
- DWORD outRead =0;
- DWORD errRead =0;
- DWORD inRead =0;
- while(1) {
- outRead = readNextData(currentProcessStdout, buf, hWriteOutput);
- errRead = readNextData(currentProcessStderr, buf, hWriteError);
- inRead = readNextData(hWriteInput, buf, currentProcessStdin);
- GetExitCodeProcess(pi.hProcess, &exitCode);
- if (exitCode != STILL_ACTIVE) break;
-
- if(outRead == 0 && errRead==0 && inRead==0 && timeOut!=INFINITE) {
- if((GetTickCount() - started) > timeOut) break;
- }
- //avoid extra using of CPU resources
- Sleep(1);
- }
- return exitCode;
-}
-char * readHandle(HANDLE hRead) {
- char * output = NULL;
- char * buf = newpChar(STREAM_BUF_LENGTH);
- DWORD total = 0;
- DWORD read;
- DWORD bytesRead;
- DWORD bytesAvailable;
-
- while(1) {
- PeekNamedPipe(hRead, buf, STREAM_BUF_LENGTH - 1, &bytesRead, &bytesAvailable, NULL);
- if(bytesAvailable==0) break;
- ReadFile(hRead, buf, STREAM_BUF_LENGTH - 1, &read, NULL);
- if(read==0) break;
- output = appendStringN(output, total, buf, read);
- total+=read;
- }
- FREE(buf);
- return output;
-}
-
-
-
-
-// run process and get its standart output
-// command - executing command
-// timeLimitMillis - timeout of the process running without any output
-// dir - working directory
-// return ERROR_ON_EXECUTE_PROCESS for serios error
-// return ERROR_PROCESS_TIMEOUT for timeout
-
-void executeCommand(LauncherProperties * props, WCHAR * command, WCHAR * dir, DWORD timeLimitMillis, HANDLE hWriteOutput, HANDLE hWriteError, DWORD priority) {
- STARTUPINFOW si;
- SECURITY_ATTRIBUTES sa;
- SECURITY_DESCRIPTOR sd;
- PROCESS_INFORMATION pi;
-
- HANDLE newProcessInput;
- HANDLE newProcessOutput;
- HANDLE newProcessError;
-
- HANDLE currentProcessStdout;
- HANDLE currentProcessStdin;
- HANDLE currentProcessStderr;
-
- WCHAR * directory;
-
- InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION);
- SetSecurityDescriptorDacl(&sd, TRUE, NULL, FALSE);
- sa.lpSecurityDescriptor = &sd;
- sa.nLength = sizeof(SECURITY_ATTRIBUTES);
- sa.bInheritHandle = TRUE;
-
-
- if (!CreatePipe(&newProcessInput, ¤tProcessStdin, &sa, 0)) {
- writeErrorA(props, OUTPUT_LEVEL_NORMAL, 1, "Can`t create pipe for input. ", NULL , GetLastError());
- props->status = ERROR_ON_EXECUTE_PROCESS;
- return;
- }
-
- if (!CreatePipe(¤tProcessStdout, &newProcessOutput, &sa, 0)) {
- writeErrorA(props, OUTPUT_LEVEL_NORMAL, 1, "Can`t create pipe for output. ", NULL , GetLastError());
- CloseHandle(newProcessInput);
- CloseHandle(currentProcessStdin);
- props->status = ERROR_ON_EXECUTE_PROCESS;
- return;
- }
-
- if (!CreatePipe(¤tProcessStderr, &newProcessError, &sa, 0)) {
- writeErrorA(props, OUTPUT_LEVEL_NORMAL, 1, "Can`t create pipe for error. ", NULL , GetLastError());
- CloseHandle(newProcessInput);
- CloseHandle(currentProcessStdin);
- CloseHandle(newProcessOutput);
- CloseHandle(currentProcessStdout);
- props->status = ERROR_ON_EXECUTE_PROCESS;
- return;
- }
-
-
- GetStartupInfoW(&si);
-
- si.dwFlags = STARTF_USESTDHANDLES|STARTF_USESHOWWINDOW;
- si.wShowWindow = SW_HIDE;
- si.hStdOutput = newProcessOutput;
- si.hStdError = newProcessError;
- si.hStdInput = newProcessInput;
-
- directory = (dir!=NULL) ? dir : getCurrentDirectory();
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "Create new process: ", 1);
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, " command : ", 0);
- writeMessageW(props, OUTPUT_LEVEL_NORMAL, 0, command, 1);
- writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, " directory : ", 0);
- writeMessageW(props, OUTPUT_LEVEL_NORMAL, 0, directory, 1);
-
- props->exitCode = ERROR_OK;
- if (CreateProcessW(NULL, command, NULL, NULL, TRUE,
- CREATE_NEW_CONSOLE | CREATE_NO_WINDOW | CREATE_DEFAULT_ERROR_MODE | priority,
- NULL, directory, &si, &pi)) {
- // TODO
- // Check whether volder virtualization can brake things and provide method to disable it if necessary
- // I am not sure whether we need it off or on.
- // http://www.netbeans.org/issues/show_bug.cgi?id=122186
- DWORD timeOut = ((timeLimitMillis<=0) ? DEFAULT_PROCESS_TIMEOUT: timeLimitMillis);
- props->status = ERROR_OK;
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... process created", 1);
-
- props->exitCode = readProcessStream(pi, currentProcessStdin, currentProcessStdout, currentProcessStderr, timeOut, newProcessInput, hWriteOutput, hWriteError);
-
- if(props->exitCode==STILL_ACTIVE) {
- //actually we have reached the timeout of the process and need to terminate it
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, "... process is timeouted", 1);
- GetExitCodeProcess(pi.hProcess, & (props->exitCode));
-
- if(props->exitCode==STILL_ACTIVE) {
- TerminateProcess(pi.hProcess, 0);
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, "... terminate process", 1);
- //Terminating process...It worked too much without any stdout/stdin/stderr
- props->status = ERROR_PROCESS_TIMEOUT;//terminated by timeout
- }
- } else {
- //application finished its work... succesfully or not - it doesn`t matter
- writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "... process finished his work", 1);
- }
- CloseHandle(pi.hThread);
- CloseHandle(pi.hProcess);
- } else {
- writeErrorA(props, OUTPUT_LEVEL_DEBUG, 1, "... can`t create process.", NULL, GetLastError());
- props->status = ERROR_ON_EXECUTE_PROCESS;
- }
-
-
- CloseHandle(newProcessInput);
- CloseHandle(newProcessOutput);
- CloseHandle(newProcessError);
- CloseHandle(currentProcessStdin);
- CloseHandle(currentProcessStdout);
- CloseHandle(currentProcessStderr);
-}
-
-
-
diff --git a/nbi/engine/native/launcher/windows/src/ProcessUtils.h b/nbi/engine/native/launcher/windows/src/ProcessUtils.h
deleted file mode 100644
index f553b207ee2d..000000000000
--- a/nbi/engine/native/launcher/windows/src/ProcessUtils.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef _ProcessUtils_H
-#define _ProcessUtils_H
-
-#include
-#include
-#include "Errors.h"
-#include "Types.h"
-#include "ExtractUtils.h"
-#include "FileUtils.h"
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- #define STREAM_BUF_LENGTH 1024
-
- extern const DWORD DEFAULT_PROCESS_TIMEOUT;
-
- char * readHandle(HANDLE hRead);
-
- void executeCommand(LauncherProperties * props, WCHAR * command, WCHAR * dir, DWORD timeLimitMillis, HANDLE hWriteOutput, HANDLE hWriteError, DWORD priority);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ProcessUtils_H */
diff --git a/nbi/engine/native/launcher/windows/src/RegistryUtils.c b/nbi/engine/native/launcher/windows/src/RegistryUtils.c
deleted file mode 100644
index e60bd60ea39a..000000000000
--- a/nbi/engine/native/launcher/windows/src/RegistryUtils.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include "RegistryUtils.h"
-#include "StringUtils.h"
-#include "SystemUtils.h"
-#include "FileUtils.h"
-
-WCHAR * getStringValue(HKEY root, WCHAR *key, WCHAR *valueName, BOOL access64key) {
-
- HKEY hkey = 0 ;
- WCHAR *result = NULL;
- DWORD type = 0;
- DWORD size = 0;
- byte* value = NULL;
-
- if(RegOpenKeyExW(root, key, 0, KEY_READ | ((access64key && IsWow64) ? KEY_WOW64_64KEY : 0), &hkey) == ERROR_SUCCESS) {
-
- if (RegQueryValueExW(hkey, valueName, NULL, &type, NULL, &size) == ERROR_SUCCESS) {
-
- value = (byte*) LocalAlloc(LPTR,(size + 1) * sizeof(WCHAR));
- ZERO(value, sizeof(WCHAR) * (size + 1));
- if (RegQueryValueExW(hkey, valueName, NULL, &type, value, &size) == ERROR_SUCCESS) {
- if(type == REG_SZ) {
- result = (WCHAR *)value;
- }
- }
- if(result==NULL) {
- FREE(value);
- }
- }
- }
-
- if(hkey!=0) {
- RegCloseKey(hkey);
- }
- return result;
-}
-WCHAR * getStringValuePC(HKEY root, WCHAR *parentkey, WCHAR *childkey, WCHAR *valueName, BOOL access64key) {
- WCHAR * key = appendStringW(appendStringW(appendStringW(NULL, parentkey), L"\\"), childkey);
- WCHAR *value = getStringValue(root, key, valueName, access64key);
- FREE(key);
- return value;
-}
diff --git a/nbi/engine/native/launcher/windows/src/RegistryUtils.h b/nbi/engine/native/launcher/windows/src/RegistryUtils.h
deleted file mode 100644
index c9851b053e1c..000000000000
--- a/nbi/engine/native/launcher/windows/src/RegistryUtils.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef _RegistryUtils_H
-#define _RegistryUtils_H
-
-#include
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-WCHAR * getStringValue(HKEY root, WCHAR *key, WCHAR *valueName, BOOL access64key);
-WCHAR * getStringValuePC(HKEY root, WCHAR *parentkey, WCHAR *childkey, WCHAR *valueName, BOOL access64key);
-
-#ifndef KEY_WOW64_32KEY
-#define KEY_WOW64_32KEY 0x0200
-#endif
-#ifndef KEY_WOW64_64KEY
-#define KEY_WOW64_64KEY 0x0100
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _RegistryUtils_H */
diff --git a/nbi/engine/native/launcher/windows/src/StringUtils.c b/nbi/engine/native/launcher/windows/src/StringUtils.c
deleted file mode 100644
index cf0423bb9094..000000000000
--- a/nbi/engine/native/launcher/windows/src/StringUtils.c
+++ /dev/null
@@ -1,794 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include "StringUtils.h"
-
-
-
-const char * JVM_NOT_FOUND_PROP = "nlw.jvm.notfoundmessage";
-const char * JVM_USER_DEFINED_ERROR_PROP = "nlw.jvm.usererror";
-
-const char * JVM_UNSUPPORTED_VERSION_PROP = "nlw.jvm.unsupportedversion";
-const char * NOT_ENOUGH_FREE_SPACE_PROP = "nlw.freespace";
-const char * CANT_CREATE_TEMP_DIR_PROP = "nlw.tmpdir";
-const char * INTEGRITY_ERROR_PROP = "nlw.integrity";
-const char * OUTPUT_ERROR_PROP = "nlw.output.error";
-const char * JAVA_PROCESS_ERROR_PROP = "nlw.java.process.error";
-const char * EXTERNAL_RESOURE_LACK_PROP = "nlw.missing.external.resource";
-const char * BUNDLED_JVM_EXTRACT_ERROR_PROP = "nlw.bundled.jvm.extract.error";
-const char * BUNDLED_JVM_VERIFY_ERROR_PROP = "nlw.bundled.jvm.verify.error";
-
-const char * ARG_OUTPUT_PROPERTY = "nlw.arg.output";
-const char * ARG_JAVA_PROP = "nlw.arg.javahome";
-const char * ARG_DEBUG_PROP = "nlw.arg.verbose";
-const char * ARG_TMP_PROP = "nlw.arg.tempdir";
-const char * ARG_CPA_PROP = "nlw.arg.classpatha";
-const char * ARG_CPP_PROP = "nlw.arg.classpathp";
-const char * ARG_EXTRACT_PROP = "nlw.arg.extract";
-const char * ARG_DISABLE_SPACE_CHECK = "nlw.arg.disable.space.check";
-const char * ARG_LOCALE_PROP = "nlw.arg.locale";
-const char * ARG_SILENT_PROP = "nlw.arg.silent";
-const char * ARG_HELP_PROP = "nlw.arg.help";
-
-const char * MSG_CREATE_TMPDIR = "nlw.msg.create.tmpdir";
-const char * MSG_EXTRACT_DATA = "nlw.msg.extract";
-const char * MSG_JVM_SEARCH = "nlw.msg.jvmsearch";
-const char * MSG_SET_OPTIONS = "nlw.msg.setoptions";
-const char * MSG_RUNNING = "nlw.msg.running";
-const char * MSG_TITLE = "nlw.msg.title";
-const char * MSG_MESSAGEBOX_TITLE = "nlw.msg.messagebox.title";
-const char * MSG_PROGRESS_TITLE = "nlw.msg.progress.title";
-
-const char * EXIT_BUTTON_PROP = "nlw.msg.button.error" ;
-const char * MAIN_WINDOW_TITLE = "nlw.msg.main.title" ;
-
-
-
-
-//adds string the the initial string and modifies totalWCHARs and capacity
-// initial - the beginning of the string
-// size - pointer to the value that contains the length of the initial string
-// It is modified to store returning string length
-// addString - additional string
-//
-
-
-void freeI18NMessages(LauncherProperties * props) {
- if(props->i18nMessages!=NULL) {
- DWORD i=0;
-
- for(i=0;iI18N_PROPERTIES_NUMBER;i++) {
- FREE(props->i18nMessages->properties[i]);
- FREE(props->i18nMessages->strings[i]);
- }
- FREE(props->i18nMessages->properties);
- FREE(props->i18nMessages->strings);
- FREE(props->i18nMessages);
- }
-}
-
-char * searchA(const char * wcs1, const char * wcs2) {
- char *cp = (char *) wcs1;
- char *s1, *s2;
-
- if ( !*wcs2) {
- return (char *)wcs1;
- }
-
- while (*cp) {
- s1 = cp;
- s2 = (char *) wcs2;
-
- while ( *s1 && *s2 && !(*s1-*s2) ) {
- s1++, s2++;
- }
- if (!*s2) {
- return(cp);
- }
- cp++;
- }
- return(NULL);
-}
-
-WCHAR * searchW(const WCHAR * wcs1, const WCHAR * wcs2) {
- WCHAR *cp = (WCHAR *) wcs1;
- WCHAR *s1, *s2;
-
- if ( !*wcs2) {
- return (WCHAR *)wcs1;
- }
-
- while (*cp) {
- s1 = cp;
- s2 = (WCHAR *) wcs2;
-
- while ( *s1 && *s2 && !(*s1-*s2) ) {
- s1++, s2++;
- }
- if (!*s2) {
- return(cp);
- }
- cp++;
- }
- return(NULL);
-}
-
-void getI18nPropertyTitleDetail(LauncherProperties * props, const char * name, WCHAR ** title, WCHAR ** detail) {
- const WCHAR * prop = getI18nProperty(props,name);
- WCHAR * detailStringSep = searchW(prop, L"\n");
-
- if(detailStringSep == NULL) {
- *title = appendStringW(NULL, prop);
- *detail = NULL;
- } else {
- DWORD dif = getLengthW(prop) - getLengthW(detailStringSep);
- *title = appendStringNW(NULL, 0, prop, dif);
- *detail = appendStringW(NULL, prop + (dif + 1));
- }
-}
-const WCHAR * getI18nProperty(LauncherProperties * props, const char * name) {
- if(name==NULL) return NULL;
- if(name!=NULL && props->i18nMessages!=NULL) {
- DWORD i;
- for(i=0;iI18N_PROPERTIES_NUMBER;i++) {
- char * pr = props->i18nMessages->properties[i];
- if(pr!=NULL) { // hope so it`s true
- if(lstrcmpA(name, pr)==0) {
- return props->i18nMessages->strings[i];
- }
- }
- }
- }
- return getDefaultString(name);
-}
-
-WCHAR * getDefaultString(const char *name) {
- if(lstrcmpA(name, JVM_NOT_FOUND_PROP)==0) {
- return L"Can`t find suitable JVM. Specify it with %s argument";
- } else if(lstrcmpA(name, NOT_ENOUGH_FREE_SPACE_PROP)==0) {
- return L"Not enought free space at %s";
- } else if(lstrcmpA(name, CANT_CREATE_TEMP_DIR_PROP)==0) {
- return L"Can`t create temp directory %s";
- } else if(lstrcmpA(name, INTEGRITY_ERROR_PROP)==0) {
- return L"Integrity error. File %s is corrupted";
- } else if(lstrcmpA(name, JVM_USER_DEFINED_ERROR_PROP)==0) {
- return L"Can`t find JVM at %s";
- } else if(lstrcmpA(name, JVM_UNSUPPORTED_VERSION_PROP)==0) {
- return L"Unsupported JVM at %s";
- } else if(lstrcmpA(name, OUTPUT_ERROR_PROP)==0) {
- return L"Can`t create file %s.\nError: %s";
- } else if(lstrcmpA(name, JAVA_PROCESS_ERROR_PROP)==0) {
- return L"Java error:\n%s";
- } else if(lstrcmpA(name, ARG_JAVA_PROP)==0) {
- return L"%s Using specified JVM";
- } else if(lstrcmpA(name, ARG_OUTPUT_PROPERTY)==0) {
- return L"%s Output all stdout/stderr to the file";
- } else if(lstrcmpA(name, ARG_DEBUG_PROP)==0) {
- return L"%s Use verbose output";
- } else if(lstrcmpA(name, ARG_TMP_PROP)==0) {
- return L"%s Use specified temporary dir for extracting data";
- } else if(lstrcmpA(name, ARG_CPA_PROP)==0) {
- return L"%s Append classpath";
- } else if(lstrcmpA(name, ARG_CPP_PROP)==0) {
- return L"%s Prepend classpath";
- } else if(lstrcmpA(name, ARG_EXTRACT_PROP)==0) {
- return L"%s Extract all data";
- } else if(lstrcmpA(name, ARG_HELP_PROP)==0) {
- return L"%s Using this help";
- } else if(lstrcmpA(name, ARG_DISABLE_SPACE_CHECK)==0) {
- return L"%s Disable free space check";
- } else if(lstrcmpA(name, ARG_LOCALE_PROP )==0) {
- return L"%s Use specified locale for messagess";
- } else if(lstrcmpA(name, ARG_SILENT_PROP )==0) {
- return L"%s Run silently";
- } else if(lstrcmpA(name, MSG_CREATE_TMPDIR)==0) {
- return L"Creating tmp directory...";
- } else if(lstrcmpA(name, MSG_EXTRACT_DATA)==0) {
- return L"Extracting data...";
- } else if(lstrcmpA(name, MSG_JVM_SEARCH)==0) {
- return L"Finding JVM...";
- } else if(lstrcmpA(name, MSG_RUNNING)==0) {
- return L"Running JVM...";
- } else if(lstrcmpA(name, MSG_SET_OPTIONS)==0) {
- return L"Setting command options...";
- } else if(lstrcmpA(name, MSG_MESSAGEBOX_TITLE)==0) {
- return L"Message";
- } else if(lstrcmpA(name, MSG_PROGRESS_TITLE)==0) {
- return L"Running";
- } else if(lstrcmpA(name, EXIT_BUTTON_PROP)==0) {
- return L"Exit";
- } else if(lstrcmpA(name, MAIN_WINDOW_TITLE)==0) {
- return L"NBI Launcher";
- } else if(lstrcmpA(name, EXTERNAL_RESOURE_LACK_PROP)==0) {
- return L"Can`t run launcher\nThe following file is missing : %s";
- } else if(lstrcmpA(name, BUNDLED_JVM_EXTRACT_ERROR_PROP)==0) {
- return L"Can`t run prepare bundled JVM";
- } else if(lstrcmpA(name, BUNDLED_JVM_VERIFY_ERROR_PROP)==0) {
- return L"Can`t run verify bundled JVM";
- }
- return NULL;
-}
-
-DWORD getLengthA(const char * message) {
- return (message!=NULL) ? lstrlenA(message) : 0;
-}
-
-DWORD getLengthW(const WCHAR * message) {
- return (message!=NULL) ? lstrlenW(message) : 0;
-}
-
-//adds string the the initial string
-char * appendStringN(char * initial, DWORD initialLength, const char * addString, DWORD addStringLength) {
- DWORD length = initialLength + addStringLength + 1;
- if (length > 1) {
- char * tmp = newpChar(length+1);
- DWORD i=0;
- if(initialLength!=0) {
- for(i=0;i1) {
-
- WCHAR * tmp = newpWCHAR(length+1);
- DWORD i=0;
-
- if(initialLength!=0) {
- for(i=0;i0);
- default:
- bsCounter = 0;
- break;
- }
- result[r++] = c;
- }
- if(quoting) {
- while(bsCounter>0) {
- result[r++] = '\\';
- bsCounter--;
- }
- result[r++] = '\"';
- }
- result[r] = '\0';
- return result;
-}
-
-char * DWORDtoCHARN(DWORD value, int fillZeros) {
- int digits = 0;
- DWORD tmpValue = value;
- int i = 0;
- char * str;
-
- do {
- digits++;
- tmpValue = tmpValue / 10;
- } while(tmpValue!=0);
- tmpValue = value;
- if(digits < fillZeros) {
- digits = fillZeros;
- }
- str = (char*) LocalAlloc(LPTR, sizeof(char)*(digits +1));
- str[digits] = '\0';
- for(i=0;iHigh==0) {
- return DWORDtoCHAR(value->Low);
- } else {
- char * high = DWORDtoCHAR(value->High);
- char * low = DWORDtoCHAR(value->Low);
- DWORD highLength = getLengthA(high);
- DWORD lowLength = getLengthA(low);
-
- char * str = newpChar(highLength + lowLength + 9);
- DWORD i = 0;
- str[0] = '[';
- str[1] = 'H';
- str[2] = ']';
- str[3] = '[';
- str[4] = 'L';
- str[5] = ']';
- str[6] = '=';
-
- for(i = 0; i < highLength; i++) {
- str [7 + i] = high[i];
- }
- str [7 + highLength] =L',';
- for(i = 0; i < lowLength;i++) {
- str [8 + highLength + i] = low[i];
- }
- str [8 + highLength + lowLength] = '\0';
- FREE(high);
- FREE(low);
- return str;
- }
-}
-WCHAR * int64ttoWCHAR(int64t*value) {
- if(value->High==0) {
- return DWORDtoWCHAR(value->Low);
- } else {
- WCHAR * high = DWORDtoWCHAR(value->High);
- WCHAR * low = DWORDtoWCHAR(value->Low);
- DWORD highLength = getLengthW(high);
- DWORD lowLength = getLengthW(low);
-
- WCHAR * str = newpWCHAR(highLength + lowLength + 9);
- DWORD i = 0;
- str[0] = L'[';
- str[1] = L'H';
- str[2] = L']';
- str[3] = L'[';
- str[4] = L'L';
- str[5] = L']';
- str[6] = L'=';
-
- for(i = 0; i < highLength;i++) {
- str [7 + i] = high[i];
- }
- str [7 + highLength] = L',';
- for(i = 0; i < lowLength;i++) {
- str [8 + highLength + i] = low[i];
- }
- str [8 + highLength + lowLength] = L'\0';
- FREE(high);
- FREE(low);
- return str;
- }
-}
-
-void freeStringList(StringListEntry **ss) {
- while ( (*ss) !=NULL) {
- StringListEntry * tmp = (*ss)->next;
- FREE((*ss)->string);
- FREE((*ss));
- * ss = tmp;
- }
-}
-
-DWORD inList(StringListEntry * top, WCHAR * str) {
- StringListEntry * tmp = top;
- while(tmp!=NULL) {
- if(lstrcmpW(tmp->string, str)==0) {
- return 1;
- }
- tmp = tmp->next;
- }
- return 0;
-}
-
-StringListEntry * addStringToList(StringListEntry * top, WCHAR * str) {
- StringListEntry * ss = (StringListEntry*) LocalAlloc(LPTR,sizeof(StringListEntry));
- ss->string = appendStringW(NULL, str);
- ss->next = top;
- return ss;
-}
-
-
-DWORD getLineSeparatorNumber(char *str) {
- DWORD result = 0;
- char *ptr = str;
- if(ptr!=NULL) {
- while((ptr = searchA(ptr, "\n"))!=NULL) {
- ptr++;
- result++;
- if(ptr==NULL) break;
- }
- }
- return result;
-}
-
-char *toCharN(const WCHAR * string, DWORD n) {
- DWORD len = 0;
- DWORD length = 0;
- char * str = NULL;
- if(string==NULL) return NULL;
- //static DWORD excludeCodepages [] = { 50220, 50221, 50222, 50225, 50227, 50229, 52936, 54936, 57002, 57003, 57004, 57005, 57006, 57007, 57008, 57009, 57010, 57011, 65000, 42};
- //int symbols = 0;
- len = getLengthW(string);
- if(nbytes;
- DWORD len = sz->length;
- int unicodeFlags;
- DWORD i;
- char * string = NULL;
- char * ptr = NULL;
- WCHAR * wstr = NULL;
- if(str==NULL) return NULL;
- //static DWORD excludeCodepages [] = { 50220, 50221, 50222, 50225, 50227, 50229, 52936, 54936, 57002, 57003, 57004, 57005, 57006, 57007, 57008, 57009, 57010, 57011, 65000, 42};
-
- string = appendStringN(NULL, 0 , str, len);
- ptr = string;
- unicodeFlags = -1 ;
- if(len>=2) {
- BOOL hasBOM = (*ptr == '\xFF' && *(ptr+1) == '\xFE');
- BOOL hasReverseBOM = (*ptr == '\xFE' && *(ptr+1) == '\xFF');
-
- if (IsTextUnicode(string, len, &unicodeFlags) || hasBOM || hasReverseBOM) {
- //text is unicode
- len-= 2;
- ptr+= 2;
- if (unicodeFlags & IS_TEXT_UNICODE_REVERSE_SIGNATURE || hasReverseBOM) {
- //we need to change bytes order
- char c;
- for (i = 0 ; i < len/2 ; i++) {
- c = ptr [2 * i] ;
- ptr [2 * i] = ptr [2 * i + 1] ;
- ptr [2 * i + 1] = c;
- }
- }
- }
-
- }
- wstr = newpWCHAR(len/2+1);
-
- for(i=0;ibytes = NULL;
- s->length = 0;
- return s;
-}
-
-void freeSizedString(SizedString ** s) {
- if(*s!=NULL) {
- FREE((*s)->bytes);
- FREE((*s));
- *s = NULL;
- }
-}
-
-
-WCHAR * getLocaleName() {
- LANGID langID = LANGIDFROMLCID(GetUserDefaultLCID());
- LCID localeID = MAKELCID(langID, SORT_DEFAULT);
- const DWORD MAX_LENGTH = 512;
- WCHAR * lang = newpWCHAR(MAX_LENGTH);
- WCHAR * country = newpWCHAR(MAX_LENGTH);
- WCHAR * locale = NULL;
- GetLocaleInfoW(localeID, LOCALE_SISO639LANGNAME, lang, MAX_LENGTH);
- GetLocaleInfoW(localeID, LOCALE_SISO3166CTRYNAME, country, MAX_LENGTH);
- locale = appendStringW(appendStringW(appendStringW(NULL, lang), L"_"), country);
- FREE(country);
- FREE(lang);
- return locale;
-}
-
-WCHAR * newpWCHAR(DWORD length) {
- WCHAR * res = (WCHAR*) LocalAlloc(LPTR,sizeof(WCHAR) * length);
- ZERO(res, length * sizeof(WCHAR));
- return res;
-}
-WCHAR ** newppWCHAR(DWORD length) {
- return (WCHAR**) LocalAlloc(LPTR,sizeof(WCHAR *) * length);
-}
-
-
-char * newpChar(DWORD length) {
- char * res = (char*) LocalAlloc(LPTR,sizeof(char) * length);
- ZERO(res, length * sizeof(char));
- return res;
-}
-
-char ** newppChar(DWORD length) {
- return (char**) LocalAlloc(LPTR,sizeof(char*) * length);
-}
-
-int compare(int64t * size, DWORD value) {
- if (size->High > 0) return 1;
-
- if (size->Low > value)
- return 1;
- else if(size->Low == value)
- return 0;
- else //if(size->Low < value)
- return -1;
-}
-int compareInt64t(int64t * a1, int64t * a2) {
- if (a1->High > a2->High) {
- return 1;
- } else if(a1->High == a2->High) {
- if (a1->Low > a2->Low) {
- return 1;
- } else if(a1->Low == a2->Low) {
- return 0;
- }
- }
- return -1;
-}
-
-void plus(int64t * size, DWORD value) {
- if(value!=0) {
- if((MAXDWORD - size->Low) >= (value - 1)) {
- size->Low = size->Low + value;
- } else {
- size->High = size->High + 1;
- size->Low = value - (MAXDWORD - size->Low) - 1;
- }
- }
-}
-void multiply(int64t * size, DWORD value) {
- if(value==0) {
- size->Low = 0;
- size->High = 0;
- } else {
- DWORD i = 0;
- DWORD low = size->Low;
- DWORD high = size->High;
- size->High = 0;
- for(; i < value - 1 ; i++) {
- plus(size, low);
- }
- size->High += high * value;
- }
-}
-
-void minus(int64t * size, DWORD value) {
- if(value!=0) {
- if(size->Low < value) {
- size->High = size->High -1;
- size->Low = size->Low + (MAXDWORD - value) + 1;
- } else {
- size->Low = size->Low - value;
- }}
-}
-int64t * newint64_t(DWORD low, DWORD high) {
- int64t * res = (int64t *) LocalAlloc(LPTR,sizeof(int64t));
- res->Low = low;
- res->High = high;
- return res;
-}
-WCHAR * getErrorDescription(DWORD dw) {
- WCHAR * lpMsgBuf;
- WCHAR * lpDisplayBuf = NULL;
- WCHAR * res = DWORDtoWCHAR(dw);
-
- FormatMessageW( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
- NULL, dw, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPWSTR) &lpMsgBuf, 0, NULL );
-
- lpDisplayBuf = appendStringW(lpDisplayBuf, L"Error code (");
- lpDisplayBuf = appendStringW(lpDisplayBuf, res);
- lpDisplayBuf = appendStringW(lpDisplayBuf, L"): ");
- lpDisplayBuf = appendStringW(lpDisplayBuf, lpMsgBuf);
-
- FREE(lpMsgBuf);
- FREE(res);
-
- return lpDisplayBuf;
-
-}
-
-WCHAR * formatMessageW(const WCHAR* message, const DWORD varArgsNumber, ...) {
- DWORD totalLength=getLengthW(message);
- DWORD counter=0;
- WCHAR * result = NULL;
-
- va_list ap;
- va_start(ap, varArgsNumber);
-
- while((counter++)status == ERROR_OK);
-}
diff --git a/nbi/engine/native/launcher/windows/src/StringUtils.h b/nbi/engine/native/launcher/windows/src/StringUtils.h
deleted file mode 100644
index 9cf775ca4703..000000000000
--- a/nbi/engine/native/launcher/windows/src/StringUtils.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef _StringUtils_H
-#define _StringUtils_H
-
-#include
-#include
-#include "Types.h"
-#include "Errors.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern const char * JVM_NOT_FOUND_PROP;
-extern const char * JVM_USER_DEFINED_ERROR_PROP;
-extern const char * JVM_UNSUPPORTED_VERSION_PROP;
-extern const char * NOT_ENOUGH_FREE_SPACE_PROP;
-extern const char * CANT_CREATE_TEMP_DIR_PROP;
-extern const char * INTEGRITY_ERROR_PROP;
-extern const char * OUTPUT_ERROR_PROP;
-extern const char * JAVA_PROCESS_ERROR_PROP;
-extern const char * EXTERNAL_RESOURE_LACK_PROP;
-extern const char * BUNDLED_JVM_EXTRACT_ERROR_PROP;
-extern const char * BUNDLED_JVM_VERIFY_ERROR_PROP;
-extern const char * ARG_OUTPUT_PROPERTY;
-extern const char * ARG_JAVA_PROP;
-extern const char * ARG_DEBUG_PROP;
-extern const char * ARG_TMP_PROP;
-extern const char * ARG_CPA_PROP;
-extern const char * ARG_CPP_PROP;
-extern const char * ARG_EXTRACT_PROP;
-extern const char * ARG_DISABLE_SPACE_CHECK;
-extern const char * ARG_LOCALE_PROP;
-extern const char * ARG_SILENT_PROP;
-extern const char * ARG_HELP_PROP;
-extern const char * MSG_CREATE_TMPDIR;
-extern const char * MSG_EXTRACT_DATA;
-extern const char * MSG_JVM_SEARCH;
-extern const char * MSG_SET_OPTIONS;
-extern const char * MSG_RUNNING;
-extern const char * MSG_TITLE;
-extern const char * MSG_MESSAGEBOX_TITLE;
-extern const char * MSG_PROGRESS_TITLE;
-extern const char * EXIT_BUTTON_PROP;
-extern const char * MAIN_WINDOW_TITLE;
-
-#define FREE(x) { \
- if((x)!=NULL) {\
- LocalFree(x); \
- (x)=NULL;\
- }\
-}
-
-
-#ifdef _MSC_VER
-#define ZERO(x,y) SecureZeroMemory((x),(y));
-#else
-#define ZERO(x,y) ZeroMemory((x),(y));
-#endif
-
-
-
-
-
- void freeI18NMessages(LauncherProperties * props);
-
- void getI18nPropertyTitleDetail(LauncherProperties * props, const char * name, WCHAR ** title, WCHAR ** detail);
- const WCHAR * getI18nProperty(LauncherProperties * props, const char * name);
- WCHAR * getDefaultString(const char *name);
-
- WCHAR * addString(WCHAR * initial, WCHAR *addString, long number, WCHAR * totalWCHARs, WCHAR * capacity);
- char * appendStringN(char * initial, DWORD initialLength, const char * addString, DWORD addStringLength);
- WCHAR * appendStringNW(WCHAR * initial, DWORD initialLength, const WCHAR * addString, DWORD addStringLength);
- char * appendString(char * initial, const char * addString);
- WCHAR * appendStringW(WCHAR * initial, const WCHAR * addString);
- WCHAR * escapeString(const WCHAR * string);
-
- void freeStringList(StringListEntry **s);
- StringListEntry * addStringToList(StringListEntry * top, WCHAR * str);
- DWORD inList(StringListEntry * top, WCHAR * str);
-
- char *toChar(const WCHAR * string);
- char *toCharN(const WCHAR * string, DWORD length);
- WCHAR * toWCHAR(char * string);
- WCHAR * toWCHARn(char * string, DWORD length);
-
- WCHAR *createWCHAR(SizedString * sz);
-
- SizedString * createSizedString();
- char * int64ttoCHAR(int64t*);
- WCHAR * int64ttoWCHAR(int64t*);
- char * DWORDtoCHAR(DWORD);
- char * DWORDtoCHARN(DWORD,int);
-
- WCHAR * DWORDtoWCHAR(DWORD);
- WCHAR * DWORDtoWCHARN(DWORD,int);
-
- char * long2char(long value);
- char * long2charN(long value,int fillZeros);
-
- char * word2char(WORD value);
- char * word2charN(WORD value,int fillZeros);
-
- void freeSizedString(SizedString ** s);
-
- WCHAR * getLocaleName();
-
- WCHAR * newpWCHAR(DWORD length);
- char * newpChar(DWORD length);
- WCHAR * searchW( const WCHAR * wcs1, const WCHAR * wcs2);
- char * searchA(const char* str1, const char * str2);
-
- WCHAR ** newppWCHAR(DWORD length);
- char ** newppChar(DWORD length);
- int64t * newint64_t(DWORD low, DWORD high);
- int compare(int64t * size, DWORD value);
- int compareInt64t(int64t * a1, int64t * a2);
- void plus(int64t * size, DWORD value);
- void multiply(int64t * size, DWORD value);
- void minus(int64t * size, DWORD value);
- DWORD getLineSeparatorNumber(char *str);
- DWORD getLengthA(const char * message);
- DWORD getLengthW(const WCHAR * message);
-
- WCHAR * getErrorDescription(DWORD dw);
- WCHAR * formatMessageW(const WCHAR* message, const DWORD varArgsNumber, ...);
- DWORD isOK(LauncherProperties * props);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _StringUtils_H */
diff --git a/nbi/engine/native/launcher/windows/src/SystemUtils.c b/nbi/engine/native/launcher/windows/src/SystemUtils.c
deleted file mode 100644
index c8b423ec7916..000000000000
--- a/nbi/engine/native/launcher/windows/src/SystemUtils.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include
-#include
-#include