Package org.openoffice.setup

Examples of org.openoffice.setup.InstallData


        String mktempString = "/usr/bin/mktemp";
        File mktemp = new File(mktempString);
        if ( mktemp.exists() ) {
            // this is Solaris 10
            LogManager.setCommandsHeaderLine("Preparing Solaris 10 user installation");
            InstallData data = InstallData.getInstance();
            String mktempCommand = mktempString + " -d";
            String[] mktempCommandArray = new String[2];
            mktempCommandArray[0] = mktempString;
            mktempCommandArray[1] = "-d";
            Vector returnVector = new Vector();
            Vector returnErrorVector = new Vector();
            int returnValue = ExecuteProcess.executeProcessReturnVector(mktempCommandArray, returnVector, returnErrorVector);
            String uniqueLocalDir = (String) returnVector.get(0);
                       
            data.setLocalTempPath(uniqueLocalDir);
           
            String log = mktempCommand + "<br><b>Returns: " + uniqueLocalDir + "</b><br>";
            LogManager.addCommandsLogfileComment(log);
           
            String installRoot = data.getInstallDir();
            File installRootTemp = new File(installRoot, "tmp");
           
            if ( installRootTemp.exists() ) {
                SystemManager.removeDirectory(installRootTemp);
            }
View Full Code Here


            LogManager.addCommandsLogfileComment(log);
        }
    }
   
    private void removeLocalTempDir() {
        InstallData data = InstallData.getInstance();
       
        if ( data.getLocalTempPath() != null ) {
            File installRootTemp = new File(data.getInstallDir(), "tmp");
            if ( installRootTemp.exists() ) {
                installRootTemp.delete(); // removing the link
                SystemManager.createDirectory(installRootTemp);
            }           

            File localTemp = new File(data.getLocalTempPath());
            if ( localTemp.exists() ) {
                SystemManager.removeDirectory(localTemp);
            }
        }
    }
View Full Code Here

    }
   
    private Vector getAdminFileContent(boolean relocatable, boolean rdepends) {

        Vector adminFile = new Vector();
        InstallData data = InstallData.getInstance();
       
        // if ( relocatable ) {
        //     String installDir =  data.getInstallDir();
        //     // installDir = installDir.replace(" ", "\\ ");
        //     String baseDirLine = "basedir=" + installDir;
        //     adminFile.add(baseDirLine);
        // }

        String mailLine = "mail=";
        adminFile.add(mailLine);

        String conflictLine = "conflict=nochange";
        if ( data.isUserInstallation() ) { conflictLine = "conflict=nochange"; }       
        adminFile.add(conflictLine);

        String runlevelLine = "runlevel=nocheck";
        adminFile.add(runlevelLine);

        String setuidLine = "setuid=quit";
        if ( data.isUserInstallation() ) { setuidLine = "setuid=nocheck"; }       
        adminFile.add(setuidLine);

        String actionLine = "action=nocheck";
        adminFile.add(actionLine);

        String partialLine = "partial=quit";
        if ( data.isUserInstallation() ) { partialLine = "partial=nocheck"; }       
        adminFile.add(partialLine);

        String instanceLine = "instance=unique";
        adminFile.add(instanceLine);
       
        // String idependLine = "idepend=quit";
        String idependLine = "idepend=nocheck";
        // if ( data.isUserInstallation() ) { idependLine = "idepend=nocheck"; }       
        adminFile.add(idependLine);

        // String rdependLine = "rdepend=nocheck";
        String rdependLine = "rdepend=quit";
        if ( ! rdepends ) { rdependLine = "rdepend=nocheck"; }
        if ( data.isUserInstallation() ) { rdependLine = "rdepend=nocheck"; }       
        adminFile.add(rdependLine);

        String spaceLine = "space=quit";
        if ( data.isUserInstallation() ) { spaceLine = "space=nocheck"; }       
        adminFile.add(spaceLine);
       
        return adminFile;
    }
