From 7940b17ba72ce1d89bf4b61749655adb2ac0ef48 Mon Sep 17 00:00:00 2001 From: kervala Date: Thu, 20 Oct 2016 14:47:08 +0200 Subject: [PATCH] Changed: Init log just after loading config file --- .../tools/client/ryzom_installer/src/main.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/code/ryzom/tools/client/ryzom_installer/src/main.cpp b/code/ryzom/tools/client/ryzom_installer/src/main.cpp index 47201a807..5279678db 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/main.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/main.cpp @@ -144,19 +144,22 @@ int main(int argc, char *argv[]) // instanciate ConfigFile CConfigFile config; - OperationStep step = config.load() ? config.getInstallNextStep():DisplayNoServerError; - if (step == DisplayNoServerError) - { - QMessageBox::critical(NULL, QApplication::tr("Error"), QApplication::tr("Unable to find ryzom_installer.ini")); - return 1; - } + bool res = config.load(); // init log CLogHelper logHelper(config.getInstallationDirectory()); nlinfo("Launched %s", Q2C(config.getInstallerCurrentFilePath())); + OperationStep step = res ? config.getInstallNextStep():DisplayNoServerError; + + if (res == DisplayNoServerError) + { + QMessageBox::critical(NULL, QApplication::tr("Error"), QApplication::tr("Unable to find ryzom_installer.ini")); + return 1; + } + #if defined(Q_OS_WIN) && !defined(_DEBUG) // under Windows, Ryzom Installer should always be copied in TEMP directory QString tempPath = QStandardPaths::writableLocation(QStandardPaths::TempLocation);