Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 19th November 2004, 01:51   #1
evilvoice
Guest
 
Posts: n/a
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?
  Reply With Quote
Old 19th November 2004, 05:45   #2
bluenet
Senior Member
 
Join Date: Mar 2004
Posts: 138
Using ReserveFile
bluenet is offline   Reply With Quote
Old 19th November 2004, 09:11   #3
evilvoice
Guest
 
Posts: n/a
Could u tell me how to go about it? I saw it in the manual but it kinda confused me.
  Reply With Quote
Old 19th November 2004, 09:38   #4
evilvoice
Guest
 
Posts: n/a
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?
  Reply With Quote
Old 19th November 2004, 10:39   #5
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 19th November 2004, 10:56   #6
evilvoice
Guest
 
Posts: n/a
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.
  Reply With Quote
Old 19th November 2004, 11:01   #7
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Yes, .onInit should be the only function that affects the showing of that dialog. NSIS 2.0 can be downloaded from the project page:

http://sf.net/projects/nsis

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 19th November 2004, 11:47   #8
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 19th November 2004, 12:25   #9
evilvoice
Guest
 
Posts: n/a
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?
  Reply With Quote
Old 19th November 2004, 12:30   #10
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 19th November 2004, 13:04   #11
evilvoice
Guest
 
Posts: n/a
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?
  Reply With Quote
Old 19th November 2004, 13:31   #12
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Use the File command in the sections to have it unpack the files in the sections. For example:
code:
Section
File test.exe
SectionEnd


NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 19th November 2004, 18:13   #13
evilvoice
Guest
 
Posts: n/a
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.
  Reply With Quote
Old 19th November 2004, 18:15   #14
evilvoice
Guest
 
Posts: n/a
Would using Reservefile get it back or just speed up the loading process?
  Reply With Quote
Old 19th November 2004, 18:48   #15
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Just speeds up the loading process as it puts your files at the top of the 'files to extract' list.

-Stu
Afrow UK is offline   Reply With Quote
Old 19th November 2004, 19:03   #16
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 19th November 2004, 19:16   #17
evilvoice
Guest
 
Posts: n/a
Im sure I've not overridden the lzma compression later in the script.

Quote:
or using MakeNSISw
What did u mean here?
  Reply With Quote
Old 19th November 2004, 19:19   #18
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 19th November 2004, 19:50   #19
evilvoice
Guest
 
Posts: n/a
I typed makensis /hrdinfo in command prompt got some error.

Or am I doing something wrong here?
  Reply With Quote
Old 19th November 2004, 19:53   #20
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
It's /HDRINFO not /HRDINFO. You've mised up D and R.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 19th November 2004, 19:59   #21
evilvoice
Guest
 
Posts: n/a
yes 'NSIS_BZIP2_COMPRESS_WHOLE' is there
  Reply With Quote
Old 19th November 2004, 20:11   #22
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
And what about MakeNSISw? What is set in Tools->Settings?

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 19th November 2004, 20:24   #23
evilvoice
Guest
 
Posts: n/a
"defined in script/compiler default"
  Reply With Quote
Old 19th November 2004, 20:33   #24
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Did it show the dialog when you tried it with 2.0?

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 19th November 2004, 20:33   #25
evilvoice
Guest
 
Posts: n/a
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.
  Reply With Quote
Old 19th November 2004, 20:34   #26
evilvoice
Guest
 
Posts: n/a
Yes, but with a slightly different script
  Reply With Quote
Old 19th November 2004, 20:39   #27
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Yes, send in the script. I'll the files too so I can compile it.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 19th November 2004, 20:42   #28
evilvoice
Guest
 
Posts: n/a
Do u use msn? I'll send them to you over msn
  Reply With Quote
Old 19th November 2004, 20:44   #29
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
No. Send to kichik @ users dot sourceforge dot net.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 19th November 2004, 20:50   #30
evilvoice
Guest
 
Posts: n/a
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.
  Reply With Quote
Old 19th November 2004, 20:52   #31
evilvoice
Guest
 
Posts: n/a
You could block and delete me right after we get through this.
  Reply With Quote
Old 19th November 2004, 20:55   #32
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
I don't use it. If it's too big, upload it somewhere or find someway to reproduce it using standard files (include some big DLLs from Windows, for example).

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 19th November 2004, 21:13   #33
evilvoice
Junior Member
 
Join Date: Nov 2004
Posts: 2
sent ya a PM
evilvoice is offline   Reply With Quote
Old 20th November 2004, 14:21   #34
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
It turns out the "unpacking" progress dialog didn't show because of the usage of BGGradient. This happens because the unpacking dialog won't show if the NSIS dialog was already created. The gradient background window pretends to be the dialog for so it can be used as the parent of splash screens. Since it is created before .onInit, anything extract in .onInit won't have the "unpacking" dialog.

I have made the gradient background window stop pretending to be the dialog window. The background window is hidden while processing .onInit anyway so the script can make the installer silent without the window flashing.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 28th November 2004, 00:25   #35
evilvoice
Junior Member
 
Join Date: Nov 2004
Posts: 2
kichik, in my installer script I have used the setreboot flag, but even then at the finish page it doesnt show the option to reboot now or later. Could you have a look at it
evilvoice is offline   Reply With Quote
Old 30th November 2004, 17:58   #36
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
I have already deleted the script, so I can't test it on it. Try creating a minimal example reproducing the example. If you won't find the problem while creating the script, attach it and someone will surely be able to help.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik 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