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.
| 134 | // that the useless and incorrect .qt5 extension is removed. |
| 135 | // |
| 136 | void 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 | |
| 147 | MOApplication::MOApplication(int& argc, char** argv) : QApplication(argc, argv) |
| 148 | { |
no test coverage detected