| 354 | } |
| 355 | |
| 356 | void LaunchProfile::getLibraryFiles( |
| 357 | const RuntimeContext & runtimeContext, |
| 358 | QStringList& jars, |
| 359 | QStringList& nativeJars, |
| 360 | const QString& overridePath, |
| 361 | const QString& tempPath |
| 362 | ) const |
| 363 | { |
| 364 | QStringList native32, native64; |
| 365 | jars.clear(); |
| 366 | nativeJars.clear(); |
| 367 | for (auto lib : getLibraries()) |
| 368 | { |
| 369 | lib->getApplicableFiles(runtimeContext, jars, nativeJars, native32, native64, overridePath); |
| 370 | } |
| 371 | // NOTE: order is important here, add main jar last to the lists |
| 372 | if(m_mainJar) |
| 373 | { |
| 374 | // FIXME: HACK!! jar modding is weird and unsystematic! |
| 375 | if(m_jarMods.size()) |
| 376 | { |
| 377 | QDir tempDir(tempPath); |
| 378 | jars.append(tempDir.absoluteFilePath("minecraft.jar")); |
| 379 | } |
| 380 | else |
| 381 | { |
| 382 | m_mainJar->getApplicableFiles(runtimeContext, jars, nativeJars, native32, native64, overridePath); |
| 383 | } |
| 384 | } |
| 385 | for (auto lib : getNativeLibraries()) |
| 386 | { |
| 387 | lib->getApplicableFiles(runtimeContext, jars, nativeJars, native32, native64, overridePath); |
| 388 | } |
| 389 | if(runtimeContext.javaArchitecture == "32") |
| 390 | { |
| 391 | nativeJars.append(native32); |
| 392 | } |
| 393 | else if(runtimeContext.javaArchitecture == "64") |
| 394 | { |
| 395 | nativeJars.append(native64); |
| 396 | } |
| 397 | } |
no test coverage detected