From f2c145b2fc9d6ffce838398e06f7aa583d05887d Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Sat, 5 Jan 2019 16:34:10 -0600 Subject: Change qPrintable to qUtf8Printable to better support non-ASCII text --- src/installationmanager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/installationmanager.cpp') diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp index 76b1e086..57c5e861 100644 --- a/src/installationmanager.cpp +++ b/src/installationmanager.cpp @@ -758,7 +758,7 @@ bool InstallationManager::install(const QString &fileName, if (fileInfo.dir() == QDir(m_DownloadsDirectory)) { m_CurrentFile = fileInfo.fileName(); } - qDebug("using mod name \"%s\" (id %d) -> %s", modName->toUtf8().constData(), modID, qPrintable(m_CurrentFile)); + qDebug("using mod name \"%s\" (id %d) -> %s", modName->toUtf8().constData(), modID, qUtf8Printable(m_CurrentFile)); //If there's an archive already open, close it. This happens with the bundle //installer when it uncompresses a split archive, then finds it has a real archive @@ -770,8 +770,8 @@ bool InstallationManager::install(const QString &fileName, new MethodCallback(this, &InstallationManager::queryPassword)); if (!archiveOpen) { qDebug("integrated archiver can't open %s: %s (%d)", - qPrintable(fileName), - qPrintable(getErrorString(m_ArchiveHandler->getLastError())), + qUtf8Printable(fileName), + qUtf8Printable(getErrorString(m_ArchiveHandler->getLastError())), m_ArchiveHandler->getLastError()); } ON_BLOCK_EXIT(std::bind(&InstallationManager::postInstallCleanup, this)); @@ -841,7 +841,7 @@ bool InstallationManager::install(const QString &fileName, } } catch (const IncompatibilityException &e) { qCritical("plugin \"%s\" incompatible: %s", - qPrintable(installer->name()), e.what()); + qUtf8Printable(installer->name()), e.what()); } // act upon the installation result. at this point the files have already been -- cgit v1.3.1 From d0445685bf9a1723c8550fbdf115b3b86059174c Mon Sep 17 00:00:00 2001 From: Al Date: Thu, 10 Jan 2019 23:51:53 +0100 Subject: Fix #523 by resetting m_URL after install. --- src/installationmanager.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/installationmanager.cpp') diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp index 57c5e861..50e170d2 100644 --- a/src/installationmanager.cpp +++ b/src/installationmanager.cpp @@ -643,6 +643,9 @@ bool InstallationManager::doInstall(GuessedValue &modName, QString game settingsFile.setValue("repository", repository); settingsFile.setValue("url", m_URL); + //cleanup of m_URL or this will persist across installs. + m_URL = ""; + if (!merge) { // this does not clear the list we have in memory but the mod is going to have to be re-read anyway // btw.: installedFiles were written with beginWriteArray but we can still clear it with beginGroup. nice -- cgit v1.3.1 From e6e8ce1d686d9b208276d84ca312d18d0f40caff Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Fri, 18 Jan 2019 17:46:56 -0600 Subject: Cancel the installation progress bar when done to prevent it showing up again --- src/installationmanager.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/installationmanager.cpp') diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp index 50e170d2..6719c84a 100644 --- a/src/installationmanager.cpp +++ b/src/installationmanager.cpp @@ -579,6 +579,7 @@ bool InstallationManager::doInstall(GuessedValue &modName, QString game m_InstallationProgress = new QProgressDialog(m_ParentWidget); ON_BLOCK_EXIT([this] () { + m_InstallationProgress->cancel(); m_InstallationProgress->hide(); m_InstallationProgress->deleteLater(); m_InstallationProgress = nullptr; -- cgit v1.3.1 From 4b522f40e88e1350434aaa7d77fc60cb7ca36930 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Wed, 30 Jan 2019 20:32:48 -0600 Subject: Make logs more consistent in format and content --- src/categories.cpp | 12 ++++++------ src/directoryrefresher.cpp | 9 ++++++++- src/executableslist.cpp | 4 ++-- src/installationmanager.cpp | 2 +- src/loadmechanism.cpp | 4 ++-- src/mainwindow.cpp | 4 ++-- src/modinfo.cpp | 4 ++-- src/modinfodialog.cpp | 2 +- src/modlistsortproxy.cpp | 4 ++-- src/organizercore.cpp | 10 +++++----- src/overwriteinfodialog.cpp | 2 +- src/pluginlist.cpp | 6 +++--- src/profile.cpp | 22 +++++++++++----------- 13 files changed, 46 insertions(+), 39 deletions(-) (limited to 'src/installationmanager.cpp') diff --git a/src/categories.cpp b/src/categories.cpp index 4d89eff9..9e5fa9f7 100644 --- a/src/categories.cpp +++ b/src/categories.cpp @@ -72,7 +72,7 @@ void CategoryFactory::loadCategories() bool ok = false; int temp = iter->toInt(&ok); if (!ok) { - qCritical("invalid id %s", iter->constData()); + qCritical("invalid category id %s", iter->constData()); } nexusIDs.push_back(temp); } @@ -268,7 +268,7 @@ void CategoryFactory::loadDefaultCategories() int CategoryFactory::getParentID(unsigned int index) const { if (index >= m_Categories.size()) { - throw MyException(QObject::tr("invalid index %1").arg(index)); + throw MyException(QObject::tr("invalid category index: %1").arg(index)); } return m_Categories[index].m_ParentID; @@ -303,7 +303,7 @@ bool CategoryFactory::isDecendantOf(int id, int parentID) const bool CategoryFactory::hasChildren(unsigned int index) const { if (index >= m_Categories.size()) { - throw MyException(QObject::tr("invalid index %1").arg(index)); + throw MyException(QObject::tr("invalid category index: %1").arg(index)); } return m_Categories[index].m_HasChildren; @@ -313,7 +313,7 @@ bool CategoryFactory::hasChildren(unsigned int index) const QString CategoryFactory::getCategoryName(unsigned int index) const { if (index >= m_Categories.size()) { - throw MyException(QObject::tr("invalid index %1").arg(index)); + throw MyException(QObject::tr("invalid category index: %1").arg(index)); } return m_Categories[index].m_Name; @@ -323,7 +323,7 @@ QString CategoryFactory::getCategoryName(unsigned int index) const int CategoryFactory::getCategoryID(unsigned int index) const { if (index >= m_Categories.size()) { - throw MyException(QObject::tr("invalid index %1").arg(index)); + throw MyException(QObject::tr("invalid category index: %1").arg(index)); } return m_Categories[index].m_ID; @@ -334,7 +334,7 @@ int CategoryFactory::getCategoryIndex(int ID) const { std::map::const_iterator iter = m_IDMap.find(ID); if (iter == m_IDMap.end()) { - throw MyException(QObject::tr("invalid category id %1").arg(ID)); + throw MyException(QObject::tr("invalid category id: %1").arg(ID)); } return iter->second; } diff --git a/src/directoryrefresher.cpp b/src/directoryrefresher.cpp index c48b77d9..eded70b0 100644 --- a/src/directoryrefresher.cpp +++ b/src/directoryrefresher.cpp @@ -125,6 +125,10 @@ void DirectoryRefresher::addModFilesToStructure(DirectoryEntry *directoryStructu // files to this mod FilesOrigin &origin = directoryStructure->createOrigin(ToWString(modName), directoryW, priority); for (const QString &filename : stealFiles) { + if (filename.isEmpty()) { + qWarning("Trying to find file with no name"); + continue; + } QFileInfo fileInfo(filename); FileEntry::Ptr file = directoryStructure->findFile(ToWString(fileInfo.fileName())); if (file.get() != nullptr) { @@ -135,7 +139,10 @@ void DirectoryRefresher::addModFilesToStructure(DirectoryEntry *directoryStructu origin.addFile(file->getIndex()); file->addOrigin(origin.getID(), file->getFileTime(), L"", -1); } else { - qWarning("%s not found", qUtf8Printable(fileInfo.fileName())); + QString warnStr = fileInfo.absolutePath(); + if (warnStr.isEmpty()) + warnStr = filename; + qWarning("file not found: %1", qUtf8Printable(warnStr)); } } } else { diff --git a/src/executableslist.cpp b/src/executableslist.cpp index 21cb6ed4..ae4ebdbf 100644 --- a/src/executableslist.cpp +++ b/src/executableslist.cpp @@ -75,7 +75,7 @@ const Executable &ExecutablesList::find(const QString &title) const return exe; } } - throw std::runtime_error(QString("invalid name %1").arg(title).toLocal8Bit().constData()); + throw std::runtime_error(QString("invalid executable name: %1").arg(title).toLocal8Bit().constData()); } @@ -86,7 +86,7 @@ Executable &ExecutablesList::find(const QString &title) return exe; } } - throw std::runtime_error(QString("invalid executable name %1").arg(title).toLocal8Bit().constData()); + throw std::runtime_error(QString("invalid executable name: %1").arg(title).toLocal8Bit().constData()); } diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp index 6719c84a..83128e4b 100644 --- a/src/installationmanager.cpp +++ b/src/installationmanager.cpp @@ -762,7 +762,7 @@ bool InstallationManager::install(const QString &fileName, if (fileInfo.dir() == QDir(m_DownloadsDirectory)) { m_CurrentFile = fileInfo.fileName(); } - qDebug("using mod name \"%s\" (id %d) -> %s", modName->toUtf8().constData(), modID, qUtf8Printable(m_CurrentFile)); + qDebug("using mod name \"%s\" (id %d) -> %s", qUtf8Printable(modName), modID, qUtf8Printable(m_CurrentFile)); //If there's an archive already open, close it. This happens with the bundle //installer when it uncompresses a split archive, then finds it has a real archive diff --git a/src/loadmechanism.cpp b/src/loadmechanism.cpp index ebbb5de3..8f0529ce 100644 --- a/src/loadmechanism.cpp +++ b/src/loadmechanism.cpp @@ -100,7 +100,7 @@ bool LoadMechanism::hashIdentical(const QString &fileNameLHS, const QString &fil { QFile fileLHS(fileNameLHS); if (!fileLHS.open(QIODevice::ReadOnly)) { - throw MyException(QObject::tr("%1 not found").arg(fileNameLHS)); + throw MyException(QObject::tr("file not found: %1").arg(qUtf8Printable(fileNameLHS))); } QByteArray dataLHS = fileLHS.readAll(); QByteArray hashLHS = QCryptographicHash::hash(dataLHS, QCryptographicHash::Md5); @@ -109,7 +109,7 @@ bool LoadMechanism::hashIdentical(const QString &fileNameLHS, const QString &fil QFile fileRHS(fileNameRHS); if (!fileRHS.open(QIODevice::ReadOnly)) { - throw MyException(QObject::tr("%1 not found").arg(fileNameRHS)); + throw MyException(QObject::tr("file not found: %1").arg(qUtf8Printable(fileNameRHS))); } QByteArray dataRHS = fileRHS.readAll(); QByteArray hashRHS = QCryptographicHash::hash(dataRHS, QCryptographicHash::Md5); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index fccb5efe..8bcf7ba7 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -5186,7 +5186,7 @@ void MainWindow::previewDataFile() const FileEntry::Ptr file = m_OrganizerCore.directoryStructure()->searchFile(ToWString(fileName), nullptr); if (file.get() == nullptr) { - reportError(tr("file not found: %1").arg(fileName)); + reportError(tr("file not found: %1").arg(qUtf8Printable(fileName))); return; } @@ -6339,7 +6339,7 @@ void MainWindow::dropLocalFile(const QUrl &url, const QString &outputDir, bool m { QFileInfo file(url.toLocalFile()); if (!file.exists()) { - qWarning("invalid source file %s", qUtf8Printable(file.absoluteFilePath())); + qWarning("invalid source file: %s", qUtf8Printable(file.absoluteFilePath())); return; } QString target = outputDir + "/" + file.fileName(); diff --git a/src/modinfo.cpp b/src/modinfo.cpp index 1c6139f6..7ae41b02 100644 --- a/src/modinfo.cpp +++ b/src/modinfo.cpp @@ -110,7 +110,7 @@ QString ModInfo::getContentTypeName(int contentType) case CONTENT_INI: return tr("INI files"); case CONTENT_MODGROUP: return tr("ModGroup files"); - default: throw MyException(tr("invalid content type %1").arg(contentType)); + default: throw MyException(tr("invalid content type: %1").arg(contentType)); } } @@ -133,7 +133,7 @@ ModInfo::Ptr ModInfo::getByIndex(unsigned int index) QMutexLocker locker(&s_Mutex); if (index >= s_Collection.size() && index != ULONG_MAX) { - throw MyException(tr("invalid mod index %1").arg(index)); + throw MyException(tr("invalid mod index: %1").arg(index)); } if (index == ULONG_MAX) return s_Collection[ModInfo::getIndex("Overwrite")]; return s_Collection[index]; diff --git a/src/modinfodialog.cpp b/src/modinfodialog.cpp index d2e5e84f..04506374 100644 --- a/src/modinfodialog.cpp +++ b/src/modinfodialog.cpp @@ -1431,7 +1431,7 @@ void ModInfoDialog::previewDataFile() const FileEntry::Ptr file = m_OrganizerCore->directoryStructure()->searchFile(ToWString(fileName), nullptr); if (file.get() == nullptr) { - reportError(tr("file not found: %1").arg(fileName)); + reportError(tr("file not found: %1").arg(qUtf8Printable(fileName))); return; } diff --git a/src/modlistsortproxy.cpp b/src/modlistsortproxy.cpp index 99f0efef..2d9ea4a5 100644 --- a/src/modlistsortproxy.cpp +++ b/src/modlistsortproxy.cpp @@ -474,13 +474,13 @@ bool ModListSortProxy::filterAcceptsRow(int row, const QModelIndex &parent) cons } if (row >= static_cast(m_Profile->numMods())) { - qWarning("invalid row idx %d", row); + qWarning("invalid row index: %d", row); return false; } QModelIndex idx = sourceModel()->index(row, 0, parent); if (!idx.isValid()) { - qDebug("invalid index"); + qDebug("invalid mod index"); return false; } if (sourceModel()->hasChildren(idx)) { diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 10b6fd8b..4fa09ab6 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -1010,7 +1010,7 @@ MOBase::IModInterface *OrganizerCore::installMod(const QString &fileName, emit modInstalled(modName); return modInfo.data(); } else { - reportError(tr("mod \"%1\" not found").arg(modName)); + reportError(tr("mod not found: %1").arg(qUtf8Printable(modName))); } } else if (m_InstallationManager.wasCancelled()) { QMessageBox::information(qApp->activeWindow(), tr("Installation cancelled"), @@ -1068,7 +1068,7 @@ void OrganizerCore::installDownload(int index) m_ModInstalled(modName); } else { - reportError(tr("mod \"%1\" not found").arg(modName)); + reportError(tr("mod not found: %1").arg(qUtf8Printable(modName))); } m_DownloadManager.markInstalled(index); @@ -1129,7 +1129,7 @@ QStringList OrganizerCore::findFiles( } } } else { - qWarning("directory %s not found", qUtf8Printable(path)); + qWarning("directory not found: %1", qUtf8Printable(path)); } return result; } @@ -1148,7 +1148,7 @@ QStringList OrganizerCore::getFileOrigins(const QString &fileName) const ToQString(m_DirectoryStructure->getOriginByID(i.first).getName())); } } else { - qDebug("%s not found", qUtf8Printable(fileName)); + qWarning("file not found: %1", qUtf8Printable(fileName)); } return result; } @@ -1294,7 +1294,7 @@ HANDLE OrganizerCore::spawnBinaryProcess(const QFileInfo &binary, if (!binary.exists()) { reportError( - tr("Executable \"%1\" not found").arg(binary.absoluteFilePath())); + tr("Executable not found: %1").arg(qUtf8Printable(binary.absoluteFilePath()))); return INVALID_HANDLE_VALUE; } diff --git a/src/overwriteinfodialog.cpp b/src/overwriteinfodialog.cpp index 4d35a2c3..d1289c91 100644 --- a/src/overwriteinfodialog.cpp +++ b/src/overwriteinfodialog.cpp @@ -110,7 +110,7 @@ void OverwriteInfoDialog::setModInfo(ModInfo::Ptr modInfo) if (QDir(modInfo->absolutePath()).exists()) { m_FileSystemModel->setRootPath(modInfo->absolutePath()); } else { - throw MyException(tr("%1 not found").arg(modInfo->absolutePath())); + throw MyException(tr("mod not found: %1").arg(qUtf8Printable(modInfo->absolutePath()))); } } diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index b2fabbe0..56a5c91f 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -298,7 +298,7 @@ void PluginList::enableESP(const QString &name, bool enable) emit writePluginsList(); } else { - reportError(tr("esp not found: %1").arg(name)); + reportError(tr("Plugin not found: %1").arg(qUtf8Printable(name))); } } @@ -694,7 +694,7 @@ void PluginList::setState(const QString &name, PluginStates state) { m_ESPs[iter->second].m_Enabled = (state == IPluginList::STATE_ACTIVE) || m_ESPs[iter->second].m_ForceEnabled; } else { - qWarning("plugin %s not found", qUtf8Printable(name)); + qWarning("Plugin not found: %1", qUtf8Printable(name)); } } @@ -824,7 +824,7 @@ void PluginList::updateIndices() continue; } if (m_ESPs[i].m_Priority >= static_cast(m_ESPs.size())) { - qCritical("invalid priority %d", m_ESPs[i].m_Priority); + qCritical("invalid plugin priority: %d", m_ESPs[i].m_Priority); continue; } m_ESPsByName[m_ESPs[i].m_Name.toLower()] = i; diff --git a/src/profile.cpp b/src/profile.cpp index 629e043f..a5e3bc54 100644 --- a/src/profile.cpp +++ b/src/profile.cpp @@ -78,7 +78,7 @@ Profile::Profile(const QString &name, IPluginGame const *gamePlugin, bool useDef QDir profileBase(profilesDir); QString fixedName = name; if (!fixDirectoryName(fixedName)) { - throw MyException(tr("invalid profile name %1").arg(name)); + throw MyException(tr("invalid profile name: %1").arg(qUtf8Printable(name))); } if (!profileBase.exists() || !profileBase.mkdir(fixedName)) { @@ -416,19 +416,19 @@ void Profile::refreshModStatus() m_ModStatus[modIndex].m_Enabled = enabled; if (m_ModStatus[modIndex].m_Priority == -1) { if (static_cast(index) >= m_ModStatus.size()) { - throw MyException(tr("invalid index %1").arg(index)); + throw MyException(tr("invalid mod index: %1").arg(index)); } m_ModStatus[modIndex].m_Priority = index++; } } else { qWarning("no mod state for \"%s\" (profile \"%s\")", - qUtf8Printable(modName), m_Directory.path().toUtf8().constData()); + qUtf8Printable(modName), qUtf8Printable(m_Directory.path())); // need to rewrite the modlist to fix this modStatusModified = true; } } else { - qDebug("mod \"%s\" (profile \"%s\") not found", - qUtf8Printable(modName), m_Directory.path().toUtf8().constData()); + qDebug("mod not found: \"%s\" (profile \"%s\")", + qUtf8Printable(modName), qUtf8Printable(m_Directory.path())); // need to rewrite the modlist to fix this modStatusModified = true; } @@ -455,7 +455,7 @@ void Profile::refreshModStatus() m_ModStatus[i].m_Priority = numKnownMods - m_ModStatus[i].m_Priority - 1; } else { if (static_cast(index) >= m_ModStatus.size()) { - throw MyException(tr("invalid index %1").arg(index)); + throw MyException(tr("invalid mod index: %1").arg(index)); } if (modInfo->hasFlag(ModInfo::FLAG_FOREIGN)) { m_ModStatus[i].m_Priority = --topInsert; @@ -552,7 +552,7 @@ unsigned int Profile::modIndexByPriority(int priority) const void Profile::setModEnabled(unsigned int index, bool enabled) { if (index >= m_ModStatus.size()) { - throw MyException(tr("invalid index %1").arg(index)); + throw MyException(tr("invalid mod index: %1").arg(index)); } ModInfo::Ptr modInfo = ModInfo::getByIndex(index); @@ -573,7 +573,7 @@ void Profile::setModsEnabled(const QList &modsToEnable, const QLis QList dirtyMods; for (auto idx : modsToEnable) { if (idx >= m_ModStatus.size()) { - qCritical() << tr("invalid index %1").arg(idx); + qCritical() << tr("invalid mod index: %1").arg(idx); continue; } if (!m_ModStatus[idx].m_Enabled) { @@ -583,7 +583,7 @@ void Profile::setModsEnabled(const QList &modsToEnable, const QLis } for (auto idx : modsToDisable) { if (idx >= m_ModStatus.size()) { - qCritical() << tr("invalid index %1").arg(idx); + qCritical() << tr("invalid mod index: %1").arg(idx); continue; } if (ModInfo::getByIndex(idx)->alwaysEnabled()) { @@ -602,7 +602,7 @@ void Profile::setModsEnabled(const QList &modsToEnable, const QLis bool Profile::modEnabled(unsigned int index) const { if (index >= m_ModStatus.size()) { - throw MyException(tr("invalid index %1").arg(index)); + throw MyException(tr("invalid mod index: %1").arg(index)); } return m_ModStatus[index].m_Enabled; @@ -612,7 +612,7 @@ bool Profile::modEnabled(unsigned int index) const int Profile::getModPriority(unsigned int index) const { if (index >= m_ModStatus.size()) { - throw MyException(tr("invalid index %1").arg(index)); + throw MyException(tr("invalid mod index: %1").arg(index)); } return m_ModStatus[index].m_Priority; -- cgit v1.3.1 From 1369c8d5712bc3b23bcc5a5e9ead4a6ec159bc17 Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Wed, 30 Jan 2019 20:53:48 -0600 Subject: Make logs more consistent in format and content --- src/bbcode.cpp | 2 +- src/downloadmanager.cpp | 2 +- src/installationmanager.cpp | 4 ++-- src/mainwindow.cpp | 8 ++++---- src/modinfodialog.cpp | 4 ++-- src/modinforegular.cpp | 4 ++-- src/organizercore.cpp | 22 +++++++++++----------- src/overwriteinfodialog.cpp | 2 +- src/profile.cpp | 2 +- src/syncoverwritedialog.cpp | 2 +- src/transfersavesdialog.cpp | 2 +- 11 files changed, 27 insertions(+), 27 deletions(-) (limited to 'src/installationmanager.cpp') diff --git a/src/bbcode.cpp b/src/bbcode.cpp index 84d7a7c0..3475f1b2 100644 --- a/src/bbcode.cpp +++ b/src/bbcode.cpp @@ -100,7 +100,7 @@ public: // expression doesn't match. either the input string is invalid // or the expression is qWarning("%s doesn't match the expression for %s", - temp.toUtf8().constData(), tagName.toUtf8().constData()); + qUtf8Printable(temp), qUtf8Printable(tagName)); length = 0; return QString(); } diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index 15831126..1e4ec1f4 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -1510,7 +1510,7 @@ void DownloadManager::nxmFilesAvailable(QString, int, QVariant userData, QVarian } else { if (info->m_FileInfo->fileID == 0) { qWarning("could not determine file id for %s (state %d)", - info->m_FileName.toUtf8().constData(), info->m_State); + qUtf8Printable(info->m_FileName), info->m_State); } } diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp index 83128e4b..be838867 100644 --- a/src/installationmanager.cpp +++ b/src/installationmanager.cpp @@ -526,7 +526,7 @@ bool InstallationManager::testOverwrite(GuessedValue &modName, bool *me settingsFile.write(originalSettings); settingsFile.close(); } else { - qCritical("failed to restore original settings: %s", metaFilename.toUtf8().constData()); + qCritical("failed to restore original settings: %s", qUtf8Printable(metaFilename)); } return true; } else if (overwriteDialog.action() == QueryOverwriteDialog::ACT_MERGE) { @@ -575,7 +575,7 @@ bool InstallationManager::doInstall(GuessedValue &modName, QString game QString targetDirectory = QDir(m_ModsDirectory + "/" + modName).canonicalPath(); QString targetDirectoryNative = QDir::toNativeSeparators(targetDirectory); - qDebug("installing to \"%s\"", targetDirectoryNative.toUtf8().constData()); + qDebug("installing to \"%s\"", qUtf8Printable(targetDirectoryNative)); m_InstallationProgress = new QProgressDialog(m_ParentWidget); ON_BLOCK_EXIT([this] () { diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 8bcf7ba7..9904845b 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1190,7 +1190,7 @@ void MainWindow::startExeAction() selectedExecutable.m_WorkingDirectory.length() != 0 ? selectedExecutable.m_WorkingDirectory : selectedExecutable.m_BinaryInfo.absolutePath(), - selectedExecutable.m_SteamAppID, + selectedExecutable.m_SteamAppID, customOverwrite, forcedLibraries); } else { @@ -1990,7 +1990,7 @@ void MainWindow::on_startButton_clicked() { selectedExecutable.m_WorkingDirectory.length() != 0 ? selectedExecutable.m_WorkingDirectory : selectedExecutable.m_BinaryInfo.absolutePath(), - selectedExecutable.m_SteamAppID, + selectedExecutable.m_SteamAppID, customOverwrite, forcedLibraries); } catch (...) { @@ -2961,7 +2961,7 @@ void MainWindow::displayModInformation(const QString &modName, int tab) { unsigned int index = ModInfo::getIndex(modName); if (index == UINT_MAX) { - qCritical("failed to resolve mod name %s", modName.toUtf8().constData()); + qCritical("failed to resolve mod name %s", qUtf8Printable(modName)); return; } @@ -5531,7 +5531,7 @@ BSA::EErrorCode MainWindow::extractBSA(BSA::Archive &archive, BSA::Folder::Ptr f for (unsigned int i = 0; i < folder->getNumFiles(); ++i) { BSA::File::Ptr file = folder->getFile(i); - BSA::EErrorCode res = archive.extract(file, destination.toUtf8().constData()); + BSA::EErrorCode res = archive.extract(file, qUtf8Printable(destination)); if (res != BSA::ERROR_NONE) { reportError(tr("failed to read %1: %2").arg(file->getName().c_str()).arg(res)); result = res; diff --git a/src/modinfodialog.cpp b/src/modinfodialog.cpp index 04506374..c2ded812 100644 --- a/src/modinfodialog.cpp +++ b/src/modinfodialog.cpp @@ -331,7 +331,7 @@ void ModInfoDialog::refreshLists() QStringList fields(relativeName.prepend("...")); fields.append(ToQString(altString.str())); - QTreeWidgetItem *item = new QTreeWidgetItem(fields); + QTreeWidgetItem *item = new QTreeWidgetItem(fields); item->setData(0, Qt::UserRole, fileName); item->setData(1, Qt::UserRole, ToQString(m_Directory->getOriginByID(alternatives.back().first).getName())); item->setData(1, Qt::UserRole + 1, alternatives.back().first); @@ -1123,7 +1123,7 @@ void ModInfoDialog::openFile(const QModelIndex &index) HINSTANCE res = ::ShellExecuteW(nullptr, L"open", ToWString(fileName).c_str(), nullptr, nullptr, SW_SHOW); if ((unsigned long long)res <= 32) { - qCritical("failed to invoke %s: %d", fileName.toUtf8().constData(), res); + qCritical("failed to invoke %s: %d", qUtf8Printable(fileName), res); } } diff --git a/src/modinforegular.cpp b/src/modinforegular.cpp index f29d3725..15ce56ba 100644 --- a/src/modinforegular.cpp +++ b/src/modinforegular.cpp @@ -64,7 +64,7 @@ ModInfoRegular::~ModInfoRegular() saveMeta(); } catch (const std::exception &e) { qCritical("failed to save meta information for \"%s\": %s", - m_Name.toUtf8().constData(), e.what()); + qUtf8Printable(m_Name), e.what()); } } @@ -631,7 +631,7 @@ QString ModInfoRegular::getURL() const -QStringList ModInfoRegular::archives(bool checkOnDisk) +QStringList ModInfoRegular::archives(bool checkOnDisk) { if (checkOnDisk) { QStringList result; diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 4fa09ab6..a3addcb4 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -1208,18 +1208,18 @@ QStringList OrganizerCore::modsSortedByProfilePriority() const ++i) { int modIndex = currentProfile()->modIndexByPriority(i); auto modInfo = ModInfo::getByIndex(modIndex); - if (!modInfo->hasFlag(ModInfo::FLAG_OVERWRITE) && + if (!modInfo->hasFlag(ModInfo::FLAG_OVERWRITE) && !modInfo->hasFlag(ModInfo::FLAG_BACKUP)) { res.push_back(ModInfo::getByIndex(modIndex)->name()); - } + } } return res; } -void OrganizerCore::spawnBinary(const QFileInfo &binary, - const QString &arguments, - const QDir ¤tDirectory, - const QString &steamAppID, +void OrganizerCore::spawnBinary(const QFileInfo &binary, + const QString &arguments, + const QDir ¤tDirectory, + const QString &steamAppID, const QString &customOverwrite, const QList &forcedLibraries) { @@ -1349,7 +1349,7 @@ HANDLE OrganizerCore::spawnBinaryProcess(const QFileInfo &binary, try { m_USVFS.updateMapping(fileMapping(profileName, customOverwrite)); m_USVFS.updateForcedLibraries(forcedLibraries); - + } catch (const UsvfsConnectorException &e) { qDebug(e.what()); return INVALID_HANDLE_VALUE; @@ -1453,7 +1453,7 @@ HANDLE OrganizerCore::runShortcut(const MOShortcut& shortcut) exe.m_WorkingDirectory.length() != 0 ? exe.m_WorkingDirectory : exe.m_BinaryInfo.absolutePath(), - exe.m_SteamAppID, + exe.m_SteamAppID, "", forcedLibaries); } @@ -1521,7 +1521,7 @@ HANDLE OrganizerCore::startApplication(const QString &executable, } } catch (const std::runtime_error &) { qWarning("\"%s\" not set up as executable", - executable.toUtf8().constData()); + qUtf8Printable(executable)); binary = QFileInfo(executable); } } @@ -1585,7 +1585,7 @@ bool OrganizerCore::waitForProcessCompletion(HANDLE handle, LPDWORD exitCode, IL uilock->setProcessName(processName); qDebug() << "Waiting for" << (originalHandle ? "spawned" : "usvfs") - << "process completion :" << processName.toUtf8().constData(); + << "process completion :" << qUtf8Printable(processName); newHandle = false; } @@ -1840,7 +1840,7 @@ void OrganizerCore::updateModsActiveState(const QList &modIndices, m_PluginList.blockSignals(false); } } - + for (const QString &esl : dir.entryList(QStringList() << "*.esl", QDir::Files)) { const FileEntry::Ptr file = m_DirectoryStructure->findFile(ToWString(esl)); diff --git a/src/overwriteinfodialog.cpp b/src/overwriteinfodialog.cpp index d1289c91..3d82cf17 100644 --- a/src/overwriteinfodialog.cpp +++ b/src/overwriteinfodialog.cpp @@ -221,7 +221,7 @@ void OverwriteInfoDialog::openFile(const QModelIndex &index) HINSTANCE res = ::ShellExecuteW(nullptr, L"open", ToWString(fileName).c_str(), nullptr, nullptr, SW_SHOW); if ((INT_PTR)res <= 32) { - qCritical("failed to invoke %s: %d", fileName.toUtf8().constData(), res); + qCritical("failed to invoke %s: %d", qUtf8Printable(fileName), res); } } diff --git a/src/profile.cpp b/src/profile.cpp index a5e3bc54..79f7d59e 100644 --- a/src/profile.cpp +++ b/src/profile.cpp @@ -349,7 +349,7 @@ void Profile::renameModInList(QFile &modList, const QString &oldName, const QStr modName = newName; ++renamed; } - outBuffer.write(modName.toUtf8().constData()); + outBuffer.write(qUtf8Printable(modName)); outBuffer.write("\r\n"); } modList.close(); diff --git a/src/syncoverwritedialog.cpp b/src/syncoverwritedialog.cpp index 7c341567..4ee4716e 100644 --- a/src/syncoverwritedialog.cpp +++ b/src/syncoverwritedialog.cpp @@ -86,7 +86,7 @@ void SyncOverwriteDialog::readTree(const QString &path, DirectoryEntry *director if (subDir != nullptr) { readTree(fileInfo.absoluteFilePath(), subDir, newItem); } else { - qCritical("no directory structure for %s?", file.toUtf8().constData()); + qCritical("no directory structure for %s?", qUtf8Printable(file)); delete newItem; newItem = nullptr; } diff --git a/src/transfersavesdialog.cpp b/src/transfersavesdialog.cpp index 61dab6e5..130df14f 100644 --- a/src/transfersavesdialog.cpp +++ b/src/transfersavesdialog.cpp @@ -342,7 +342,7 @@ bool TransferSavesDialog::transferCharacters( if (!method(sourceFile.absoluteFilePath(), destinationFile)) { qCritical(errmsg, sourceFile.absoluteFilePath().toUtf8().constData(), - destinationFile.toUtf8().constData()); + qUtf8Printable(destinationFile)); } } } -- cgit v1.3.1 From 55249ba3a6e2b4d51c259c0eff0c1d97ab6be614 Mon Sep 17 00:00:00 2001 From: Krzysztof Starecki Date: Fri, 15 Feb 2019 22:01:36 +0100 Subject: Reject new mod installations if another one is already running --- src/installationmanager.cpp | 14 +- src/installationmanager.h | 7 + src/organizer_en.ts | 552 +++++++++++++++++++++++--------------------- src/organizercore.cpp | 14 ++ 4 files changed, 317 insertions(+), 270 deletions(-) (limited to 'src/installationmanager.cpp') diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp index be838867..769394e7 100644 --- a/src/installationmanager.cpp +++ b/src/installationmanager.cpp @@ -80,7 +80,8 @@ static T resolveFunction(QLibrary &lib, const char *name) InstallationManager::InstallationManager() : m_ParentWidget(nullptr), - m_SupportedExtensions({"zip", "rar", "7z", "fomod", "001"}) { + m_SupportedExtensions({"zip", "rar", "7z", "fomod", "001"}), + m_IsRunning(false) { QLibrary archiveLib(QCoreApplication::applicationDirPath() + "\\dlls\\archive.dll"); if (!archiveLib.load()) { @@ -664,6 +665,11 @@ bool InstallationManager::wasCancelled() return m_ArchiveHandler->getLastError() == Archive::ERROR_EXTRACT_CANCELLED; } +bool InstallationManager::isRunning() +{ + return m_IsRunning; +} + void InstallationManager::postInstallCleanup() { @@ -705,6 +711,7 @@ bool InstallationManager::install(const QString &fileName, bool &hasIniTweaks, int modID) { + m_IsRunning = true; QFileInfo fileInfo(fileName); if (m_SupportedExtensions.find(fileInfo.suffix()) == m_SupportedExtensions.end()) { reportError(tr("File format \"%1\" not supported").arg(fileInfo.suffix())); @@ -853,6 +860,7 @@ bool InstallationManager::install(const QString &fileName, switch (installResult) { case IPluginInstaller::RESULT_CANCELED: case IPluginInstaller::RESULT_FAILED: { + m_IsRunning = false; return false; } break; case IPluginInstaller::RESULT_SUCCESS: @@ -861,8 +869,10 @@ bool InstallationManager::install(const QString &fileName, DirectoryTree::node_iterator iniTweakNode = filesTree->nodeFind(DirectoryTreeInformation("INI Tweaks")); hasIniTweaks = (iniTweakNode != filesTree->nodesEnd()) && ((*iniTweakNode)->numLeafs() != 0); + m_IsRunning = false; return true; } else { + m_IsRunning = false; return false; } } break; @@ -871,6 +881,8 @@ bool InstallationManager::install(const QString &fileName, reportError(tr("None of the available installer plugins were able to handle that archive.\n" "This is likely due to a corrupted or incompatible download or unrecognized archive format.")); + + m_IsRunning = false; return false; } diff --git a/src/installationmanager.h b/src/installationmanager.h index 7c43b4e2..54fdf169 100644 --- a/src/installationmanager.h +++ b/src/installationmanager.h @@ -89,6 +89,11 @@ public: **/ bool wasCancelled(); + /** + * @return true if an installation is currently in progress + **/ + bool isRunning(); + /** * @brief retrieve a string describing the specified error code * @@ -202,6 +207,8 @@ private: private: + bool m_IsRunning; + QWidget *m_ParentWidget; QString m_ModsDirectory; diff --git a/src/organizer_en.ts b/src/organizer_en.ts index ed614df7..d98749c4 100644 --- a/src/organizer_en.ts +++ b/src/organizer_en.ts @@ -1280,99 +1280,99 @@ p, li { white-space: pre-wrap; } InstallationManager - + Password required - + Password - - + + Extracting files - + failed to create backup - + Mod Name - + Name - + Invalid name - + The name you entered is invalid, please enter a different one. - + File format "%1" not supported - + None of the available installer plugins were able to handle that archive. This is likely due to a corrupted or incompatible download or unrecognized archive format. - + no error - + 7z.dll not found - + 7z.dll isn't valid - + archive not found - + failed to open archive - + unsupported archive type - + internal library error - + archive invalid - + unknown archive error @@ -1555,7 +1555,7 @@ p, li { white-space: pre-wrap; } - + Create Backup @@ -1731,8 +1731,8 @@ p, li { white-space: pre-wrap; } - - + + Refresh @@ -1927,7 +1927,7 @@ p, li { white-space: pre-wrap; } - + Update @@ -1965,7 +1965,7 @@ p, li { white-space: pre-wrap; } - + Endorse Mod Organizer @@ -2033,8 +2033,8 @@ Error: %1 - + Endorse @@ -2265,16 +2265,16 @@ Error: %1 - - + + failed to rename "%1" to "%2" - - - + + + Confirm @@ -2371,494 +2371,494 @@ Error: %1 - + <table cellspacing="5"><tr><th>Type</th><th>All</th><th>Visible</th><tr><td>Enabled mods:&emsp;</td><td align=right>%1 / %2</td><td align=right>%3 / %4</td></tr><tr><td>Unmanaged/DLCs:&emsp;</td><td align=right>%5</td><td align=right>%6</td></tr><tr><td>Mod backups:&emsp;</td><td align=right>%7</td><td align=right>%8</td></tr><tr><td>Separators:&emsp;</td><td align=right>%9</td><td align=right>%10</td></tr></table> - + <table cellspacing="6"><tr><th>Type</th><th>Active </th><th>Total</th></tr><tr><td>All plugins:</td><td align=right>%1 </td><td align=right>%2</td></tr><tr><td>ESMs:</td><td align=right>%3 </td><td align=right>%4</td></tr><tr><td>ESPs:</td><td align=right>%7 </td><td align=right>%8</td></tr><tr><td>ESMs+ESPs:</td><td align=right>%9 </td><td align=right>%10</td></tr><tr><td>ESLs:</td><td align=right>%5 </td><td align=right>%6</td></tr></table> - - - + + + Create Mod... - + This will create an empty mod. Please enter a name: - - + + A mod with this name already exists - + Create Separator... - + This will create a new separator. Please enter a name: - + A separator with this name already exists - + This will move all files from overwrite into a new, regular mod. Please enter a name: - + Move successful. - - + + Are you sure? - + About to recursively delete: - + Not logged in, endorsement information will be wrong - + Continue? - + The versioning scheme decides which version is considered newer than another. This function will guess the versioning scheme under the assumption that the installed version is outdated. - - + + Sorry - + I don't know a versioning scheme where %1 is newer than %2. - + Really enable all visible mods? - + Really disable all visible mods? - + Export to csv - + CSV (Comma Separated Values) is a format that can be imported in programs like Excel to create a spreadsheet. You can also use online editors and converters instead. - + Select what mods you want export: - + All installed mods - + Only active (checked) mods from your current profile - + All currently visible mods in the mod list - + Choose what Columns to export: - + Mod_Priority - + Mod_Name - + Notes_column - + Mod_Status - + Primary_Category - + Nexus_ID - + Mod_Nexus_URL - + Mod_Version - + Install_Date - + Download_File_Name - + export failed: %1 - + Open Game folder - + Open MyGames folder - + Open INIs folder - + Open Instance folder - + Open Mods folder - + Open Profile folder - + Open Downloads folder - + Open MO2 Install folder - + Open MO2 Plugins folder - + Open MO2 Logs folder - + Install Mod... - + Create empty mod - + Create Separator - + Enable all visible - + Disable all visible - + Check all for update - + Export to csv... - - + + Send to - - + + Top - - + + Bottom - - + + Priority... - + Separator... - + All Mods - + Sync to Mods... - + Move content to Mod... - + Clear Overwrite... - - + + Open in Explorer - + Restore Backup - + Remove Backup... - - + + Change Categories - - + + Primary Category - + Rename Separator... - + Remove Separator... - + Select Color... - + Reset Color - + Change versioning scheme - + Un-ignore update - + Ignore update - - + + Enable selected - - + + Disable selected - + Rename Mod... - + Reinstall Mod - + Remove Mod... - + Un-Endorse - + Won't endorse - + Endorsement state unknown - + Ignore missing data - + Mark as converted/working - + Visit on Nexus - + Visit web page - + Information... - - + + Exception: - - + + Unknown exception - + <All> - + <Multiple> - + %1 more - + Are you sure you want to remove the following %n save(s)?<br><ul>%1</ul><br>Removed saves will be sent to the Recycle Bin. @@ -2866,12 +2866,12 @@ You can also use online editors and converters instead. - + Enable Mods... - + Delete %n save(s) @@ -2879,22 +2879,22 @@ You can also use online editors and converters instead. - + failed to remove %1 - + failed to create %1 - + Restarting MO - + Changing the managed game directory requires restarting MO. Any pending downloads will be paused. @@ -2902,335 +2902,335 @@ Click OK to restart MO now. - + Can't change download directory while downloads are in progress! - + failed to write to file %1 - + %1 written - + Select binary - + Binary - + Enter Name - + Please enter a name for the executable - + Not an executable - + This is not a recognized executable. - - + + Replace file? - + There already is a hidden version of this file. Replace it? - - + + File operation failed - - + + Failed to remove "%1". Maybe you lack the required file permissions? - + There already is a visible version of this file. Replace it? - - + + Set Priority - + Set the priority of the selected plugins - + file not found: %1 - + failed to generate preview for %1 - + Sorry, can't preview anything. This function currently does not support extracting from bsas. - + Update available - + Open/Execute - + Add as Executable - + Preview - + Un-Hide - + Hide - + Write To File... - + Do you want to endorse Mod Organizer on %1 now? - + Thank you! - + Thank you for your endorsement! - + Request to Nexus failed: %1 - - + + failed to read %1: %2 - - + + Error - + failed to extract %1 (errorcode %2) - + Extract BSA - + This archive contains invalid hashes. Some files may be broken. - + Extract... - + This will restart MO, continue? - + Edit Categories... - + Deselect filter - + Remove - + Enable all - + Disable all - + Unlock load order - + Lock load order - + Open Origin in Explorer - + Open Origin Info... - + depends on missing "%1" - + incompatible with "%1" - + Please wait while LOOT is running - + loot failed. Exit code was: %1 - + failed to start loot - + failed to run loot: %1 - + Errors occured - + Backup of load order created - + Choose backup to restore - + No Backups - + There are no backups to restore - - + + Restore failed - - + + Failed to restore the backup. Errorcode: %1 - + Backup of modlist created - + A file with the same name has already been downloaded. What would you like to do? - + Overwrite - + Rename new file - + Ignore file - + Set the priority of the selected mods @@ -4422,172 +4422,180 @@ p, li { white-space: pre-wrap; } - - + + Installation successful - - + + Configure Mod - - + + This mod contains ini tweaks. Do you want to configure them now? - - + + mod not found: %1 - - + + + + Installation cancelled - - + + + Another installation is currently in progress. + + + + + The mod was not installed completely. - + Executable not found: %1 - + Start Steam? - + Steam is required to be running already to correctly start the game. Should MO try to start steam now? - + Error - + Windows Event Log Error - + The Windows Event Log service is disabled and/or not running. This prevents USVFS from running properly. Your mods may not be working in the executable that you are launching. Note that you may have to restart MO and/or your PC after the service is fixed. Continue launching %1? - + Blacklisted Executable - + The executable you are attempted to launch is blacklisted in the virtual file system. This will likely prevent the executable, and any executables that are launched by this one, from seeing any mods. This could extend to INI files, save games and any other virtualized files. Continue launching %1? - + No profile set - + Failed to refresh list of esps: %1 - + Multiple esps/esls activated, please check that they don't conflict. - + Download? - + A download has been started but no installed page plugin recognizes it. If you download anyway no information (i.e. version) will be associated with the download. Continue? - - + + failed to update mod list: %1 - - + + login successful - + Login failed - + Login failed, try again? - + login failed: %1. Download will not be associated with an account - + login failed: %1 - + login failed: %1. You need to log-in with Nexus to update MO. - + MO1 "Script Extender" load mechanism has left hook.dll in your game folder - - + + Description missing - + <a href="%1">hook.dll</a> has been found in your game folder (right click to copy the full path). This is most likely a leftover of setting the ModOrganizer 1 load mechanism to "Script Extender", in which case you must remove this file either by changing the load mechanism in ModOrganizer 1 or manually removing the file, otherwise the game is likely to crash and burn. - + failed to save load order: %1 - + The designated write target "%1" is not enabled. @@ -5362,7 +5370,7 @@ p, li { white-space: pre-wrap; } - + archive.dll not loaded: "%1" @@ -5584,42 +5592,48 @@ If the folder was still in use, restart MO and try again. + Please select the game to manage - + + Canceled finding game in "%1". + + + + No game identified in "%1". The directory is required to contain the game binary. - + Please select the game edition you have (MO can't start the game correctly if this is set incorrectly!) - + failed to start shortcut: %1 - + failed to start application: %1 - + Mod Organizer - + An instance of Mod Organizer is already running - + Failed to set up instance @@ -5630,7 +5644,7 @@ If the folder was still in use, restart MO and try again. - + <Manage...> diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 4dceefbf..a668de6b 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -988,6 +988,13 @@ MOBase::IModInterface *OrganizerCore::installMod(const QString &fileName, return nullptr; } + if (m_InstallationManager.isRunning()) { + QMessageBox::information( + qApp->activeWindow(), tr("Installation cancelled"), + tr("Another installation is currently in progress."), QMessageBox::Ok); + return nullptr; + } + bool hasIniTweaks = false; GuessedValue modName; if (!initModName.isEmpty()) { @@ -1029,6 +1036,13 @@ MOBase::IModInterface *OrganizerCore::installMod(const QString &fileName, void OrganizerCore::installDownload(int index) { + if (m_InstallationManager.isRunning()) { + QMessageBox::information( + qApp->activeWindow(), tr("Installation cancelled"), + tr("Another installation is currently in progress."), QMessageBox::Ok); + return; + } + try { QString fileName = m_DownloadManager.getFilePath(index); QString gameName = m_DownloadManager.getGameName(index); -- cgit v1.3.1 From 78ae7072c9a0ea3795dc0610b389e8e335f4eee6 Mon Sep 17 00:00:00 2001 From: Silarn Date: Fri, 1 Feb 2019 00:36:44 -0600 Subject: Write the file category ID to the mod data when installing/updating --- src/installationmanager.cpp | 7 +++++-- src/installationmanager.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src/installationmanager.cpp') diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp index 769394e7..b11f5667 100644 --- a/src/installationmanager.cpp +++ b/src/installationmanager.cpp @@ -561,7 +561,7 @@ bool InstallationManager::ensureValidModName(GuessedValue &name) const bool InstallationManager::doInstall(GuessedValue &modName, QString gameName, int modID, const QString &version, const QString &newestVersion, - int categoryID, const QString &repository) + int categoryID, int fileCategoryID, const QString &repository) { if (!ensureValidModName(modName)) { return false; @@ -641,6 +641,7 @@ bool InstallationManager::doInstall(GuessedValue &modName, QString game if (!settingsFile.contains("category")) { settingsFile.setValue("category", QString::number(categoryID)); } + settingsFile.setValue("nexusFileStatus", fileCategoryID); settingsFile.setValue("installationFile", m_CurrentFile); settingsFile.setValue("repository", repository); settingsFile.setValue("url", m_URL); @@ -727,6 +728,7 @@ bool InstallationManager::install(const QString &fileName, QString version = ""; QString newestVersion = ""; int categoryID = 0; + int fileCategoryID = 1; QString repository = "Nexus"; QString metaName = fileName + ".meta"; @@ -745,6 +747,7 @@ bool InstallationManager::install(const QString &fileName, metaFile.value("category", 0).toInt()); categoryID = CategoryFactory::instance().getCategoryID(categoryIndex); repository = metaFile.value("repository", "").toString(); + fileCategoryID = metaFile.value("fileCategory", 1).toInt(); } if (version.isEmpty()) { @@ -822,7 +825,7 @@ bool InstallationManager::install(const QString &fileName, // the simple installer only prepares the installation, the rest // works the same for all installers if (!doInstall(modName, gameName, modID, version, newestVersion, categoryID, - repository)) { + fileCategoryID, repository)) { installResult = IPluginInstaller::RESULT_FAILED; } } diff --git a/src/installationmanager.h b/src/installationmanager.h index 54fdf169..6e4f5925 100644 --- a/src/installationmanager.h +++ b/src/installationmanager.h @@ -176,7 +176,7 @@ private: MOBase::DirectoryTree::Node *getSimpleArchiveBase(MOBase::DirectoryTree *dataTree); bool doInstall(MOBase::GuessedValue &modName, QString gameName, - int modID, const QString &version, const QString &newestVersion, int categoryID, const QString &repository); + int modID, const QString &version, const QString &newestVersion, int categoryID, int fileCategoryID, const QString &repository); //QString generateBackupName(const QString &directoryName) const; -- cgit v1.3.1 From 067d605a58004b2dbde4b0951844baf11c409497 Mon Sep 17 00:00:00 2001 From: Krzysztof Starecki Date: Wed, 20 Feb 2019 15:20:20 +0100 Subject: Fix state breakage when terminating installation via exceptions --- src/installationmanager.cpp | 6 +- src/organizer_en.ts | 1536 +++++++++++++++++++++++-------------------- 2 files changed, 830 insertions(+), 712 deletions(-) (limited to 'src/installationmanager.cpp') diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp index b11f5667..e443a8f2 100644 --- a/src/installationmanager.cpp +++ b/src/installationmanager.cpp @@ -713,6 +713,8 @@ bool InstallationManager::install(const QString &fileName, int modID) { m_IsRunning = true; + ON_BLOCK_EXIT([this]() { m_IsRunning = false; }); + QFileInfo fileInfo(fileName); if (m_SupportedExtensions.find(fileInfo.suffix()) == m_SupportedExtensions.end()) { reportError(tr("File format \"%1\" not supported").arg(fileInfo.suffix())); @@ -863,7 +865,6 @@ bool InstallationManager::install(const QString &fileName, switch (installResult) { case IPluginInstaller::RESULT_CANCELED: case IPluginInstaller::RESULT_FAILED: { - m_IsRunning = false; return false; } break; case IPluginInstaller::RESULT_SUCCESS: @@ -872,10 +873,8 @@ bool InstallationManager::install(const QString &fileName, DirectoryTree::node_iterator iniTweakNode = filesTree->nodeFind(DirectoryTreeInformation("INI Tweaks")); hasIniTweaks = (iniTweakNode != filesTree->nodesEnd()) && ((*iniTweakNode)->numLeafs() != 0); - m_IsRunning = false; return true; } else { - m_IsRunning = false; return false; } } break; @@ -885,7 +884,6 @@ bool InstallationManager::install(const QString &fileName, reportError(tr("None of the available installer plugins were able to handle that archive.\n" "This is likely due to a corrupted or incompatible download or unrecognized archive format.")); - m_IsRunning = false; return false; } diff --git a/src/organizer_en.ts b/src/organizer_en.ts index 0d63c34c..21f15bfd 100644 --- a/src/organizer_en.ts +++ b/src/organizer_en.ts @@ -304,12 +304,12 @@ p, li { white-space: pre-wrap; } DirectoryRefresher - + failed to parse bsa %1: %2 - + failed to read mod (%1): %2 @@ -571,301 +571,316 @@ p, li { white-space: pre-wrap; } - + Memory allocation error (in refreshing directory). - + failed to download %1: could not open output file: %2 - + Download again? - + A file with the same name "%1" has already been downloaded. Do you want to download it again? The new file will receive a different name. - + Wrong Game - + The download link is for a mod for "%1" but this instance of MO has been set up for "%2". - - Already Started + There is already a download queued for this file. + +Mod %1 +File %2 - - A download for this mod file has already been queued. + + Already Queued - - There is already a download started for this file (mod: %1, file: %2). + + There is already a download started for this file. + +Mod %1: %2 +File %3: %4 - - + + Already Started + + + + + remove: invalid download index %1 - + failed to delete %1 - + failed to delete meta file for %1 - + restore: invalid download index: %1 - + cancel: invalid download index %1 - + pause: invalid download index %1 - + resume: invalid download index %1 - + resume (int): invalid download index %1 - + No known download urls. Sorry, this download can't be resumed. - + query: invalid download index %1 - + Please enter the nexus mod id - + Mod ID: - + Please select the source game code for %1 - + VisitNexus: invalid download index %1 - + Nexus ID for this Mod is unknown - + OpenFile: invalid download index %1 - + OpenFileInDownloadsFolder: invalid download index %1 - + get pending: invalid download index %1 - + get path: invalid download index %1 - + Main - + Update - + Optional - + Old - - Misc + + Miscellaneous + + + + + Deleted - + Unknown - + display name: invalid download index %1 - + file name: invalid download index %1 - + file time: invalid download index %1 - + file size: invalid download index %1 - + progress: invalid download index %1 - + state: invalid download index %1 - + infocomplete: invalid download index %1 - - + + mod id: invalid download index %1 - + ishidden: invalid download index %1 - + file info: invalid download index %1 - + mark installed: invalid download index %1 - + mark uninstalled: invalid download index %1 - + Memory allocation error (in processing progress event). - + Memory allocation error (in processing downloaded data). - + Information updated - - + + No matching file found on Nexus! Maybe this file is no longer available or it was renamed? - + No file on Nexus matches the selected file by name. Please manually choose the correct one. - + No download server available. Please try again later. - + Failed to request file info from nexus: %1 - + Warning: Content type is: %1 - + Download header content length: %1 downloaded file size: %2 - + Download failed: %1 (%2) - + We were unable to download the file due to errors after four retries. There may be an issue with the Nexus servers. - + failed to re-open %1 - + Unable to write download to drive (return %1). Check the drive's available storage. @@ -1016,7 +1031,7 @@ Right now the only case I know of where this needs to be overwritten is for the - + Add @@ -1057,34 +1072,34 @@ Right now the only case I know of where this needs to be overwritten is for the - + Select a directory - + Confirm - + Really remove "%1" from executables? - + Modify - - + + Save Changes? - - + + You made changes to the current executable, do you want to save them? @@ -1280,99 +1295,99 @@ p, li { white-space: pre-wrap; } InstallationManager - + Password required - + Password - - + + Extracting files - + failed to create backup - + Mod Name - + Name - + Invalid name - + The name you entered is invalid, please enter a different one. - + File format "%1" not supported - + None of the available installer plugins were able to handle that archive. This is likely due to a corrupted or incompatible download or unrecognized archive format. - + no error - + 7z.dll not found - + 7z.dll isn't valid - + archive not found - + failed to open archive - + unsupported archive type - + internal library error - + archive invalid - + unknown archive error @@ -1482,7 +1497,7 @@ This is likely due to a corrupted or incompatible download or unrecognized archi MainWindow - + Categories @@ -1548,20 +1563,20 @@ p, li { white-space: pre-wrap; } - + Restore Backup... - - + + Create Backup - + Active: @@ -1582,34 +1597,49 @@ p, li { white-space: pre-wrap; } - - - + + + Filter - + + Nexus API Queued and Remaining Requests + + + + + <html><head/><body><p>This tracks the number of queued Nexus API requests on the left (<span style=" font-weight:600;">Q</span>) and the remaining daily (<span style=" font-weight:600;">D</span>) and hourly (<span style=" font-weight:600;">H</span>) requests on the right. The Nexus API limits you to a pool of requests per day and requests per hour. It is dynamically updated every time a request is completed. If you run out of requests, you will be unable to queue downloads, check updates, parse mod info, or even log in. Both pools must be consumed before this happens.</p></body></html> + + + + + API: Q: 0 | D: 0 | H: 0 + + + + Clear all Filters - + No groups - + Nexus IDs - + Pick a program to run. - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -1619,12 +1649,12 @@ p, li { white-space: pre-wrap; } - + Run program - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -1633,17 +1663,17 @@ p, li { white-space: pre-wrap; } - + Run - + Create a shortcut in your start menu or on the desktop to the specified program - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -1652,32 +1682,32 @@ p, li { white-space: pre-wrap; } - + Shortcut - + Plugins - + Sort - + This provides statistics about the plugin list. The total number of active plugins is normally displayed. Other statistics may be accessed with the tooltip of this counter. - + List of available esp/esm files - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -1686,27 +1716,27 @@ p, li { white-space: pre-wrap; } - + Archives - + <html><head/><body><p>BSAs / BA2s are bundles of game assets (textures, scripts, etc.). By default, the engine loads these bundles in a separate step from loose files. <p>Their load order is specified by the priority of the corresponding plugin (right pane, plugins tab).</p><p>If there is a matching plugin, the game will load them no matter what.</p></body></html> - + <html><head/><body><p>Currently detected archives. (<a href="#"><span style=" text-decoration: underline; color:#0000ff;">What is an archive?</span></a>)</p></body></html> - + List of available BS Archives. Archives not checked here are not managed by MO and ignore installation order. - + BSA files are archives (comparable to .zip files) that contain data assets (meshes, textures, ...) to be used by the game. As such they "compete" with loose files in your data directory over which is loaded. By default, BSAs that share their base name with an enabled ESP (i.e. plugin.esp and plugin.bsa) are automatically loaded and will have precedence over all loose files, the installation order you set up to the left is then ignored! @@ -1714,72 +1744,72 @@ p, li { white-space: pre-wrap; } - + Data - + refresh data-directory overview - + Refresh the overview. This may take a moment. - - - - + + + + Refresh - + This is an overview of your data directory as visible to the game (and tools). - + File - + Mod - - + + Filters the above list so that only conflicts are displayed. - + Show only conflicts - - + + Filters the above list so that files from archives are not shown - + Show files from Archives - + Saves - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -1790,1078 +1820,1075 @@ p, li { white-space: pre-wrap; } - + Downloads - + Refresh downloads view - + This is a list of mods you downloaded from Nexus. Double click one to install it. You can also drag an archive into here. - + Show Hidden - + Tool Bar - + Install Mod - + Install &Mod - + Install a new mod from an archive - + Ctrl+M - + Profiles - + &Profiles - + Configure Profiles - + Ctrl+P - + Executables - + &Executables - + Configure the executables that can be started through Mod Organizer - + Ctrl+E - - + + Tools - + &Tools - + Ctrl+I - + Settings - + &Settings - + Configure settings and workarounds - + Ctrl+S - + Nexus - + Search nexus network for more mods - + Ctrl+N - - + + Update - + Mod Organizer is up-to-date - - - No Problems + + + No Notifications - - This button will be highlighted if MO discovered potential problems in your setup and provide tips on how to fix them. - -!Work in progress! -Right now this has very limited functionality + + This button will be highlighted if MO discovered potential problems in your setup and provide tips on how to fix them. - - + + Help - + Ctrl+H - + Endorse MO - - + + Endorse Mod Organizer - + Copy Log to Clipboard - + Change Game - + Open the Instance selection dialog to manage a different Game - + Toolbar - + Desktop - + Start Menu - + There is no supported sort mechanism for this game. You will probably have to use a third-party tool. - + Crash on exit - + MO crashed while exiting. Some settings may not be saved. Error: %1 - - Problems + + Notifications - - There are potential problems with your setup + + There are notifications to read - - Everything seems to be in order + + There are no notifications - - - + + + Endorse - + Won't Endorse - + Help on UI - + Documentation - + Chat on Discord - + Report Issue - + Tutorials - + About - + About Qt - + Name - + Please enter a name for the new profile - + failed to create profile: %1 - + Show tutorial? - + You are starting Mod Organizer for the first time. Do you want to show a tutorial of its basic features? If you choose no you can always start the tutorial from the "Help"-menu. - + Downloads in progress - + There are still downloads in progress, do you really want to quit? - + Plugin "%1" failed: %2 - + Plugin "%1" failed - + Browse Mod Page - + Also in: <br> - + No conflict - + <Edit...> - + This bsa is enabled in the ini file so it may be required! - + Activating Network Proxy - + Notice: Your current MO version (%1) is lower than the previously used one (%2). The GUI may not downgrade gracefully, so you may experience oddities. However, there should be no serious issues. - + Choose Mod - + Mod Archive - + Start Tutorial? - + You're about to start a tutorial. For technical reasons it's not possible to end the tutorial early. Continue? - + failed to spawn notepad.exe: %1 - + failed to change origin name: %1 - + failed to move "%1" from mod "%2" to "%3": %4 - + <Contains %1> - + <Checked> - + <Unchecked> - + <Update> - + <Mod Backup> - + <Managed by MO> - + <Managed outside MO> - + <No category> - + <Conflicted> - + <Not Endorsed> - + failed to rename mod: %1 - + Overwrite? - + This will replace the existing mod "%1". Continue? - + failed to remove mod "%1" - - - + + + failed to rename "%1" to "%2" - - - - + + + + Confirm - + Remove the following mods?<br><ul>%1</ul> - + failed to remove mod: %1 - - - + + + Failed - + Installation file no longer exists - + Mods installed with old versions of MO can't be reinstalled in this way. - + Failed to create backup. - + You need to be logged in with Nexus to resume a download - - - - + + + + You need to be logged in with Nexus to endorse - - + + Endorsing multiple mods will take a while. Please wait... - - + + Unendorsing multiple mods will take a while. Please wait... - + Failed to display overwrite dialog: %1 - + Opening Nexus Links - + You are trying to open %1 links to Nexus Mods. Are you sure you want to do this? - + Nexus ID for this Mod is unknown - + Opening Web Pages - + You are trying to open %1 Web Pages. Are you sure you want to do this? - + Web page for this mod is unknown - + <table cellspacing="5"><tr><th>Type</th><th>All</th><th>Visible</th><tr><td>Enabled mods:&emsp;</td><td align=right>%1 / %2</td><td align=right>%3 / %4</td></tr><tr><td>Unmanaged/DLCs:&emsp;</td><td align=right>%5</td><td align=right>%6</td></tr><tr><td>Mod backups:&emsp;</td><td align=right>%7</td><td align=right>%8</td></tr><tr><td>Separators:&emsp;</td><td align=right>%9</td><td align=right>%10</td></tr></table> - + <table cellspacing="6"><tr><th>Type</th><th>Active </th><th>Total</th></tr><tr><td>All plugins:</td><td align=right>%1 </td><td align=right>%2</td></tr><tr><td>ESMs:</td><td align=right>%3 </td><td align=right>%4</td></tr><tr><td>ESPs:</td><td align=right>%7 </td><td align=right>%8</td></tr><tr><td>ESMs+ESPs:</td><td align=right>%9 </td><td align=right>%10</td></tr><tr><td>ESLs:</td><td align=right>%5 </td><td align=right>%6</td></tr></table> - - - + + + Create Mod... - + This will create an empty mod. Please enter a name: - - + + A mod with this name already exists - + Create Separator... - + This will create a new separator. Please enter a name: - + A separator with this name already exists - + This will move all files from overwrite into a new, regular mod. Please enter a name: - + Move successful. - - + + Are you sure? - + About to recursively delete: - - Not logged in, endorsement information will be wrong - - - - + Continue? - + The versioning scheme decides which version is considered newer than another. This function will guess the versioning scheme under the assumption that the installed version is outdated. - - + + Sorry - + I don't know a versioning scheme where %1 is newer than %2. - + Really enable all visible mods? - + Really disable all visible mods? - + Export to csv - + CSV (Comma Separated Values) is a format that can be imported in programs like Excel to create a spreadsheet. You can also use online editors and converters instead. - + Select what mods you want export: - + All installed mods - + Only active (checked) mods from your current profile - + All currently visible mods in the mod list - + Choose what Columns to export: - + Mod_Priority - + Mod_Name - + Notes_column - + Mod_Status - + Primary_Category - + Nexus_ID - + Mod_Nexus_URL - + Mod_Version - + Install_Date - + Download_File_Name - + export failed: %1 - + Open Game folder - + Open MyGames folder - + Open INIs folder - + Open Instance folder - + Open Mods folder - + Open Profile folder - + Open Downloads folder - + Open MO2 Install folder - + Open MO2 Plugins folder - + Open MO2 Logs folder - + Install Mod... - + Create empty mod - + Create Separator - + Enable all visible - + Disable all visible - - Check all for update + + Check for updates - + Export to csv... - - + + Send to - - + + Top - - + + Bottom - - + + Priority... - + Separator... - + All Mods - + Sync to Mods... - + Move content to Mod... - + Clear Overwrite... - - + + Open in Explorer - + Restore Backup - + Remove Backup... - - + + Change Categories - - + + Primary Category - + Rename Separator... - + Remove Separator... - + Select Color... - + Reset Color - + Change versioning scheme - + + Force-check updates + + + + Un-ignore update - + Ignore update - - + + Enable selected - - + + Disable selected - + Rename Mod... - + Reinstall Mod - + Remove Mod... - + Un-Endorse - + Won't endorse - + Endorsement state unknown - + Ignore missing data - + Mark as converted/working - + Visit on Nexus - + Visit web page - + Information... - - + + Exception: - - + + Unknown exception - + <All> - + <Multiple> - + %1 more - + Are you sure you want to remove the following %n save(s)?<br><ul>%1</ul><br>Removed saves will be sent to the Recycle Bin. @@ -2869,12 +2896,12 @@ You can also use online editors and converters instead. - + Enable Mods... - + Delete %n save(s) @@ -2882,22 +2909,22 @@ You can also use online editors and converters instead. - + failed to remove %1 - + failed to create %1 - + Restarting MO - + Changing the managed game directory requires restarting MO. Any pending downloads will be paused. @@ -2905,345 +2932,373 @@ Click OK to restart MO now. - + Can't change download directory while downloads are in progress! - + failed to write to file %1 - + %1 written - + Select binary - + Binary - + Enter Name - + Please enter a name for the executable - + Not an executable - + This is not a recognized executable. - - + + Replace file? - + There already is a hidden version of this file. Replace it? - - + + File operation failed - - + + Failed to remove "%1". Maybe you lack the required file permissions? - + There already is a visible version of this file. Replace it? - - + + Set Priority - + Set the priority of the selected plugins - + file not found: %1 - + failed to generate preview for %1 - + Sorry, can't preview anything. This function currently does not support extracting from bsas. - + Update available - + Open/Execute - + Add as Executable - + Preview - + Un-Hide - + Hide - + Write To File... - + Do you want to endorse Mod Organizer on %1 now? - + + Abstain from Endorsing Mod Organizer + + + + + Are you sure you want to abstain from endorsing Mod Organizer 2? +You will have to visit the mod page on the %1 Nexus site to change your mind. + + + + + + Thank you for endorsing MO2! :) + + + + + + Please reconsider endorsing MO2 on Nexus! + + + + Thank you! - + Thank you for your endorsement! - + Okay. - + This mod will not be endorsed and will no longer ask you to endorse. - + + Mod ID %1 no longer seems to be available on Nexus. + + + + Request to Nexus failed: %1 - - + + failed to read %1: %2 - - + + Error - + failed to extract %1 (errorcode %2) - + Extract BSA - + This archive contains invalid hashes. Some files may be broken. - + Extract... - + This will restart MO, continue? - + Edit Categories... - + Deselect filter - + Remove - + Enable all - + Disable all - + Unlock load order - + Lock load order - + Open Origin in Explorer - + Open Origin Info... - + depends on missing "%1" - + incompatible with "%1" - + Please wait while LOOT is running - + loot failed. Exit code was: %1 - + failed to start loot - + failed to run loot: %1 - + Errors occured - + Backup of load order created - + Choose backup to restore - + No Backups - + There are no backups to restore - - + + Restore failed - - + + Failed to restore the backup. Errorcode: %1 - + Backup of modlist created - + A file with the same name has already been downloaded. What would you like to do? - + Overwrite - + Rename new file - + Ignore file - + Set the priority of the selected mods @@ -3251,8 +3306,8 @@ Click OK to restart MO now. MessageDialog - - + + Placeholder @@ -3326,16 +3381,16 @@ Click OK to restart MO now. - invalid content type %1 + invalid content type: %1 - invalid mod index %1 + invalid mod index: %1 - + remove: invalid mod index %1 @@ -3742,210 +3797,214 @@ p, li { white-space: pre-wrap; } - Info requested, please wait - + Main - + Update - + Optional - + Old - + + Miscellaneous + + + + Deleted - + Unknown - + Current Version: %1 - + No update available - - (description incomplete, please visit nexus) + + <div style="text-align: center;"><h1>Uh oh!</h1><p>Sorry, there is no description available for this mod. :(</p></div> - + <a href="%1">Visit on Nexus</a> - + Failed to delete %1 - - - - + + + + Confirm - - + + Are sure you want to delete "%1"? - - + + Are sure you want to delete the selected files? - - + + New Folder - + Failed to create "%1" - - + + Replace file? - + There already is a hidden version of this file. Replace it? - - + + File operation failed - - + + Failed to remove "%1". Maybe you lack the required file permissions? - - + + failed to rename %1 to %2 - + There already is a visible version of this file. Replace it? - + Select binary - + Binary - + file not found: %1 - + failed to generate preview for %1 - + Sorry - + Sorry, can't preview anything. This function currently does not support extracting from bsas. - + Un-Hide - + Hide - - + + Open/Execute - - + + Preview - + Name - + Please enter a name - - + + Error - + Invalid name. Must be a valid file name - + A tweak by that name exists - + Create Tweak @@ -3984,18 +4043,18 @@ p, li { white-space: pre-wrap; } ModInfoRegular - - + + failed to write %1/meta.ini: error %2 - + %1 contains no esp/esm/esl and no asset (textures, meshes, interface, ...) directory - + Categories: <br> @@ -4156,148 +4215,168 @@ p, li { white-space: pre-wrap; } - + installed version: "%1", newest version: "%2" - + The newest version on Nexus seems to be older than the one you have installed. This could either mean the version you have has been withdrawn (i.e. due to a bug) or the author uses a non-standard versioning scheme and that newest version is actually newer. Either way you may want to "upgrade". + This file has been marked as "Old". There is most likely an updated version of this file available. + + + + + This file has been marked as "Deleted"! You may want to check for an update or remove the nexus ID from this mod! + + + + + %1 minute(s) and %2 second(s) + + + + + This mod will be available to check in %2. + + + + Categories: <br> - + Invalid name - + Name is already in use by another mod - + drag&drop failed: %1 - + Confirm - + Are you sure you want to remove "%1"? - + Flags - + Content - + Mod Name - + Version - + Priority - + Category - + Source Game - + Nexus ID - + Installation - + Notes - - + + unknown - + Name of your mods - + Version of the mod (if available) - + Installation priority of your mod. The higher, the more "important" it is and thus overwrites files from mods with lower priority. - + Category of the mod. - + The source game which was the origin of this mod. - + Id of the mod as used on Nexus. - + Emblemes to highlight things that might require attention. - + Depicts the content of the mod:<br><table cellspacing=7><tr><td><img src=":/MO/gui/content/plugin" width=32/></td><td>Game plugins (esp/esm/esl)</td></tr><tr><td><img src=":/MO/gui/content/interface" width=32/></td><td>Interface</td></tr><tr><td><img src=":/MO/gui/content/mesh" width=32/></td><td>Meshes</td></tr><tr><td><img src=":/MO/gui/content/bsa" width=32/></td><td>BSA</td></tr><tr><td><img src=":/MO/gui/content/texture" width=32/></td><td>Textures</td></tr><tr><td><img src=":/MO/gui/content/sound" width=32/></td><td>Sounds</td></tr><tr><td><img src=":/MO/gui/content/music" width=32/></td><td>Music</td></tr><tr><td><img src=":/MO/gui/content/string" width=32/></td><td>Strings</td></tr><tr><td><img src=":/MO/gui/content/script" width=32/></td><td>Scripts (Papyrus)</td></tr><tr><td><img src=":/MO/gui/content/skse" width=32/></td><td>Script Extender plugins</td></tr><tr><td><img src=":/MO/gui/content/skyproc" width=32/></td><td>SkyProc Patcher</td></tr><tr><td><img src=":/MO/gui/content/menu" width=32/></td><td>Mod Configuration Menu</td></tr><tr><td><img src=":/MO/gui/content/inifile" width=32/></td><td>INI files</td></tr><tr><td><img src=":/MO/gui/content/modgroup" width=32/></td><td>ModGroup files</td></tr></table> - + Time this mod was installed - + User notes about the mod @@ -4339,30 +4418,45 @@ p, li { white-space: pre-wrap; } NXMAccessManager - + Validating Nexus Connection - + Verifying Nexus login - + There was a timeout during the request - + Unknown error + + + Validation failed, please reauthenticate in the Settings -> Nexus tab: %1 + + + + + Could not parse response. Invalid JSON. + + + + + Unknown error. + + NXMUrl - + invalid nxm-link: %1 @@ -4370,17 +4464,17 @@ p, li { white-space: pre-wrap; } NexusInterface - + Failed to guess mod id for "%1", please pick the correct one - + empty response - + invalid response @@ -4388,214 +4482,234 @@ p, li { white-space: pre-wrap; } OrganizerCore - - + + Failed to write settings - + An error occured trying to update MO settings to %1: %2 - + File is write protected - + Invalid file format (probably a bug) - + Unknown error %1 - + An error occured trying to write back MO settings to %1: %2 - - + + Download started - + Download failed - + + + + + Installation cancelled + + + + - Installation successful + Another installation is currently in progress. - - - Configure Mod + + + Installation successful - - - This mod contains ini tweaks. Do you want to configure them now? + + + Configure Mod - - - mod "%1" not found + + + This mod contains ini tweaks. Do you want to configure them now? - - - Installation cancelled + + + mod not found: %1 - - + + The mod was not installed completely. - - Executable "%1" not found + + Executable not found: %1 - + Start Steam? - + Steam is required to be running already to correctly start the game. Should MO try to start steam now? - + + Steam: Access Denied + + + + + MO was denied access to the Steam process. This normally indicates that Steam is being run as administrator while MO is not. This can cause issues launching the game. It is recommended to not run Steam as administrator unless absolutely neccessary. + +Restart MO as administrator? + + + + Error - + Windows Event Log Error - + The Windows Event Log service is disabled and/or not running. This prevents USVFS from running properly. Your mods may not be working in the executable that you are launching. Note that you may have to restart MO and/or your PC after the service is fixed. Continue launching %1? - + Blacklisted Executable - + The executable you are attempted to launch is blacklisted in the virtual file system. This will likely prevent the executable, and any executables that are launched by this one, from seeing any mods. This could extend to INI files, save games and any other virtualized files. Continue launching %1? - + No profile set - + Failed to refresh list of esps: %1 - + Multiple esps/esls activated, please check that they don't conflict. - + Download? - + A download has been started but no installed page plugin recognizes it. If you download anyway no information (i.e. version) will be associated with the download. Continue? - - + + failed to update mod list: %1 - - + + login successful - + Login failed - + Login failed, try again? - + login failed: %1. Download will not be associated with an account - + login failed: %1 - + login failed: %1. You need to log-in with Nexus to update MO. - + MO1 "Script Extender" load mechanism has left hook.dll in your game folder - - + + Description missing - + <a href="%1">hook.dll</a> has been found in your game folder (right click to copy the full path). This is most likely a leftover of setting the ModOrganizer 1 load mechanism to "Script Extender", in which case you must remove this file either by changing the load mechanism in ModOrganizer 1 or manually removing the file, otherwise the game is likely to crash and burn. - + failed to save load order: %1 - + The designated write target "%1" is not enabled. @@ -4639,7 +4753,7 @@ Continue? - %1 not found + mod not found: %1 @@ -4742,94 +4856,94 @@ Continue? - + failed to update esp info for file %1 (source id: %2), error: %3 - - esp not found: %1 + + Plugin not found: %1 - - + + Confirm - + Really enable all plugins? - + Really disable all plugins? - + The file containing locked plugin indices is broken - - + + <b>Origin</b>: %1 - + <br><b><i>This plugin can't be disabled (enforced by the game).</i></b> - + Author - + Description - + Missing Masters - + Enabled Masters - + Loads Archives - + There are Archives connected to this plugin. Their assets will be added to your game, overwriting in case of conflicts following the plugin order. Loose files will always overwrite assets from Archives. (This flag only checks for Archives from the same mod as the plugin) - + Loads INI settings - + There is an ini file connected to this plugin. Its settings will be added to your game settings, overwriting in case of conflicts. - + This ESP is flagged as an ESL. It will adhere to the ESP load order but the records will be loaded in ESL space. - + failed to restore load order for %1 @@ -4859,7 +4973,7 @@ Continue? ProblemsDialog - Problems + Notifications @@ -4892,7 +5006,7 @@ p, li { white-space: pre-wrap; } Profile - invalid profile name %1 + invalid profile name: %1 @@ -4933,7 +5047,7 @@ p, li { white-space: pre-wrap; } - invalid index %1 + invalid mod index: %1 @@ -5253,7 +5367,7 @@ p, li { white-space: pre-wrap; } - + Error @@ -5299,12 +5413,12 @@ p, li { white-space: pre-wrap; } - invalid index %1 + invalid category index: %1 - invalid category id %1 + invalid category id: %1 @@ -5370,7 +5484,7 @@ p, li { white-space: pre-wrap; } - + archive.dll not loaded: "%1" @@ -5517,7 +5631,7 @@ If the folder was still in use, restart MO and try again. - %1 not found + file not found: %1 @@ -5575,7 +5689,7 @@ If the folder was still in use, restart MO and try again. - + Failed to create "%1". Your user account probably lacks permission. @@ -5592,73 +5706,79 @@ If the folder was still in use, restart MO and try again. + Please select the game to manage - + + Canceled finding game in "%1". + + + + No game identified in "%1". The directory is required to contain the game binary. - + Please select the game edition you have (MO can't start the game correctly if this is set incorrectly!) - + failed to start shortcut: %1 - + failed to start application: %1 - - + + Mod Organizer - + An instance of Mod Organizer is already running - + Failed to set up instance - + Please use "Help" from the toolbar to get usage instructions to all elements - - + + <Manage...> - + failed to parse profile %1: %2 - + Failed to start "%1" - + Waiting - + Please press OK once you're logged into steam. @@ -5679,12 +5799,12 @@ If the folder was still in use, restart MO and try again. - + failed to access %1 - + failed to set file time %1 @@ -5694,12 +5814,12 @@ If the folder was still in use, restart MO and try again. - + Script Extender - + Proxy DLL @@ -5905,44 +6025,44 @@ Select Show Details option to see the full change-log. Settings - + Failed - + Sorry, failed to start the helper application - - + + attempt to store setting for unknown plugin "%1" - - + + Error - + Failed to retrieve a Nexus API key! Please try again.A browser window should open asking you to authorize. - + Failed to create "%1", you may not have the necessary permission. path remains unchanged. - + Restart Mod Organizer? - + In order to reset the window geometries, MO must be restarted. Restart it now? @@ -6473,7 +6593,7 @@ Uncheck this if you want to use Mod Organizer with total conversions (like Nehri - Enable parsing of Archives. Has negative effects on performance. + Enable parsing of Archives. This is an Experimental Feature. Has negative effects on performance and known incorrectness. @@ -6483,7 +6603,7 @@ Uncheck this if you want to use Mod Organizer with total conversions (like Nehri - Enable parsing of Archives + Enable parsing of Archives (Experimental Feature) @@ -6651,22 +6771,22 @@ programs you are intentionally running. - + Confirm - + Changing the mod directory affects all your profiles! Mods not present (or named differently) in the new location will be disabled in all profiles. There is no way to undo this unless you backed up your profiles manually. Proceed? - + Executables Blacklist - + Enter one executable per line to be blacklisted from the virtual file system. Mods and other virtualized files will not be visible to these executables and any executables launched by them. @@ -6677,47 +6797,47 @@ Example: - + Select base directory - + Select download directory - + Select mod directory - + Select cache directory - + Select profiles directory - + Select overwrite directory - + Select game executable - + Confirm? - + This will make all dialogs show up again where you checked the "Remember selection"-box. Continue? -- cgit v1.3.1