Examples of InstallData


Examples of org.openoffice.setup.InstallData

   
    static public void setDefaultModuleSettings(PackageDescription data) {
        // Setting default module settings for modules, that are not hidden
        // Hidden modules do not get a defined state now
        boolean isInstalled = false;
        InstallData installdata = InstallData.getInstance();
        boolean isUninstall = installdata.isUninstallationMode();
       
        if (isUninstall) {
            isInstalled = true;
        }
View Full Code Here

Examples of org.openoffice.setup.InstallData

        }

        if ( ! packageData.isLeaf() ) {
            // System.err.println("setParentDefaultModuleSettings: " + packageData.getName());
            int state = packageData.getSelectionState();
            InstallData installdata = InstallData.getInstance();
            boolean allChildrenIgnored = true;
            boolean atLeastOneInstalled = false;
            boolean allChildrenHidden = true;

            // System.err.println("    STATE before iterating over children: " + state);

            for (Enumeration e = packageData.children(); e.hasMoreElements();) {           
                PackageDescription child = (PackageDescription) e.nextElement();
                int childState = child.getSelectionState();

                // System.err.println("    Child: " + child.getName() + " : " + childState);
               
                if ( childState != PackageDescription.IGNORE) {
                    allChildrenIgnored = false;
                }

                if (( childState == PackageDescription.INSTALL) || ( childState == PackageDescription.INSTALL_SOME)) {
                    atLeastOneInstalled = true;
                }

                if ( ! child.isHidden() ) {
                    allChildrenHidden = false;
                }
               
                if ((state == PackageDescription.DONT_KNOW) || (state == PackageDescription.IGNORE)) {
                    state = childState;         
                // } else if ((state != childState) && (childState != PackageDescription.IGNORE)) {
                } else if ((state != childState) && (childState != PackageDescription.IGNORE) && (childState != PackageDescription.DONT_KNOW)) {
                    if ( installdata.isUninstallationMode() ) {
                        state = PackageDescription.REMOVE_SOME;
                    } else {
                        state = PackageDescription.INSTALL_SOME;
                    }
                }
               
                // System.err.println("    NEW state after child: " + state);
            }

            if ( allChildrenIgnored ) {
                state = PackageDescription.IGNORE;
            }
           
            if ( installdata.isInstallationMode() ) {
                if (( state == PackageDescription.INSTALL_SOME ) && ( ! atLeastOneInstalled )) {
                    state = PackageDescription.DONT_INSTALL;
                }
            }
View Full Code Here

Examples of org.openoffice.setup.InstallData

            setHiddenModuleSettingsInstall(child);
        }
    }

    static public void setHiddenModuleSettingsUninstall(PackageDescription packageData) {
        InstallData data = InstallData.getInstance();           
        // update selection states for hidden modules during uninstallation
        if (( packageData.isHidden() ) && ( packageData.getSelectionState() != packageData.IGNORE )) {
            // System.err.println("Package name: " + packageData.getName());
            // System.err.println("Selection: " + packageData.getSelectionState());
           
            PackageDescription parent = (PackageDescription)packageData.getParent();
            if ( parent != null ) {
                packageData.setSelectionState(parent.getSelectionState());
                // Hidden modules at root module have to be uninstalled at complete uninstallation
                // In Uninstallation the complete is the typical installation type
                if (( parent.getName() == "" ) && ( data.isTypicalInstallation() ))  {
                    packageData.setSelectionState(packageData.REMOVE);                   
                }
                // Hidden modules at root module must not be uninstalled at custom uninstallation
                // But if all visible modules are selected for uninstallation, this shall be handled
                // as complete uninstallation.
                if ( ! data.isMaskedCompleteUninstallation() )
                {
                    if (( parent.getName() == "" ) && ( data.isCustomInstallation() ))  {
                        packageData.setSelectionState(packageData.IGNORE);
                    }
                }
            }
           
View Full Code Here

Examples of org.openoffice.setup.InstallData

        File infoFile = new File(dir, infoFileName);
        SystemManager.saveCharFileVector(infoFile.getPath(), fileContent);
    }

    static private void removeSpecialFiles() {
        InstallData data = InstallData.getInstance();
        File jarFile = data.getJarFilePath();
        SystemManager.deleteFile(jarFile);
       
        String jarFilePath = jarFile.getParent();
        File setupFile = new File(jarFilePath, "setup");
        SystemManager.deleteFile(setupFile);

        if ( ! data.getAdminFileNameReloc().equals("null") ) {
            SystemManager.deleteFile(new File(data.getAdminFileNameReloc()));
        }

        if ( ! data.getAdminFileNameNoReloc().equals("null") ) {
            SystemManager.deleteFile(new File(data.getAdminFileNameNoReloc()));
        }

        if ( ! data.getGetUidPath().equals("null") ) {
            SystemManager.deleteFile(new File(data.getGetUidPath()));           
        }
    }
View Full Code Here

Examples of org.openoffice.setup.InstallData

        setNewInstallData(map);
        Dumper.dumpNewInstallData();
    }
   
    private void checkUninstallPrivileges() {
        InstallData data = InstallData.getInstance();
        // data.setStoredInstallationPrivileges((String)map.get("InstallationPrivileges"));
        String originalPrivileges = data.getStoredInstallationPrivileges();
        String currentPrivileges = data.getInstallationPrivileges();
        if ( ! currentPrivileges.equalsIgnoreCase(originalPrivileges) ) {
            // aborting installation with error message
            if ( currentPrivileges.equalsIgnoreCase("root")) {
                String message = ResourceManager.getString("String_UninstallationPrologue_Wrong_Privileges_Current_Root");
                String title = ResourceManager.getString("String_Error");
View Full Code Here

Examples of org.openoffice.setup.InstallData

            SystemManager.deleteFile(new File(data.getGetUidPath()));           
        }
    }

    static private void removeInforootSubdir(String dir1, String dir2) {
        InstallData data = InstallData.getInstance();
        File subdir1 = data.getInfoRoot(dir1);
        File subdir2 = new File(subdir1, dir2);
        if (subdir2 != null) {
            if ( subdir2.exists() ) {
                SystemManager.removeDirectory(subdir2);
            }
View Full Code Here

Examples of org.openoffice.setup.InstallData

            }
        }
    }

    static private void removeInforootSubdir(String dir) {
        InstallData data = InstallData.getInstance();
        File subdir = data.getInfoRoot(dir);
        if (subdir != null) {
          if ( subdir.exists() ) {
                SystemManager.removeDirectory(subdir);
            }
        }
View Full Code Here

Examples of org.openoffice.setup.InstallData

            }
        }
    }
   
    static private void removeInforoot() {
        InstallData data = InstallData.getInstance();
        SystemManager.removeDirectory(data.getInfoRoot());
    }
