mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-29 00:36:01 +00:00
Big updates to the UI.
This commit is contained in:
22
llm.cpp
22
llm.cpp
@@ -3,6 +3,7 @@
|
||||
#include <QCoreApplication>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QProcess>
|
||||
#include <QResource>
|
||||
#include <fstream>
|
||||
|
||||
@@ -143,3 +144,24 @@ void LLM::responseStopped()
|
||||
m_responseInProgress = false;
|
||||
emit responseInProgressChanged();
|
||||
}
|
||||
|
||||
bool LLM::checkForUpdates() const
|
||||
{
|
||||
#if defined(Q_OS_LINUX)
|
||||
QString tool("MaintenanceTool");
|
||||
#elif defined(Q_OS_WINDOWS)
|
||||
QString tool("MaintenanceTool.exe");
|
||||
#elif defined(Q_OS_DARWIN)
|
||||
QString tool("MaintenanceTool.app/Contents/MacOS/MaintenanceTool");
|
||||
#endif
|
||||
|
||||
QString fileName = QCoreApplication::applicationDirPath()
|
||||
+ QDir::separator() + ".." + QDir::separator() + tool;
|
||||
if (!QFileInfo::exists(fileName)) {
|
||||
qDebug() << "Couldn't find tool at" << fileName << "so cannot check for updates!";
|
||||
return false;
|
||||
}
|
||||
|
||||
return QProcess::startDetached(fileName);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user