source: src-qt4/pc-installgui/backend.h @ 027bbae

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2releng/10.0.3releng/10.1
Last change on this file since 027bbae was 027bbae, checked in by Kris Moore <kris@…>, 19 months ago

Setup pc-installgui to switch between the default pc-sysinstall and a debug copy, if it exists

  • Property mode set to 100644
File size: 2.3 KB
RevLine 
[1620346]1#ifndef BACKEND_H
2#define BACKEND_H
3
4#include <QStringListIterator>
5#include <QStringList>
6#include <QString>
7#include <QList>
8#include <QDebug>
9#include <QProcess>
10#include <QByteArray>
[027bbae]11#include <QFile>
[1620346]12#include <QWidget>
13
[027bbae]14
[1620346]15#define PCSYSINSTALLCFG QString("/tmp/sys-install.cfg")
16#define TMPLANGFILE QString("/tmp/.SysInstallLang")
17
18// Set the minimum sizes for FBSD
19#define FBSD_MINSIZE 2500
20#define FBSD_MINROOT 1000
21#define FBSD_MINVAR 500
22#define FBSD_MINUSR 1000
23
24// Set the minimum sizes for PCBSD
25#define PCBSD_MINSIZE 3000
26#define PCBSD_MINROOT 1000
27#define PCBSD_MINVAR 500
28#define PCBSD_MINUSR 1500
29
30
31namespace Scripts {
32
33class Process : public QProcess {
34public:
35    Process(const QStringList &args) {
[027bbae]36        QString PCSYSINSTALL;
[1620346]37        setReadChannel(QProcess::StandardOutput);
[027bbae]38        // If we are using a debug copy of pc-sysinstall, we can execute that instead of default
39        if ( QFile::exists("/root/pc-sysinstall/pc-sysinstall") )
40          PCSYSINSTALL = "/root/pc-sysinstall/pc-sysinstall";
41        else
42          PCSYSINSTALL = "/usr/local/sbin/pc-sysinstall";
[1620346]43        start(PCSYSINSTALL, args);
44    }
45};
46
47class Backend {
48public:
49    static void enableNic(QString Nic, QString IP, QString NetMask, QString DNS, QString Gate, bool fetchMirrors, QString IPv6="", QString IPv6Gate="", QString IPv6DNS="");
50    static void createErrorReport();
51    static void setupSSHKeys(QString Host, QString User, QString Port);
52    static QStringList languages();
53    static QStringList keyLayouts();
54    static QStringList keyModels();
55    static QStringList keyVariants(const QString &, QStringList &savedKeyVariants);
56    static QStringList bootableMedia();
57    static QStringList networkDevices();
58    static QStringList timezones();
59    static void changeKbMap(QString model, QString layout, QString variant);
60    static QList<QStringList> hardDrives();
61    static QList<QStringList> availComponents();
62    static int systemMemory();
63    static int deleteMBRPart(QString Slice, QString &output);
64    static int addMBRPart(QString Disk, int size, QString &output);
65    static QList<QStringList> getPackageData(bool &found, QString pkgset);
66    //static QList<QStringList> slices();
67
[027bbae]68private:
69  QString PCSYSINSTALL;
70  QString PCSYSINSTALLDIR;
[1620346]71};
72
73
74} //namespace Scripts
75
76
77#endif // BACKEND_H
Note: See TracBrowser for help on using the repository browser.