Old 14th February 2012, 11:42   #1
crystalcoder
Junior Member
 
Join Date: Feb 2012
Posts: 7
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?
crystalcoder is offline   Reply With Quote
Old 14th February 2012, 14:25   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
You can use the Banner plug-in.

Stu
Afrow UK is offline   Reply With Quote
Old 15th February 2012, 11:38   #3
crystalcoder
Junior Member
 
Join Date: Feb 2012
Posts: 7
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.
Attached Thumbnails
Click image for larger version

Name:	SplashLoading.gif
Views:	149
Size:	2.8 KB
ID:	49453  
crystalcoder is offline   Reply With Quote
Old 15th February 2012, 12:16   #4
crystalcoder
Junior Member
 
Join Date: Feb 2012
Posts: 7
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'?
crystalcoder is offline   Reply With Quote
Old 15th February 2012, 12:53   #5
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
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.
MSG is offline   Reply With Quote
Old 15th February 2012, 13:44   #6
crystalcoder
Junior Member
 
Join Date: Feb 2012
Posts: 7
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.
crystalcoder is offline   Reply With Quote
Old 15th February 2012, 17:51   #7
Zizzzzy
Junior Member
 
Join Date: Feb 2012
Posts: 3
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.
Zizzzzy is offline   Reply With Quote
Old 15th February 2012, 18:07   #8
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Quote:
Originally Posted by crystalcoder View Post
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
Afrow UK is offline   Reply With Quote
Old 15th February 2012, 20:13   #9
crystalcoder
Junior Member
 
Join Date: Feb 2012
Posts: 7
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.
crystalcoder is offline   Reply With Quote
Old 15th February 2012, 21:22   #10
crystalcoder
Junior Member
 
Join Date: Feb 2012
Posts: 7
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?
crystalcoder is offline   Reply With Quote
Old 15th February 2012, 21:31   #11
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Old 15th February 2012, 21:42   #12
crystalcoder
Junior Member
 
Join Date: Feb 2012
Posts: 7
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.
crystalcoder 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