mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-21 11:29:48 +00:00
This PR establishes the initial infrastructure required to migrate gpt4all away from reliance on the IFW framwork by implementing a custom updater. This custom updater (currently headless only) can perform the same operations as the existing updater with the option for more functionality to be added and most importantly, is installer agnostic, meaning gpt4all can start to leverage platform specific installers. Implements both offline and online installation and update mechanisms. Initial implementation of: https://github.com/nomic-ai/gpt4all/issues/2878 Signed-off-by: John Parent <john.parent@kitware.com>
38 lines
598 B
C++
38 lines
598 B
C++
#pragma once
|
|
|
|
#include <iostream>
|
|
#include <fstream>
|
|
#include <sstream>
|
|
|
|
#include <QCoreApplication>
|
|
#include <QFile>
|
|
#include <QByteArray>
|
|
|
|
// Symbols indicating beginning and end of embedded installer
|
|
extern "C" {
|
|
extern char data_start_gpt4all_installer, data_stop_gpt4all_installer;
|
|
extern int gpt4all_installer_size;
|
|
}
|
|
|
|
namespace gpt4all {
|
|
namespace embedded {
|
|
|
|
class EmbeddedInstaller : public QObject
|
|
{
|
|
public:
|
|
EmbeddedInstaller();
|
|
void extractAndDecode();
|
|
void installInstaller();
|
|
|
|
private:
|
|
char * start;
|
|
char * end;
|
|
int size;
|
|
QByteArray data;
|
|
};
|
|
|
|
|
|
}
|
|
}
|
|
|