Old 23rd July 2007, 15:12   #1
wheleph
Junior Member
 
Join Date: Jul 2007
Location: Kiev, Ukraine
Posts: 12
unzip

I need to unpack zip archive during installation. How to reflect the progress of extracting files in progress bar?
wheleph is offline   Reply With Quote
Old 23rd July 2007, 17:39   #2
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
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

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 24th July 2007, 06:47   #3
wheleph
Junior Member
 
Join Date: Jul 2007
Location: Kiev, Ukraine
Posts: 12
The problem is not to draw a progress bar but to tie it to unpacking process
wheleph is offline   Reply With Quote
Old 24th July 2007, 08:55   #4
empezar
Senior Member
 
empezar's Avatar
 
Join Date: Sep 2003
Posts: 123
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.

Bored with the real world? Try QuakeWorld!
empezar is offline   Reply With Quote
Old 24th July 2007, 10:02   #5
wheleph
Junior Member
 
Join Date: Jul 2007
Location: Kiev, Ukraine
Posts: 12
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
wheleph is offline   Reply With Quote
Old 25th July 2007, 14:58   #6
wheleph
Junior Member
 
Join Date: Jul 2007
Location: Kiev, Ukraine
Posts: 12
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.
wheleph is offline   Reply With Quote
Old 25th July 2007, 15:07   #7
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Old 2nd August 2007, 17:31   #8
pgg1
Senior Member
 
Join Date: Jul 2007
Location: Piccadilly, London
Posts: 132
Unhappy 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?
pgg1 is offline   Reply With Quote
Old 2nd August 2007, 17:46   #9
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
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"

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 3rd August 2007, 09:27   #10
pgg1
Senior Member
 
Join Date: Jul 2007
Location: Piccadilly, London
Posts: 132
Ok thanks, I'll give that a whirl.
pgg1 is offline   Reply With Quote
Old 4th July 2008, 12:13   #11
wheleph
Junior Member
 
Join Date: Jul 2007
Location: Kiev, Ukraine
Posts: 12
Another workaround from Nsisunz plugin wiki (http://nsis.sourceforge.net/Nsisunz_plug-in):

code:

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.
wheleph is offline   Reply With Quote
Old 4th July 2008, 13:20   #12
zeeh3
Senior Member
 
Join Date: Aug 2005
Posts: 121
Maybe Nwiz plug-in is another good option.
zeeh3 is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump