Old 27th April 2006, 20:59   #1
jtweather
Junior Member
 
Join Date: Apr 2006
Posts: 16
installer crashes on launch

Hello,

I am a first-time user of NSIS and I have a problem running an installer that I have created. When I execute the installer, I recieve an error message stating that the installer has caused a problem and needs to close. The installer was written and opened on Windows XP Service Pack 2. I am not sure what caused the error or if I have the script file or the configuration files written correctly.

The attached text file includes the contents of the script and configuration files. Additionaly, I had used the InstallOptionsEx plugin as well as the EBanner Plugin in the installer.

Any help in correcting the error message or the script file is greatly appreciated. Thank you for your support.

jtweather
Attached Files
File Type: txt script.txt (2.9 KB, 467 views)
jtweather is offline   Reply With Quote
Old 27th April 2006, 21:07   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Don't call both InstallOptionsEx::Dialog and InstallOptionsEx::Show, only InstallOptionsEx::Dialog.

-Stu
Afrow UK is offline   Reply With Quote
Old 27th April 2006, 21:17   #3
jtweather
Junior Member
 
Join Date: Apr 2006
Posts: 16
I now took out the InstallOptionsEx::Show calls, however, I am still getting the error message when I launch the installer.

jtweather
jtweather is offline   Reply With Quote
Old 27th April 2006, 21:23   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Remove the Call pre02 and Call pre03 instructions.
Not sure what you are trying to do there, but you can't show an InstallOptions dialog in the Leave function of a page.

-Stu
Afrow UK is offline   Reply With Quote
Old 27th April 2006, 21:36   #5
jtweather
Junior Member
 
Join Date: Apr 2006
Posts: 16
I removed the call pre02 and call pre03 functions. I also removed the leave01 and leave02 callback functions. Unfortunately, I am still getting the error message.

jtweather
jtweather is offline   Reply With Quote
Old 27th April 2006, 21:53   #6
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
I'd suggest try to get an experience on standard InstallOptions 'playing' with bundled examples and then make your modifications and add your personal futures one by one. :-)

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 28th April 2006, 07:47   #7
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
I guess it must be the ebanner plugin causing the crash then, although the other things I mentioned would probably have crashed your installer as well.

Do the files 'media\audio.wav' 'media\banner.bmp' exist? What I mean by this is do they exist on run time. There's no code there to extract the files from your installer...?

-Stu
Afrow UK is offline   Reply With Quote
Old 28th April 2006, 19:00   #8
jtweather
Junior Member
 
Join Date: Apr 2006
Posts: 16
The files "audio.wav" and "banner.bmp" do exist on my system. They are located in "media/", which is a subdirectory of the directory that the installer was created in. Can the installer read the files from the subfolder, or do I have to compile the files in the installer?

jtweather
jtweather is offline   Reply With Quote
Old 28th April 2006, 19:35   #9
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
They must be extracted at run time with the File instruction.
You must also specify the full path to the files and not the relative path.

The best place to put these files is in the $PLUGINSDIR folder. Make sure you use InitPluginsDir before using the constant.

-Stu
Afrow UK is offline   Reply With Quote
Old 28th April 2006, 20:23   #10
jtweather
Junior Member
 
Join Date: Apr 2006
Posts: 16
I added the necessary File instructions and changed all $EXEDIR varibles to $PLUGINSDIR. I recompiled the installer, ran it, and still got the error.

Also, I took notice that, even though I had disabled the Next and Back buttons for the custom pages in the configuration files, the buttons showed up on the page. The attached text file has the modified code that is up to date. Do I still have errors in the modified code, also, are the buttons causing the error?

jtweather
Attached Files
File Type: txt modified_code.txt (2.8 KB, 401 views)
jtweather is offline   Reply With Quote
Old 28th April 2006, 21:08   #11
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
It doesn't help using forward strokes (/) in the file paths for the ebanner plugin calls.
If that doesn't fix it then try commenting the ebanner calls.

-Stu
Afrow UK is offline   Reply With Quote
Old 28th April 2006, 21:58   #12
jtweather
Junior Member
 
Join Date: Apr 2006
Posts: 16
I changed the forward strokes to backward strokes, and I still get the error. I then thought about commenting the ebanner calls, but I am unsure if that means that I have to add comments to the ebannner calls. Do I have to add comments?

jtweather
jtweather is offline   Reply With Quote
Old 29th April 2006, 07:17   #13
Mr Inches
Member
 
Join Date: Jan 2006
Location: Canberra, Australia
Posts: 76
It seems the problem is that the ebanner plugin does not like being unloaded while it is displaying the banner or playing the audio file.

