Old 3rd November 2011, 04:22   #1
ramilsulit
Junior Member
 
Join Date: Nov 2011
Posts: 5
advsplash error

hi im newbie here and firstime using nsis software
here is my problem


Function .onInit
SetOutPath $TEMP
File /oname=spltmp.bmp "my_splash.bmp"

; optional
; File /oname=spltmp.wav "my_splashshit.wav"

advsplash::show 1000 600 400 -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
; Delete $TEMP\spltmp.wav
FunctionEnd

when i drag and drop this *.nsi file to compile in nsi scripts it display an error script.


Then i make a new one and create a new .jpeg and the path of this picture is locate in desktop.

here is my sript

Function .onInit
SetOutPath $TEMP
File /oname=spltmp.jpg "%useprofile%\Desktop\picture.jpg"

; optional
; File /oname=spltmp.wav "my_splashshit.wav"

advsplash::show 1000 600 400 -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.jpg
; Delete $TEMP\spltmp.wav
FunctionEnd

then it display an error again
ramilsulit is offline   Reply With Quote
Old 3rd November 2011, 05:27   #2
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 562
Send a message via ICQ to T.Slappy
If this is your whole script then you need to add at least one Section and OutFile.
But if it is only fragment of script then it is correct

Cool looking installers with custom design: www.graphical-installer.com
Create Setup Pages easily: www.install-designer.com
Build installers in Visual Studio 2005-2022: www.visual-installer.com
or RAD Studio 2009 - 11 Alexandria: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Old 3rd November 2011, 07:10   #3
ramilsulit
Junior Member
 
Join Date: Nov 2011
Posts: 5
yes thats is my whole script thanks for your reply i dont know how to use the section and outfile command can you give me some sample script related in my script
ramilsulit is offline   Reply With Quote
Old 3rd November 2011, 07:15   #4
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
For an example, please look in your NSIS installation folder, at NSIS\Examples\Example1.nsi and Example2.nsi. To find out what a specific command does, use the command reference: http://nsis.sourceforge.net/Docs/Chapter4.html
MSG is offline   Reply With Quote
Old 15th November 2011, 01:46   #5
ramilsulit
Junior Member
 
Join Date: Nov 2011
Posts: 5
why the splash screen doesn't display here is my script it only extract the file

Function .onInit
SetOutPath $TEMP
File /oname=splash.jpg "blue.jpg"
advsplash::show 1000 500 200 -1 $TEMP\splash
Pop $0 ; $0 has '1' if the user closed the splash screen early,
FunctionEnd
Outfile "samplepicture.exe"
Section "DESKTOP"
SetOutPath $DESKTOP
File "sample.txt"
SectionEnd
ramilsulit is offline   Reply With Quote
Old 15th November 2011, 05:03   #6
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 562
Send a message via ICQ to T.Slappy
There is no problem in the code: I can see splash correctly.
Check all files, their location or any result from compiler.

Cool looking installers with custom design: www.graphical-installer.com
Create Setup Pages easily: www.install-designer.com
Build installers in Visual Studio 2005-2022: www.visual-installer.com
or RAD Studio 2009 - 11 Alexandria: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Old 15th November 2011, 06:21   #7
ramilsulit
Junior Member
 
Join Date: Nov 2011
Posts: 5
here is the result after compiled

Processed 1 file, writing output:
Adding plug-ins initializing function... Done!
Processing pages... Done!
Removing unused resources... Done!
Generating language tables... Done!

Output: "C:\Documents and Settings\user\Desktop\pics\samplepicture.exe"
Install: 2 pages (128 bytes), 1 section (1048 bytes), 31 instructions (868 bytes), 51 strings (800 bytes), 1 language table (198 bytes).

Using zlib compression.

EXE header size: 33280 / 35840 bytes
Install code: 965 / 3370 bytes
Install data: 29371 / 34677 bytes
CRC (0xF262F70E): 4 / 4 bytes

Total size: 63620 / 73891 bytes (86.0%)
ramilsulit is offline   Reply With Quote
Old 15th November 2011, 09:32   #8
ramilsulit
Junior Member
 
Join Date: Nov 2011
Posts: 5
yes i did it i found the solution i just replace the .jpg extension to .bmp thanks guys now i been working on how to run the NewAdvSplash.zip that i download i was confuse to use this i dont know where to place this zip file and run it?
ramilsulit 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