|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
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? |
|
|
|
#2 |
|
Senior Member
Join Date: Mar 2004
Posts: 138
|
Using ReserveFile
|
|
|
|
|
|
#3 |
|
Guest
Posts: n/a
|
Could u tell me how to go about it? I saw it in the manual but it kinda confused me.
|
|
|
|
#4 |
|
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? |
|
|
|
#5 |
|
M.I.A.
[NSIS Dev, Mod] 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 |
|
|
|
|
|
#6 |
|
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. |
|
|
|
#7 |
|
M.I.A.
[NSIS Dev, Mod] 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 |
|
|
|
|
|
#8 |
|
M.I.A.
[NSIS Dev, Mod] 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 |
|
|
|
|
|
#9 |
|
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? |
|
|
|
#10 |
|
M.I.A.
[NSIS Dev, Mod] 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 |
|
|
|
|
|
#11 |
|
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? |
|
|
|
#12 |
|
M.I.A.
[NSIS Dev, Mod] 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: NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#13 |
|
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. |
|
|
|
#14 |
|
Guest
Posts: n/a
|
Would using Reservefile get it back or just speed up the loading process?
|
|
|
|
#15 |
|
Moderator
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 |
|
|
|
|
|
#16 |
|
M.I.A.
[NSIS Dev, Mod] 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 |
|
|
|
|
|
#17 | |
|
Guest
Posts: n/a
|
Im sure I've not overridden the lzma compression later in the script.
Quote:
|
|
|
|
|
#18 |
|
M.I.A.
[NSIS Dev, Mod] 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 |
|
|
|
|
|
#19 |
|
Guest
Posts: n/a
|
I typed makensis /hrdinfo in command prompt got some error.
Or am I doing something wrong here? |
|
|
|
#20 |
|
M.I.A.
[NSIS Dev, Mod] 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 |
|
|
|
|
|
#21 |
|
Guest
Posts: n/a
|
yes 'NSIS_BZIP2_COMPRESS_WHOLE' is there
|
|
|
|
#22 |
|
M.I.A.
[NSIS Dev, Mod] 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 |
|
|
|
|
|
#23 |
|
Guest
Posts: n/a
|
"defined in script/compiler default"
|
|
|
|
#24 |
|
M.I.A.
[NSIS Dev, Mod] 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 |
|
|
|
|
|
#25 |
|
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.
|
|
|
|
#26 |
|
Guest
Posts: n/a
|
Yes, but with a slightly different script
|
|
|
|
#27 |
|
M.I.A.
[NSIS Dev, Mod] 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 |
|
|
|
|
|
#28 |
|
Guest
Posts: n/a
|
Do u use msn? I'll send them to you over msn
|
|
|
|
#29 |
|
M.I.A.
[NSIS Dev, Mod] 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 |
|
|
|
|
|
#30 |
|
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.
|
|
|
|
#31 |
|
Guest
Posts: n/a
|
You could block and delete me right after we get through this.
|
|
|
|
#32 |
|
M.I.A.
[NSIS Dev, Mod] 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 |
|
|
|
|
|
#33 |
|
Junior Member
Join Date: Nov 2004
Posts: 2
|
sent ya a PM
|
|
|
|
|
|
#34 |
|
M.I.A.
[NSIS Dev, Mod] 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 |
|
|
|
|
|
#35 |
|
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
|
|
|
|
|
|
#36 |
|
M.I.A.
[NSIS Dev, Mod] 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 |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|