| 276 | } |
| 277 | |
| 278 | void LaunchProfile::getLibraryFiles( |
| 279 | const QString& architecture, |
| 280 | QStringList& jars, |
| 281 | QStringList& nativeJars, |
| 282 | const QString& overridePath, |
| 283 | const QString& tempPath |
| 284 | ) const |
| 285 | { |
| 286 | QStringList native32, native64; |
| 287 | jars.clear(); |
| 288 | nativeJars.clear(); |
| 289 | for (auto lib : getLibraries()) |
| 290 | { |
| 291 | lib->getApplicableFiles(currentSystem, jars, nativeJars, native32, native64, overridePath); |
| 292 | } |
| 293 | // NOTE: order is important here, add main jar last to the lists |
| 294 | if(m_mainJar) |
| 295 | { |
| 296 | // FIXME: HACK!! jar modding is weird and unsystematic! |
| 297 | if(m_jarMods.size()) |
| 298 | { |
| 299 | QDir tempDir(tempPath); |
| 300 | jars.append(tempDir.absoluteFilePath("minecraft.jar")); |
| 301 | } |
| 302 | else |
| 303 | { |
| 304 | m_mainJar->getApplicableFiles(currentSystem, jars, nativeJars, native32, native64, overridePath); |
| 305 | } |
| 306 | } |
| 307 | for (auto lib : getNativeLibraries()) |
| 308 | { |
| 309 | lib->getApplicableFiles(currentSystem, jars, nativeJars, native32, native64, overridePath); |
| 310 | } |
| 311 | if(architecture == "32") |
| 312 | { |
| 313 | nativeJars.append(native32); |
| 314 | } |
| 315 | else if(architecture == "64") |
| 316 | { |
| 317 | nativeJars.append(native64); |
| 318 | } |
| 319 | } |
no test coverage detected