This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I have enclosed a proposed patch for the following issues: 1. Corrected comment for UPDATE_MAIN_DIR member; 2. Corrected the assignment for mainargs in MainConfig class; 3. Adding the size files under main/ to totallength and also update progress bar when these files are extracted. I believe this patch is needed to keep the length and progress accurate. This is especially important when external installer contains large files. I have began relying on this new feature, and have tested the patches in my project and they work as expected now. Please let me know if this patch is acceptable. I just want to say once again that this external installer new feature is COOOL! Thanks, Jun Index: ModuleUpdater.java =================================================================== RCS file: /cvs/autoupdate/libsrc/org/netbeans/updater/ModuleUpdater.java,v retrieving revision 1.15 diff -c -r1.15 ModuleUpdater.java *** ModuleUpdater.java 2001/03/09 10:36:35 1.15 --- ModuleUpdater.java 2001/03/15 21:59:56 *************** *** 58,64 **** /** The name of zip entry containing java_extension files */ public static final String UPDATE_JAVA_EXT_DIR = "java_ext"; // NOI18N ! /** The name of zip entry containing java_extension files */ public static final String UPDATE_MAIN_DIR = "main"; // NOI18N /** Absolut name of directory where are external installers*/ --- 58,64 ---- /** The name of zip entry containing java_extension files */ public static final String UPDATE_JAVA_EXT_DIR = "java_ext"; // NOI18N ! /** The name of zip entry containing files for external installer */ public static final String UPDATE_MAIN_DIR = "main"; // NOI18N /** Absolut name of directory where are external installers*/ *************** *** 176,183 **** checkStop(); if ( ( entry.getName().startsWith( UPDATE_NETBEANS_DIR ) || ! entry.getName().startsWith( ModuleUpdater.UPDATE_JAVA_EXT_DIR ) ) && ! !entry.isDirectory() ) { totalLength += entry.getSize(); } } --- 176,184 ---- checkStop(); if ( ( entry.getName().startsWith( UPDATE_NETBEANS_DIR ) || ! entry.getName().startsWith( ModuleUpdater.UPDATE_JAVA_EXT_DIR ) || ! entry.getName().startsWith( UPDATE_MAIN_DIR) ) && ! !entry.isDirectory() ) { totalLength += entry.getSize(); } } *************** *** 280,285 **** --- 281,288 ---- destFile.getParentFile ().mkdirs (); hasMainClass = true; copyStreams( jarFile.getInputStream( entry ), new FileOutputStream( destFile ) ); + bytesRead += entry.getSize(); + UpdaterFrame.setProgressValue( bytesRead ); } } if ( hasMainClass ) { *************** *** 585,591 **** else parameters = parameters + " " + mainclass; ! mainargs = details.getProperty(PAR_JVMPAR,null); if (mainargs != null) parameters = parameters + " " + mainargs; --- 588,594 ---- else parameters = parameters + " " + mainclass; ! mainargs = details.getProperty(PAR_MAINARGS,null); if (mainargs != null) parameters = parameters + " " + mainargs;
Thanks for proposed patch! It's correct and I fixed it in dev and 3.2 builds. Fix will be in next build. Ales
Fixed