Add the /UNLOAD switch to each of the ebanner plugin calls and the crashes stop.

e.g. instead of

ebanner::play '$PLUGINSDIR/audio.wav'
ebanner::show '$PLUGINSDIR/banner.bmp'

use

ebanner::play /NOUNLOAD '$PLUGINSDIR/audio.wav'
ebanner::show /NOUNLOAD '$PLUGINSDIR/banner.bmp'

This behaviour is quite common with plugins, check the readme.txt file that accompanies the ebanner plugin.

Duncan
Mr Inches is offline   Reply With Quote
Old 29th April 2006, 07:25   #14
Mr Inches
Member
 
Join Date: Jan 2006
Location: Canberra, Australia
Posts: 76
Amendment to above, don't forget to call ebanner::stop without the /UNLOAD switch when you are done with the banner, so that NSIS can delete the $PLUGINSDIR when your installer exits.

BTW: The smilies are supposed to be "p"s, I think something in the parsing changed them on me!

Duncan
Mr Inches is offline   Reply With Quote
Old 29th April 2006, 07:54   #15
galil
Member
 
Join Date: Jan 2003
Posts: 83
Quote:
Originally posted by Mr Inches
BTW: The smilies are supposed to be "p"s, I think something in the parsing changed them on me!
Well, you could choose to Edit your post and check the "Disable Smilies in This Post" option
galil is offline   Reply With Quote
Old 29th April 2006, 08:58   #16
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Fixed his post.

-Stu
Afrow UK is offline   Reply With Quote
Old 29th April 2006, 11:27   #17
jtweather
Junior Member
 
Join Date: Apr 2006
Posts: 16
I added the /NOUNLOAD switch to the Ebanner calls. I also changed $EXEDIR to $PLUGINSDIR in the InstallOptionsEx calls. The installer now opens without an error, however, the audio file ('audio.wav') won't play and 'banner.bmp' will not display. How do I get the audio to play and 'banner.bmp' to display now that I have the /NOUNLOAD switch in the code?

Attached is a copy of the code with the changes I made.

jtweather
Attached Files
File Type: txt changed_script.txt (2.3 KB, 423 views)
jtweather is offline   Reply With Quote
Old 29th April 2006, 11:33   #18
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
The call to InstallOptionsEx will pause the execution process. No instructions will be executed after the plugin call until you click the Next button.

Move the ebanner plugin calls above the InstallOptionsEx plugin calls.

-Stu
Afrow UK is offline   Reply With Quote
Old 29th April 2006, 12:15   #19
jtweather
Junior Member
 
Join Date: Apr 2006
Posts: 16
I moved the Ebanner calls, however, 'audio.wav' still won't play and 'banner.bmp' still won't show.

jtweather
jtweather is offline   Reply With Quote
Old 29th April 2006, 14:19   #20
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Hmm I can't think of anything more.
Please attach your newest script.

-Stu
Afrow UK is offline   Reply With Quote
Old 29th April 2006, 14:22   #21
jtweather
Junior Member
 
Join Date: Apr 2006
Posts: 16
My newest script is attached.

jtweather
Attached Files
File Type: txt newest_script.txt (2.0 KB, 463 views)
jtweather is offline   Reply With Quote
Old 29th April 2006, 14:30   #22
Comperio
Major Dude
 
Comperio's Avatar
 
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
As I understand, the EBanner plugin only works in the Installation page (within a section) and not in an InstallOptions page. (at least that's how I'm reading it. And the included example seems to show this as well.)

You may want to ask the author (Takhir) or post a message to this thread for clarification.

Also:
If you use eBanner, make sure you end it with an eBanner::stop call. This will unload the plugin from memory and prevent a windows error from occuring when the installation is finished (or if you abort your installation prematurely).
Comperio is offline   Reply With Quote
Old 29th April 2006, 14:45   #23
jtweather
Junior Member
 
Join Date: Apr 2006
Posts: 16
The EBanner plugin was working ('audio.wav' was playing) with the InstallOptionsEx pages, until I moved the EBanner calls. I heard 'audio.wav' play prior to recieving the error message.

jtweather
jtweather is offline   Reply With Quote
Old 29th April 2006, 15:01   #24
jtweather
Junior Member
 
Join Date: Apr 2006
Posts: 16
Also, I added the Ebanner::stop calls to the script. The audio still doesn't play, although I can hear 10 milliseconds of the audio file when the installer launches. Is there a problem with the configuration files for InstallOptionsEx? If so, is that why the audio won't play?

