Skip to content

Commit

Permalink
launch browser instead of maintenancetool from offline builds
Browse files Browse the repository at this point in the history
  • Loading branch information
apage43 committed Sep 27, 2023
1 parent 7f979c8 commit 6711bdd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion gpt4all-chat/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ if (GPT4ALL_LOCALHOST)
cpack_ifw_add_repository("GPT4AllRepository" URL "http://localhost/repository")
elseif(GPT4ALL_OFFLINE_INSTALLER)
add_compile_definitions(GPT4ALL_OFFLINE_INSTALLER)
# noop
else()
if(${CMAKE_SYSTEM_NAME} MATCHES Linux)
cpack_ifw_add_repository("GPT4AllRepository" URL "https://gpt4all.io/installer_repos/linux/repository")
Expand Down
6 changes: 6 additions & 0 deletions gpt4all-chat/llm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <QProcess>
#include <QResource>
#include <QSettings>
#include <QDesktopServices>
#include <fstream>

class MyLLM: public LLM { };
Expand Down Expand Up @@ -60,6 +61,10 @@ bool LLM::hasSettingsAccess() const

bool LLM::checkForUpdates() const
{
#ifdef GPT4ALL_OFFLINE_INSTALLER
#pragma message "offline installer build will not check for updates!"
return QDesktopServices::openUrl(QUrl("https://gpt4all.io/"));
#else
Network::globalInstance()->sendCheckForUpdates();

#if defined(Q_OS_LINUX)
Expand All @@ -78,6 +83,7 @@ bool LLM::checkForUpdates() const
}

return QProcess::startDetached(fileName);
#endif
}

bool LLM::directoryExists(const QString &path) const
Expand Down

0 comments on commit 6711bdd

Please sign in to comment.