[izpack-changes] r1549 - izpack-src/trunk/src/lib/com/izforge/izpack/panels

noreply at berlios.de noreply at berlios.de
Sun Aug 27 16:10:47 CEST 2006


Author: eppelman
Date: 2006-08-27 16:10:46 +0200 (Sun, 27 Aug 2006)
New Revision: 1549

Modified:
   izpack-src/trunk/src/lib/com/izforge/izpack/panels/ShortcutPanelAutomationHelper.java
Log:
Display uninstall information for automated installation on Console.

Modified: izpack-src/trunk/src/lib/com/izforge/izpack/panels/ShortcutPanelAutomationHelper.java
===================================================================
--- izpack-src/trunk/src/lib/com/izforge/izpack/panels/ShortcutPanelAutomationHelper.java	2006-08-27 13:47:06 UTC (rev 1548)
+++ izpack-src/trunk/src/lib/com/izforge/izpack/panels/ShortcutPanelAutomationHelper.java	2006-08-27 14:10:46 UTC (rev 1549)
@@ -181,7 +181,7 @@
             shortcuts.add(data);
         }
 
-        System.out.print("[ creating shortcuts ");
+        System.out.print("[ Creating shortcuts ");
 
         // ShortcutData data;
 
@@ -223,55 +223,48 @@
 
                 try
                 {
-                    // ----------------------------------------------
-                    // save the shortcut only if it is either not on
-                    // the desktop or if it is on the desktop and
-                    // the user has signalled that it is ok to place
-                    // shortcuts on the desktop.
-                    // ----------------------------------------------
-                    if ((data.type != Shortcut.DESKTOP) || ((data.type == Shortcut.DESKTOP)))
-                    {
-                        // save the shortcut
 
-                        System.out.print(".");
-                        System.out.flush();
+                    // save the shortcut
 
-                        shortcut.save();
+                    System.out.print(".");
+                    System.out.flush();
 
-                        // add the file and directory name to the file list
-                        String fileName = shortcut.getFileName();
-                        files.add(0, fileName);
+                    shortcut.save();
 
-                        File file = new File(fileName);
-                        File base = new File(shortcut.getBasePath());
-                        Vector intermediates = new Vector();
+                    // add the file and directory name to the file list
+                    String fileName = shortcut.getFileName();
+                    files.add(0, fileName);
 
-                        // String directoryName = shortcut.getDirectoryCreated ();
-                        execFiles.add(new ExecutableFile(fileName, ExecutableFile.UNINSTALL,
-                                ExecutableFile.IGNORE, new ArrayList(), false));
+                    File file = new File(fileName);
+                    File base = new File(shortcut.getBasePath());
+                    Vector intermediates = new Vector();
 
-                        files.add(fileName);
+                    // String directoryName = shortcut.getDirectoryCreated ();
+                    execFiles.add(new ExecutableFile(fileName, ExecutableFile.UNINSTALL,
+                            ExecutableFile.IGNORE, new ArrayList(), false));
 
-                        while ((file = file.getParentFile()) != null)
-                        {
-                            if (file.equals(base))
-                            {
-                                break;
-                            }
+                    files.add(fileName);
 
-                            intermediates.add(file);
+                    while ((file = file.getParentFile()) != null)
+                    {
+                        if (file.equals(base))
+                        {
+                            break;
                         }
 
-                        if (file != null)
-                        {
-                            Enumeration filesEnum = intermediates.elements();
+                        intermediates.add(file);
+                    }
 
-                            while (filesEnum.hasMoreElements())
-                            {
-                                files.add(0, filesEnum.nextElement().toString());
-                            }
+                    if (file != null)
+                    {
+                        Enumeration filesEnum = intermediates.elements();
+
+                        while (filesEnum.hasMoreElements())
+                        {
+                            files.add(0, filesEnum.nextElement().toString());
                         }
                     }
+
                 }
                 catch (Exception exception)
                 {}
@@ -308,15 +301,18 @@
         {
             cannot.printStackTrace();
         }
+        System.out.println(" done. ]");
+        System.out.print("[ Add shortcuts to uninstaller ");
 
         UninstallData uninstallData = UninstallData.getInstance();
 
         for (int i = 0; i < files.size(); i++)
         {
             uninstallData.addFile((String) files.elementAt(i));
+            System.out.print(".");
+            System.out.flush();
         }
 
-        // /////parent.unlockNextButton();
         System.out.println(" done. ]");
 
         return true;




More information about the izpack-changes mailing list