MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / extraArguments

Method extraArguments

launcher/minecraft/MinecraftInstance.cpp:424–472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

422}
423
424QStringList MinecraftInstance::extraArguments()
425{
426 auto list = BaseInstance::extraArguments();
427 auto version = getPackProfile();
428 if (!version)
429 return list;
430 auto jarMods = getJarMods();
431 if (!jarMods.isEmpty()) {
432 list.append({ "-Dfml.ignoreInvalidMinecraftCertificates=true", "-Dfml.ignorePatchDiscrepancies=true" });
433 }
434 auto addn = m_components->getProfile()->getAddnJvmArguments();
435 if (!addn.isEmpty()) {
436 list.append(addn);
437 }
438 auto agents = m_components->getProfile()->getAgents();
439 for (auto agent : agents) {
440 QStringList jar, temp1, temp2, temp3;
441 agent->library()->getApplicableFiles(runtimeContext(), jar, temp1, temp2, temp3, getLocalLibraryPath());
442 list.append("-javaagent:" + jar[0] + (agent->argument().isEmpty() ? "" : "=" + agent->argument()));
443 }
444
445 {
446 QString openALPath;
447 QString glfwPath;
448
449 if (settings()->get("UseNativeOpenAL").toBool()) {
450 openALPath = APPLICATION->m_detectedOpenALPath;
451 auto customPath = settings()->get("CustomOpenALPath").toString();
452 if (!customPath.isEmpty())
453 openALPath = customPath;
454 }
455 if (settings()->get("UseNativeGLFW").toBool()) {
456 glfwPath = APPLICATION->m_detectedGLFWPath;
457 auto customPath = settings()->get("CustomGLFWPath").toString();
458 if (!customPath.isEmpty())
459 glfwPath = customPath;
460 }
461
462 QFileInfo openALInfo(openALPath);
463 QFileInfo glfwInfo(glfwPath);
464
465 if (!openALPath.isEmpty() && openALInfo.exists())
466 list.append("-Dorg.lwjgl.openal.libname=" + openALInfo.absoluteFilePath());
467 if (!glfwPath.isEmpty() && glfwInfo.exists())
468 list.append("-Dorg.lwjgl.glfw.libname=" + glfwInfo.absoluteFilePath());
469 }
470
471 return list;
472}
473
474QStringList MinecraftInstance::javaArguments()
475{

Callers

nothing calls this directly

Calls 9

appendMethod · 0.80
getProfileMethod · 0.80
getApplicableFilesMethod · 0.80
libraryMethod · 0.80
argumentMethod · 0.80
existsMethod · 0.80
isEmptyMethod · 0.45
getMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected