mirror of
https://github.com/ModOrganizer2/modorganizer.git
synced 2026-07-27 13:58:24 -07:00
some fixes/disabled code required since hook.dll is gone
This commit is contained in:
@@ -694,7 +694,10 @@ bool InstallationManager::install(const QString &fileName, GuessedValue<QString>
|
||||
bool archiveOpen = m_CurrentArchive->open(ToWString(QDir::toNativeSeparators(fileName)).c_str(),
|
||||
new MethodCallback<InstallationManager, void, LPSTR>(this, &InstallationManager::queryPassword));
|
||||
if (!archiveOpen) {
|
||||
qDebug("integrated archiver can't open %s. errorcode %d", qPrintable(fileName), m_CurrentArchive->getLastError());
|
||||
qDebug("integrated archiver can't open %s: %s (%d)",
|
||||
qPrintable(fileName),
|
||||
qPrintable(getErrorString(m_CurrentArchive->getLastError())),
|
||||
m_CurrentArchive->getLastError());
|
||||
}
|
||||
ON_BLOCK_EXIT(std::bind(&InstallationManager::postInstallCleanup, this));
|
||||
|
||||
|
||||
@@ -132,6 +132,9 @@ void LoadMechanism::deactivateScriptExtender()
|
||||
|
||||
QDir pluginsDir(game->gameDirectory().absolutePath() + "/data/" + extender->name() + "/plugins");
|
||||
|
||||
#pragma "implement this for usvfs"
|
||||
|
||||
/*
|
||||
QString hookDLLName = ToQString(AppConfig::hookDLLName());
|
||||
if (QFile(pluginsDir.absoluteFilePath(hookDLLName)).exists()) {
|
||||
// remove dll from SE plugins directory
|
||||
@@ -141,6 +144,7 @@ void LoadMechanism::deactivateScriptExtender()
|
||||
}
|
||||
|
||||
removeHintFile(pluginsDir);
|
||||
*/
|
||||
} catch (const std::exception &e) {
|
||||
QMessageBox::critical(nullptr, QObject::tr("Failed to deactivate script extender loading"), e.what());
|
||||
}
|
||||
@@ -191,6 +195,8 @@ void LoadMechanism::activateScriptExtender()
|
||||
pluginsDir.mkpath(".");
|
||||
}
|
||||
|
||||
#pragma message("implement this for usvfs")
|
||||
/*
|
||||
QString targetPath = pluginsDir.absoluteFilePath(ToQString(AppConfig::hookDLLName()));
|
||||
QString hookDLLPath = qApp->applicationDirPath() + "/" + QString::fromStdWString(AppConfig::hookDLLName());
|
||||
|
||||
@@ -210,6 +216,7 @@ void LoadMechanism::activateScriptExtender()
|
||||
}
|
||||
}
|
||||
writeHintFile(pluginsDir);
|
||||
*/
|
||||
} catch (const std::exception &e) {
|
||||
QMessageBox::critical(nullptr, QObject::tr("Failed to set up script extender loading"), e.what());
|
||||
}
|
||||
|
||||
@@ -131,19 +131,6 @@ bool bootstrap()
|
||||
createAndMakeWritable(AppConfig::overwritePath());
|
||||
createAndMakeWritable(AppConfig::logPath());
|
||||
|
||||
// verify the hook-dll exists
|
||||
QString dllName = qApp->applicationDirPath() + "/" + ToQString(AppConfig::hookDLLName());
|
||||
|
||||
if (::GetModuleHandleW(ToWString(dllName).c_str()) != nullptr) {
|
||||
throw std::runtime_error("hook.dll already loaded! You can't start Mod Organizer from within itself (not even indirectly)");
|
||||
}
|
||||
|
||||
HMODULE dllMod = ::LoadLibraryW(ToWString(dllName).c_str());
|
||||
if (dllMod == nullptr) {
|
||||
throw windows_error("hook.dll is missing or invalid");
|
||||
}
|
||||
::FreeLibrary(dllMod);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -516,7 +503,6 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
game->setGameVariant(settings.value("game_edition").toString());
|
||||
|
||||
|
||||
#pragma message("edition isn't used?")
|
||||
qDebug("managing game at %s", qPrintable(QDir::toNativeSeparators(gamePath)));
|
||||
|
||||
|
||||
+3
-1
@@ -585,7 +585,9 @@ bool Profile::invalidationActive(bool *supported) const
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
*supported = false;
|
||||
if (supported != nullptr) {
|
||||
*supported = false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ APPPARAM(std::wstring, iniFileName, L"ModOrganizer.ini")
|
||||
APPPARAM(std::wstring, proxyDLLTarget, L"steam_api.dll")
|
||||
APPPARAM(std::wstring, proxyDLLOrig, L"steam_api_orig.dll") // needs to be identical to the value used in proxydll-project
|
||||
APPPARAM(std::wstring, proxyDLLSource, L"proxy.dll")
|
||||
APPPARAM(std::wstring, hookDLLName, L"hook.dll") // needs to be identical to the value used in proxydll-project
|
||||
APPPARAM(const wchar_t*, localSavePlaceholder, L"__MOProfileSave__\\")
|
||||
|
||||
APPPARAM(std::wstring, firstStepsTutorial, L"tutorial_firststeps_main.js")
|
||||
|
||||
Reference in New Issue
Block a user