mirror of
https://github.com/PrismLauncher/PrismLauncher
synced 2026-04-23 09:05:03 +00:00
Reshuffle launch log (#5179)
This commit is contained in:
commit
5772a8ac93
|
|
@ -408,7 +408,7 @@ void LaunchController::launchInstance()
|
|||
{
|
||||
auto versionString = QString("%1 version: %2 (%3)")
|
||||
.arg(BuildConfig.LAUNCHER_DISPLAYNAME, BuildConfig.printableVersionString(), BuildConfig.BUILD_PLATFORM);
|
||||
m_launcher->prependStep(makeShared<TextPrint>(m_launcher, versionString + "\n\n", MessageLevel::Launcher));
|
||||
m_launcher->prependStep(makeShared<TextPrint>(m_launcher, versionString + "\n", MessageLevel::Launcher));
|
||||
}
|
||||
m_launcher->start();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ void CheckJava::executeTask()
|
|||
emitFailed(QString("Java path is not valid."));
|
||||
return;
|
||||
} else {
|
||||
emit logLine("Java path is:\n" + m_javaPath + "\n\n", MessageLevel::Launcher);
|
||||
emit logLine("Java path is:\n " + m_javaPath, MessageLevel::Launcher);
|
||||
}
|
||||
|
||||
if (JavaUtils::getJavaCheckPath().isEmpty()) {
|
||||
|
|
@ -146,6 +146,6 @@ void CheckJava::checkJavaFinished(const JavaChecker::Result& result)
|
|||
void CheckJava::printJavaInfo(const QString& version, const QString& architecture, const QString& realArchitecture, const QString& vendor)
|
||||
{
|
||||
emit logLine(
|
||||
QString("Java is version %1, using %2 (%3) architecture, from %4.\n\n").arg(version, architecture, realArchitecture, vendor),
|
||||
QString("Java is version %1, using %2 (%3) architecture, from %4").arg(version, architecture, realArchitecture, vendor),
|
||||
MessageLevel::Launcher);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ void PrintServers::executeTask()
|
|||
void PrintServers::resolveServer(const QHostInfo& host_info)
|
||||
{
|
||||
QString server = host_info.hostName();
|
||||
QString addresses = server + " resolves to:\n [";
|
||||
QString addresses = server + " resolves to:\n ";
|
||||
|
||||
if (!host_info.addresses().isEmpty()) {
|
||||
for (QHostAddress address : host_info.addresses()) {
|
||||
|
|
@ -46,7 +46,7 @@ void PrintServers::resolveServer(const QHostInfo& host_info)
|
|||
} else {
|
||||
addresses += "N/A";
|
||||
}
|
||||
addresses += "]\n\n";
|
||||
addresses += "\n";
|
||||
|
||||
m_server_to_address.insert(server, addresses);
|
||||
|
||||
|
|
|
|||
|
|
@ -889,49 +889,11 @@ QStringList MinecraftInstance::verboseDescription(AuthSessionPtr session, Minecr
|
|||
|
||||
QStringList out;
|
||||
|
||||
out << "Main Class:" << indent + getMainClass() << emptyLine;
|
||||
out << "Native path:" << indent + getNativePath() << emptyLine;
|
||||
out << "Launcher: " + getLauncher();
|
||||
out << "Main class: " + getMainClass() << emptyLine;
|
||||
|
||||
auto profile = m_components->getProfile();
|
||||
|
||||
// traits
|
||||
auto alltraits = traits();
|
||||
if (alltraits.size()) {
|
||||
out << "Traits:";
|
||||
for (auto trait : alltraits) {
|
||||
out << indent + trait;
|
||||
}
|
||||
out << emptyLine;
|
||||
}
|
||||
|
||||
// native libraries
|
||||
auto settings = this->settings();
|
||||
bool nativeOpenAL = settings->get("UseNativeOpenAL").toBool();
|
||||
bool nativeGLFW = settings->get("UseNativeGLFW").toBool();
|
||||
if (nativeOpenAL || nativeGLFW) {
|
||||
if (nativeOpenAL)
|
||||
out << "Using system OpenAL.";
|
||||
if (nativeGLFW)
|
||||
out << "Using system GLFW.";
|
||||
out << emptyLine;
|
||||
}
|
||||
|
||||
// libraries and class path.
|
||||
{
|
||||
out << "Libraries:";
|
||||
QStringList jars, nativeJars;
|
||||
profile->getLibraryFiles(runtimeContext(), jars, nativeJars, getLocalLibraryPath(), binRoot());
|
||||
for (auto file : jars) {
|
||||
out << indent + file;
|
||||
}
|
||||
out << emptyLine;
|
||||
out << "Native libraries:";
|
||||
for (auto file : nativeJars) {
|
||||
out << indent + file;
|
||||
}
|
||||
out << emptyLine;
|
||||
}
|
||||
|
||||
// mods and core mods
|
||||
auto printModList = [&out](const QString& label, ModFolderModel& model) {
|
||||
if (model.size()) {
|
||||
|
|
@ -977,9 +939,49 @@ QStringList MinecraftInstance::verboseDescription(AuthSessionPtr session, Minecr
|
|||
out << emptyLine;
|
||||
}
|
||||
|
||||
// traits
|
||||
auto alltraits = traits();
|
||||
if (alltraits.size()) {
|
||||
out << "Traits:";
|
||||
for (auto trait : alltraits) {
|
||||
out << indent + trait;
|
||||
}
|
||||
out << emptyLine;
|
||||
}
|
||||
|
||||
// native libraries
|
||||
auto settings = this->settings();
|
||||
bool nativeOpenAL = settings->get("UseNativeOpenAL").toBool();
|
||||
bool nativeGLFW = settings->get("UseNativeGLFW").toBool();
|
||||
if (nativeOpenAL || nativeGLFW) {
|
||||
if (nativeOpenAL)
|
||||
out << "Using system OpenAL.";
|
||||
if (nativeGLFW)
|
||||
out << "Using system GLFW.";
|
||||
out << emptyLine;
|
||||
}
|
||||
|
||||
// libraries and class path.
|
||||
{
|
||||
out << "Libraries:";
|
||||
QStringList jars, nativeJars;
|
||||
profile->getLibraryFiles(runtimeContext(), jars, nativeJars, getLocalLibraryPath(), binRoot());
|
||||
for (auto file : jars) {
|
||||
out << indent + file;
|
||||
}
|
||||
out << emptyLine;
|
||||
out << "Native libraries:";
|
||||
for (auto file : nativeJars) {
|
||||
out << indent + file;
|
||||
}
|
||||
out << emptyLine;
|
||||
}
|
||||
|
||||
out << "Natives path:" << indent + getNativePath() << emptyLine;
|
||||
|
||||
// minecraft arguments
|
||||
auto params = processMinecraftArgs(nullptr, targetToJoin);
|
||||
out << "Params:";
|
||||
out << "Minecraft arguments:";
|
||||
out << indent + params.join(' ');
|
||||
out << emptyLine;
|
||||
|
||||
|
|
@ -994,9 +996,6 @@ QStringList MinecraftInstance::verboseDescription(AuthSessionPtr session, Minecr
|
|||
}
|
||||
out << emptyLine;
|
||||
|
||||
out << "Launcher: " + getLauncher();
|
||||
out << emptyLine;
|
||||
|
||||
// environment variables
|
||||
const QString env = settings->get("Env").toString();
|
||||
if (auto envMap = Json::toMap(env); !envMap.isEmpty()) {
|
||||
|
|
@ -1122,7 +1121,7 @@ LaunchTask* MinecraftInstance::createLaunchTask(AuthSessionPtr session, Minecraf
|
|||
|
||||
// print a header
|
||||
{
|
||||
process->appendStep(makeShared<TextPrint>(pptr, "Minecraft folder is:\n" + gameRoot() + "\n\n", MessageLevel::Launcher));
|
||||
process->appendStep(makeShared<TextPrint>(pptr, "Minecraft folder is:\n " + gameRoot() + "\n", MessageLevel::Launcher));
|
||||
}
|
||||
|
||||
// create the .minecraft folder and server-resource-packs (workaround for Minecraft bug MCL-3732)
|
||||
|
|
@ -1160,6 +1159,8 @@ LaunchTask* MinecraftInstance::createLaunchTask(AuthSessionPtr session, Minecraf
|
|||
{
|
||||
process->appendStep(makeShared<AutoInstallJava>(pptr));
|
||||
process->appendStep(makeShared<CheckJava>(pptr));
|
||||
// verify that minimum Java requirements are met
|
||||
process->appendStep(makeShared<VerifyJavaInstall>(pptr));
|
||||
}
|
||||
|
||||
// run pre-launch command if that's needed
|
||||
|
|
@ -1204,11 +1205,6 @@ LaunchTask* MinecraftInstance::createLaunchTask(AuthSessionPtr session, Minecraf
|
|||
process->appendStep(makeShared<ReconstructAssets>(pptr));
|
||||
}
|
||||
|
||||
// verify that minimum Java requirements are met
|
||||
{
|
||||
process->appendStep(makeShared<VerifyJavaInstall>(pptr));
|
||||
}
|
||||
|
||||
{
|
||||
// actually launch the game
|
||||
auto step = makeShared<LauncherPartLaunch>(pptr);
|
||||
|
|
|
|||
|
|
@ -94,8 +94,8 @@ void LauncherPartLaunch::executeTask()
|
|||
|
||||
m_launchScript = instance->createLaunchScript(m_session, m_targetToJoin);
|
||||
QStringList args = instance->javaArguments();
|
||||
QString allArgs = args.join(", ");
|
||||
emit logLine("Java Arguments:\n[" + m_parent->censorPrivateInfo(allArgs) + "]\n\n", MessageLevel::Launcher);
|
||||
QString allArgs = args.join(" ");
|
||||
emit logLine("Java arguments:\n " + m_parent->censorPrivateInfo(allArgs) + "\n", MessageLevel::Launcher);
|
||||
|
||||
auto javaPath = FS::ResolveExecutable(instance->settings()->get("JavaPath").toString());
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ void VerifyJavaInstall::executeTask()
|
|||
}
|
||||
|
||||
if (ignoreCompatibility) {
|
||||
emit logLine(tr("Java major version is incompatible. Things might break."), MessageLevel::Warning);
|
||||
emit logLine(tr("Java major version is incompatible. Things might break.\n"), MessageLevel::Warning);
|
||||
emitSucceeded();
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue