Visual studio installer including gstreamer install

Hi,
I’ve written an app in C++ in Visual Studio which uses gstreamer. All good. In the visual studio project I created an installer so I can generate a setup.exe/msi binary to distribute my app to other users. In the installer I included the gstreamer runtime installer msi, but how do I automatically get my installer to run the gstreamer msi? I’ve read the “Windows deployment” section in the gstreamer documentation which says use “msiexec” but I can’t figure out how to run msiexec from my installer. I appreciate this isn’t exactly a gstreamer question as such, but it’s related and I’m sure some of you out there will have had to do this…

If there’s a better way to do this then advice is always welcome. Basically, I want to produce a setup.exe for my project which also includes the gstreamer setup, so the user doesn’t have to worry about anything other than just clicking on my “setup.exe”…

Many thanks in advance,
Mike

I use nsis installer and my gstreamer install function is as follows:
Function gstreamerInstall
SetOutPath “$INSTDIR\bin\gstreamer\bin”
File /a /r “${cotsFolder}\gstreamer${REQ_GSTREAMER_VERSION}\1.0\msvc_x86_64\bin*.dll”
File /a /r “${cotsFolder}\gstreamer${REQ_GSTREAMER_VERSION}\1.0\msvc_x86_64\bin\gst-launch-1.0.exe”
File /a /r “${cotsFolder}\gstreamer${REQ_GSTREAMER_VERSION}\1.0\msvc_x86_64\bin\gst-inspect-1.0.exe”
File /a /r “${cotsFolder}\gstreamer${REQ_GSTREAMER_VERSION}\1.0\msvc_x86_64\bin\gst-play-1.0.exe”
SetOutPath “$INSTDIR\bin\gstreamer\etc”
File /a /r “${cotsFolder}\gstreamer${REQ_GSTREAMER_VERSION}\1.0\msvc_x86_64\etc”
SetOutPath “$INSTDIR\bin\gstreamer\lib\gio\modules”
File /a /r “${cotsFolder}\gstreamer${REQ_GSTREAMER_VERSION}\1.0\msvc_x86_64\lib\gio\modules\gioopenssl.dll”
SetOutPath “$INSTDIR\bin\gstreamer\lib\gstreamer-1.0”
File /a /r “${cotsFolder}\gstreamer${REQ_GSTREAMER_VERSION}\1.0\msvc_x86_64\lib\gstreamer-1.0*.dll”
SetOutPath “$INSTDIR\bin”

${LogText} "Gstreamer installed with return code: $0"
EnVar::SetHKLM
EnVar::AddValue "Path" "C:\abc\gstreamer\bin"
Pop $0
DetailPrint "EnVar::AddValue returned=|$0|"
${LogText} "Gstreamer added to path with return code: $0"

FunctionEnd

Basically copy the files and then add the copied bin directory to path

Many thanks for the reply; much appreciated.

I’ve never used nsis before so I’ll try it. I haven’t a clue how to implement your instructions however…

  • copy the files to where? Which files?
  • Add the copied bin directory to path? Is this a manual step after installation?
  • Do I need to substitute REQ_GSTREAMER_VERSION to something meaningful?
  • Do I need to substitute the cotsFolder text to something meaningful?
  • How to add the above function to nsis along with my zip file?

Basically, I’m a complete noob in this area, so looks like I will have to do a fair amount of reading to understand it. And I don’t expect you to spoon-feed me step by step instructions (you can if you want though ;)), but thanks for pointing me in the right direction…

I install gstreamer runtime and developer msi’s into ${cotsFolder}\gstreamer${REQ_GSTREAMER_VERSION}\ on my computer so thats where the File command is copying the files into my program’s setup.

  1. copy the files into your program installation directory:
    command is : File /a /r “${cotsFolder}\gstreamer${REQ_GSTREAMER_VERSION}\1.0\msvc_x86_64\bin*.dll” ->all dll files in gstreamer bin directory. other File commands are similar…
  2. NSIS command for adding the gstreamer bin directory to path: EnVar::SetHKLM
    EnVar::AddValue “Path” “C:\abc\gstreamer\bin”

Basically my setup doesn't install gstreamer via msi, just dlls and some other files into a custom directory and adds custom bin directory to path.

I never used visual studio installer but I'm guessing similar functionality can be achieved with it too..
I hope that is clear now..

Many thanks,
I’ve started to have a play with it, and it’s beginning to make sense.
Appreciate your help!
Mike