View Full Code Here

        return new String("InstallationOngoing");
    }
   
    public String getPrevious() {

        InstallData data = InstallData.getInstance();

        if ( data.isRootInstallation() ) {
            if ( data.olderVersionExists() ) {
                if ( data.hideEula() ) {
                    return new String("Prologue");           
                } else {
                    return new String("AcceptLicense");
                }
            } else if ( data.sameVersionExists() ) {
                return new String("ChooseComponents");
            } else {
                if ( data.getInstallationType().equals(data.getCustomActionCommand()) ) {
                    return new String("ChooseComponents");
                } else if ( data.getInstallationType().equals(data.getTypicalActionCommand()) ) {
                    return new String("ChooseInstallationType");           
                } else {
                    System.err.println("Error: Unknown installation type!" );           
                    return new String("Error");           
                }
            }
        } else {
            if ( data.olderVersionExists() ) {
                return new String("ChooseDirectory");
            } else if ( data.sameVersionExists() ) {
                return new String("ChooseComponents");
            } else {
                if ( data.getInstallationType().equals(data.getCustomActionCommand()) ) {
                    return new String("ChooseComponents");
                } else if ( data.getInstallationType().equals(data.getTypicalActionCommand()) ) {
                    return new String("ChooseInstallationType");           
                } else {
                    System.err.println("Error: Unknown installation type!" );           
                    return new String("Error");           
                }
View Full Code Here

        databasePath = data.getInstallDir();
        return databasePath;
    }

    public void createAdminFile(boolean relocatable, boolean rdepends) {
        InstallData data = InstallData.getInstance();
        Vector removeFiles = data.getRemoveFiles();
        String adminFileName = "";
       
        if ( relocatable ) {
          if ( rdepends ) {
                adminFileName = "adminFileReloc";
            } else {
                adminFileName = "adminFileRelocNoDepends";             
            }
        } else {
          if ( rdepends ) {
                adminFileName = "adminFileNoReloc";
            } else {
                adminFileName = "adminFileNoRelocNoDepends";
            }    
        }

        Vector fileContent = getAdminFileContent(relocatable, rdepends);
        File adminFile = new File(data.getInstallDir(), adminFileName);
        String completeAdminFileName = adminFile.getPath();

        if ( relocatable ) {
          if ( rdepends ) {
                data.setAdminFileNameReloc(completeAdminFileName);
            } else {           
                data.setAdminFileNameRelocNoDepends(completeAdminFileName);
            }
        } else {
          if ( rdepends ) {
                data.setAdminFileNameNoReloc(completeAdminFileName);
            } else {
                data.setAdminFileNameNoRelocNoDepends(completeAdminFileName);
            }
        }
       
        if ( ! adminFile.exists() ) {
            // only saving, if it did not exist
View Full Code Here

        // SystemManager.dumpFile(adminFileName, dumpFileName);
    }

    // for user installations an environment hashmap is used
    public void setEnvironmentForUserInstall() {
        InstallData data = InstallData.getInstance();
        HashMap env = SystemManager.getEnvironmentHashMap();
        env.put("LD_PRELOAD_32", data.getGetUidPath());
        data.setShellEnvironment(env);
    }
View Full Code Here

        InstallationImminent panel = (InstallationImminent)getPanel();
        panel.setInfoText(htmlInfoText);
        panel.setCaretPosition();
       
        // Update mode
        InstallData data = InstallData.getInstance();
        if ( data.olderVersionExists() ) {
            String dialogTitle = ResourceManager.getString("String_InstallationImminent1_Update");
            panel.setTitleText(dialogTitle);
        }
    }
View Full Code Here

    public boolean afterShow(boolean nextButtonPressed) {
        boolean repeatDialog = false;

        if ( nextButtonPressed ) {

            InstallData data = InstallData.getInstance();

            // determining the packagePath
            if ( data.getPackagePath() != null ) {
                String log = "<b>Packages path:</b> " + data.getPackagePath() + "<br>";
                LogManager.addLogfileComment(log);
            } else {
                String message = ResourceManager.getString("String_InstallationOngoing_PackagePath_Not_Found");
                String title = ResourceManager.getString("String_Error");
                Informer.showErrorMessage(message, title);
View Full Code Here

    private PanelLabel varLabel;
    private PanelTitle titleBox;

    public installationCompleted() {

        InstallData data = InstallData.getInstance();
       
        setLayout(new java.awt.BorderLayout());
        setBorder(new EmptyBorder(new Insets(10, 10, 10, 10)));
     
        String titleText = ResourceManager.getString("String_InstallationCompleted1");
        titleBox = new PanelTitle(titleText);
        add(titleBox, BorderLayout.NORTH);

        JPanel contentPanel = new JPanel();
        contentPanel.setLayout(new java.awt.BorderLayout());
        if ( data.useRtl() ) { contentPanel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }

        String dialogText = ResourceManager.getString("String_InstallationCompleted2");
        varLabel = new PanelLabel(dialogText, true);     
        String text2 = ResourceManager.getString("String_InstallationCompleted3");
        PanelLabel label2 = new PanelLabel(text2);
        if ( data.useRtl() ) { label2.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }

        mDetailsButton = new JButton();
        String buttonText = ResourceManager.getString("String_InstallationCompleted_Button");
        mDetailsButton.setText(buttonText);
        mDetailsButton.setEnabled(true);
        if ( data.useRtl() ) { mDetailsButton.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }

        JPanel ButtonPanel = new JPanel();
        ButtonPanel.setLayout(new BorderLayout());
        ButtonPanel.setBorder(new EmptyBorder(new Insets(5, 10, 5, 10)));      
        ButtonPanel.setPreferredSize(new Dimension(120, 44));
        ButtonPanel.add(mDetailsButton, BorderLayout.NORTH);
        if ( data.useRtl() ) { ButtonPanel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }

        contentPanel.add(varLabel, BorderLayout.NORTH);
        contentPanel.add(ButtonPanel, BorderLayout.EAST);
        contentPanel.add(label2, BorderLayout.CENTER)
       
View Full Code Here

        helpFile = "String_Helpfile_ChooseInstallationType";
    }
   
    public String getNext() {

        InstallData data = InstallData.getInstance();
       
        if ( data.getInstallationType().equals(data.getCustomActionCommand()) ) {
            return new String("ChooseComponents");
        } else if ( data.getInstallationType().equals(data.getTypicalActionCommand()) ) {
            return new String("InstallationImminent");           
        } else {
            System.err.println("Error: Unknown installation type!" );           
            return new String("Error");           
        }
View Full Code Here

TOP

Related Classes of org.openoffice.setup.InstallData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.