Unsolved Windows Deployment: dealing with variable PATH
-
Hi,
Currently, I am developing a Windows application using shared libraries. The way I launch it is calling a .bat script, just like this one:@echo OFF set PATH=..\lib;..\lib\qt5;..\lib\libav app.exe %1
It works like a charm, but I wonder if there is a way to avoid the .bat script by defining the variable PATH from the main.cpp code of my app. Just guessing, in that way I would be able to open my application just clicking on the app.exe binary.
Is there a way to make this possible without compiling the app as static? I appreciate any hint.
-
-
It looks like you are trying to add library paths to your app. If that is the case you could check out
QCoreApplication::addLibraryPath
. That should do what you need without the need for the .bat script and the modification to the system path. -
@xtingray To add to @ambershark : take a look at http://doc.qt.io/qt-5/qt-conf.html