Skip to content
⌘ NSIS Forum Archive

Video played during the installation progress (game related)

11 posts

DavidGeorge1991#

Video played during the installation progress (game related)

Hello, on behalf of our head developer the reason for posting this because; we are working on a video game modification project which to be released SOON. We are frequent users of WinRaR for many years now thus it is getting old and redudant. That is why we need something new as an alternative. Hopefully NSIS will do anything. What Big Boss[head developer] really wanted to make our soon to be Installer awesome is a video attached to it which automatically plays during the Installation sequence, probably it needs a custom code or Plug-in to execute. To get the idea here is the example inside the .zip file which we will replicate for our proposed Installer even though it's NOT ours.

So my question here is how to add and automatically play a non-loopable video file during the user installation progress using NSIS just like the link I provided. We are 1st timers on using NSIS so teach us step by step.
Anders#
https://nsis.sourceforge.io/NsMCI_plug-in might work in theory but MCI is very old, might only play AVI and MPEG1.

https://nsis.sourceforge.io/NsisSlideshow_plug-in if a slideshow is acceptable.

Otherwise I think you are on your own.

Unless your setup is on a DVD, does this even make sense? Why waste time extracting a video?
DavidGeorge1991#
https://nsis.sourceforge.io/NsMCI_plug-in might work in theory but MCI is very old, might only play AVI and MPEG1.

https://nsis.sourceforge.io/NsisSlideshow_plug-in if a slideshow is acceptable.
It doesn't matter whether old or new the important at least is these plugins are proved to be useful.


Unless your setup is on a DVD, does this even make sense? Why waste time extracting a video?
Actually is not DVD nor ISO but rather standalone .exe installer.


Otherwise I think you are on your own.
Hope for the best. Thanks!
DavidGeorge1991#
Originally Posted by Anders View Post
https://nsis.sourceforge.io/NsMCI_plug-in might work in theory but MCI is very old, might only play AVI and MPEG1.

https://nsis.sourceforge.io/NsisSlideshow_plug-in if a slideshow is acceptable.

Otherwise I think you are on your own.

Unless your setup is on a DVD, does this even make sense? Why waste time extracting a video?

I know you read my PM last time Anders . Anyways could you please make a sample Tutorial video on that you mentioned as my request until I got funds for my new Laptop for easy reference and understanding since I'm new into NSIS[new comer]. I'd be waiting of your response.


PS: Does this forum have Discord server?
Anders#
I don't think videos are a great way to learn and I am certainly not going to create one.

If you are new to NSIS then you should read the documentation and look at the examples, starting with Example1.nsi
DavidGeorge1991#
Originally Posted by Anders View Post
I don't think videos are a great way to learn and I am certainly not going to create one.

If you are new to NSIS then you should read the documentation and look at the examples, starting with Example1.nsi
Please send me a link to that example file you've mentioned[Example1.nsi] and I'll see what I can do Anders 😉.
DavidGeorge1991#
Hello there sir, long time no chat since 2022. Life happens 🙂. Anyway ; I downloaded this installer of a video game modification from ModDB which ironically is an NSIS also. I decompiled it to see the contents of it, but when I test compile it ; it gave me an error code as seen on the screenshot here 🫤😕:

Click image for larger version

Name:	Error_-_line_971.jpg
Views:	121
Size:	178.1 KB
ID:	4637363

How do I fix this 😢? Here is the .zip file containing the source files of the decompiled installer:

Anders#
You cannot expect a decompiled script to compile without errors, the decompilers are not perfect.

The compiler at least tries to tell you what the problem is, in this case, it can't find the file "forgotten-splash.bmp".
DavidGeorge1991#
Hello, my apologies for late reply, anyway; I finally made my 1st ever installer using NSIS and Visual Studio Code. But I have additional questions to ask, for the sake of learning:

1.) What specific code should I type to trigger the splash image along with .wav file that played before the welcome screen 🤔?

newadvsplash:lay /NOUNLOAD /LOOP "$PLUGINSDIR\name-of-sound.wav"
newadvsplash::show /NOUNLOAD 2000 1000 500 -2 /BANNER "$PLUGINSDIR\forgotten-splash.bmp"



2.) In the script codes:

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "LICENSE.TXT"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_LANGUAGE "English"


Is it possible to add a .wav file on each window ( when played? What code should I type to trigger this action 🤔?


3.) For the .avi video playing during installation (as the title suggests); What code should I type without getting an error🤔?​
Anders#
You could probably call PlaySound with the system plug-in to play sound on page change (in the page show callback function).

System::Call 'winmm::PlaySound(t "$pluginsdir\mysound.wav", i 0, i 1)' ; Extract the .wav in .onGuiInit first