|
|
#1 |
|
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? |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
You can use the Banner plug-in.
Stu |
|
|
|
|
|
#3 |
|
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. |
|
|
|
|
|
#4 |
|
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'?
|
|
|
|
|
|
#5 |
|
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.
|
|
|
|
|
|
#6 |
|
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.
|
|
|
|
|
|
#7 |
|
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. |
|
|
|
|
|
#8 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
|
|
|
|
|
|
#9 |
|
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. |
|
|
|
|
|
#10 |
|
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? |
|
|
|
|
|
#11 |
|
Moderator
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 |
|
|
|
|
|
#12 |
|
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.
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|