I’m working on Windows, using C++ and Visual Studio. I’ve added an implementation of gstreamer into an already existing project and now I need to pack it and test it into our target machines.
The problem is that due to space and other project constraints, I cannot install gstreamer in each individual target machine, so my idea to package the program is to put all the necessary DLLs inside a folder within the build folder and read the necessary DLLs from there. Thus the ideal folder structure I would like to have is the following:
\root (where the .exe resides)
-----\gstreamer
------------\core (all the core libraries)
-------------\plugins (all the plugin libraries)
(I hope that the previous structure is understandable)
I’ve managed to make the program read the plugins from this structure using the following code before calling gst_init():
Ok, if you mean changing the PATH environment variable from the OS perspective, in other words manually going to the OS configuration (in this case windows), and changing or adding the PATH to the specific folder I need it.
I can’t see this approach usable for my particular case, as I would need to do it for every target machine where this software is installed (and it’s quite a long list of servers).
If you mean doing it programatically, changing this PATH each time the program is executed, while not ideal I would consider this as a short term solution.
Well, I thought it was, as gstreamer has the GST_PLUGIN_PATH for these same eaxct purpose but for plugin libraries, so I assumed there would be something similar for core libraries within gstreamer. Thus, I’ve decided to ask here.
We use NSIS for creating windows apllication setup and with that we can add gstreamer to the system path. In the uninstaller we remove it from the path. We kept the same folder structure as gstreamer installation so in the nsis script this works:
EnVar::SetHKLM
EnVar::AddValue “Path” “path-to-our-app\gstreamer\bin”