Archive: Large setup initializing


Large setup initializing
Hello all,

When I run my installer (it's a big file: 1.5Gb)on Vista there is a displayed message indicating to wait with a percentage, so it's a good thing. But on XP system, I have to wait a time (around 1 or 2 minutes) before having this message, is there a way to have this message displayed as soon as I have run the setup without any wait time (like on my vista system) ?
[edit] It's for a wab distribution, so I don't want to use a disk spanning system, I'd like to have only one file to download[/edit]


I think if you see that message at startup it indicates there is something wrong with your installer! Usually your installer should startup (almost) immediately, even if it's very large. Make sure you use "ReserveFile" to reserve all plugins you use and all other files that are extracted "out of order" (not in the order they appear in the script). For example extracting files in your ".onInit" function can cause problem, if that function is located after the install sections in your script. Those files would be extracted immediately when your installer starts up, but they would have been added at the very end of the installer's data block. Obviously it will take a very long time to extract, making the installer startup sloooow! The bigger the installer, the slower it will start up. Reserving those files at the beginning of your installer script (using ReserveFile) solves the problem once and for all...


oops, I'm new with NSIS and I didn't use the reservefile. I will add them and test.

Just a question, I knwo that I have to add the picture I use for the setup. But I have alsoo seen that I have to add some of the dll used by NSIS plugin. I have used The modernui plugin and also the advsplash, so what dll have I to add?
[edit]The AdvSplash.dll I guess, but for the others I don't know...[/edit]


Argh, it's still not working

I use the LZMA compression (non solid)

And here comes the beginning of my script, if someone can tell me what to add in the reserve file... Many thanks in advance

ReserveFile "e:\zipper\setup makers\ressources\setup_debut.bmp"
ReserveFile "e:\zipper\setup makers\ressources\setup_background.bmp"
ReserveFile "e:\zipper\setup makers\ressources\setup_wiz.bmp"
ReserveFile "e:\zipper\setup makers\ressources\license.rtf"
ReserveFile "${NSISDIR}\Contrib\Graphics\Icons\win-install.ico"
ReserveFile "${NSISDIR}\Plugins\AdvSplash.dll"
ReserveFile "${NSISDIR}\Plugins\BgImage.dll"

!include MUI2.nsh

Var StartMenuFolder

Name "test_project"

OutFile "test_project.exe"

InstallDir $PROGRAMFILES\test_project

InstallDirRegKey HKCU "Software\test\test_project" ""

RequestExecutionLevel user

;-------------------------------- INIT
Function .onInit

SetOutPath $TEMP
File /oname=spltmp.bmp "e:\zipper\setup makers\ressources\setup_debut.bmp"

advsplash::show 2000 600 600 -1 $TEMP\spltmp

Pop $0

Delete $TEMP\spltmp.bmp

FunctionEnd
;--------------------------------GuiIninit
Function ZGUIInit

BgImage::SetBg /NOUNLOAD /FILLSCREEN "e:\zipper\setup makers\ressources\setup_background.bmp"
CreateFont $R0 "Verdana" 50 700
BgImage::AddText /NOUNLOAD "E.Y.E" $R0 0 0 0 48 48 798 198
BgImage::AddText /NOUNLOAD "E.Y.E" $R0 255 255 255 50 50 800 200
BgImage::Redraw /NOUNLOAD

FunctionEnd

--------------------------------SUCCESS
Function .onInstSuccess
SetOutPath $TEMP
File /oname=spltmp.bmp "e:\zipper\setup makers\ressources\setup_wiz.bmp"

advsplash::show 2000 600 600 -1 $TEMP\spltmp

Pop $0 ; $0 has '1' if the user closed the splash screen early,
; '0' if everything closed normally, and '-1' if some error occurred.

Delete $TEMP\spltmp.bmp

FunctionEnd


!define MUI_ABORTWARNING
!define MUI_CUSTOMFUNCTION_GUIINIT ZGuiInit
!define MUI_PAGE_HEADER_TEXT "Test installation"
!define MUI_PAGE_HEADER_SUBTEXT "1"
!define MUI_LICENSEPAGE_BUTTON "I agree"
!define MUI_FINISHPAGE_RUN "$INSTDIR\Test.exe"
!define MUI_FINISHPAGE_RUN_TEXT "Run now"
!define MUI_FINISHPAGE_RUN_NOTCHECKED
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\manual.pdf"
!define MUI_FINISHPAGE_SHOWREADME_TEXT "manual (PDF format)"
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
!define MUI_FINISHPAGE_LINK "http://www.test.com"
!define MUI_FINISHPAGE_LINK_LOCATION "http://www.test.com"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\win-uninstall.ico"
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\win-install.ico"

!insertmacro MUI_PAGE_LICENSE "e:\zipper\setup makers\ressources\license.rtf"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH


!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES


Does the Vista message show with CRCCheck off? If so then it's built in to Vista and not something you will have on XP.

One option you have is to have a launcher but you will need two files then of course.

Stu


Thanks for your answer, having several files is a real problem for me to make my setup downloadable.

The message isn't displayed with the CRCCheck off (so it's the crc message, you can see a screen of the message attached). But I don't understand why it is displayed as soon as I run the exe on vista and some minutes later in XP (tested on several machines).

So is there a difference between the work of the setup on vista and XP?
How can I fix my problem, so how to make the message being displayed as soon as I run the exe on XP too (with only one file)?

Because at this time, the long waiting time on XP before displaying anything can let thinking the setup is not working (even if it's not the case).


I've seen long delays like you describe caused by the antivirus program. It tries to scan the NSIS installer for viruses, and may take some time before it permits it to execute. You said your installer is 1.5 GB. Do smaller installers open faster? How much memory is in your XP system, and do you have an antivirus program running?

My home XP system did very slow virus checks until I upgraded the memory from .5 GB to 2 GB.

Don


In XP it could be down to network unconnectivity (i.e. disconnected mapped drives), anti virus software, lack of disk space, NTFS compression, indexing service etc. Either way in my experience I have never seen a setup take over 1 minute to open as far as I can remember unless it is from over a network.

Stu


I have just tred after having disabled my antivirus and I still have the problem. All the XP system on which I have tested have 4Gb


Sorry I have answered before seeing your answer Afrow. Setup are not run via the network. I will finally tried with a disk spanning setup (as soon as I find how do it with nsis) and will put all files in an autoextractible zip...