View Full Code Here

Examples of org.openoffice.setup.InstallData

    public void duringShow() {

        Thread t = new Thread() {
            public void run() {
                InstallData installData = InstallData.getInstance();
                if ( ! installData.databaseAnalyzed() ) {
                    getSetupFrame().setButtonEnabled(false, getSetupFrame().BUTTON_NEXT);
               
                    // now it is time to read the infoFile in directory "installData.getInfoRoot()"
                    readInfoFile();
                   
                    // controlling the installation privileges. Are the original installation privileges
                    // identical with the current deinstallation privileges?
                    checkUninstallPrivileges();

                    PackageDescription packageData = SetupDataProvider.getPackageDescription();               
                    Installer installer = InstallerFactory.getInstance();
                    installer.preUninstall(packageData);

                    // searching in the database for already installed packages
                    LogManager.setCommandsHeaderLine("Analyzing system database");
                    ModuleCtrl.setDatabaseSettings(packageData, installData, installer);
                    installData.setDatabaseAnalyzed(true);
                    ModuleCtrl.setDontUninstallFlags(packageData);
                    if ( installData.isRootInstallation() ) { ModuleCtrl.setDontUninstallUserInstallOnylFlags(packageData); }
                    ModuleCtrl.setParentDefaultModuleSettings(packageData);
                    getSetupFrame().setButtonEnabled(true, getSetupFrame().BUTTON_NEXT);
                    getSetupFrame().setButtonSelected(getSetupFrame().BUTTON_NEXT);
                }
            }
View Full Code Here

Examples of org.openoffice.setup.InstallData

    }

    static public void prepareUninstallation() {
        // additional tasks for uninstallation
        // Directory destDir has to exist!
        InstallData data = InstallData.getInstance();
        File destDir = new File(data.getInstallDefaultDir(), data.getProductDir());
        boolean directoryExists = true;

        if ( ! destDir.exists() ) {
            try {
                directoryExists = SystemManager.create_directory(destDir.getPath());
            }
            catch (SecurityException ex) {
                String message = ResourceManager.getString("String_ChooseDirectory_No_Write_Access") + ": " + destDir.getPath();
                String title = ResourceManager.getString("String_Error");
                Informer.showErrorMessage(message, title);
            }
        }

        if ( directoryExists ) {
            String setupPath = copySourceFile("setup");
            SystemManager.setUnixPrivileges(setupPath, "775");
            File jarFile = data.getJarFilePath();
            copySourceFile(jarFile.getName());

            File uninstallDir = createUninstallDir();
            copyInstallDirectoryWithExtension(uninstallDir, "xpd", "xpd");
            copyInstallDirectoryWithExtension(uninstallDir, "html", "html");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.