Archive: unzip


unzip
I need to unpack zip archive during installation. How to reflect the progress of extracting files in progress bar?


Surely there are several ways to do that, one I could think about is by hiding installer window and using nxs plugin.

http://nsis.sourceforge.net/Nxs_plug-in


The problem is not to draw a progress bar but to tie it to unpacking process


I'm having this problem as well. My users think the installer has crashed when it unzips large zip files, since nothing really happens until it's done.


To emulate the progress I use http://nsis.sourceforge.net/RealProgress_plug-in increasing percentage say 1% a second to show that my installer has not crashed. But this is just not very good workaroud


To be short:
try File /r.

The story:
I didn't know that File instruction support /r function. NSIS installer is run by ant script automatically in my project. And when I add a new file to it I thought that I need to modify my .nsi file. It's certainly unacceptable. That's why I put .war file in my installer and unpacked it on user's computer. Now I have no need to do this.

But I still think that in some cases such plugin may be useful.


It would be better to write another NSIS installer executable to generate the NSIS code for you. I plan on writing such today if I have time.

Stu


Installing files
Has anybody found a solution yet? I am in the same predicament. I need to unpack a load of stuff and wish to do it within the progress bar of the following page:
!insertmacro MUI_UNPAGE_INSTFILES.

Can it be done?


It can be done, the problem is when unpacking the zip the progress bar does not show any activity which doesn't look nice especially if the zip is big and needs some time to unpack.

For my opinion a simple solution is to pop up that small banner using banner plugin saying e.g. "Please wait while unpacking data"


Ok thanks, I'll give that a whirl.


Another workaround from Nsisunz plugin wiki (http://nsis.sourceforge.net/Nsisunz_plug-in):


InitPluginsDir
; Call plug-in. Push filename to ZIP first, and the dest. folder last.
nsisunz::UnzipToLog "$PLUGINSDIR\myzipfile.zip" "$INSTDIR"

; Always check result on stack
Pop $0
StrCmp $0 "success" ok
DetailPrint "$0" ;print error message to log
ok:


Thus progress bar is still not dirigible but log window lists the files been unpacked and users will not think that installer hangs.

Maybe Nwiz plug-in is another good option.