cmake: do not modify gpt4all.app after signing it (#3417)

Signed-off-by: AT <manyoso@users.noreply.github.com>
This commit is contained in:
Jared Van Bortel
2025-01-24 14:15:24 -05:00
committed by GitHub
parent f4f7de51e7
commit 4fbc20ced9
4 changed files with 26 additions and 25 deletions

View File

@@ -88,19 +88,18 @@ int main(int argc, char *argv[])
#endif
// set search path before constructing the MySettings instance, which relies on this
QString llmodelSearchPaths = QCoreApplication::applicationDirPath();
const QString libDir = QCoreApplication::applicationDirPath() + "/../lib/";
if (LLM::directoryExists(libDir))
llmodelSearchPaths += ";" + libDir;
#if defined(Q_OS_MAC)
const QString binDir = QCoreApplication::applicationDirPath() + "/../../../";
if (LLM::directoryExists(binDir))
llmodelSearchPaths += ";" + binDir;
const QString frameworksDir = QCoreApplication::applicationDirPath() + "/../Frameworks/";
if (LLM::directoryExists(frameworksDir))
llmodelSearchPaths += ";" + frameworksDir;
{
auto appDirPath = QCoreApplication::applicationDirPath();
QStringList searchPaths {
#ifdef Q_OS_DARWIN
u"%1/../Frameworks"_s.arg(appDirPath),
#else
appDirPath,
u"%1/../lib"_s.arg(appDirPath),
#endif
LLModel::Implementation::setImplementationsSearchPath(llmodelSearchPaths.toStdString());
};
LLModel::Implementation::setImplementationsSearchPath(searchPaths.join(u';').toStdString());
}
// Set the local and language translation before the qml engine has even been started. This will
// use the default system locale unless the user has explicitly set it to use a different one.