Archive: Help on splash screen and file initialization


Help on splash screen and file initialization
Hi, I'm a new user to NSIS since reviously I'm using INNO. I have no background on C or C++ programming. So a sample code would be helpful.

I have a custom page which will load RTF file and show information about the application that I'm installing. This I'm using the 'LoadRTF.nsh' plugin. Now my problem is, how can I embed and extract the RTF file to temporary directory before all the page load using a splash screen initializing progress display like Winamp installer?


You can use the Banner plug-in.

Stu


Thanks for the advice. I have tested the following banner plug-ins.
- EBanner
- NewAdvSplash
- SpiderBanner

The closest to what I wanted is SpiderBanner. I'll have to run install page for single section then only go to welcome screen. That I'll try to figure up. Thanks for the idea.

If possible I want to do something like the attachment image.


I think I found something using "WinMessages.nsh" on examples folder for "Banner.dll". The banner.dll plugin can use to show that loading page. Now next problem is how to embed RTF file and read the embeded RTF using 'LoadRTF.nsh'?


Embedding RTF has been asked about many times before. IIRC you can use a license page for that. But search the forums, you'll find it.


Using license page already tried. The problem is the display text box for RTF file is too small. Therefore I use my own custom page that consist only single text box to 100% width and height to show the RTF information.


Setup your Temporary folder by using:

SetOutPath "$TEMP\DirectoryOfYourChoice"

You can include your file to be packaged by adding

File "Path\To\Your\File.rtf"

In my scripts, I have those two lines in my Function .onInit, the files are extracted and available in my temp directory while the program initializes and are ready immediately for use on my pages (or even splash screen)

I also add:

Function .onGUIEnd
RMDir /r /REBOOTOK "$TEMP\DirectoryOfYourChoice"
FunctionEnd

This will delete the temp files when your installer exits.


Originally posted by crystalcoder
Thanks for the advice. I have tested the following banner plug-ins.
- EBanner
- NewAdvSplash
- SpiderBanner
I specifically said the Banner plug-in, because it comes with NSIS.

Stu

To: Zizzzzy
Thanks! It works! Didn't know the 'File' command can be use within function. Thought that is only usable in section

To: Afrow UK
Thanks a lot for the reminder. I actually realized after my #3 post and replied at #4. But that didn't solve the embedding and extacting the RTF file that I wanted.


Sorry to ask another question, since I'm totally beginner in C or C++.

How to specify or define a boolean? After that how to change the value or even comparing it using ${if}?

Specifying it will be using or passing parameter
Var MyBoolean

Now how do I set or change this boolean and then compare?


There are no data types as such in NSIS (all variables are strings) so the Boolean value is up to you. It can be "1" or "true" or "yes" (or whatever).

Edit: To set, use StrCpy.

Stu


Thanks a lot! I know about StrCpy and StrCmp. So strings value is fine for me as I'm using it by default. Just wondering it only.