diff options
author | Duncan Foster <dfoster@openoffice.org> | 2003-07-11 09:28:48 +0000 |
---|---|---|
committer | Duncan Foster <dfoster@openoffice.org> | 2003-07-11 09:28:48 +0000 |
commit | 72cd759fbc39f8649d33b3dafe3246a85cc16c90 (patch) | |
tree | e644a47fb4be7267ba8d91f94d444e31b747e9f6 /scripting/workben | |
parent | 889bae0eaccbb6a7ff9a6fdfffa6afd76c45fd3a (diff) |
#i16594#
Install components, example scripts & registry data into share.
Add flags for doing a two stage network install.
Diffstat (limited to 'scripting/workben')
-rw-r--r-- | scripting/workben/bindings/ScriptBinding.xba | 8 | ||||
-rw-r--r-- | scripting/workben/installer/FileUpdater.java | 8 | ||||
-rw-r--r-- | scripting/workben/installer/Final.java | 268 | ||||
-rw-r--r-- | scripting/workben/installer/InstallWizard.java | 761 | ||||
-rw-r--r-- | scripting/workben/installer/Register.java | 4 | ||||
-rw-r--r-- | scripting/workben/installer/XmlUpdater.java | 479 |
6 files changed, 767 insertions, 761 deletions
diff --git a/scripting/workben/bindings/ScriptBinding.xba b/scripting/workben/bindings/ScriptBinding.xba index 2b5c8a514480..87d44a41a58d 100644 --- a/scripting/workben/bindings/ScriptBinding.xba +++ b/scripting/workben/bindings/ScriptBinding.xba @@ -678,7 +678,7 @@ sub RemoveEventFromDocViaAPI( event as string ) url.Complete = "script://_$ScriptFrmwrkHelper.removeEvent?" _ + "language=Java&function=ScriptFrmwrkHelper.removeEvent" _ - + "&location=user" + + "&location=share" parser.parseStrict(url) disp = document.queryDispatch(url,"",0) @@ -823,7 +823,7 @@ Sub UpdateCfgFile ( fileName as String ) FuncProvider = createUnoService("drafts.com.sun.star.script.framework.provider.FunctionProvider") FuncProvider.initialize( args() ) Func = FuncProvider.getFunction("script://_$ScriptFrmwrkHelper.updateCfgFile?" _ - + "language=Java&function=ScriptFrmwrkHelper.updateCfgFile&location=user") + + "language=Java&function=ScriptFrmwrkHelper.updateCfgFile&location=share") Dim inArgs(2) Dim outArgs() Dim outIndex() @@ -1838,7 +1838,7 @@ Sub RunDebugger(lang as String, uri as String, filename as String) url.Complete = "script://_$DebugRunner.Debug?" _ + "language=Java&function=DebugRunner.go" _ - + "&location=user" + + "&location=share" parser.parseStrict(url) disp = document.queryDispatch(url,"",0) @@ -2091,4 +2091,4 @@ end sub sub HelpOKButton() helpDialog.endExecute() end sub -</script:module>
\ No newline at end of file +</script:module> diff --git a/scripting/workben/installer/FileUpdater.java b/scripting/workben/installer/FileUpdater.java index b0eb279d811d..76b5358eb6fe 100644 --- a/scripting/workben/installer/FileUpdater.java +++ b/scripting/workben/installer/FileUpdater.java @@ -124,10 +124,10 @@ public class FileUpdater { if( ( xmlArray[i].indexOf( "<library:libraries xmlns:library" ) != -1 ) && ( xmlArray[i+1].indexOf( "ScriptBindingLibrary" ) == -1 ) ) { String opSys = System.getProperty("os.name"); if (opSys.indexOf("Windows") != -1) { - out.write(" <library:library library:name=\"ScriptBindingLibrary\" library:link=\"false\"/>\n" ); + out.write(" <library:library library:name=\"ScriptBindingLibrary\" library:link=\"true\"/>\n" ); } else { - out.write(" <library:library library:name=\"ScriptBindingLibrary\" xlink:href=\"file://"+installPath+"/user/basic/ScriptBindingLibrary/script.xlb/\" xlink:type=\"simple\" library:link=\"false\"/>\n" ); + out.write(" <library:library library:name=\"ScriptBindingLibrary\" xlink:href=\"file://"+installPath+"/share/basic/ScriptBindingLibrary/script.xlb/\" xlink:type=\"simple\" library:link=\"true\"/>\n" ); } } } @@ -200,10 +200,10 @@ public class FileUpdater { if( ( xmlArray[i].indexOf( "<library:libraries xmlns:library" ) != -1 ) && ( xmlArray[i+1].indexOf( "ScriptBindingLibrary" ) == -1 ) ) { String opSys = System.getProperty("os.name"); if (opSys.indexOf("Windows") != -1) { - out.write(" <library:library library:name=\"ScriptBindingLibrary\" library:link=\"false\"/>\n" ); + out.write(" <library:library library:name=\"ScriptBindingLibrary\" library:link=\"true\"/>\n" ); } else { - out.write(" <library:library library:name=\"ScriptBindingLibrary\" xlink:href=\"file://"+installPath+"/user/basic/ScriptBindingLibrary/dialog.xlb/\" xlink:type=\"simple\" library:link=\"false\"/>\n" ); + out.write(" <library:library library:name=\"ScriptBindingLibrary\" xlink:href=\"file://"+installPath+"/share/basic/ScriptBindingLibrary/dialog.xlb/\" xlink:type=\"simple\" library:link=\"true\"/>\n" ); } } } diff --git a/scripting/workben/installer/Final.java b/scripting/workben/installer/Final.java index 068685702705..ea543d45ccec 100644 --- a/scripting/workben/installer/Final.java +++ b/scripting/workben/installer/Final.java @@ -1,136 +1,136 @@ package installer; -/*
- * Welcome.java
- *
- * Created on 04 July 2002, 15:43
- */
-
-/**
- *
- * @author mike
- */
-
-import java.awt.event.*;
-import java.util.*;
-import java.net.*;
-import javax.swing.*;
-
-public class Final extends javax.swing.JPanel implements ActionListener, InstallListener {
-
- /** Creates new form Welcome */
- public Final(InstallWizard wizard) {
- this.wizard = wizard;
- setBackground(java.awt.Color.white);
- xud = null;
- initComponents();
- }
-
- /** 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.
- */
- private void initComponents() {//GEN-BEGIN:initComponents
- statusPanel = new javax.swing.JPanel();
- statusPanel.setBackground(java.awt.Color.white);
- statusLine = new javax.swing.JLabel("Ready", javax.swing.JLabel.CENTER);
-
- setLayout(new java.awt.BorderLayout());
-
- statusPanel.setLayout(new java.awt.BorderLayout());
-
- statusLine.setText("Waiting to install. \n All Office processes must be terminated.");
- statusPanel.add(statusLine, java.awt.BorderLayout.CENTER);
-
- add(statusPanel, java.awt.BorderLayout.CENTER);
- nav = new NavPanel(wizard, true, true, true, InstallWizard.VERSIONS, "");
- nav.setNextListener(this);
- nav.removeCancelListener(nav);
- nav.setCancelListener(this);
- nav.navNext.setText("Install");
- add(nav, java.awt.BorderLayout.SOUTH);
-
-
-
- }//GEN-END:initComponents
-
- public java.awt.Dimension getPreferredSize() {
- return new java.awt.Dimension(InstallWizard.DEFWIDTH, InstallWizard.DEFHEIGHT);
- }
-
- public void actionPerformed(ActionEvent e) {
- // navNext is "Install"
- if (e.getSource() == nav.navNext)
- {
- JProgressBar progressBar=new JProgressBar();
- progressBar.setMaximum(10);
- progressBar.setValue(0);
- statusPanel.add(progressBar, java.awt.BorderLayout.SOUTH);
- nav.enableNext(false);
- nav.enableBack(false);
- nav.enableCancel(false);
- ArrayList locations = wizard.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);
- xud.addInstallListener(this);
- InstallWizard.setInstallStarted(true);
- InstallWizard.setPatchedTypes(false);
- InstallWizard.setPatchedJava(false);
- InstallWizard.setPatchedRDB(false);
- xud.start();
- }
- }
-
- // set to "Exit" at end of installation process
- if (e.getSource() == nav.navCancel) {
- int answer = JOptionPane.showConfirmDialog(wizard, "Are you sure you want to exit?");
- if (answer == JOptionPane.YES_OPTION)
- {
- wizard.exitForm(null);
- }
- else
- {
- return;
- }
- }
- }// actionPerformed
-
-
- 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");
- nav.enableIDE(true);
- nav.enableCancel(true);
- xud = null;
- }
- else {
- //System.out.println("Detected installation complete (No IDE(s) detected)");
- nav.removeCancelListener(this);
- nav.setCancelListener(nav);
- nav.navCancel.setText("Finish");
- nav.enableCancel(true);
- xud = null;
- }
- }
-
- // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JPanel statusPanel;
- private javax.swing.JLabel statusLine;
- private InstallWizard wizard;
- private NavPanel nav;
- private XmlUpdater xud;
- // End of variables declaration//GEN-END:variables
-
-}
+/* + * Welcome.java + * + * Created on 04 July 2002, 15:43 + */ + +/** + * + * @author mike + */ + +import java.awt.event.*; +import java.util.*; +import java.net.*; +import javax.swing.*; + +public class Final extends javax.swing.JPanel implements ActionListener, InstallListener { + + /** Creates new form Welcome */ + public Final(InstallWizard wizard) { + this.wizard = wizard; + setBackground(java.awt.Color.white); + xud = null; + initComponents(); + } + + /** 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. + */ + private void initComponents() {//GEN-BEGIN:initComponents + statusPanel = new javax.swing.JPanel(); + statusPanel.setBackground(java.awt.Color.white); + statusLine = new javax.swing.JLabel("Ready", javax.swing.JLabel.CENTER); + + setLayout(new java.awt.BorderLayout()); + + statusPanel.setLayout(new java.awt.BorderLayout()); + + statusLine.setText("Waiting to install. \n All Office processes must be terminated."); + statusPanel.add(statusLine, java.awt.BorderLayout.CENTER); + + add(statusPanel, java.awt.BorderLayout.CENTER); + nav = new NavPanel(wizard, true, true, true, InstallWizard.VERSIONS, ""); + nav.setNextListener(this); + nav.removeCancelListener(nav); + nav.setCancelListener(this); + nav.navNext.setText("Install"); + add(nav, java.awt.BorderLayout.SOUTH); + + + + }//GEN-END:initComponents + + public java.awt.Dimension getPreferredSize() { + return new java.awt.Dimension(InstallWizard.DEFWIDTH, InstallWizard.DEFHEIGHT); + } + + public void actionPerformed(ActionEvent e) { + // navNext is "Install" + if (e.getSource() == nav.navNext) + { + JProgressBar progressBar=new JProgressBar(); + progressBar.setMaximum(10); + progressBar.setValue(0); + statusPanel.add(progressBar, java.awt.BorderLayout.SOUTH); + nav.enableNext(false); + nav.enableBack(false); + nav.enableCancel(false); + ArrayList locations = wizard.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); + InstallWizard.setPatchedTypes(false); + InstallWizard.setPatchedJava(false); + InstallWizard.setPatchedRDB(false); + xud.start(); + } + } + + // set to "Exit" at end of installation process + if (e.getSource() == nav.navCancel) { + int answer = JOptionPane.showConfirmDialog(wizard, "Are you sure you want to exit?"); + if (answer == JOptionPane.YES_OPTION) + { + wizard.exitForm(null); + } + else + { + return; + } + } + }// actionPerformed + + + 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"); + nav.enableIDE(true); + nav.enableCancel(true); + xud = null; + } + else { + //System.out.println("Detected installation complete (No IDE(s) detected)"); + nav.removeCancelListener(this); + nav.setCancelListener(nav); + nav.navCancel.setText("Finish"); + nav.enableCancel(true); + xud = null; + } + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JPanel statusPanel; + private javax.swing.JLabel statusLine; + private InstallWizard wizard; + private NavPanel nav; + private XmlUpdater xud; + // End of variables declaration//GEN-END:variables + +} diff --git a/scripting/workben/installer/InstallWizard.java b/scripting/workben/installer/InstallWizard.java index 730c40024e41..14fae1c5dfcd 100644 --- a/scripting/workben/installer/InstallWizard.java +++ b/scripting/workben/installer/InstallWizard.java @@ -1,378 +1,389 @@ package installer; /* - * InstallWizard.java
- *
- * Created on 04 July 2002, 15:09
- */
-
-/**
- *
- * @author mike
- */
-
-import javax.swing.*;
-import java.awt.*;
-import java.awt.event.*;
-import java.util.*;
-import java.net.*;
-import java.io.*;
-
-public class InstallWizard extends javax.swing.JFrame implements ActionListener {
-/*
- private static class ShutdownHook extends Thread {
- public void run()
- {
- if (InstallWizard.isInstallStarted())
- {
- // Check for and backup any config.xml files
- // Check for and backup any StarBasic macro files
- // Check for and backup ProtocolHandler
-
- if (!InstallWizard.isPatchedTypes())
- {
- File backup = new File(InstUtil.getTmpDir(), "TypeDetection.xml");
- File destination = new File(InstallWizard.getTypesPath());
- InstUtil.copy(backup, destination); //Restore typedetection.xml
- }
- if (!InstallWizard.isPatchedJava())
- {
- File backup = new File(InstUtil.getTmpDir(), "Java.xml");
- File destination = new File(InstallWizard.getJavaPath());
- InstUtil.copy(backup, destination); //Restore typedetection.xml
- }
- if (!InstallWizard.isPatchedRDB())
- {
- File backup = new File(InstUtil.getTmpDir(), "applicat.rdb");
- File destination = new File(InstallWizard.getJavaPath());
- //InstUtil.copy(backup, destination); //Restore typedetection.xml
- }
-
- System.out.println( "ShutdownHook" );
- }
-
- InstUtil.removeTmpDir();
- }
- }// class ShutdownHook
-
- static {
- Runtime rt=Runtime.getRuntime();
- rt.addShutdownHook(new ShutdownHook());
- }
-*/
- /** Creates new form InstallWizard */
- public InstallWizard() {
- super("Office Scripting Framework Installer - Early Developer Release");
-
- try {
- System.out.print("All diagnostic output is being redirected to SFrameworkInstall.log\n");
- System.out.print("Location: "+ System.getProperty( "user.dir" ) +
- File.separator + "SFrameworkInstall.log\n");
-
- LogStream log = new LogStream( "SFrameworkInstall.log" );
- System.setErr(log);
-
- System.setOut(log);
- }
- catch( FileNotFoundException fnfe ) {
- System.err.println("Office Scripting Framework Installer - Error: ");
- System.err.println("Unable to create log file for installation.");
- exitForm(null);
- }
-
- //setBackground(Color.WHITE);
- setBackground(new Color(0,0,0));
- locations = new ArrayList();
- //Point center = GraphicsEnvironment.getLocalGraphicsEnvironment().getCenterPoint();
- Point center = new Point( 400, 400 );
- int windowWidth=200;
- int windowHeight=300;
- setSize(windowWidth,windowHeight);
- setBounds((center.x-windowWidth/2)-115,(center.y-windowWidth/2)-100, windowWidth,windowHeight);
- initComponents();
- setResizable(false);
- }
-
- /** This method is called from within the constructor to
- * initialize the form.
- */
- private void initComponents() {
- navigation = new javax.swing.JPanel();
- navBack = new javax.swing.JButton();
- navNext = new javax.swing.JButton();
- navCancel = new javax.swing.JButton();
- screens = new javax.swing.JPanel();
-
- addWindowListener(new java.awt.event.WindowAdapter() {
- public void windowClosing(java.awt.event.WindowEvent evt) {
- exitForm(evt);
- }
- });
-
- navigation.setLayout(new java.awt.GridBagLayout());
- java.awt.GridBagConstraints gridBagConstraints1;
-
- navBack.setText("<< Back");
- gridBagConstraints1 = new java.awt.GridBagConstraints();
- gridBagConstraints1.insets = new java.awt.Insets(1, 1, 1, 1);
-
- navNext.setText("Next >>");
- gridBagConstraints1 = new java.awt.GridBagConstraints();
- gridBagConstraints1.gridx = 2;
- gridBagConstraints1.gridy = 0;
-
- navCancel.setText("Cancel");
- gridBagConstraints1 = new java.awt.GridBagConstraints();
- gridBagConstraints1.gridx = 6;
- gridBagConstraints1.gridy = 0;
- //navigation.add(navNext, gridBagConstraints1);
- //navigation.add(navBack, gridBagConstraints1);
- //navigation.add(navCancel, gridBagConstraints1);
-
- getContentPane().add(navigation, java.awt.BorderLayout.SOUTH);
- screens.setLayout(new java.awt.CardLayout());
- screens.add(WELCOME, new Welcome(this));
- version = new Version(this);
- screens.add(VERSIONS, version);
- _final = new Final(this);
- screens.add(FINAL, _final);
-
- //boolean hasIDEInstallation = (InstUtil.hasNetbeansInstallation() || InstUtil.hasJeditInstallation()) ;
- boolean hasIDEInstallation = ( InstUtil.hasNetbeansInstallation() ) ;
-
- if( hasIDEInstallation )
- {
- idewelcome = new IdeWelcome(this);
- screens.add(IDEWELCOME, idewelcome);
- ideversion = new IdeVersion(this);
- screens.add(IDEVERSIONS, ideversion);
- idefinal = new IdeFinal(this);
- screens.add(IDEFINAL, idefinal);
- }
- getContentPane().add(screens, java.awt.BorderLayout.CENTER);
-
- navNext.addActionListener(this);
- navNext.addActionListener(version);
- navNext.addActionListener(_final);
-
- if( hasIDEInstallation )
- {
- navNext.addActionListener(ideversion);
- navNext.addActionListener(idefinal);
- }
-
- navCancel.addActionListener(this);
- navBack.addActionListener(this);
-
-
- URL url = this.getClass().getResource("sidebar.jpg");
- JLabel sideBar = new JLabel();
- sideBar.setIcon(new ImageIcon(url));
- getContentPane().add (sideBar, java.awt.BorderLayout.WEST);
- pack();
- }// initComponents
-
- /** Exit the Application */
- public void exitForm(java.awt.event.WindowEvent evt) {
- System.exit(0);
- }
-
-
- public void actionPerformed(ActionEvent e)
- {
- if (e.getSource() == navNext)
- {
- ((CardLayout)screens.getLayout()).next(screens);
- }
-
- if (e.getSource() == navCancel)
- {
- exitForm(null);
- }
-
- if (e.getSource() == navBack)
- {
- ((CardLayout)screens.getLayout()).previous(screens);
- }
- }// actionPerformed
-
- public static void storeLocation(String path)
- {
- locations.add(path);
- }
-
- public static ArrayList getLocations()
- {
- return locations;
- }
-
- public static void clearLocations()
- {
- locations.clear();
- }
-
- public void show(String cardName)
- {
- ((CardLayout)screens.getLayout()).show(screens, cardName);
- }
-
- /**
- * @param args the command line arguments
- */
- public static void main(String args[]) {
- String officePath = null;
- String netbeansPath = null;
- //String jeditPath = null;
- int i = 0;
-
- while (i < args.length) {
- if (args[i].equals("-help")) {
- printUsage();
- System.exit(0);
- }
- if (args[i].equals("-office"))
- officePath = args[++i];
- if (args[i].equals("-netbeans"))
- netbeansPath = args[++i];
- //if (args[i].equals("-jedit"))
- // jeditPath = args[++i];
- i++;
- }
-
- //if (officePath == null && netbeansPath == null && jeditPath == null)
- if (officePath == null && netbeansPath == null)
- new InstallWizard().show();
-
- JLabel label = new JLabel();
- JProgressBar progressbar = new JProgressBar();
-
- try {
- System.out.println("Log file is: " +
- System.getProperty("user.dir") +
- File.separator + "SFrameworkInstall.log");
-
- LogStream log = new LogStream( "SFrameworkInstall.log" );
- System.setErr(log);
- System.setOut(log);
- }
- catch( FileNotFoundException fnfe ) {
- System.err.println("Error: Unable to create log file: "
- + fnfe.getMessage());
- System.exit(-1);
- }
-
- if (officePath != null) {
- XmlUpdater xud = new XmlUpdater(officePath, label, progressbar);
- xud.run();
- }
-
- if (netbeansPath != null) {
- 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() {
- System.err.println("java -jar SFrameworkInstall.jar");
- System.err.println("\t[-office <path_to_office_installation]");
- System.err.println("\t[-netbeans <path_to_netbeans_installation]");
- //System.err.println("\t[-jedit <path_to_jedit_installation]");
- }
-
- public static synchronized boolean isPatchedTypes()
- {
- return bPatchedTypes;
- }
-
- public static synchronized boolean isPatchedJava()
- {
- return bPatchedJava;
- }
-
- public static synchronized boolean isPatchedRDB()
- {
- return bPatchedRDB;
- }
-
- public static synchronized boolean isInstallStarted()
- {
- return bInstallStarted;
- }
-
- public static synchronized void setPatchedTypes(boolean value)
- {
- bPatchedTypes = value;
- }
-
- public static synchronized void setPatchedJava(boolean value)
- {
- bPatchedJava = value;
- }
-
- public static synchronized void setPatchedRDB(boolean value)
- {
- bPatchedRDB = value;
- }
-
- public static synchronized void setInstallStarted(boolean value)
- {
- bInstallStarted = value;
- }
-
- public static synchronized void setTypesPath(String path)
- {
- typesPath = path;
- }
-
- public static synchronized void setJavaPath(String path)
- {
- javaPath = path;
- }
-
- public static synchronized String getTypesPath()
- {
- return typesPath;
- }
-
- public static synchronized String getJavaPath()
- {
- return javaPath;
- }
-
- private javax.swing.JPanel navigation;
- private javax.swing.JButton navBack;
- private javax.swing.JButton navNext;
- private javax.swing.JButton navCancel;
- private javax.swing.JPanel screens;
-
- private Version version = null;
- private Final _final = null;
- private IdeVersion ideversion = null;
- private IdeFinal idefinal = null;
- private IdeWelcome idewelcome = null;
- private static ArrayList locations = null;
-
- public static String VERSIONS = "VERSIONS";
- public static String WELCOME = "WELCOME";
- public static String FINAL = "FINAL";
- public static String IDEVERSIONS = "IDEVERSIONS";
- public static String IDEWELCOME = "IDEWELCOME";
- public static String IDEFINAL = "IDEFINAL";
-
- public static int DEFWIDTH = 480;
- public static int DEFHEIGHT = 240;
-
- private static String typesPath = null;
- private static String javaPath = null;
-
- private static boolean bPatchedTypes = false;
- private static boolean bPatchedJava = false;
- private static boolean bPatchedRDB = false;
- private static boolean bInstallStarted = false;
-
-}// InstallWizard
+ * InstallWizard.java + * + * Created on 04 July 2002, 15:09 + */ + +/** + * + * @author mike + */ + +import javax.swing.*; +import java.awt.*; +import java.awt.event.*; +import java.util.*; +import java.net.*; +import java.io.*; + +public class InstallWizard extends javax.swing.JFrame implements ActionListener { +/* + private static class ShutdownHook extends Thread { + public void run() + { + if (InstallWizard.isInstallStarted()) + { + // Check for and backup any config.xml files + // Check for and backup any StarBasic macro files + // Check for and backup ProtocolHandler + + if (!InstallWizard.isPatchedTypes()) + { + File backup = new File(InstUtil.getTmpDir(), "TypeDetection.xml"); + File destination = new File(InstallWizard.getTypesPath()); + InstUtil.copy(backup, destination); //Restore typedetection.xml + } + if (!InstallWizard.isPatchedJava()) + { + File backup = new File(InstUtil.getTmpDir(), "Java.xml"); + File destination = new File(InstallWizard.getJavaPath()); + InstUtil.copy(backup, destination); //Restore typedetection.xml + } + if (!InstallWizard.isPatchedRDB()) + { + File backup = new File(InstUtil.getTmpDir(), "applicat.rdb"); + File destination = new File(InstallWizard.getJavaPath()); + //InstUtil.copy(backup, destination); //Restore typedetection.xml + } + + System.out.println( "ShutdownHook" ); + } + + InstUtil.removeTmpDir(); + } + }// class ShutdownHook + + static { + Runtime rt=Runtime.getRuntime(); + rt.addShutdownHook(new ShutdownHook()); + } +*/ + /** Creates new form InstallWizard */ + public InstallWizard() { + super("Office Scripting Framework Installer - Early Developer Release"); + + try { + System.out.print("All diagnostic output is being redirected to SFrameworkInstall.log\n"); + System.out.print("Location: "+ System.getProperty( "user.dir" ) + + File.separator + "SFrameworkInstall.log\n"); + + LogStream log = new LogStream( "SFrameworkInstall.log" ); + System.setErr(log); + + System.setOut(log); + } + catch( FileNotFoundException fnfe ) { + System.err.println("Office Scripting Framework Installer - Error: "); + System.err.println("Unable to create log file for installation."); + exitForm(null); + } + + //setBackground(Color.WHITE); + setBackground(new Color(0,0,0)); + locations = new ArrayList(); + //Point center = GraphicsEnvironment.getLocalGraphicsEnvironment().getCenterPoint(); + Point center = new Point( 400, 400 ); + int windowWidth=200; + int windowHeight=300; + setSize(windowWidth,windowHeight); + setBounds((center.x-windowWidth/2)-115,(center.y-windowWidth/2)-100, windowWidth,windowHeight); + initComponents(); + setResizable(false); + } + + /** This method is called from within the constructor to + * initialize the form. + */ + private void initComponents() { + navigation = new javax.swing.JPanel(); + navBack = new javax.swing.JButton(); + navNext = new javax.swing.JButton(); + navCancel = new javax.swing.JButton(); + screens = new javax.swing.JPanel(); + + addWindowListener(new java.awt.event.WindowAdapter() { + public void windowClosing(java.awt.event.WindowEvent evt) { + exitForm(evt); + } + }); + + navigation.setLayout(new java.awt.GridBagLayout()); + java.awt.GridBagConstraints gridBagConstraints1; + + navBack.setText("<< Back"); + gridBagConstraints1 = new java.awt.GridBagConstraints(); + gridBagConstraints1.insets = new java.awt.Insets(1, 1, 1, 1); + + navNext.setText("Next >>"); + gridBagConstraints1 = new java.awt.GridBagConstraints(); + gridBagConstraints1.gridx = 2; + gridBagConstraints1.gridy = 0; + + navCancel.setText("Cancel"); + gridBagConstraints1 = new java.awt.GridBagConstraints(); + gridBagConstraints1.gridx = 6; + gridBagConstraints1.gridy = 0; + //navigation.add(navNext, gridBagConstraints1); + //navigation.add(navBack, gridBagConstraints1); + //navigation.add(navCancel, gridBagConstraints1); + + getContentPane().add(navigation, java.awt.BorderLayout.SOUTH); + screens.setLayout(new java.awt.CardLayout()); + screens.add(WELCOME, new Welcome(this)); + version = new Version(this); + screens.add(VERSIONS, version); + _final = new Final(this); + screens.add(FINAL, _final); + + //boolean hasIDEInstallation = (InstUtil.hasNetbeansInstallation() || InstUtil.hasJeditInstallation()) ; + boolean hasIDEInstallation = ( InstUtil.hasNetbeansInstallation() ) ; + + if( hasIDEInstallation ) + { + idewelcome = new IdeWelcome(this); + screens.add(IDEWELCOME, idewelcome); + ideversion = new IdeVersion(this); + screens.add(IDEVERSIONS, ideversion); + idefinal = new IdeFinal(this); + screens.add(IDEFINAL, idefinal); + } + getContentPane().add(screens, java.awt.BorderLayout.CENTER); + + navNext.addActionListener(this); + navNext.addActionListener(version); + navNext.addActionListener(_final); + + if( hasIDEInstallation ) + { + navNext.addActionListener(ideversion); + navNext.addActionListener(idefinal); + } + + navCancel.addActionListener(this); + navBack.addActionListener(this); + + + URL url = this.getClass().getResource("sidebar.jpg"); + JLabel sideBar = new JLabel(); + sideBar.setIcon(new ImageIcon(url)); + getContentPane().add (sideBar, java.awt.BorderLayout.WEST); + pack(); + }// initComponents + + /** Exit the Application */ + public void exitForm(java.awt.event.WindowEvent evt) { + System.exit(0); + } + + + public void actionPerformed(ActionEvent e) + { + if (e.getSource() == navNext) + { + ((CardLayout)screens.getLayout()).next(screens); + } + + if (e.getSource() == navCancel) + { + exitForm(null); + } + + if (e.getSource() == navBack) + { + ((CardLayout)screens.getLayout()).previous(screens); + } + }// actionPerformed + + public static void storeLocation(String path) + { + locations.add(path); + } + + public static ArrayList getLocations() + { + return locations; + } + + public static void clearLocations() + { + locations.clear(); + } + + public void show(String cardName) + { + ((CardLayout)screens.getLayout()).show(screens, cardName); + } + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + String officePath = null; + String netbeansPath = null; + //String jeditPath = null; + int i = 0; + + while (i < args.length) { + if (args[i].equals("-help")) { + printUsage(); + System.exit(0); + } + if (args[i].equals("-office")) + officePath = args[++i]; + if (args[i].equals("-netbeans")) + netbeansPath = args[++i]; + if (args[i].equals("-net")) + 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(); + + JLabel label = new JLabel(); + JProgressBar progressbar = new JProgressBar(); + + try { + System.out.println("Log file is: " + + System.getProperty("user.dir") + + File.separator + "SFrameworkInstall.log"); + + LogStream log = new LogStream( "SFrameworkInstall.log" ); + System.setErr(log); + System.setOut(log); + } + catch( FileNotFoundException fnfe ) { + System.err.println("Error: Unable to create log file: " + + fnfe.getMessage()); + System.exit(-1); + } + + if (officePath != null) { + XmlUpdater xud = new XmlUpdater(officePath, label, progressbar, bNetworkInstall, bBindingsInstall ); + xud.run(); + } + + if (netbeansPath != null) { + 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() { + System.err.println("java -jar SFrameworkInstall.jar"); + System.err.println("\t[-office <path_to_office_installation]"); + System.err.println("\t[-netbeans <path_to_netbeans_installation]"); + System.err.println("\t[-net]"); + 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() + { + return bPatchedTypes; + } + + public static synchronized boolean isPatchedJava() + { + return bPatchedJava; + } + + public static synchronized boolean isPatchedRDB() + { + return bPatchedRDB; + } + + public static synchronized boolean isInstallStarted() + { + return bInstallStarted; + } + + public static synchronized void setPatchedTypes(boolean value) + { + bPatchedTypes = value; + } + + public static synchronized void setPatchedJava(boolean value) + { + bPatchedJava = value; + } + + public static synchronized void setPatchedRDB(boolean value) + { + bPatchedRDB = value; + } + + public static synchronized void setInstallStarted(boolean value) + { + bInstallStarted = value; + } + + public static synchronized void setTypesPath(String path) + { + typesPath = path; + } + + public static synchronized void setJavaPath(String path) + { + javaPath = path; + } + + public static synchronized String getTypesPath() + { + return typesPath; + } + + public static synchronized String getJavaPath() + { + return javaPath; + } + + private javax.swing.JPanel navigation; + private javax.swing.JButton navBack; + private javax.swing.JButton navNext; + private javax.swing.JButton navCancel; + private javax.swing.JPanel screens; + + private Version version = null; + private Final _final = null; + private IdeVersion ideversion = null; + private IdeFinal idefinal = null; + private IdeWelcome idewelcome = null; + private static ArrayList locations = null; + + public static String VERSIONS = "VERSIONS"; + public static String WELCOME = "WELCOME"; + public static String FINAL = "FINAL"; + public static String IDEVERSIONS = "IDEVERSIONS"; + public static String IDEWELCOME = "IDEWELCOME"; + public static String IDEFINAL = "IDEFINAL"; + + public static int DEFWIDTH = 480; + public static int DEFHEIGHT = 240; + + private static String typesPath = null; + private static String javaPath = null; + + public static boolean bNetworkInstall = false; + public static boolean bBindingsInstall = false; + + private static boolean bPatchedTypes = false; + private static boolean bPatchedJava = false; + private static boolean bPatchedRDB = false; + private static boolean bInstallStarted = false; + +}// InstallWizard diff --git a/scripting/workben/installer/Register.java b/scripting/workben/installer/Register.java index 03b96fc9e36c..69557f59fe34 100644 --- a/scripting/workben/installer/Register.java +++ b/scripting/workben/installer/Register.java @@ -79,14 +79,14 @@ public class Register{ goodResult = command.exec("chmod a+x " + progpath + "pkgchk", null ); if ( goodResult ){ - cmd = progpath + "pkgchk -f " + progpath + packages[i]; + cmd = progpath + "pkgchk -s -f " + progpath + packages[i]; System.err.println(cmd); goodResult = command.exec(cmd, env); } } else { - cmd = "\"" + progpath + "pkgchk.exe\" -f \"" + progpath + + cmd = "\"" + progpath + "pkgchk.exe\" -s -f \"" + progpath + packages[i] + "\""; System.err.println(cmd); diff --git a/scripting/workben/installer/XmlUpdater.java b/scripting/workben/installer/XmlUpdater.java index 6212894ded24..a0b79c2ecbb8 100644 --- a/scripting/workben/installer/XmlUpdater.java +++ b/scripting/workben/installer/XmlUpdater.java @@ -17,6 +17,8 @@ public class XmlUpdater extends Thread { private String classesPath = null; private String jarfilename; private String installPath; + private boolean netInstall; + private boolean bindingsInstall; private JLabel statusLabel; @@ -27,24 +29,24 @@ public class XmlUpdater extends Thread { private final String[] bakFiles = { - "writermenubar.xml", - "writerkeybinding.xml", - "calcmenubar.xml", - "calckeybinding.xml", - "impressmenubar.xml", - "impresskeybinding.xml", - "drawmenubar.xml", - "drawkeybinding.xml", - "eventbindings.xml", - "META-INF" + File.separator + "manifest.xml" + "writermenubar.xml", + "writerkeybinding.xml", + "calcmenubar.xml", + "calckeybinding.xml", + "impressmenubar.xml", + "impresskeybinding.xml", + "drawmenubar.xml", + "drawkeybinding.xml", + "eventbindings.xml", + "META-INF" + File.separator + "manifest.xml" }; private final String[] dirs = { - "java" + File.separator + "Highlight", - "java" + File.separator + "MemoryUsage", - "java" + File.separator + "ScriptFrmwrkHelper", - "java" + File.separator + "debugger", + "java" + File.separator + "Highlight", + "java" + File.separator + "MemoryUsage", + "java" + File.separator + "ScriptFrmwrkHelper", + "java" + File.separator + "debugger", "java" + File.separator + "debugger" + File.separator + "rhino", "beanshell" + File.separator + "InteractiveBeanShell", "beanshell" + File.separator + "Highlight", @@ -84,59 +86,58 @@ public class XmlUpdater extends Thread { }; - public XmlUpdater(String installPath, JLabel statusLabel,JProgressBar pBar) { + public XmlUpdater(String installPath, JLabel statusLabel,JProgressBar pBar, boolean netInstall, boolean bindingsInstall) { this.installPath = installPath; this.statusLabel = statusLabel; - listeners = new Vector(); - threadSuspended = false; - progressBar=pBar; - progressBar.setStringPainted(true); + this.netInstall = netInstall; + this.bindingsInstall = bindingsInstall; + listeners = new Vector(); + threadSuspended = false; + progressBar=pBar; + progressBar.setStringPainted(true); }// XmlUpdater public boolean checkStop() { - if (internalThread == Thread.currentThread()) - return false; - return true; + if (internalThread == Thread.currentThread()) + return false; + return true; }// checkStop public void checkSuspend() { - if (threadSuspended) - { - synchronized(this) - { - while (threadSuspended) - { - try { - wait(); - } catch (InterruptedException eInt) { - //... - } + if (threadSuspended) { + synchronized(this) { + while (threadSuspended) { + try { + wait(); + } catch (InterruptedException eInt) { + //... } - } + } } + } }// checkSuspend public void setSuspend() { - threadSuspended = true; + threadSuspended = true; }// setSuspend public void setResume() { - threadSuspended = false; - notify(); + threadSuspended = false; + notify(); }// setResume public void setStop() { - internalThread = null; + internalThread = null; }// setStop @@ -149,25 +150,20 @@ public class XmlUpdater extends Thread { URL url; String fileName = null; - internalThread = Thread.currentThread(); + internalThread = Thread.currentThread(); //System.out.println("\n\n\n\nFileName: "+installPath); classesPath= installPath.concat(File.separator+"program"+File.separator+"classes"+File.separator); String opSys =System.getProperty("os.name"); - //System.out.println("\n System "+opSys); + //System.out.println("\n System "+opSys); String progpath=installPath; progpath= progpath.concat(File.separator+"program"+File.separator); //System.out.println("Office progpath" + progpath ); //System.out.println("\nModifying Installation "+installPath); - 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 + File.separator + "META-INF" + File.separator; - String starBasicPath=installPath; - starBasicPath= starBasicPath.concat(File.separator+"user"+File.separator+"basic"+File.separator+"ScriptBindingLibrary"+File.separator); + starBasicPath= starBasicPath.concat(File.separator+"share"+File.separator+"basic"+File.separator+"ScriptBindingLibrary"+File.separator); //System.out.println( "Office StarBasic path: " + starBasicPath ); String regSchemaOfficePath=installPath; @@ -177,238 +173,237 @@ public class XmlUpdater extends Thread { // Get the NetBeans installation //String netbeansPath= - progressBar.setString("Unzipping Required Files"); + progressBar.setString("Unzipping Required Files"); ZipData zd = new ZipData("SFrameworkInstall.jar"); - // Adding new directories to Office - // Adding <Office>/user/basic/ScriptBindingLibrary/ - File scriptBindingLib = new File( starBasicPath ); - if( !scriptBindingLib.isDirectory() ) { - if( !scriptBindingLib.mkdir() ) { - System.out.println( "ScriptBindingLibrary failed"); - } - else { - System.out.println( "ScriptBindingLibrary directory created"); + 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/ + File configDir = new File( configPath ); + if( !configDir.isDirectory() ) { + if( !configDir.mkdir() ) { + System.out.println( "creating " + configDir + "directory failed"); + } + else { + System.out.println( configDir + "directory created"); + } } - } - else - System.out.println( "ScriptBindingLibrary exists" ); - - //Adding <Office>/user/config/soffice.cfg/ - File configDir = new File( configPath ); - if( !configDir.isDirectory() ) { - if( !configDir.mkdir() ) { - System.out.println( "soffice.cfg directory failed"); + else + System.out.println( "soffice.cfg exists" ); + + File manifestDir = new File( manifestPath ); + if( !manifestDir.isDirectory() ) { + if( !manifestDir.mkdir() ) { + System.out.println( "creating " + manifestPath + "directory failed"); + } + else { + System.out.println( manifestPath + " directory created"); + } } - else { - System.out.println( "soffice.cfg directory created"); + else + System.out.println( manifestPath + " exists" ); + + // Backup the confguration files in + // <office>/user/config/soffice.cfg/ + // If they already exist. + + for( int i=0; i < bakFiles.length; i++ ) + { + String pathNameBak = configPath + bakFiles[i]; + File origFile = new File( pathNameBak ); + if( origFile.exists() ) + { + System.out.println( "Attempting to backup " + pathNameBak + " to " + pathNameBak + ".bak" ); + if(! origFile.renameTo( new File( pathNameBak + ".bak" ) ) ) + { + System.out.println( "Failed to backup " + pathNameBak + " to " + pathNameBak + ".bak" ); + } + } } - } - else - System.out.println( "soffice.cfg exists" ); - File manifestDir = new File( manifestPath ); - if( !manifestDir.isDirectory() ) { - if( !manifestDir.mkdir() ) { - System.out.println( "creating " + manifestPath + "directory failed"); + // Adding Office configuration files + if (!zd.extractEntry("bindingdialog/writermenubar.xml",configPath, statusLabel)) + { + onInstallComplete(); + return; + } + if (!zd.extractEntry("bindingdialog/writerkeybinding.xml",configPath, statusLabel)) + { + onInstallComplete(); + return; } - else { - System.out.println( manifestPath + " directory created"); + if (!zd.extractEntry("bindingdialog/calcmenubar.xml",configPath, statusLabel)) + { + onInstallComplete(); + return; + } + if (!zd.extractEntry("bindingdialog/calckeybinding.xml",configPath, statusLabel)) + { + onInstallComplete(); + return; + } + if (!zd.extractEntry("bindingdialog/impressmenubar.xml",configPath, statusLabel)) + { + onInstallComplete(); + return; + } + if (!zd.extractEntry("bindingdialog/impresskeybinding.xml",configPath, statusLabel)) + { + onInstallComplete(); + return; + } + if (!zd.extractEntry("bindingdialog/drawmenubar.xml",configPath, statusLabel)) + { + onInstallComplete(); + return; + } + if (!zd.extractEntry("bindingdialog/drawkeybinding.xml",configPath, statusLabel)) + { + onInstallComplete(); + return; + } + if (!zd.extractEntry("bindingdialog/eventbindings.xml",configPath, statusLabel)) + { + onInstallComplete(); + return; + } + if (!zd.extractEntry("bindingdialog/manifest.xml",manifestPath, statusLabel)) + { + onInstallComplete(); + return; } } - else - System.out.println( manifestPath + " exists" ); - -//-------------------------------- - // Backup the confguration files in <office>/user/config/soffice.cfg/ - // If they already exist. + if(!bindingsInstall) { + // Adding new directories to Office + // Adding <Office>/user/basic/ScriptBindingLibrary/ + File scriptBindingLib = new File( starBasicPath ); + if( !scriptBindingLib.isDirectory() ) { + if( !scriptBindingLib.mkdir() ) { + System.out.println( "ScriptBindingLibrary failed"); + } + else { + System.out.println( "ScriptBindingLibrary directory created"); + } + } + else + System.out.println( "ScriptBindingLibrary exists" ); - for( int i=0; i < bakFiles.length; i++ ) - { - String pathNameBak = configPath + bakFiles[i]; - File origFile = new File( pathNameBak ); - if( origFile.exists() ) - { - System.out.println( "Attempting to backup " + pathNameBak + " to " + pathNameBak + ".bak" ); - if(! origFile.renameTo( new File( pathNameBak + ".bak" ) ) ) + // Adding Scripting Framework and tools + if (!zd.extractEntry("sframework/ooscriptframe.zip",progpath, statusLabel)) { - System.out.println( "Failed to backup " + pathNameBak + " to " + pathNameBak + ".bak" ); + onInstallComplete(); + return; } - } - } + if (!zd.extractEntry("sframework/bshruntime.zip",progpath, statusLabel)) + { + onInstallComplete(); + return; + } -//-------------------------------- - // Adding Scripting Framework and tools - if (!zd.extractEntry("sframework/ooscriptframe.zip",progpath, statusLabel)) - { - onInstallComplete(); - return; - } - - if (!zd.extractEntry("sframework/bshruntime.zip",progpath, statusLabel)) - { - onInstallComplete(); - return; - } + if (!zd.extractEntry("sframework/jsruntime.zip",progpath, statusLabel)) + { + onInstallComplete(); + return; + } - if (!zd.extractEntry("sframework/jsruntime.zip",progpath, statusLabel)) - { - onInstallComplete(); - return; - } + if (!zd.extractEntry("schema/Scripting.xcs",regSchemaOfficePath, statusLabel)) + { + onInstallComplete(); + return; + } - if (!zd.extractEntry("schema/Scripting.xcs",regSchemaOfficePath, statusLabel)) - { - onInstallComplete(); - return; - } + //-------------------------------- -//-------------------------------- + progressBar.setString("Registering Scripting Framework"); + progressBar.setValue(3); + if(!Register.register(installPath+File.separator, statusLabel) ) { + onInstallComplete(); + return; + } + progressBar.setValue(5); - progressBar.setString("Registering Scripting Framework"); - progressBar.setValue(3); - if(!Register.register(installPath+File.separator, statusLabel) ) - { - onInstallComplete(); - return; - } - progressBar.setValue(5); + String path = installPath + File.separator + + "share" + File.separator + "Scripts" + File.separator; -//-------------------------------- -// Robert Kinsella test 2 + for (int i = 0; i < dirs.length; i++) { + File dir = new File(path + dirs[i]); - String path = installPath + File.separator + - "user" + File.separator + "Scripts" + File.separator; + if (!dir.exists()) { + if (!dir.mkdirs()) { + System.err.println("Error making dir: " + + dir.getAbsolutePath()); + onInstallComplete(); + return; + } + } + } - for (int i = 0; i < dirs.length; i++) { - File dir = new File(path + dirs[i]); + for (int i = 0; i < names.length; i++) { + String source = "/examples/" + names[i]; + String dest = path + names[i].replace('/', File.separatorChar); - if (!dir.exists()) { - if (!dir.mkdirs()) { - System.err.println("Error making dir: " + - dir.getAbsolutePath()); + if (!zd.extractEntry(source, dest, statusLabel)) { onInstallComplete(); return; } } - } - for (int i = 0; i < names.length; i++) { - String source = "/examples/" + names[i]; - String dest = path + names[i].replace('/', File.separatorChar); - if (!zd.extractEntry(source, dest, statusLabel)) { + // Adding binding dialog + if (!zd.extractEntry("bindingdialog/ScriptBinding.xba",starBasicPath, statusLabel)) + { + onInstallComplete(); + return; + } + if (!zd.extractEntry("bindingdialog/MenuBinding.xdl",starBasicPath, statusLabel)) + { + onInstallComplete(); + return; + } + if (!zd.extractEntry("bindingdialog/KeyBinding.xdl",starBasicPath, statusLabel)) + { + onInstallComplete(); + return; + } + if (!zd.extractEntry("bindingdialog/EventsBinding.xdl",starBasicPath, statusLabel)) + { + onInstallComplete(); + return; + } + if (!zd.extractEntry("bindingdialog/HelpBinding.xdl",starBasicPath, statusLabel)) + { + onInstallComplete(); + return; + } + if (!zd.extractEntry("bindingdialog/EditDebug.xdl",starBasicPath, statusLabel)) + { + onInstallComplete(); + return; + } + if (!zd.extractEntry("bindingdialog/dialog.xlb",starBasicPath, statusLabel)) + { + onInstallComplete(); + return; + } + if (!zd.extractEntry("bindingdialog/script.xlb",starBasicPath, statusLabel)) + { onInstallComplete(); return; } } -// Robert Kinsella test 2 end -//-------------------------------- - // Adding binding dialog - if (!zd.extractEntry("bindingdialog/ScriptBinding.xba",starBasicPath, statusLabel)) - { - onInstallComplete(); - return; - } - if (!zd.extractEntry("bindingdialog/MenuBinding.xdl",starBasicPath, statusLabel)) - { - onInstallComplete(); - return; - } - if (!zd.extractEntry("bindingdialog/KeyBinding.xdl",starBasicPath, statusLabel)) - { - onInstallComplete(); - return; - } - if (!zd.extractEntry("bindingdialog/EventsBinding.xdl",starBasicPath, statusLabel)) - { - onInstallComplete(); - return; - } - if (!zd.extractEntry("bindingdialog/HelpBinding.xdl",starBasicPath, statusLabel)) - { - onInstallComplete(); - return; - } - if (!zd.extractEntry("bindingdialog/EditDebug.xdl",starBasicPath, statusLabel)) - { - onInstallComplete(); - return; - } - if (!zd.extractEntry("bindingdialog/dialog.xlb",starBasicPath, statusLabel)) - { - onInstallComplete(); - return; - } - if (!zd.extractEntry("bindingdialog/script.xlb",starBasicPath, statusLabel)) - { - onInstallComplete(); - return; - } - -//-------------------------------- - - // Adding Office configuration files - if (!zd.extractEntry("bindingdialog/writermenubar.xml",configPath, statusLabel)) - { - onInstallComplete(); - return; - } - if (!zd.extractEntry("bindingdialog/writerkeybinding.xml",configPath, statusLabel)) - { - onInstallComplete(); - return; - } - if (!zd.extractEntry("bindingdialog/calcmenubar.xml",configPath, statusLabel)) - { - onInstallComplete(); - return; - } - if (!zd.extractEntry("bindingdialog/calckeybinding.xml",configPath, statusLabel)) - { - onInstallComplete(); - return; - } - if (!zd.extractEntry("bindingdialog/impressmenubar.xml",configPath, statusLabel)) - { - onInstallComplete(); - return; - } - if (!zd.extractEntry("bindingdialog/impresskeybinding.xml",configPath, statusLabel)) - { - onInstallComplete(); - return; - } - if (!zd.extractEntry("bindingdialog/drawmenubar.xml",configPath, statusLabel)) - { - onInstallComplete(); - return; - } - if (!zd.extractEntry("bindingdialog/drawkeybinding.xml",configPath, statusLabel)) - { - onInstallComplete(); - return; - } - if (!zd.extractEntry("bindingdialog/eventbindings.xml",configPath, statusLabel)) - { - onInstallComplete(); - return; - } - if (!zd.extractEntry("bindingdialog/manifest.xml",manifestPath, statusLabel)) - { - onInstallComplete(); - return; - } - - statusLabel.setText("Installation Complete"); - progressBar.setString("Installation Complete"); - progressBar.setValue(10); - onInstallComplete(); + statusLabel.setText("Installation Complete"); + progressBar.setString("Installation Complete"); + progressBar.setValue(10); + onInstallComplete(); }// run |