changeset 4007:7fa0244ee54e

Backed out changeset dce4c708d955
author mhowe
date Wed, 12 Jun 2013 14:56:27 -0700
parents dce4c708d955
children 0809810d0ae1
files deploy/packager/src/com/sun/javafx/tools/packager/bundlers/LinuxDebBundler.java deploy/packager/src/com/sun/javafx/tools/resource/linux/template.control
diffstat 2 files changed, 3 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/deploy/packager/src/com/sun/javafx/tools/packager/bundlers/LinuxDebBundler.java	Sun Jun 09 22:28:27 2013 -0700
+++ b/deploy/packager/src/com/sun/javafx/tools/packager/bundlers/LinuxDebBundler.java	Wed Jun 12 14:56:27 2013 -0700
@@ -36,10 +36,6 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.Writer;
-import java.nio.file.DirectoryStream;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -281,30 +277,6 @@
             }
         }
     }
-    
-    private long getInstalledSizeKB() {
-        return getInstalledSizeKB(Paths.get(appImageRoot.toURI())) >> 10;
-    }
-
-    private long getInstalledSizeKB(Path dir) {
-        long count = 0;
-        try {
-            DirectoryStream<Path> stream = Files.newDirectoryStream(dir);
-            try {
-                for (Path p : stream) {
-                    if (Files.isRegularFile(p)) {
-                        count += Files.size(p);
-                    } else if (Files.isDirectory(p)) {
-                        count += getInstalledSizeKB(p);
-                    }
-                }
-            } finally {
-                stream.close();
-            }
-        } catch (IOException ignore) {
-        }
-        return count;
-    }    
 
     private boolean prepareProjectConfig() throws IOException {
         Map<String, String> data = new HashMap<String, String>();
@@ -329,8 +301,7 @@
                 params.licenseType != null ? params.licenseType : "unknown");
         data.put("APPLICATION_LICENSE_TEXT", getLicenseText());
         data.put("APPLICATION_ARCH", getArch());
-        data.put("APPLICATION_INSTALLED_SIZE", Long.toString(getInstalledSizeKB()));
- 
+
         //prepare control file
         Writer w = new BufferedWriter(new FileWriter(getConfig_ControlFile()));
         String content = preprocessTextResource(
@@ -361,7 +332,7 @@
                 "DEB copyright file", DEFAULT_COPYRIGHT_TEMPLATE, data);
         w.write(content);
         w.close();
-        
+
         //prepare desktop shortcut
         w = new BufferedWriter(new FileWriter(getConfig_DesktopShortcutFile()));
         content = preprocessTextResource(
--- a/deploy/packager/src/com/sun/javafx/tools/resource/linux/template.control	Sun Jun 09 22:28:27 2013 -0700
+++ b/deploy/packager/src/com/sun/javafx/tools/resource/linux/template.control	Wed Jun 12 14:56:27 2013 -0700
@@ -6,4 +6,4 @@
 Architecture: APPLICATION_ARCH
 Provides: APPLICATION_NAME  
 Description: APPLICATION_SUMMARY
-Installed-Size: APPLICATION_INSTALLED_SIZE
+