MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / getLibraryFiles

Method getLibraryFiles

launcher/minecraft/LaunchProfile.cpp:356–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

354}
355
356void 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}

Callers 4

getClassPathMethod · 0.80
getNativeJarsMethod · 0.80
createLaunchScriptMethod · 0.80
verboseDescriptionMethod · 0.80

Calls 4

getApplicableFilesMethod · 0.80
appendMethod · 0.80
clearMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected