MCPcopy Create free account
hub / github.com/ModOrganizer2/modorganizer / addDllsToPath

Function addDllsToPath

src/moapplication.cpp:136–145  ·  view source on GitHub ↗

This adds the `dlls` directory to the path so the dlls can be found. How MO is able to find dlls in there is a bit convoluted: Dependencies on DLLs can be baked into an executable by passing a `manifestdependency` option to the linker. This can be done on the command line or with a pragma. Typically, the dependency will not be a hardcoded filename, but an assembly name, such as Microsoft.Windows.

Source from the content-addressed store, hash-verified

134// that the useless and incorrect .qt5 extension is removed.
135//
136void addDllsToPath()
137{
138 const auto dllsPath =
139 QDir::toNativeSeparators(QCoreApplication::applicationDirPath() + "/dlls");
140
141 QCoreApplication::setLibraryPaths(QStringList(dllsPath) +
142 QCoreApplication::libraryPaths());
143
144 env::prependToPath(dllsPath);
145}
146
147MOApplication::MOApplication(int& argc, char** argv) : QApplication(argc, argv)
148{

Callers 1

MOApplicationMethod · 0.85

Calls 1

prependToPathFunction · 0.85

Tested by

no test coverage detected