Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 18th January 2008, 01:04   #1
arfgh
Member
 
Join Date: Mar 2007
Posts: 91
Problem with the banner !

Hi

i am still having visual problems using the banner plugin.

I have all the code into the .oninit
algo i use the getparameters function.
The problem is when i try tos how the banner, other nsis internal banner appears, and cause a so bad effect.
This internal banner tell something called "unpacking" or some like that.

The problem not appears if the main installer not size so much.

Please, can someone give a solution to make possible this nsis internall banner not appears ?


thx
arfgh is offline   Reply With Quote
Old 18th January 2008, 09:33   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
Make sure .onInit is defined on the top of the script.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 18th January 2008, 13:05   #3
arfgh
Member
 
Join Date: Mar 2007
Posts: 91
yes, it is


this problem with the banner come from older nsis versions too. I detect it one year ago.

And the problem of this internal banner is to cause a so bad effect, especially if we use the banner plugin.

Also i forgot to tell i am using lzma /solid compression.

I am sure must exist some way to prevent this internal banner to appears, but how ?
arfgh is offline   Reply With Quote
Old 18th January 2008, 13:09   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
.onInit must be on the top of the script to get rid of the internal banner. The internal banner is displayed when decompression has to be done before the installer is shown. This can happen when you're using solid compression and .onInit has to decompress files that don't belong to it from the solid block before it reaches the plug-ins/images/other files it needs. For example, the following script will trigger this banner.
code:
Section
File large_files\*
SectionEnd

Function .onInit
Banner::show test
FunctionEnd

To get around this, put .onInit before any other sections or instructions that may add content to the data block or use ReserveFile to make sure the files needed by .onInit are at the beginning of the data block.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 18th January 2008, 13:15   #5
arfgh
Member
 
Join Date: Mar 2007
Posts: 91
ok. This is how i have the nsis script...


Name blabla
!addplugindir blabla
OutFile blabla
SetCompressor /SOLID lzma
SetDatablockOptimize on
Icon blabla
InstalldirRegKey blabla

Function .onInit
Banner::show /NOUNLOAD blabla
Banner::getWindow /NOUNLOAD
Pop $0
Call showme
newadvsplash::show /NOUNLOAD 2000 0 500 -1 /BANNER blabla
Quit
FunctionEnd

Section
SectionEnd

Function showme
blabla...
FunctionEnd

Function GetParameters
blabla..
FunctionEnd


the section if empty, because i not need it.
the function called showme is to reposition the banner over the image the newadvsplash show
arfgh is offline   Reply With Quote
Old 18th January 2008, 13:23   #6
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
A stripped down script can't help here. The details which you've replaced with "blabla" are exactly the required details. Make sure everything you extract in anything that runs during .onInit is at the top of the data block with ResreveFile.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 18th January 2008, 13:27   #7
arfgh
Member
 
Join Date: Mar 2007
Posts: 91
you mean, i must specify all the files to extract on the top of the script ?
arfgh is offline   Reply With Quote
Old 18th January 2008, 13:33   #8
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
Only the files you need in .onInit and functions called by it. Remember this includes plug-ins.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 18th January 2008, 13:35   #9
arfgh
Member
 
Join Date: Mar 2007
Posts: 91
and this is the only possible way to disable the internal nsis banner to appears ? How is possible ? I thought exist soem procedure to disable it...
arfgh is offline   Reply With Quote
Old 18th January 2008, 13:40   #10
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
You can also use non-solid compression.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 18th January 2008, 13:41   #11
arfgh
Member
 
Join Date: Mar 2007
Posts: 91
yes i see that. The solid is who cause the anomaly. Who knows why. But i insist, must exist a way to prevent that to appears...
arfgh is offline   Reply With Quote
Old 18th January 2008, 13:46   #12
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
Solid compression triggers this for the reasons explained above. If you use file B that was compressed after file A in a code that runs before A was decompressed, both files must be decompressed before you can get to B.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 18th January 2008, 13:48   #13
arfgh
Member
 
Join Date: Mar 2007
Posts: 91
you mean... if i use the files by order, the internal banner not will come ?
arfgh is offline   Reply With Quote
Old 18th January 2008, 13:50   #14
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
Yes. That's what ReserveFile and putting .onInit on top are for.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 18th January 2008, 14:29   #15
arfgh
Member
 
Join Date: Mar 2007
Posts: 91
i am trying the Reversefile and at time i not got success. The internal banner still comes.

Also i found other solution. Is insert all the code into he Section and leave the .oninit. Then with the command "hidewindow" we can hide the installer screen, but the problem is that cause a popup. I mean the installer is showed, and then is hide. Is other ugly effect.
arfgh is offline   Reply With Quote
Old 27th January 2008, 13:42   #16
arfgh
Member
 
Join Date: Mar 2007
Posts: 91
Hey

i used the Reservefile command to reserve these files and prevent the installer show the ugly "upacking data" banner.

But i not got success.Somebody know a good way to prevent this banner to appears ? I need to use the /SOLID lzma compresion..
arfgh is offline   Reply With Quote
Old 27th January 2008, 16:51   #17
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
This is the only way. If it doesn't work, attach the script that exhibits the issue.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 30th January 2008, 12:16   #18
arfgh
Member
 
Join Date: Mar 2007
Posts: 91
ok, this is whole script
The internal makensis banner always appears on this part:

Delete $INSTdir\blabla.gif
Banner::show /NOUNLOAD 'BlaBla'
Banner::getWindow /NOUNLOAD
Pop $0
Call showme
newadvsplash::show /NOUNLOAD 2000 0 500 -1 /BANNER





