| Line 36... |
Line 36... |
| 36 |
SETTING_CHECK
|
36 |
SETTING_CHECK
|
| 37 |
};
|
37 |
};
|
| 38 |
|
38 |
|
| 39 |
typedef struct SSettingString : public SSettingType {
|
39 |
typedef struct SSettingString : public SSettingType {
|
| 40 |
SSettingString () { iType = SETTING_STRING; }
|
40 |
SSettingString () { iType = SETTING_STRING; }
|
| 41 |
Utils::String sValue;
|
41 |
Utils::WString sValue;
|
| 42 |
} SSettingString;
|
42 |
} SSettingString;
|
| 43 |
|
43 |
|
| 44 |
typedef struct SSettingInteger : public SSettingType {
|
44 |
typedef struct SSettingInteger : public SSettingType {
|
| 45 |
SSettingInteger () { iType = SETTING_INTEGER; }
|
45 |
SSettingInteger () : iValue(0) { iType = SETTING_INTEGER; }
|
| 46 |
int iValue;
|
46 |
int iValue;
|
| 47 |
} SSettingInteger;
|
47 |
} SSettingInteger;
|
| 48 |
|
48 |
|
| 49 |
typedef struct SSettingCheck : public SSettingType {
|
49 |
typedef struct SSettingCheck : public SSettingType {
|
| 50 |
SSettingCheck () { iType = SETTING_CHECK; }
|
50 |
SSettingCheck () : bValue(false) { iType = SETTING_CHECK; }
|
| 51 |
bool bValue ;
|
51 |
bool bValue ;
|
| 52 |
} SSettingCheck;
|
52 |
} SSettingCheck;
|
| 53 |
|
53 |
|
| 54 |
|
54 |
|
| 55 |
public:
|
55 |
public:
|
| 56 |
static int ConvertScriptType(const Utils::String &sType);
|
56 |
static int ConvertScriptType(const Utils::WString &sType);
|
| 57 |
static Utils::String GetScriptTypeStringStatic(int type);
|
57 |
static Utils::WString GetScriptTypeStringStatic(int type);
|
| 58 |
static Utils::WString GetWareText(SWares *w, int lang);
|
58 |
static Utils::WString GetWareText(SWares *w, int lang);
|
| 59 |
static Utils::WString GetWareDesc(SWares *w, int lang);
|
59 |
static Utils::WString GetWareDesc(SWares *w, int lang);
|
| 60 |
|
60 |
|
| 61 |
// get functions
|
61 |
// get functions
|
| 62 |
Utils::String GetScriptTypeString(int lang) const;
|
62 |
Utils::WString scriptTypeString(int lang) const;
|
| 63 |
Utils::String GetCustomScriptType () const { return m_sScriptType; }
|
63 |
Utils::WString customScriptType () const { return m_sScriptType; }
|
| 64 |
Utils::String GetCustomScriptType (int lang) const;
|
64 |
Utils::WString customScriptType (int lang) const;
|
| 65 |
Utils::String otherName() const { return m_sOtherName; }
|
65 |
const Utils::WString &otherName() const { return m_sOtherName; }
|
| 66 |
Utils::String otherAuthor() const { return m_sOtherAuthor; }
|
66 |
const Utils::WString &otherAuthor() const { return m_sOtherAuthor; }
|
| 67 |
Utils::String GetOtherName() const { return m_sOtherName; }
|
- |
|
| 68 |
Utils::String GetOtherAuthor() const { return m_sOtherAuthor; }
|
- |
|
| 69 |
CLinkList<SWares> *GetWaresList() { return &m_lWares; }
|
67 |
CLinkList<SWares> *GetWaresList() { return &m_lWares; }
|
| 70 |
CLinkList<SSettingType> *GetSettingsList() { return &m_lSettings; }
|
68 |
CLinkList<SSettingType> *settingsList() { return &m_lSettings; }
|
| 71 |
|
69 |
|
| 72 |
bool CheckValidReadmes () const;
|
70 |
bool CheckValidReadmes () const;
|
| 73 |
|
71 |
|
| 74 |
bool IsCustomStart () const { return (m_iPackageType == PACKAGETYPE_CUSTOMSTART) ? true : false; }
|
72 |
bool IsCustomStart () const { return (m_iPackageType == PACKAGETYPE_CUSTOMSTART) ? true : false; }
|
| 75 |
bool IsPackageUpdate () const { return (m_iPackageType == PACKAGETYPE_UPDATE) ? true : false; }
|
73 |
bool IsPackageUpdate () const { return (m_iPackageType == PACKAGETYPE_UPDATE) ? true : false; }
|
| Line 85... |
Line 83... |
| 85 |
|
83 |
|
| 86 |
// Custom Start
|
84 |
// Custom Start
|
| 87 |
Utils::String GetCustomStartName() const;
|
85 |
Utils::String GetCustomStartName() const;
|
| 88 |
|
86 |
|
| 89 |
// set functions
|
87 |
// set functions
|
| 90 |
void SetScriptType ( const Utils::String &str ) { m_sScriptType = str; _changed(); }
|
88 |
void setScriptType ( const Utils::WString &str ) { m_sScriptType = str; _changed(); }
|
| 91 |
void SetAnotherMod ( const Utils::String &name, const Utils::String &author ) { m_sOtherName = name; m_sOtherAuthor = author; _changed(); }
|
89 |
void setAnotherMod ( const Utils::WString &name, const Utils::WString &author ) { m_sOtherName = name; m_sOtherAuthor = author; _changed(); }
|
| 92 |
void SetForceProfile ( bool p ) { m_bForceProfile = p; _changed(); }
|
90 |
void SetForceProfile ( bool p ) { m_bForceProfile = p; _changed(); }
|
| 93 |
|
91 |
|
| 94 |
void SetPackageType(int i)
|
92 |
void SetPackageType(int i)
|
| 95 |
{
|
93 |
{
|
| 96 |
m_iPackageType = i;
|
94 |
m_iPackageType = i;
|
| Line 106... |
Line 104... |
| 106 |
void SetPatch() { this->SetPackageType(PACKAGETYPE_PATCH); }
|
104 |
void SetPatch() { this->SetPackageType(PACKAGETYPE_PATCH); }
|
| 107 |
void SetLibrary() { this->SetPackageType(PACKAGETYPE_LIBRARY); }
|
105 |
void SetLibrary() { this->SetPackageType(PACKAGETYPE_LIBRARY); }
|
| 108 |
void SetCustomStart() { this->SetPackageType(PACKAGETYPE_CUSTOMSTART); }
|
106 |
void SetCustomStart() { this->SetPackageType(PACKAGETYPE_CUSTOMSTART); }
|
| 109 |
void SetPackageUpdate() { this->SetPackageType(PACKAGETYPE_UPDATE); }
|
107 |
void SetPackageUpdate() { this->SetPackageType(PACKAGETYPE_UPDATE); }
|
| 110 |
void SetNormalPackage() { this->SetPackageType(PACKAGETYPE_NORMAL); }
|
108 |
void SetNormalPackage() { this->SetPackageType(PACKAGETYPE_NORMAL); }
|
| 111 |
void SetScriptType(int i) { SetNormalPackage(); m_iScriptType = i; _changed(); }
|
109 |
void setScriptType(int i) { SetNormalPackage(); m_iScriptType = i; _changed(); }
|
| 112 |
|
110 |
|
| 113 |
virtual bool loadPackageData(const Utils::WString &sFirst, const Utils::WString &sRest, const Utils::WString &sMainGame, Utils::WStringList &otherGames, Utils::WStringList &gameAddons, CProgressInfo *progress = NULL) override;
|
111 |
virtual bool loadPackageData(const Utils::WString &sFirst, const Utils::WString &sRest, const Utils::WString &sMainGame, Utils::WStringList &otherGames, Utils::WStringList &gameAddons, CProgressInfo *progress = NULL) override;
|
| 114 |
virtual bool GeneratePackagerScript(bool wildcard, Utils::WStringList *list, int game, const Utils::WStringList &gameAddons, bool datafile = false) override;
|
112 |
virtual bool GeneratePackagerScript(bool wildcard, Utils::WStringList *list, int game, const Utils::WStringList &gameAddons, bool datafile = false) override;
|
| 115 |
|
113 |
|
| 116 |
CSpkFile();
|
114 |
CSpkFile();
|
| Line 139... |
Line 137... |
| 139 |
|
137 |
|
| 140 |
int CheckValidCustomStart () const;
|
138 |
int CheckValidCustomStart () const;
|
| 141 |
|
139 |
|
| 142 |
virtual bool computeSigned(bool updateFiles) const override;
|
140 |
virtual bool computeSigned(bool updateFiles) const override;
|
| 143 |
|
141 |
|
| 144 |
SSettingType *AddSetting(const Utils::String &key, int type);
|
142 |
SSettingType *addSetting(const Utils::WString &key, int type);
|
| 145 |
void ClearSettings ();
|
143 |
void clearSettings ();
|
| 146 |
void ConvertSetting ( SSettingType *t, const Utils::String &set ) const;
|
144 |
void convertSetting(SSettingType *t, const Utils::WString &set) const;
|
| 147 |
Utils::String GetSetting ( SSettingType *t ) const;
|
145 |
Utils::WString getSetting(SSettingType *t) const;
|
| 148 |
bool AnySettings() const { return !m_lSettings.empty(); }
|
146 |
bool anySettings() const { return !m_lSettings.empty(); }
|
| 149 |
|
147 |
|
| 150 |
// installer usage
|
148 |
// installer usage
|
| 151 |
Utils::String GetLastReadme () const { return m_sLastReadme; }
|
149 |
const Utils::WString &lastReadme () const { return m_sLastReadme; }
|
| 152 |
Utils::String GetCustomMap () const { return m_sCustomMap; }
|
150 |
const Utils::WString &customMap () const { return m_sCustomMap; }
|
| 153 |
|
151 |
|
| 154 |
void SetCustomMap ( const Utils::String &map ) { m_sCustomMap = map; }
|
152 |
void setCustomMap ( const Utils::WString &map ) { m_sCustomMap = map; }
|
| 155 |
void SetLastReadme ( const Utils::String &r ) { m_sLastReadme = r; }
|
153 |
void setLastReadme ( const Utils::WString &r ) { m_sLastReadme = r; }
|
| 156 |
|
154 |
|
| 157 |
virtual int GetType () { return TYPE_SPK; }
|
155 |
virtual int GetType () { return TYPE_SPK; }
|
| 158 |
virtual BaseFileType type() const override { return BaseFileType::TYPE_SPK; }
|
156 |
virtual BaseFileType type() const override { return BaseFileType::TYPE_SPK; }
|
| 159 |
|
157 |
|
| 160 |
void MergePackage(CBaseFile *p);
|
158 |
void MergePackage(CBaseFile *p);
|
| Line 175... |
Line 173... |
| 175 |
FileType _convert_fileType(const Utils::String &sFile);
|
173 |
FileType _convert_fileType(const Utils::String &sFile);
|
| 176 |
Utils::String _convert_parseFilename(const Utils::String &sRest, float fVersion, Utils::String *pDir);
|
174 |
Utils::String _convert_parseFilename(const Utils::String &sRest, float fVersion, Utils::String *pDir);
|
| 177 |
unsigned char *_convert_parseFile(const Utils::String &s_Cmd, const Utils::String &s_Rest, float fVersion, unsigned char *d);
|
175 |
unsigned char *_convert_parseFile(const Utils::String &s_Cmd, const Utils::String &s_Rest, float fVersion, unsigned char *d);
|
| 178 |
|
176 |
|
| 179 |
// varibles
|
177 |
// varibles
|
| 180 |
Utils::String m_sOtherAuthor;
|
178 |
Utils::WString m_sOtherAuthor;
|
| 181 |
Utils::String m_sOtherName;
|
179 |
Utils::WString m_sOtherName;
|
| 182 |
Utils::String m_sScriptType;
|
180 |
Utils::WString m_sScriptType;
|
| 183 |
|
181 |
|
| 184 |
bool m_bForceProfile;
|
182 |
bool m_bForceProfile;
|
| 185 |
int m_iPackageType;
|
183 |
int m_iPackageType;
|
| 186 |
int m_iScriptType;
|
184 |
int m_iScriptType;
|
| 187 |
|
185 |
|
| Line 189... |
Line 187... |
| 189 |
CLinkList<SSettingType> m_lSettings;
|
187 |
CLinkList<SSettingType> m_lSettings;
|
| 190 |
|
188 |
|
| 191 |
SWares *m_pLastWare;
|
189 |
SWares *m_pLastWare;
|
| 192 |
|
190 |
|
| 193 |
// installer varibles
|
191 |
// installer varibles
|
| 194 |
Utils::String m_sLastReadme;
|
192 |
Utils::WString m_sLastReadme;
|
| 195 |
Utils::String m_sCustomMap;
|
193 |
Utils::WString m_sCustomMap;
|
| 196 |
};
|
194 |
};
|