-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstaller.h
More file actions
123 lines (106 loc) · 3.6 KB
/
installer.h
File metadata and controls
123 lines (106 loc) · 3.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/* ipl/installer/installer.h -*- C++ -*- Copyright (c) 2006 Joshua Oreman
* Distributed under the GPL. See COPYING for details.
*/
#ifndef INSTALLER_H
#define INSTALLER_H
#include <qglobal.h>
#include "complexwizard.h"
#include "rawpod/partition.h"
// The human-readable version.
#define INSTALLER_VERSION "2.31"
// The integer version for the package list format.
#define INSTALLER_PACKAGE_VERSION 3
// A bitmask of working iPods.
// 0x18fe == 0b 0 0 0 1 1 0 0 0 1 1 1 1 1 1 1 0
// ^-^-^ ^ ^ ^-^-^ ^ ^ ^ ^ ^ ^ ^ ^- no 0th gen (0)
// No D,E,F ---+-+ | | \ / | | | | +-+-+- 1g-3g supported (1, 2, 3)
// (C) Nano works -+ | | | | | +- Mini1g works (4)
// (B) Video works -+ No 8, | | +- 4g works (5)
// 9,A | +- Photo/Color works (6)
// +- Mini2g works (7)
#define INSTALLER_WORKING_IPODS 0x18fe
#define INSTALLER_SUPPORTED_IPODS 0x00fe
enum InstallerMode { StandardInstall, AdvancedInstall,
Update, ChangeLoader, Uninstall };
enum LoaderType { UnknownLoader = 0, Loader1Apple, Loader1Linux, Loader2 };
extern InstallerMode Mode;
extern LoaderType iPodLoader;
// Physical drive number of the iPod.
extern int iPodLocation;
// boardHwSwInterfaceRev >> 16 (0x4 = mini, 0xB = video, etc.)
extern int iPodVersion;
// partition number (1=first) to shrink
extern int iPodPartitionToShrink;
// new partition size in sectors
extern int iPodLinuxPartitionSize;
// iPod's partition table
extern PartitionTable *iPodPartitionTable;
// VFS::Device for the whole iPod.
extern VFS::Device *iPodDevice;
// VFS::Device for each partition. NOTE: These are 0 until partitioning is set in stone!
extern VFS::Device *iPodFirmwarePartitionDevice, *iPodMusicPartitionDevice, *iPodLinuxPartitionDevice;
// VFS::Filesystems for the music and iPL partitions. These are 0 until formatting is done.
extern VFS::Filesystem *iPodMusicPartitionFS, *iPodLinuxPartitionFS;
// Whether the backup was made.
extern bool iPodDoBackup;
// If so: Where the backup was made, relative to the dir in which the installer started.
extern QString iPodBackupLocation;
// Where the backup and packages will go by default. (A directory.) Defaults to QDir::current().
extern QString InstallerHome;
// The first package list to be loaded.
extern QString PackageListFile;
// Proxy to use.
extern QString ProxyString;
// Installing on autopilot?
extern bool InstallAutomatically;
class QCheckBox;
class QGroupBox;
class QHttp;
class QLabel;
class QLineEdit;
class QRadioButton;
class QProgressBar;
class QPushButton;
class QSpinBox;
class QTreeWidget;
class QTreeWidgetItem;
class IntroductionPage;
class PodLocationPage;
class PartitioningPage;
class InstallPage;
class PackagesPage;
class RestoreBackupPage;
class DoActionsPage;
class DonePage;
class Installer : public ComplexWizard
{
Q_OBJECT;
public:
Installer (QWidget *parent = 0);
public slots:
void setupDevices (PartitionTable *t);
void setupFilesystems();
friend class IntroductionPage;
friend class PodLocationPage;
friend class PartitioningPage;
friend class InstallPage;
friend class PackagesPage;
friend class RestoreBackupPage;
friend class DoActionsPage;
friend class DonePage;
};
extern Installer *installer;
class InstallerPage : public WizardPage
{
Q_OBJECT
public:
InstallerPage (Installer *wiz)
: WizardPage (wiz), wizard (wiz) {}
InstallerPage()
: WizardPage (0), wizard (0) {}
protected:
Installer *wizard;
};
// Returns a string giving textual transfer progress, e.g. "42k/1.2M"
QString transferProgressText (int done, int total);
#endif