Skip to content
⌘ NSIS Forum Archive

Progress message dialog box 'unpacking data' doesnt show before setup loads

36 posts

Guest#

Progress message dialog box 'unpacking data' doesnt show before setup loads

Hi there,

I have made an installer which is 50 MB compressed and upon execution it show the message box "please wait while setup is loading... Initilizing setup 15 % "

but the main thing is it doesnt show the other progress message box "please wait while setup is loading... unpacking data 20 % "

My installer takes around 20 secs to unpack and doesnt show this mesaage while unpacking. I know it shows this msg as it showed it in my previous versions but not the latest.

20 secs without anything on the screen by the installer makes people think their system has hanged as mouse moves slowly too due to high CPU usage while unpacking.

For some reason I cant get the Splash screen to work too.

heres my .oninit code :



"Function .onInit
Call CheckSP2

SetOutPath $TEMP
File /oname=splash.bmp "files\data\splash.bmp"

advsplash::show 5000 600 400 -1 "$TEMP\splash.bmp"
Pop $0 ; $0 has '1' if the user closed the splash screen early, '0' if everything closed normal, and '-1' if some error occured.

Push $0

!insertmacro MUI_LANGDLL_DISPLAY

SetOutPath $PLUGINSDIR

WriteINIStr "$PLUGINSDIR\ioFile2.ini" "Settings" "NumFields" "1"

WriteINIStr "$PLUGINSDIR\ioFile2.ini" "Field 1" "Type" "Droplist"
WriteINIStr "$PLUGINSDIR\ioFile2.ini" "Field 1" "Flags" "NOTIFY"
WriteINIStr "$PLUGINSDIR\ioFile2.ini" "Field 1" "Left" "10"
WriteINIStr "$PLUGINSDIR\ioFile2.ini" "Field 1" "Right" "-122"
WriteINIStr "$PLUGINSDIR\ioFile2.ini" "Field 1" "Top" "84"
WriteINIStr "$PLUGINSDIR\ioFile2.ini" "Field 1" "ListItems" "$9"
WriteINIStr "$PLUGINSDIR\ioFile2.ini" "Field 1" "State" "$filename"

File "bassmod.dll"
File /nonfatal "music\*.xm"
File /nonfatal "music\*.mod"

Push "*.xm"
Call ListFiles
Push "*.mod"
Call ListFiles

Call CreateMODPage

Call BASSMOD_Init
Call BASSMOD_MusicLoad
Call BASSMOD_MusicGetName
Call BASSMOD_MusicPlay
FunctionEnd

Function CheckSP2
ReadRegStr $R3 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CSDVersion
StrCmp "$R3" "Service Pack 2" 0 +2
Return
MessageBox MB_OK "You do not have Windows XP Service Pack 2 installed.$\n$\n Make sure to choose the 'Extract Files Only' install type on the components page."
FunctionEnd"


Could someone tell me what to do here?
Guest#
The splash screen deosnt really matter to me, I just want the inbuilt Progress message box "please wait while setup is loading... UNPACKING DATA 20 %" to come back.

why has that gone away?

Is it because of the new version of Nsis 2.02?
kichik#
It should show. I don't know why it doesn't show anymore, I'll check it out.

In any case, you really should use ReserveFile so your setup will load faster.
Guest#
The only part effecting the unpacking data msg box would be in the .oninit function right?

Do you have Nsis 2.0 ? I would like to compile with that.
kichik#
Yes, .onInit should be the only function that affects the showing of that dialog. NSIS 2.0 can be downloaded from the project page:

kichik#
OK, I have looked at it and found out that everything works as should. When using solid compression, the dialog will show. Solid compression is enabled by default for bzip2 and lzma.

The problem with your script is that you extract very large files in .onInit. That's a bad idea. If you're doing that, you should at least use the Banner plug-in to show a message to the user.
Guest#
The banner plug in replaces this dialog, but I think as this dialog isnt being shown, it wont show the banner too.

I would still like to have the orignal dialog over the banner as it shows the progress.

Is there a way I can get the dialog back?

and you said having the files unpack at .oninit is a bad idea. Is there a way to change that? like can I have it unpack the selected components only at the install page?
kichik#
It will show the banner, if you use it.

You can use solid compression (SetCompressor bzip2 or SetCompressor lzma) to get back the dialog.

To unpack the files only in the install page, unpack them in a section. Each visible section is a component in the components page, and only the selected components will execute the code in their sections.
Guest#
This part of code is already there in my script :

SetCompressor lzma ;7-Zip
SetCompress force
SetDatablockOptimize on
SetCompressorDictSize 64

I do have quite a few sections and Subsections. How do I make it unpack in sections if selected?
kichik#
Use the File command in the sections to have it unpack the files in the sections. For example:
Section
File test.exe
SectionEnd
Guest#
Thanx.. will look into implementing that.

But how do I get the splash screen to show up?

What is the reason for that dialog not showing up? If for some reason I cant use the 'file' command with the other command (upgradefile) im already using.
Afrow UK#
Just speeds up the loading process as it puts your files at the top of the 'files to extract' list.

-Stu
kichik#
To get the progress dialog back, you need to use solid compression. You must have overriden the lzma setting later in the script or using MakeNSISw.
Guest#
Im sure I've not overridden the lzma compression later in the script.

or using MakeNSISw
What did u mean here?
kichik#
MakeNSISw has an option to override the compression. It is also possible you've downloaded the special build with solid compression disabled. To make sure you haven't, run makensis with the /HDRINFO switch and look for NSIS_BZIP2_COMPRESS_WHOLE. If it's there, you don't have the special build.
Guest#
I typed makensis /hrdinfo in command prompt got some error.

Or am I doing something wrong here?
Guest#
Should I send you my script so you can have a look why the dialog doesnt show? Its quite small, wouldnt take you a minute to go through it.
Guest#
The files are pretty big, and theres more to this before compiling. If we cud do this over and messenger u use, it wud be better.