Attached is a copy of my configuration files for InstallOptionsEx. The attachment is up-to-date.

jtweather
Attached Files
File Type: txt ini_files.txt (841 Bytes, 467 views)
jtweather is offline   Reply With Quote
Old 29th April 2006, 19:45   #25
Comperio
Major Dude
 
Comperio's Avatar
 
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
I'm not sure how you were getting ebanner to either play a sound or display the image in the installoptions page.

To test, I used your script as a starting point and created my own InstallOptions.INI files. (Basically just INI files with just a group box and an image).

I never got a sound or image in any of the installoptions pages. But, when I inserted the ebanner calls the section, I got both the sound an image.


And, I got the same results using the regular InstallOptions as I did using InstallOptionsEX.

Based on this, I believe that eBanner only works in sections, not pages. Whether this is by-design or not remains to be answered. But, I think this proves that the problem has nothign to do with InstallOptionsEX.

My samples (minus the pictures and wav file) are attached if you want to play with them.
Attached Files
File Type: zip sample.zip (1.8 KB, 424 views)
Comperio is offline   Reply With Quote
Old 29th April 2006, 21:03   #26
jtweather
Junior Member
 
Join Date: Apr 2006
Posts: 16
I used the provided example script to modify my script, but the audio still will not play.

Also, I had the EBanner calls after the InstallOptionsEx call, and I had to wait for the TimeOut feature of InstallOptionsEx to change the first page (Custom Page 1) to the second page (Custom Page 2) before I could hear the audio. The call 'Ebanner::Play $PLUGINSDIR\audio.wav' was located inside the Callback Function 'pre01' which was associated with the first page (Custom Page 1). My initial problem was that the audio was playing on the wrong page and that I had to click Next to make the audio play.

Is there any way I could correct that initial problem so that the audio plays on the right page without clicking Next? Or is there a way that, along with the provided script, I can correct my script that I currently have so that my installer works?

jtweather
jtweather is offline   Reply With Quote
Old 29th April 2006, 23:54   #27
Mr Inches
Member
 
Join Date: Jan 2006
Location: Canberra, Australia
Posts: 76
Audio is not playing on the first page because you don't have a call to the ebanner::play function in the page's pre01 function.

The reason you need the timeouts to move from page to page is that you have set 'NextEnabled' in each of the first two page INI files to 0, disabling these buttons (Continue in your case).

Set 'NextEnabled' to 1 in each file and you can actually use the Next (Continue) buttons!!

The banner appears to only display on INSTPAGE.

Looking at the Ebanner code for the show function, it probably has to do with how Takhir locates the window to draw it on - I think the code is specifically to locate the Details Log window which doesn't exist until the INSTPAGE is displayed.

However, looking at the InstallOptionsEx documentation, you can embed an Image field directly onto your custom page. Maybe this will do what you want (except move the image).

Duncan

Last edited by Mr Inches; 30th April 2006 at 00:11.
Mr Inches is offline   Reply With Quote
Old 30th April 2006, 00:53   #28
jtweather
Junior Member
 
Join Date: Apr 2006
Posts: 16
I have my installer running without problems, although the file 'video.avi' is not playing inside the window. I do have the file defined in the InstallOptionsEx configuration file '01-01-01b.ini' as an image. My goal was to have the video play as an an animation on the page. Is that possible with InstallOptionsEx. If not, can I run a gif file as an animation using InstallOptionEx? Or does InstallOptionsEx define an animation as an animated cursor?

jtweather
jtweather is offline   Reply With Quote
Old 30th April 2006, 02:21   #29
Comperio
Major Dude
 
Comperio's Avatar
 
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
Just a guess:
Is is possible that perhaps your AVI file is not saved in the proper format? (try looking at the avi file's properties in Windows.)

According to the docs, an AVI file must be:
Quote:
an Audio Video Interleave file without sound with no or with run-length of 8 bits (BI_RLE8) encoding compression
Comperio is offline   Reply With Quote
Old 30th April 2006, 12:46   #30
jtweather
Junior Member
 
Join Date: Apr 2006
Posts: 16
The AVI file I was using was in the right format. I used the Microsoft RLE Codec to create the 8-bit compressed AVI file. Am I using the right codec to compress the AVI file?

jtweather
jtweather is offline   Reply With Quote
Old 30th April 2006, 20:05   #31
Comperio
Major Dude
 
Comperio's Avatar
 
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
hmm...
In testing it here, I'm having similiar issues. Looks like it may be something to do with InstallOptionsEx. You'll probably need to contact the author of the plugin.
Comperio 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