summaryrefslogtreecommitdiff
path: root/scripting/workben/installer
diff options
context:
space:
mode:
Diffstat (limited to 'scripting/workben/installer')
-rw-r--r--scripting/workben/installer/FileUpdater.java4
-rw-r--r--scripting/workben/installer/Final.java5
-rw-r--r--scripting/workben/installer/IdeFinal.java9
-rw-r--r--scripting/workben/installer/IdeVersion.java23
-rw-r--r--scripting/workben/installer/IdeWelcome.java7
-rw-r--r--scripting/workben/installer/InstUtil.java51
-rw-r--r--scripting/workben/installer/InstallWizard.java10
-rw-r--r--scripting/workben/installer/LogStream.java1
-rw-r--r--scripting/workben/installer/Register.java11
-rw-r--r--scripting/workben/installer/Version.java5
-rw-r--r--scripting/workben/installer/Welcome.java1
-rw-r--r--scripting/workben/installer/XmlUpdater.java13
12 files changed, 0 insertions, 140 deletions
diff --git a/scripting/workben/installer/FileUpdater.java b/scripting/workben/installer/FileUpdater.java
index 17d1ad9ba88d..11f24e719f07 100644
--- a/scripting/workben/installer/FileUpdater.java
+++ b/scripting/workben/installer/FileUpdater.java
@@ -98,7 +98,6 @@ public class FileUpdater {
FileWriter out = null;
int count = 0;
- //System.out.println("updateScriptXLC");
try {
in_file = new File( installPath+File.separator+"user"+File.separator+"basic"+File.separator+"script.xlc" );
@@ -128,7 +127,6 @@ public class FileUpdater {
out = new FileWriter( out_file );
//split the string into a string array with one line of xml in each element
- //String[] xmlArray = xmlLine.split("\n");
for(int i=0; i<count + 1; i++) {
out.write(xmlArray[i]+"\n");
if( ( xmlArray[i].indexOf( "<library:libraries xmlns:library" ) != -1 ) && ( xmlArray[i+1].indexOf( "ScriptBindingLibrary" ) == -1 ) ) {
@@ -169,7 +167,6 @@ public class FileUpdater {
FileWriter out = null;
int count = 0;
- //System.out.println( "updateDialogXLC" );
try {
in_file = new File( installPath+File.separator+"user"+File.separator+"basic"+File.separator+"dialog.xlc" );
@@ -199,7 +196,6 @@ public class FileUpdater {
out = new FileWriter( out_file );
//split the string into a string array with one line of xml in each element
- // String[] xmlArray = xmlLine.split("\n");
for(int i=0; i<count + 1; i++) {
out.write(xmlArray[i]+"\n");
if( ( xmlArray[i].indexOf( "<library:libraries xmlns:library" ) != -1 ) && ( xmlArray[i+1].indexOf( "ScriptBindingLibrary" ) == -1 ) ) {
diff --git a/scripting/workben/installer/Final.java b/scripting/workben/installer/Final.java
index 51646315d2b1..01c0cec23976 100644
--- a/scripting/workben/installer/Final.java
+++ b/scripting/workben/installer/Final.java
@@ -77,14 +77,12 @@ public class Final extends javax.swing.JPanel implements ActionListener, Install
nav.enableBack(false);
nav.enableCancel(false);
ArrayList<?> locations = InstallWizard.getLocations();
- //System.out.println("here "+locations.size());
// Returned 1
String progpath=null;
String path=null;
String classespath=null;
for (int i =0;i<locations.size();i++){
path= (String)locations.get(i);
- //InstallWizard.currentPath = path;
xud = new XmlUpdater(path, statusLine,progressBar,InstallWizard.bNetworkInstall,InstallWizard.bBindingsInstall);
xud.addInstallListener(this);
InstallWizard.setInstallStarted(true);
@@ -111,9 +109,7 @@ public class Final extends javax.swing.JPanel implements ActionListener, Install
public void installationComplete(InstallationEvent ev) {
- //System.out.println("Detected installation complete");
if( InstUtil.hasNetbeansInstallation() ) {
- //System.out.println("Detected installation complete (IDE(s) detected)");
nav.removeCancelListener(this);
nav.setCancelListener(nav);
nav.navCancel.setText("Finish");
@@ -122,7 +118,6 @@ public class Final extends javax.swing.JPanel implements ActionListener, Install
xud = null;
}
else {
- //System.out.println("Detected installation complete (No IDE(s) detected)");
nav.removeCancelListener(this);
nav.setCancelListener(nav);
nav.navCancel.setText("Finish");
diff --git a/scripting/workben/installer/IdeFinal.java b/scripting/workben/installer/IdeFinal.java
index eac052191731..8d0ecc1786a9 100644
--- a/scripting/workben/installer/IdeFinal.java
+++ b/scripting/workben/installer/IdeFinal.java
@@ -74,19 +74,14 @@ public class IdeFinal extends javax.swing.JPanel implements ActionListener, Inst
nav.enableBack(false);
nav.enableCancel(false);
ArrayList<?> locations = InstallWizard.getLocations();
- //System.out.println("here "+locations.size());
// Returned 1
String path=null;
for (int i =0;i<locations.size();i++){
path= (String)locations.get(i);
- //InstallWizard.currentPath = path;
ideupdater = new IdeUpdater( path, statusLine, progressBar );
ideupdater.addInstallListener(this);
InstallWizard.setInstallStarted(true);
- //InstallWizard.setPatchedTypes(false);
- //InstallWizard.setPatchedJava(false);
- //InstallWizard.setPatchedRDB(false);
ideupdater.start();
}
}
@@ -107,9 +102,6 @@ public class IdeFinal extends javax.swing.JPanel implements ActionListener, Inst
public void installationComplete(InstallationEvent ev) {
- //System.out.println("Detected installation complete");
- //if( InstUtil.hasNetbeansInstallation() || InstUtil.hasJeditInstallation() ) {
- //System.out.println("Detected installation complete (IDE(s) detected)");
nav.removeCancelListener(this);
nav.setCancelListener(nav);
nav.navCancel.setText("Finish");
@@ -122,7 +114,6 @@ public class IdeFinal extends javax.swing.JPanel implements ActionListener, Inst
private javax.swing.JLabel statusLine;
private InstallWizard wizard;
private NavPanel nav;
- //private XmlUpdater xud;
private IdeUpdater ideupdater;
// End of variables declaration//GEN-END:variables
diff --git a/scripting/workben/installer/IdeVersion.java b/scripting/workben/installer/IdeVersion.java
index a90ccb13a73e..20aa5501ebc7 100644
--- a/scripting/workben/installer/IdeVersion.java
+++ b/scripting/workben/installer/IdeVersion.java
@@ -63,34 +63,15 @@ public class IdeVersion extends javax.swing.JPanel implements ActionListener, Ta
System.out.println("It got here1");
String path = null;
if ( (path = netbeansProps.getProperty(key) ) != null ) {
- //System.out.println( "n="+n+" v="+v + " Netbeans " + " key=" + key + " path=" + path );
ideProps.put(key, path);
}
}
}
}
- //System.out.println("*** About to look for jedit install");
- /*
- if(jeditProps!=null)
- {
- for( int j = 0; j < jeditProps.size(); j++ ) {
- for( int v = 0; v < InstUtil.versions.length; v++ ) {
- System.out.println("j: " +j+" v: " +v);
- String key = InstUtil.versions[v];
- String path = null;
- if ((path = jeditProps.getProperty(key)) != null) {
- //System.out.println( "j="+j+" v="+v + " jEdit " + " key=" + key + " path=" + path );
- ideProps.put(key, path);
- }
- }
- }
- }
- */
props = ideProps;
}
catch (IOException eIO) {
System.err.println("Failed to parse .netbeans/ide.log");
- //JOptionPane.showMessageDialog(this, "There was a problem reading from the NetBeans ide.log file.", "Parse Error", JOptionPane.ERROR_MESSAGE);
}
catch (Exception e) {
System.err.println("Exception thrown in initComponents");
@@ -101,7 +82,6 @@ public class IdeVersion extends javax.swing.JPanel implements ActionListener, Ta
if (tableModel.getRowCount() == 0)
{
JOptionPane.showMessageDialog(this, "No compatible IDEs were found.", "Invalid versions", JOptionPane.ERROR_MESSAGE);
- //wizard.exitForm(null);
}
tableModel.addTableModelListener(this);
@@ -182,8 +162,6 @@ public class IdeVersion extends javax.swing.JPanel implements ActionListener, Ta
if (((Boolean)list.get(0)).booleanValue() == true)
InstallWizard.storeLocation((String)list.get(2));
}
-
- //System.out.println(wizard.getLocations());
}
@@ -271,7 +249,6 @@ class MyTableModelIDE extends AbstractTableModel {
MyTableModelIDE (Properties properties, String [] validVersions) {
data = new ArrayList<ArrayList<Object>>();
- //System.out.println(properties);
int len = validVersions.length;
for (int i = 0; i < len; i++) {
diff --git a/scripting/workben/installer/IdeWelcome.java b/scripting/workben/installer/IdeWelcome.java
index 542b98e8353d..014daf54f75b 100644
--- a/scripting/workben/installer/IdeWelcome.java
+++ b/scripting/workben/installer/IdeWelcome.java
@@ -41,7 +41,6 @@ public class IdeWelcome extends javax.swing.JPanel implements ActionListener {
setLayout(new java.awt.BorderLayout());
welcomePanel.setLayout(new java.awt.BorderLayout());
- //area.setHorizontalAlignment(javax.swing.JTextField.CENTER);
area.setEditable(false);
area.setLineWrap(true);
area.setText("\n Click Next to include Scripting Framework support for IDEs.");
@@ -49,9 +48,6 @@ public class IdeWelcome extends javax.swing.JPanel implements ActionListener {
if( InstUtil.hasNetbeansInstallation() ) {
area.append("\n \tA version of Netbeans has been detected. \n");
}
- //if( InstUtil.hasJeditInstallation() ) {
- // area.append("\n \tA version of jEdit has been detected.");
- //}
welcomePanel.add(area, java.awt.BorderLayout.CENTER);
add(welcomePanel, java.awt.BorderLayout.CENTER);
@@ -59,9 +55,6 @@ public class IdeWelcome extends javax.swing.JPanel implements ActionListener {
nav.setNextListener(this);
add(nav, java.awt.BorderLayout.SOUTH);
- //Banner br = new Banner();
- //add(br, java.awt.BorderLayout.WEST);
-
}//GEN-END:initComponents
public java.awt.Dimension getPreferredSize() {
diff --git a/scripting/workben/installer/InstUtil.java b/scripting/workben/installer/InstUtil.java
index 9d12e38d75ae..4e8563c722ea 100644
--- a/scripting/workben/installer/InstUtil.java
+++ b/scripting/workben/installer/InstUtil.java
@@ -176,11 +176,6 @@ public class InstUtil {
public static Properties getJeditLocation() throws IOException {
- /*if( !hasJeditInstallation() ) {
- System.out.println( "No Jedit found (line195 InstUtil");
- return null;
- }*/
-
Properties results = new Properties();
StringBuffer str = new StringBuffer();
@@ -190,7 +185,6 @@ public class InstUtil {
String os = System.getProperty("os.name");
thePath.append(".jedit");
- //System.out.println( ".jedit path " + thePath );
File jeditLogFile = new File( thePath.toString() + File.separator + "activity.log" );
if( jeditLogFile.exists() ) {
@@ -220,17 +214,9 @@ public class InstUtil {
s.trim();
if( s.indexOf( "IDE Install" ) != -1 ) {
int pathStart = s.indexOf( "=" ) + 2;
- //System.out.println( "pathStart " + pathStart );
installPath = s.substring( pathStart, s.length() );
- //System.out.println( "installPath 1" + installPath );
int pathEnd = installPath.indexOf( ";");
- //System.out.println( "pathEnd " + pathEnd );
installPath = installPath.substring( 0, pathEnd ) +File.separator;
- //System.out.println( "pathStart " + pathStart );
- //int pathEnd = s.indexOf( ";");
- //System.out.println( "pathEnd " + pathEnd );
- //System.out.println( "s is " + s + " and " + s.length() + " long" );
- //installPath = s.substring( pathStart, pathEnd - 1 );
installPath.trim();
break;
}
@@ -240,9 +226,6 @@ public class InstUtil {
catch( IOException ioe ) {
System.out.println( "Error reading Netbeans location information" );
}
- //catch( FileNotFoundException fnfe ) {
- //System.out.println( "NetBeans ide.log FileNotFoundException" );
- //}
return installPath;
}
@@ -259,20 +242,9 @@ public class InstUtil {
s.trim();
if( s.indexOf( "jEdit home directory is" ) != -1 ) {
int pathStart = new String( "[message] jEdit: jEdit home directory is " ).length();
- //System.out.println( "pathStart " + pathStart );
installPath = s.substring( pathStart, s.length() ) +File.separator;
System.out.println( "installPath 1" + installPath );
- //int pathEnd = installPath.indexOf( ";");
- //System.out.println( "pathEnd " + pathEnd );
- //installPath = installPath.substring( 0, pathEnd ) +File.separator;
- //System.out.println( "pathStart " + pathStart );
- //int pathEnd = s.indexOf( ";");
- //System.out.println( "pathEnd " + pathEnd );
- //System.out.println( "s is " + s + " and " + s.length() + " long" );
- //installPath = s.substring( pathStart, pathEnd - 1 );
installPath.trim();
- //System.out.println( "installPath 2 " + installPath );
- //break;
jeditDetails[0] = installPath;
}
if( s.indexOf( "jEdit: jEdit version" ) != -1 ) {
@@ -289,9 +261,6 @@ public class InstUtil {
catch( IOException ioe ) {
System.out.println( "Error reading Jedit location information" );
}
- //catch( FileNotFoundException fnfe ) {
- //System.out.println( "Jedit activity.log FileNotFoundException" );
- //}
return jeditDetails;
}
@@ -335,12 +304,10 @@ public class InstUtil {
for (String s = reader.readLine(); s != null; s = reader.readLine()) {
s.trim();
- //System.out.println(s);
if (s.length() == 0)
continue;
if (s.charAt(0) == '[') {
sectionName = s.substring(1, s.length() - 1);
- //System.out.println(sectionName);
continue;
}
if ((sectionName != null) && sectionName.equalsIgnoreCase("Versions")) {
@@ -351,14 +318,8 @@ public class InstUtil {
String [] parts = new String[2];
parts[0] = officeName;
parts[1] = instPath + File.separator;
- //System.out.println( "InstUtil officeName " + officeName );
- //System.out.println( "InstUtil instPath " + instPath );
- //String [] parts = s.split("=");
if (parts.length == 2) {
- //ver.version = parts[0].trim();
- //File f = new File(parts[1].trim());
- //results.put(parts[0].trim(), f.getPath());
try {
URL url = new URL("file://" + parts[1].trim());
String opSys =System.getProperty("os.name");
@@ -382,23 +343,11 @@ public class InstUtil {
results.put( parts[0].trim(), windowsPath );
}
else {
- //System.err.println( " InstUtil URLDecoder " + URLDecoder.decode(url.getPath()) );
results.put(parts[0].trim(), URLDecoder.decode(url.getPath()));
}
- //File f = new File(url);
-
- //.sversion: OpenOffice.org 643=file:///scriptdev/neil/ScriptFrameOpenoffice1.0.1
- // parts = Installation name. f.getPath = Installation path
- //results.put(parts[0].trim(), f.getPath());
-
- //results.put(parts[0].trim(), URLDecoder.decode(url.getPath()));
- //results.put( parts[0].trim(), windowsPath );
-
}
catch (MalformedURLException eSyntax) {
- //throw new IOException("Error while reading version information");
results.put(parts[0].trim(), parts[1].trim());
- //System.out.println(parts[0].trim() + " : " + parts[1].trim());
System.err.println("GotHereException");
}
}
diff --git a/scripting/workben/installer/InstallWizard.java b/scripting/workben/installer/InstallWizard.java
index 096b873b8c4f..1134fc4ad237 100644
--- a/scripting/workben/installer/InstallWizard.java
+++ b/scripting/workben/installer/InstallWizard.java
@@ -229,7 +229,6 @@ public class InstallWizard extends javax.swing.JFrame implements ActionListener
public static void main(String args[]) {
String officePath = null;
String netbeansPath = null;
- //String jeditPath = null;
int i = 0;
while (i < args.length) {
@@ -245,12 +244,9 @@ public class InstallWizard extends javax.swing.JFrame implements ActionListener
bNetworkInstall = true;
if (args[i].equals("-bindings"))
bBindingsInstall = true;
- //if (args[i].equals("-jedit"))
- // jeditPath = args[++i];
i++;
}
- //if (officePath == null && netbeansPath == null && jeditPath == null)
if (officePath == null && netbeansPath == null)
new InstallWizard().show();
@@ -281,11 +277,6 @@ public class InstallWizard extends javax.swing.JFrame implements ActionListener
IdeUpdater ideup = new IdeUpdater(netbeansPath, label, progressbar);
ideup.run();
}
-
- //if (jeditPath != null) {
- // IdeUpdater ideup = new IdeUpdater(jeditPath, label, progressbar);
- // ideup.run();
- //}
}
private static void printUsage() {
@@ -296,7 +287,6 @@ public class InstallWizard extends javax.swing.JFrame implements ActionListener
System.err.println("\t[-bindings]");
System.err.println("\n\n-net indicates that this is the network part of a network install.");
System.err.println("-bindings will only install the menu & key bindings in user/config/soffice.cfg.");
- //System.err.println("\t[-jedit <path_to_jedit_installation]");
}
public static synchronized boolean isPatchedTypes()
diff --git a/scripting/workben/installer/LogStream.java b/scripting/workben/installer/LogStream.java
index 55cc00539860..e8cb77031a23 100644
--- a/scripting/workben/installer/LogStream.java
+++ b/scripting/workben/installer/LogStream.java
@@ -25,7 +25,6 @@ import java.text.DateFormat;
import java.text.SimpleDateFormat;
-//import java.io.PrintWriter;
public class LogStream extends PrintStream
{
static final private DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z: ");
diff --git a/scripting/workben/installer/Register.java b/scripting/workben/installer/Register.java
index e2d7ceabc9af..420ba61e177e 100644
--- a/scripting/workben/installer/Register.java
+++ b/scripting/workben/installer/Register.java
@@ -125,17 +125,6 @@ public class Register{
}
}
- // if ( !regSingletons( path, progpath, opSys, statusLabel ) )
- // {
- // return false;
- // }
- // updating ProtocolHandler
- /* statusLabel.setText("Updating ProtocolHandler...");
- if(!FileUpdater.updateProtocolHandler(path, statusLabel)) {
- statusLabel.setText("Updating ProtocolHandler failed, please view SFrameworkInstall.log");
- return false;
- } */
-
// updating StarBasic libraries
statusLabel.setText("Updating StarBasic libraries...");
if(!FileUpdater.updateScriptXLC(path, statusLabel)) {
diff --git a/scripting/workben/installer/Version.java b/scripting/workben/installer/Version.java
index 35823163148e..1f2a84644662 100644
--- a/scripting/workben/installer/Version.java
+++ b/scripting/workben/installer/Version.java
@@ -215,8 +215,6 @@ public class Version extends javax.swing.JPanel implements ActionListener, Table
if (((Boolean)list.get(0)).booleanValue() == true)
InstallWizard.storeLocation((String)list.get(2));
}
-
- //System.out.println(wizard.getLocations());
}
@@ -233,9 +231,6 @@ public class Version extends javax.swing.JPanel implements ActionListener, Table
private InstallWizard wizard;
private MyTableModel tableModel;
private NavPanel nav;
- //private static final String [] versions = {"StarOffice 6.0", "OpenOffice.org 1.0","OpenOffice.org 1.0.1","OpenOffice.org 642","OpenOffice.org 643","StarOffice 6.1"};
- //private static final String [] versions = {"OpenOffice.org 643"};
- //private static final String [] versions = {"OpenOffice.org 643", "StarOffice 6.1"};
private static final String [] versions = {"StarOffice 6.1", "OpenOffice.org 1.1Beta", "OpenOffice.org 644", "OpenOffice.org 1.1"};
// End of variables declaration//GEN-END:variables
diff --git a/scripting/workben/installer/Welcome.java b/scripting/workben/installer/Welcome.java
index 9a5cf4790acd..b9f1bca1ab59 100644
--- a/scripting/workben/installer/Welcome.java
+++ b/scripting/workben/installer/Welcome.java
@@ -155,7 +155,6 @@ public class Welcome extends javax.swing.JPanel implements ActionListener {
private javax.swing.JPanel welcomePanel;
private javax.swing.JTextArea area;
private InstallWizard wizard;
- //private static final String [] versions = {"OpenOffice.org 643", "StarOffice 6.1"};
private static final String [] versions = { "StarOffice 6.1" };
private boolean nextButtonEnable = true;
diff --git a/scripting/workben/installer/XmlUpdater.java b/scripting/workben/installer/XmlUpdater.java
index 7dfe5eca37e1..384f90a088ad 100644
--- a/scripting/workben/installer/XmlUpdater.java
+++ b/scripting/workben/installer/XmlUpdater.java
@@ -152,30 +152,18 @@ public class XmlUpdater extends Thread {
public void run() {
- //InputSource isource;
- //DocumentBuilderFactory builderFactory;
- //DocumentBuilder builder = null;
-
internalThread = Thread.currentThread();
- //System.out.println("\n\n\n\nFileName: "+installPath);
classesPath= installPath.concat(File.separator+"program"+File.separator+"classes"+File.separator);
String progpath=installPath;
progpath= progpath.concat(File.separator+"program"+File.separator);
- //System.out.println("Office progpath" + progpath );
- //System.out.println("\nModifying Installation "+installPath);
String starBasicPath=installPath;
starBasicPath= starBasicPath.concat(File.separator+"share"+File.separator+"basic"+File.separator+"ScriptBindingLibrary"+File.separator);
- //System.out.println( "Office StarBasic path: " + starBasicPath );
String regSchemaOfficePath=installPath;
regSchemaOfficePath= regSchemaOfficePath.concat(File.separator+"share"+File.separator+"registry"+File.separator+"schema"+File.separator+"org"+File.separator+"openoffice"+File.separator+"Office"+File.separator);
- //System.out.println( "Office schema path: " + regSchemaOfficePath );
-
- // Get the NetBeans installation
- //String netbeansPath=
progressBar.setString("Unzipping Required Files");
ZipData zd = new ZipData("SFrameworkInstall.jar");
@@ -184,7 +172,6 @@ public class XmlUpdater extends Thread {
if( (!netInstall) || bindingsInstall) {
String configPath=installPath;
configPath= configPath.concat(File.separator+"user"+File.separator+"config"+File.separator+"soffice.cfg"+File.separator);
- //System.out.println( "Office configuration path: " + configPath );
String manifestPath=configPath + "META-INF" + File.separator;
//Adding <Office>/user/config/soffice.cfg/