The whole script


Name 'blabla'
!addplugindir 'C:\blabla\blabla'
OutFile 'C:\blabla.exe'
SetCompressor /SOLID lzma
SetDatablockOptimize on
Icon 'C:\blabla.ico'
InstalldirRegKey HKLM \
'Software\Microsoft\blabla\blabla\blabla' \
'blabla'

Function .onInit
Call GetParameters
StrCmp $2 'blabla' 0 +6
SetOutPath '$INSTdir\blabla\blabla'
File '/oname=blabla.bmp' 'C:\blabla.bmp'
File /oname=blabla.txt 'C:\blabla.txt'
Quit
Delete '$INSTdir\blabla\blabla.*'
SetOutPath '$INSTdir\blabla'
File /nonfatal 'C:\blabla.bmp'
ifsilent +9 0
File /oname=$INSTdir\blabla.gif 'C:\blabla.gif'
newadvsplash::show /NOUNLOAD 500 500 500 -2 $INSTdir\blabla.gif
Delete $INSTdir\blabla.gif
Banner::show /NOUNLOAD 'BlaBla'
Banner::getWindow /NOUNLOAD
Pop $0
Call showme
newadvsplash::show /NOUNLOAD 2000 0 500 -1 /BANNER '$INSTdir\blabla\blabla.bmp'
RmDir /r '$INSTDIR\blabla'
SetOutPath '$INSTdir\blabla\blabla'
File /r 'C:\blabla\*.*'
RmDir /r '$INSTDIR\blabla\blabla'
SetOutPath '$INSTdir\blabla\blabla'
File 'C:\blabla\*.*'
IfSilent +7 0
GetDlgItem $2 $0 1030
SendMessage $2 12 0 'STR:Work finished !'
Call showme
Banner::destroy
newadvsplash::wait
Quit
FunctionEnd


Section
SectionEnd

Function showme
IntOp $2 1 | 2
IntOp $2 $2 | 64
System::Call 'user32::SetWindowPos(i r0, i -1, i, i, i, i, i r2)'
Sleep 1000
FunctionEnd

Function GetParameters
Push $R0
Push $R1
Push $R2
Push $R3
StrCpy $R2 1
StrLen $R3 $CMDLINE
StrCpy $R0 $CMDLINE $R2
StrCmp $R0 '"' 0 +3
StrCpy $R1 '"'
Goto +2
StrCpy $R1 ' '
IntOp $R2 $R2 + 1
StrCpy $R0 $CMDLINE 1 $R2
StrCmp $R0 $R1 +3
StrCmp $R2 $R3 +2
Goto -4
IntOp $R2 $R2 + 1
StrCpy $R0 $CMDLINE 1 $R2
StrCmp $R0 ' ' -2
StrCpy $R0 $CMDLINE '' $R2
Pop $R3
Pop $R2
Pop $R1
Exch $R0
Pop $2
StrCpy $1 '"'
Push $2
StrCpy $2 $2 '' 1
FunctionEnd
arfgh is offline   Reply With Quote
Old 30th January 2008, 18:14   #19
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
Use:
code:
ReserveFile "${NSISDIR}\Plguins\System.dll"

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 30th January 2008, 18:43   #20
arfgh
Member
 
Join Date: Mar 2007
Posts: 91
what part to inser this reservefile ?


i tried here


Name 'blabla'
!addplugindir 'C:\blabla'
OutFile 'C:\blabla.exe'
SetCompressor /SOLID lzma
SetDatablockOptimize on
Icon 'C:\blabla.ico'
InstalldirRegKey HKLM \
'Software\blabla\blabla\blabla\blabla' \
'blabla'
ReserveFile '${NSISDIR}\Plugins\System.dll'


not fixed the problem, because the unpacking data banner appears always a bit before to my first banner
arfgh is offline   Reply With Quote
Old 30th January 2008, 18:59   #21
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
Are you sure it appears there and not when you call "File /r"? Put a message box before "File /r" to make sure.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 30th January 2008, 19:02   #22
arfgh
Member
 
Join Date: Mar 2007
Posts: 91
yes, the unpackind data internal banner it appears a bit before my first banner.
arfgh is offline   Reply With Quote
Old 30th January 2008, 19:06   #23
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
A bit is not an exact location. But I can probably tell the problem is with the extraction of a massive amount of files with File /r in .onInit. There's nothing you can do to get rid of the internal banner in that case but to move the extraction to a more appropriate location such as a section.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 30th January 2008, 21:09   #24
arfgh
Member
 
Join Date: Mar 2007
Posts: 91
yes

if i insert the code to extract on the section, the unpacking date not come. But if i do that, i got other problem, because i not need the installer window.

Then to prevent that i use the command "hidewindow"
but this command have other bug, because it pop up so fast and then is hide. Thsi popup so fast is another so ugly anomaly.

have you some idea to prevent this other issue ?
arfgh is offline   Reply With Quote
Old 30th January 2008, 22:28   #25
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
If you don't want an installer window, use SilentInstall silent.

You can still use sections and banners.

Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 31st January 2008, 11:24   #26
arfgh
Member
 
Join Date: Mar 2007
Posts: 91
Yes but actually i am using the silent installer to performa a "silent installing witjout the banners and the plugins"


but i need also the normal installation and i dont need thedefault makensis installer. By the way the "hidewindow" produce an ugly fast pop up and i think must exist a solution to prevent that.
arfgh is offline   Reply With Quote
Reply
Go Back   Winamp 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