mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
change: reshuffle launch log
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
14da23b06f
commit
76bbd0f9ca
6 changed files with 54 additions and 58 deletions
|
|
@ -408,7 +408,7 @@ void LaunchController::launchInstance()
|
||||||
{
|
{
|
||||||
auto versionString = QString("%1 version: %2 (%3)")
|
auto versionString = QString("%1 version: %2 (%3)")
|
||||||
.arg(BuildConfig.LAUNCHER_DISPLAYNAME, BuildConfig.printableVersionString(), BuildConfig.BUILD_PLATFORM);
|
.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();
|
m_launcher->start();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ void CheckJava::executeTask()
|
||||||
emitFailed(QString("Java path is not valid."));
|
emitFailed(QString("Java path is not valid."));
|
||||||
return;
|
return;
|
||||||
} else {
|
} 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()) {
|
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)
|
void CheckJava::printJavaInfo(const QString& version, const QString& architecture, const QString& realArchitecture, const QString& vendor)
|
||||||
{
|
{
|
||||||
emit logLine(
|
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);
|
MessageLevel::Launcher);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ void PrintServers::executeTask()
|
||||||
void PrintServers::resolveServer(const QHostInfo& host_info)
|
void PrintServers::resolveServer(const QHostInfo& host_info)
|
||||||
{
|
{
|
||||||
QString server = host_info.hostName();
|
QString server = host_info.hostName();
|
||||||
QString addresses = server + " resolves to:\n [";
|
QString addresses = server + " resolves to:\n ";
|
||||||
|
|
||||||
if (!host_info.addresses().isEmpty()) {
|
if (!host_info.addresses().isEmpty()) {
|
||||||
for (QHostAddress address : host_info.addresses()) {
|
for (QHostAddress address : host_info.addresses()) {
|
||||||
|
|
@ -46,7 +46,7 @@ void PrintServers::resolveServer(const QHostInfo& host_info)
|
||||||
} else {
|
} else {
|
||||||
addresses += "N/A";
|
addresses += "N/A";
|
||||||
}
|
}
|
||||||
addresses += "]\n\n";
|
addresses += "\n";
|
||||||
|
|
||||||
m_server_to_address.insert(server, addresses);
|
m_server_to_address.insert(server, addresses);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -889,49 +889,11 @@ QStringList MinecraftInstance::verboseDescription(AuthSessionPtr session, Minecr
|
||||||
|
|
||||||
QStringList out;
|
QStringList out;
|
||||||
|
|
||||||
out << "Main Class:" << indent + getMainClass() << emptyLine;
|
out << "Launcher: " + getLauncher();
|
||||||
out << "Native path:" << indent + getNativePath() << emptyLine;
|
out << "Main class: " + getMainClass() << emptyLine;
|
||||||
|
|
||||||
auto profile = m_components->getProfile();
|
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
|
// mods and core mods
|
||||||
auto printModList = [&out](const QString& label, ModFolderModel& model) {
|
auto printModList = [&out](const QString& label, ModFolderModel& model) {
|
||||||
if (model.size()) {
|
if (model.size()) {
|
||||||
|
|
@ -977,9 +939,49 @@ QStringList MinecraftInstance::verboseDescription(AuthSessionPtr session, Minecr
|
||||||
out << emptyLine;
|
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
|
// minecraft arguments
|
||||||
auto params = processMinecraftArgs(nullptr, targetToJoin);
|
auto params = processMinecraftArgs(nullptr, targetToJoin);
|
||||||
out << "Params:";
|
out << "Minecraft arguments:";
|
||||||
out << indent + params.join(' ');
|
out << indent + params.join(' ');
|
||||||
out << emptyLine;
|
out << emptyLine;
|
||||||
|
|
||||||
|
|
@ -994,9 +996,6 @@ QStringList MinecraftInstance::verboseDescription(AuthSessionPtr session, Minecr
|
||||||
}
|
}
|
||||||
out << emptyLine;
|
out << emptyLine;
|
||||||
|
|
||||||
out << "Launcher: " + getLauncher();
|
|
||||||
out << emptyLine;
|
|
||||||
|
|
||||||
// environment variables
|
// environment variables
|
||||||
const QString env = settings->get("Env").toString();
|
const QString env = settings->get("Env").toString();
|
||||||
if (auto envMap = Json::toMap(env); !envMap.isEmpty()) {
|
if (auto envMap = Json::toMap(env); !envMap.isEmpty()) {
|
||||||
|
|
@ -1122,7 +1121,7 @@ LaunchTask* MinecraftInstance::createLaunchTask(AuthSessionPtr session, Minecraf
|
||||||
|
|
||||||
// print a header
|
// 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)
|
// 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<AutoInstallJava>(pptr));
|
||||||
process->appendStep(makeShared<CheckJava>(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
|
// run pre-launch command if that's needed
|
||||||
|
|
@ -1204,11 +1205,6 @@ LaunchTask* MinecraftInstance::createLaunchTask(AuthSessionPtr session, Minecraf
|
||||||
process->appendStep(makeShared<ReconstructAssets>(pptr));
|
process->appendStep(makeShared<ReconstructAssets>(pptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify that minimum Java requirements are met
|
|
||||||
{
|
|
||||||
process->appendStep(makeShared<VerifyJavaInstall>(pptr));
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
{
|
||||||
// actually launch the game
|
// actually launch the game
|
||||||
auto step = makeShared<LauncherPartLaunch>(pptr);
|
auto step = makeShared<LauncherPartLaunch>(pptr);
|
||||||
|
|
|
||||||
|
|
@ -94,8 +94,8 @@ void LauncherPartLaunch::executeTask()
|
||||||
|
|
||||||
m_launchScript = instance->createLaunchScript(m_session, m_targetToJoin);
|
m_launchScript = instance->createLaunchScript(m_session, m_targetToJoin);
|
||||||
QStringList args = instance->javaArguments();
|
QStringList args = instance->javaArguments();
|
||||||
QString allArgs = args.join(", ");
|
QString allArgs = args.join(" ");
|
||||||
emit logLine("Java Arguments:\n[" + m_parent->censorPrivateInfo(allArgs) + "]\n\n", MessageLevel::Launcher);
|
emit logLine("Java arguments:\n " + m_parent->censorPrivateInfo(allArgs) + "\n", MessageLevel::Launcher);
|
||||||
|
|
||||||
auto javaPath = FS::ResolveExecutable(instance->settings()->get("JavaPath").toString());
|
auto javaPath = FS::ResolveExecutable(instance->settings()->get("JavaPath").toString());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ void VerifyJavaInstall::executeTask()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ignoreCompatibility) {
|
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();
|
emitSucceeded();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue