#include #include #include #include #include #include #include int main(int argc, char *argv[]) { QApplication app(argc, argv); QStringList args = app.arguments(); if (args.contains("gamelaunch")) { QProcess process; process.setProgram(QApplication::applicationDirPath() + "/lotro_ru.exe"); QFileInfo check_file(QApplication::applicationDirPath() + "/lotro_ru.exe"); if (!(check_file.exists() && check_file.isFile())) { QMessageBox::critical(nullptr, "Ошибка запуска!", "Не удалось запустить русифицированную версию игры! Ошибка 0x0!"); } else { QMessageBox::information(nullptr, "Запуск ВКО:Наследие!", "Добро пожаловать в русифицированную версию Властелин Колец Онлайн!"); } process.setArguments({{"-skiprawdownload", "-disablePatch"}}); if (!process.startDetached()) { QMessageBox::critical(nullptr, "Ошибка запуска!", "Не удалось запустить русифицированную версию игры! Ошибка 0x2!"); } } else { QFile file(QApplication::applicationDirPath() + "/legacy_path.txt"); file.open(QIODevice::ReadOnly); QString legacy_path = file.readLine(); file.close(); if (legacy_path.isEmpty()) legacy_path = QApplication::applicationDirPath() + "/Legacy.exe"; QProcess process; process.setProgram(legacy_path); if (!process.startDetached()) QMessageBox::critical(nullptr, "Ошибка запуска!", "Не удалось запустить русифицированную версию игры! Ошибка 0x1!"); } return 0; }