Line 55... |
Line 55... |
55 |
SPKINSTALL_MISSINGFILE, SPKINSTALL_SHARED, SPKINSTALL_SHARED_FAIL, SPKINSTALL_ORPHANED, SPKINSTALL_ORPHANED_FAIL, SPKINSTALL_UNCOMPRESS_FAIL, SPKINSTALL_AUTOTEXT, SPKINSTALL_AUTOTEXT_FAIL
|
55 |
SPKINSTALL_MISSINGFILE, SPKINSTALL_SHARED, SPKINSTALL_SHARED_FAIL, SPKINSTALL_ORPHANED, SPKINSTALL_ORPHANED_FAIL, SPKINSTALL_UNCOMPRESS_FAIL, SPKINSTALL_AUTOTEXT, SPKINSTALL_AUTOTEXT_FAIL
|
56 |
};
|
56 |
};
|
57 |
|
57 |
|
58 |
enum {PACKAGETYPE_NORMAL, PACKAGETYPE_LIBRARY, PACKAGETYPE_CUSTOMSTART, PACKAGETYPE_PATCH, PACKAGETYPE_UPDATE, PACKAGETYPE_MOD, PACKAGETYPE_SHIP, PACKAGETYPE_FAKEPATCH};
|
58 |
enum {PACKAGETYPE_NORMAL, PACKAGETYPE_LIBRARY, PACKAGETYPE_CUSTOMSTART, PACKAGETYPE_PATCH, PACKAGETYPE_UPDATE, PACKAGETYPE_MOD, PACKAGETYPE_SHIP, PACKAGETYPE_FAKEPATCH};
|
59 |
|
59 |
|
60 |
enum {TYPE_BASE, TYPE_SPK, TYPE_XSP, TYPE_ARCHIVE};
|
60 |
enum BaseFileType {TYPE_BASE, TYPE_SPK, TYPE_XSP, TYPE_ARCHIVE};
|
61 |
|
61 |
|
62 |
// spk header struct
|
62 |
// spk header struct
|
63 |
tstruct SSPKHeader {
|
63 |
tstruct SSPKHeader {
|
64 |
SSPKHeader () { fVersion = 0; iValueCompression = lValueCompressSize = 0; }
|
64 |
SSPKHeader () { fVersion = 0; iValueCompression = lValueCompressSize = 0; }
|
65 |
float fVersion;
|
65 |
float fVersion;
|
Line 67... |
Line 67... |
67 |
unsigned long lValueCompressSize;
|
67 |
unsigned long lValueCompressSize;
|
68 |
} SSPKHeader;
|
68 |
} SSPKHeader;
|
69 |
|
69 |
|
70 |
|
70 |
|
71 |
tstruct SSPKHeader2 {
|
71 |
tstruct SSPKHeader2 {
|
72 |
SSPKHeader2 () { iNumFiles = 0; lSize = 0; lFullSize = 0; }
|
72 |
SSPKHeader2 () : iFileCompression(0), iDataCompression(0), iNumFiles(0), lSize(0), lFullSize(0) { }
|
73 |
int iNumFiles;
|
73 |
int iNumFiles;
|
74 |
long lSize;
|
74 |
long lSize;
|
75 |
long lFullSize;
|
75 |
long lFullSize;
|
76 |
int iFileCompression;
|
76 |
int iFileCompression;
|
77 |
int iDataCompression;
|
77 |
int iDataCompression;
|
Line 85... |
Line 85... |
85 |
static Utils::String ErrorString(int error, const Utils::String &errorStr = Utils::String::Null());
|
85 |
static Utils::String ErrorString(int error, const Utils::String &errorStr = Utils::String::Null());
|
86 |
|
86 |
|
87 |
CBaseFile();
|
87 |
CBaseFile();
|
88 |
virtual ~CBaseFile();
|
88 |
virtual ~CBaseFile();
|
89 |
|
89 |
|
90 |
// Get basic Settings
|
90 |
// Virtual Functions
|
91 |
virtual CyString GetFullPackageName(int language, CyString byString) { return GetFullPackageName(language, true, byString); }
|
91 |
virtual Utils::String getFullPackageName(int language, const Utils::String &byString) const;
|
92 |
virtual CyString GetFullPackageName(int language, bool includeVersion = true, CyString byString = "by")
|
92 |
virtual Utils::String getFullPackageName(int language, bool includeVersion = true, const Utils::String &byString = "by") const;
|
- |
|
93 |
virtual Utils::String getFullPackageName(const Utils::String &format, int lang) const;
|
93 |
{
|
94 |
|
94 |
CyString p;
|
- |
|
95 |
if ( language == -1 )
|
95 |
virtual Utils::String CreateValuesLine() const;
|
96 |
p = this->name();
|
- |
|
97 |
else
|
96 |
|
- |
|
97 |
virtual bool LoadPackageData(const Utils::String& sFirst, const Utils::String& sRest, const Utils::String& sMainGame, Utils::CStringList& otherGames, Utils::CStringList& gameAddons, CProgressInfo* progress);
|
98 |
p = GetLanguageName(language);
|
98 |
virtual bool GeneratePackagerScript(bool wildcard, Utils::CStringList* list, int game, const Utils::CStringList& gameAddons, bool datafile = false);
|
99 |
if ( includeVersion )
|
99 |
virtual bool GeneratePackagerScriptFile(bool wildcard, Utils::CStringList* list, int game, const Utils::CStringList& gameAddons);
|
100 |
{
|
100 |
|
101 |
p += " V";
|
101 |
// Getters
|
102 |
p += this->version();
|
102 |
Utils::String getNameValidFile() const;
|
103 |
}
|
- |
|
104 |
p += " ";
|
103 |
const CLinkList<C_File> &fileList() const;
|
105 |
p += byString + " " + this->author();
|
104 |
CLinkList<C_File>& fileList(FileType type, CLinkList<C_File> &list) const;
|
106 |
return p;
|
105 |
CLinkList<C_File>& fileList(FileType type);
|
107 |
}
|
- |
|
108 |
CLinkList<C_File> *GetFileList() { return &m_lFiles; }
|
106 |
CLinkList<C_File> *GetFileList() { return &m_lFiles; }
|
109 |
C_File *GetIcon () { return m_pIconFile; }
|
107 |
C_File *icon() const { return m_pIconFile; }
|
110 |
const Utils::String &iconExt() const { return _sIconExt; }
|
108 |
const Utils::String &iconExt() const { return _sIconExt; }
|
111 |
Utils::String getNameValidFile() const;
|
- |
|
112 |
int GetDataCompression () { return m_SHeader2.iDataCompression; }
|
109 |
int dataCompression () const { return m_SHeader2.iDataCompression; }
|
113 |
float GetFileVersion () { return m_SHeader.fVersion; }
|
110 |
float fileVersion () const { return m_SHeader.fVersion; }
|
114 |
long GetFullFileSize ();
|
111 |
size_t fileSize() const;
|
115 |
CyString GetLanguageName(int lang) const;
|
112 |
const Utils::String& getLanguageName(int lang) const;
|
116 |
const Utils::String &getLanguageName(int lang) const;
|
113 |
Utils::String getAutosaveName() const;
|
- |
|
114 |
bool IsMod();
|
117 |
virtual CyString GetFullPackageName(CyString format, int lang);
|
115 |
bool IsFakePatch() const;
|
- |
|
116 |
|
118 |
Utils::String GetAutosaveName();
|
117 |
// Setters
|
119 |
void SetAutosaveName() { this->setFilename(GetAutosaveName()); }
|
118 |
void SetAutosaveName() { this->setFilename(getAutosaveName()); }
|
- |
|
119 |
void addWebMirror(const Utils::String& str);
|
- |
|
120 |
void removeWebMirror(const Utils::String& str);
|
- |
|
121 |
void SetDataCompression(int c) { m_SHeader2.iDataCompression = c; }
|
- |
|
122 |
void SetFileCompression(int c) { m_SHeader2.iFileCompression = c; }
|
- |
|
123 |
void SetValueCompression(int c) { m_SHeader.iValueCompression = c; }
|
- |
|
124 |
void setIcon(C_File* file, const Utils::String& ext) { if (m_pIconFile) delete m_pIconFile; _sIconExt = ext.c_str(); m_pIconFile = file; _changed(); }
|
- |
|
125 |
void setFtpAddr(const Utils::String& str) { _sFtpAddr = str; }
|
- |
|
126 |
|
- |
|
127 |
// Game Compatability
|
120 |
SGameCompat *GetGameCompatability(int game);
|
128 |
SGameCompat* GetGameCompatability(int game);
|
121 |
bool RemoveGameCompatability(int game);
|
129 |
bool RemoveGameCompatability(int game);
|
122 |
void AddGameCompatability(int game, const Utils::String &version);
|
130 |
void AddGameCompatability(int game, const Utils::String &version);
|
123 |
bool CheckGameCompatability(int game);
|
131 |
bool CheckGameCompatability(int game);
|
124 |
bool CheckGameVersionCompatability(int game, CyString sVersion, int iVersion);
|
132 |
bool checkGameVersionCompatability(int game, const Utils::String &sVersion, int iVersion) const;
|
125 |
bool AnyGameCompatability() { return !m_lGames.empty(); }
|
133 |
bool AnyGameCompatability() { return !m_lGames.empty(); }
|
126 |
|
134 |
|
- |
|
135 |
// Web Mirrors
|
127 |
bool anyWebMirrors() { return !_lMirrors.empty(); }
|
136 |
bool anyWebMirrors() { return !_lMirrors.empty(); }
|
128 |
const Utils::CStringList *getWebMirrors() const { return &_lMirrors; }
|
137 |
const Utils::CStringList &webMirrors() const { return _lMirrors; }
|
129 |
int getMaxWebMirrors() { return _lMirrors.size(); }
|
138 |
int getMaxWebMirrors() { return _lMirrors.size(); }
|
130 |
Utils::String getWebMirror(size_t i) { if ( i >= 0 && i < _lMirrors.size() ) return _lMirrors.get(i)->str; return Utils::String::Null(); }
|
139 |
Utils::String getWebMirror(size_t i) { if ( i >= 0 && i < _lMirrors.size() ) return _lMirrors.get(i)->str; return Utils::String::Null(); }
|
131 |
void clearWebMirrors() { _lMirrors.clear(); }
|
140 |
void clearWebMirrors() { _lMirrors.clear(); }
|
132 |
|
141 |
|
133 |
const CLinkList<C_File> *fileList() const;
|
142 |
// Files
|
134 |
CLinkList<C_File> *fileList(int type) const;
|
- |
|
135 |
C_File *GetFirstFile(int type) const;
|
143 |
C_File *GetFirstFile(int type) const;
|
136 |
C_File *GetNextFile(C_File *prev) const;
|
144 |
C_File *GetNextFile(C_File *prev) const;
|
137 |
C_File *GetPrevFile(C_File *next) const;
|
145 |
C_File *GetPrevFile(C_File *next) const;
|
- |
|
146 |
C_File* findMatchingMod(C_File* f) const;
|
138 |
|
147 |
|
139 |
virtual Utils::String CreateValuesLine () const;
|
- |
|
140 |
|
- |
|
141 |
virtual bool LoadPackageData(const Utils::String &sFirst, const Utils::String &sRest, const Utils::String &sMainGame, Utils::CStringList &otherGames, Utils::CStringList &gameAddons, CProgressInfo *progress);
|
- |
|
142 |
virtual bool GeneratePackagerScript(bool wildcard, Utils::CStringList *list, int game, const Utils::CStringList &gameAddons, bool datafile = false);
|
- |
|
143 |
virtual bool GeneratePackagerScriptFile(bool wildcard, Utils::CStringList *list, int game, const Utils::CStringList &gameAddons);
|
- |
|
144 |
|
- |
|
145 |
void ConvertNormalMod(C_File *f, CyString to);
|
148 |
void convertNormalMod(C_File *f, const Utils::String &to) const;
|
146 |
void ConvertFakePatch(C_File *f);
|
149 |
void convertFakePatch(C_File *f) const;
|
147 |
void ConvertAutoText(C_File *f);
|
150 |
void convertAutoText(C_File *f) const;
|
148 |
C_File *FindMatchingMod(C_File *f);
|
- |
|
149 |
void RenameFile(C_File *f, CyString baseName);
|
151 |
void renameFile(C_File *f, const Utils::String &baseName) const;
|
150 |
|
152 |
|
151 |
// set basic settings
|
- |
|
152 |
void addWebMirror (const Utils::String &str);
|
153 |
size_t countFiles(FileType filetype) const;
|
153 |
void removeWebMirror (const Utils::String &str);
|
154 |
C_File* findFileAt(FileType filetype, size_t pos) const;
|
154 |
void SetDataCompression ( int c ) { m_SHeader2.iDataCompression = c; }
|
- |
|
155 |
void SetFileCompression ( int c ) { m_SHeader2.iFileCompression = c; }
|
- |
|
156 |
void SetValueCompression( int c ) { m_SHeader.iValueCompression = c; }
|
- |
|
157 |
void SetIcon ( C_File *file, CyString ext ) { if ( m_pIconFile ) delete m_pIconFile; _sIconExt = ext.c_str(); m_pIconFile = file; _changed(); }
|
155 |
C_File* findFile(const Utils::String& file, FileType type, const Utils::String& dir = Utils::String::Null(), int game = 0) const;
|
158 |
void SetFtpAddr ( CyString str ) { m_sFtpAddr = str; }
|
- |
|
159 |
|
156 |
|
160 |
void AddFileScript(FileType filetype, bool shared, bool packed, const Utils::String &rest, const Utils::String &sMainGame, Utils::CStringList &otherGames, Utils::CStringList &gameAddons, CProgressInfo *progress = NULL);
|
157 |
void AddFileScript(FileType filetype, bool shared, bool packed, const Utils::String &rest, const Utils::String &sMainGame, Utils::CStringList &otherGames, Utils::CStringList &gameAddons, CProgressInfo *progress = NULL);
|
- |
|
158 |
void AddFile(C_File* file);
|
- |
|
159 |
C_File* addFile(const Utils::String& file, const Utils::String& dir, FileType type, int game = 0, bool packed = false);
|
- |
|
160 |
C_File* appendFile(const Utils::String& file, int type, int game, bool packed, const Utils::String& dir = Utils::String::Null(), CProgressInfo* progress = NULL);
|
- |
|
161 |
bool addFileNow(const Utils::String&, const Utils::String&, FileType type, CProgressInfo* progress = NULL);
|
- |
|
162 |
virtual bool RemoveFile(int pos);
|
- |
|
163 |
virtual bool RemoveFile(C_File* files);
|
- |
|
164 |
virtual bool removeFile(const Utils::String &file, FileType type, const Utils::String &dir = Utils::String::Null(), int game = 0);
|
- |
|
165 |
virtual bool RemoveFile(CyString file, int type, CyString dir = NullString, int game = 0) { return removeFile(file.ToString(), static_cast<FileType>(type), dir.ToString(), game); }
|
- |
|
166 |
void removeAllFiles(FileType type, int game);
|
161 |
|
167 |
|
162 |
bool IsMod();
|
- |
|
163 |
bool IsFakePatch() const;
|
168 |
Utils::String createFilesLine(bool updateheader, CProgressInfo* = NULL);
|
164 |
|
169 |
|
165 |
// error handling
|
170 |
// error handling
|
166 |
void ClearError () { _sLastError = ""; _iLastError = SPKERR_NONE; }
|
171 |
void ClearError () { _sLastError = ""; _iLastError = SPKERR_NONE; }
|
167 |
int lastError() const { return _iLastError; }
|
172 |
int lastError() const { return _iLastError; }
|
168 |
const Utils::String lastErrorString() const { return _sLastError; }
|
173 |
const Utils::String lastErrorString() const { return _sLastError; }
|
169 |
|
- |
|
170 |
// file handling
|
- |
|
171 |
void AddFile ( C_File *file );
|
- |
|
172 |
C_File *AddFile(CyString, CyString, int type, int game = 0);
|
- |
|
173 |
C_File *addFile(const Utils::String &file, const Utils::String &dir, FileType type, int game = 0, bool packed = false);
|
- |
|
174 |
C_File *appendFile(const Utils::String &file, int type, int game, bool packed, const Utils::String &dir = Utils::String::Null(), CProgressInfo *progress = NULL );
|
- |
|
175 |
C_File *FindFile ( CyString, int, CyString = NullString, int game = 0 );
|
- |
|
176 |
bool AddFileNow ( CyString, CyString, int type, CProgressInfo *progress = NULL );
|
- |
|
177 |
int CountFiles ( int filetype );
|
- |
|
178 |
C_File *FindFileAt ( int filetype, int pos );
|
- |
|
179 |
virtual bool RemoveFile ( int pos );
|
- |
|
180 |
virtual bool RemoveFile ( C_File *files );
|
- |
|
181 |
virtual bool RemoveFile ( CyString file, int type, CyString dir = NullString, int game = 0 );
|
- |
|
182 |
void removeAllFiles(FileType type, int game);
|
- |
|
183 |
CyString CreateFilesLine ( bool updateheader, CProgressInfo * = NULL );
|
- |
|
184 |
|
174 |
|
185 |
virtual bool WriteHeader(CFileIO &file, int iHeader, int iLength);
|
175 |
virtual bool WriteHeader(CFileIO &file, int iHeader, int iLength);
|
186 |
virtual bool WriteData(CFileIO &file, CProgressInfo * = NULL );
|
176 |
virtual bool WriteData(CFileIO &file, CProgressInfo * = NULL );
|
187 |
virtual bool WriteFile ( CyString filename, CProgressInfo * = NULL );
|
177 |
virtual bool WriteFile ( CyString filename, CProgressInfo * = NULL );
|
188 |
virtual bool ReadFile(CyString filename, int readType = SPKREAD_ALL, CProgressInfo *progress = NULL);
|
178 |
virtual bool ReadFile(CyString filename, int readType = SPKREAD_ALL, CProgressInfo *progress = NULL);
|
Line 194... |
Line 184... |
194 |
virtual bool extractFile(int file, const Utils::String &dir, bool includedir = true, CProgressInfo *progress = NULL);
|
184 |
virtual bool extractFile(int file, const Utils::String &dir, bool includedir = true, CProgressInfo *progress = NULL);
|
195 |
virtual bool extractFile(C_File *file, const Utils::String &dir, bool includedir = true, CProgressInfo *progress = NULL);
|
185 |
virtual bool extractFile(C_File *file, const Utils::String &dir, bool includedir = true, CProgressInfo *progress = NULL);
|
196 |
virtual bool extractFile(int filenum, const Utils::String &dir, unsigned int game, const Utils::CStringList &gameAddons, bool includedir = true, CProgressInfo *progress = NULL);
|
186 |
virtual bool extractFile(int filenum, const Utils::String &dir, unsigned int game, const Utils::CStringList &gameAddons, bool includedir = true, CProgressInfo *progress = NULL);
|
197 |
virtual bool extractFile(C_File *file, const Utils::String &dir, unsigned int game, const Utils::CStringList &gameAddons, bool includedir = true, CProgressInfo *progress = NULL);
|
187 |
virtual bool extractFile(C_File *file, const Utils::String &dir, unsigned int game, const Utils::CStringList &gameAddons, bool includedir = true, CProgressInfo *progress = NULL);
|
198 |
virtual bool extractAll(const Utils::String &dir, int game, const Utils::CStringList &gameAddons, bool includedir = true, CProgressInfo *progress = NULL);
|
188 |
virtual bool extractAll(const Utils::String &dir, int game, const Utils::CStringList &gameAddons, bool includedir = true, CProgressInfo *progress = NULL);
|
199 |
|
189 |
|
200 |
virtual bool SaveToArchive(CyString filename, int game, const CGameExe *exes, CProgressInfo *progress = NULL);
|
190 |
virtual bool SaveToArchive(CyString filename, int game, const CGameExe *exes, CProgressInfo *progress = NULL);
|
201 |
virtual bool saveToArchive(const Utils::String &filename, int game, const CGameExe *exes, CProgressInfo *progress = NULL);
|
191 |
virtual bool saveToArchive(const Utils::String &filename, int game, const CGameExe *exes, CProgressInfo *progress = NULL);
|
202 |
virtual void addGeneratedFiles(HZIP &hz) {};
|
192 |
virtual void addGeneratedFiles(HZIP &hz) {};
|
203 |
|
193 |
|
204 |
void ClearFileData();
|
194 |
void ClearFileData();
|
205 |
|
195 |
|
206 |
CLinkList<SNames> *GetNamesList() { return &m_lNames; }
|
- |
|
207 |
|
- |
|
208 |
// reading files
|
196 |
// reading files
|
209 |
void ReadAllFilesToMemory ();
|
197 |
void ReadAllFilesToMemory ();
|
210 |
void ReadIconFileToMemory ();
|
198 |
void ReadIconFileToMemory ();
|
211 |
bool ReadFileToMemory(C_File *f);
|
199 |
bool ReadFileToMemory(C_File *f);
|
212 |
|
200 |
|
Line 216... |
Line 204... |
216 |
bool UncompressAllFiles ( CProgressInfo * = NULL );
|
204 |
bool UncompressAllFiles ( CProgressInfo * = NULL );
|
217 |
|
205 |
|
218 |
// static functions
|
206 |
// static functions
|
219 |
static CyString GetEndOfLine ( FILE *id, int *line = NULL, bool upper = true );
|
207 |
static CyString GetEndOfLine ( FILE *id, int *line = NULL, bool upper = true );
|
220 |
static int CheckFile ( CyString filename, float *version = NULL );
|
208 |
static int CheckFile ( CyString filename, float *version = NULL );
|
221 |
|
209 |
|
222 |
bool IsFileAdded(C_File *f) { return m_lFiles.FindData(f); }
|
210 |
bool IsFileAdded(C_File *f) { return m_lFiles.FindData(f); }
|
223 |
|
211 |
|
224 |
// installing
|
212 |
// installing
|
225 |
void SwitchFilePointer(C_File *oldFile, C_File *newFile);
|
213 |
void SwitchFilePointer(C_File *oldFile, C_File *newFile);
|
226 |
bool InstallFiles ( CyString destdir, CProgressInfo *progress, CLinkList<C_File> *spklist, CyStringList *errorStr, bool enabled = true, CPackages *packages = NULL );
|
214 |
bool InstallFiles ( CyString destdir, CProgressInfo *progress, CLinkList<C_File> *spklist, CyStringList *errorStr, bool enabled = true, CPackages *packages = NULL );
|
Line 229... |
Line 217... |
229 |
// installer functions
|
217 |
// installer functions
|
230 |
bool IsProfileEnabled () { return m_bProfile; }
|
218 |
bool IsProfileEnabled () { return m_bProfile; }
|
231 |
bool IsEnabled () { return m_bEnable; }
|
219 |
bool IsEnabled () { return m_bEnable; }
|
232 |
bool IsModifiedEnabled () { return m_bModifiedEnabled; }
|
220 |
bool IsModifiedEnabled () { return m_bModifiedEnabled; }
|
233 |
bool IsGlobalEnabled () { return m_bGlobal; }
|
221 |
bool IsGlobalEnabled () { return m_bGlobal; }
|
234 |
|
222 |
|
235 |
void SetProfileEnabled ( bool en ) { m_bProfile = en; }
|
223 |
void SetProfileEnabled ( bool en ) { m_bProfile = en; }
|
236 |
void SetEnabled ( bool en ) { m_bEnable = en; }
|
224 |
void SetEnabled ( bool en ) { m_bEnable = en; }
|
237 |
void SetModifiedEnabled ( bool en ) { m_bModifiedEnabled = en; }
|
225 |
void SetModifiedEnabled ( bool en ) { m_bModifiedEnabled = en; }
|
238 |
void SetGlobalEnabled ( bool en ) { m_bGlobal = en; }
|
226 |
void SetGlobalEnabled ( bool en ) { m_bGlobal = en; }
|
239 |
|
227 |
|
240 |
int GetLoadError() { return m_iLoadError; }
|
228 |
int GetLoadError() { return m_iLoadError; }
|
241 |
void SetLoadError(int i) { m_iLoadError = i; }
|
229 |
void SetLoadError(int i) { m_iLoadError = i; }
|
242 |
Utils::String createUpdateFile(const Utils::String &dir) const;
|
230 |
Utils::String createUpdateFile(const Utils::String &dir) const;
|
243 |
|
- |
|
244 |
// language functions
|
- |
|
245 |
void RemoveLanguageName ( int lang );
|
- |
|
246 |
void AddLanguageName ( int lang, const Utils::String &name );
|
- |
|
247 |
void ClearNames ();
|
- |
|
248 |
|
231 |
|
249 |
virtual bool ParseValueLine(const Utils::String &line);
|
232 |
virtual bool ParseValueLine(const Utils::String &line);
|
250 |
|
233 |
|
251 |
CLinkList<SGameCompat> *GetGameCompatabilityList() { return &m_lGames; }
|
234 |
CLinkList<SGameCompat> *GetGameCompatabilityList() { return &m_lGames; }
|
252 |
|
235 |
|
253 |
CyString GetFullFileSizeString();
|
236 |
Utils::String fileSizeString() const;
|
254 |
|
237 |
|
255 |
CLinkList<SNeededLibrary> *GetNeededLibraries() { return &m_lNeededLibrarys; }
|
238 |
CLinkList<SNeededLibrary> *GetNeededLibraries() { return &m_lNeededLibrarys; }
|
256 |
void AddNeededLibrary(const Utils::String &scriptName, const Utils::String &author, const Utils::String &minVersion);
|
239 |
void AddNeededLibrary(const Utils::String &scriptName, const Utils::String &author, const Utils::String &minVersion);
|
257 |
bool IsPackageNeeded(const Utils::String &scriptName, const Utils::String &author);
|
240 |
bool IsPackageNeeded(const Utils::String &scriptName, const Utils::String &author);
|
258 |
SNeededLibrary *FindPackageNeeded(const Utils::String &scriptName, const Utils::String &author);
|
241 |
SNeededLibrary *FindPackageNeeded(const Utils::String &scriptName, const Utils::String &author);
|
Line 269... |
Line 252... |
269 |
void updateTextDB() { this->_resetTextDB(); }
|
252 |
void updateTextDB() { this->_resetTextDB(); }
|
270 |
|
253 |
|
271 |
virtual bool readWares(int iLang, CLinkList<SWareEntry> &list, const Utils::String &empWares);
|
254 |
virtual bool readWares(int iLang, CLinkList<SWareEntry> &list, const Utils::String &empWares);
|
272 |
virtual bool readCommands(int iLang, CLinkList<SCommandSlot> &list);
|
255 |
virtual bool readCommands(int iLang, CLinkList<SCommandSlot> &list);
|
273 |
virtual bool readWingCommands(int iLang, CLinkList<SCommandSlot> &list);
|
256 |
virtual bool readWingCommands(int iLang, CLinkList<SCommandSlot> &list);
|
274 |
|
- |
|
275 |
// bool IsChanged() { return m_bChanged; }
|
- |
|
276 |
// void SetChanged(bool b) { m_bChanged = b; }
|
- |
|
277 |
|
257 |
|
278 |
int FindFirstGameInPackage();
|
258 |
int FindFirstGameInPackage();
|
279 |
bool IsAnyGameInPackage();
|
259 |
bool IsAnyGameInPackage();
|
280 |
bool IsMultipleGamesInPackage();
|
260 |
bool IsMultipleGamesInPackage();
|
281 |
bool IsGameInPackage(int game);
|
261 |
bool IsGameInPackage(int game);
|
282 |
|
262 |
|
- |
|
263 |
virtual BaseFileType type () const { return BaseFileType::TYPE_BASE; }
|
283 |
virtual int GetType () { return TYPE_BASE; }
|
264 |
virtual int GetType() { return type(); }
|
284 |
bool AnyFileType ( int type );
|
265 |
bool AnyFileType ( int type );
|
285 |
CBaseFile *GetParent () { return m_pParent; }
|
266 |
CBaseFile *GetParent () { return m_pParent; }
|
286 |
void SetParent ( CBaseFile *file ) { m_pParent = file; }
|
267 |
void SetParent ( CBaseFile *file ) { m_pParent = file; }
|
287 |
int ParseLanguage(const Utils::String &lang) const;
|
268 |
int ParseLanguage(const Utils::String &lang) const;
|
288 |
|
269 |
|
Line 340... |
Line 321... |
340 |
Utils::String _sIconExt;
|
321 |
Utils::String _sIconExt;
|
341 |
Utils::String _sLastError;
|
322 |
Utils::String _sLastError;
|
342 |
int _iLastError;
|
323 |
int _iLastError;
|
343 |
|
324 |
|
344 |
CLinkList<C_File> m_lFiles;
|
325 |
CLinkList<C_File> m_lFiles;
|
345 |
CLinkList<SNames> m_lNames; //TODO: move to CorePackage
|
326 |
CLinkList<C_File> m_lTempFiles;
|
346 |
Utils::CStringList _lMirrors; //TODO: move to CorePackage
|
327 |
Utils::CStringList _lMirrors; //TODO: move to CorePackage
|
347 |
Utils::CStringList _lFakePatchBefore;
|
328 |
Utils::CStringList _lFakePatchBefore;
|
348 |
Utils::CStringList _lFakePatchAfter;
|
329 |
Utils::CStringList _lFakePatchAfter;
|
349 |
|
330 |
|
350 |
CTextDB *_pTextDB;
|
331 |
CTextDB *_pTextDB;
|
Line 367... |
Line 348... |
367 |
|
348 |
|
368 |
CLinkList<SNeededLibrary> m_lNeededLibrarys;
|
349 |
CLinkList<SNeededLibrary> m_lNeededLibrarys;
|
369 |
|
350 |
|
370 |
bool _bCombineFiles;
|
351 |
bool _bCombineFiles;
|
371 |
bool m_bOverrideFiles;
|
352 |
bool m_bOverrideFiles;
|
372 |
CyString m_sFtpAddr;
|
353 |
Utils::String _sFtpAddr;
|
373 |
bool m_bAutoGenerateUpdateFile;
|
354 |
bool m_bAutoGenerateUpdateFile;
|
374 |
bool m_bUpdate;
|
355 |
bool m_bUpdate;
|
375 |
};
|
356 |
};
|
376 |
|
357 |
|
377 |
|
358 |
|
378 |
class SPKEXPORT CArchiveFile : public CBaseFile
|
359 |
class SPKEXPORT CArchiveFile : public CBaseFile
|
379 |
{
|
360 |
{
|
380 |
public:
|
361 |
public:
|
381 |
CArchiveFile();
|
362 |
CArchiveFile();
|
382 |
virtual ~CArchiveFile();
|
363 |
virtual ~CArchiveFile();
|
383 |
virtual CyString GetFullPackageName(CyString format, int lang) { return CyString("Archive(") + this->name() + ")"; }
|
364 |
virtual Utils::String getFullPackageName(const Utils::String& format, int lang) const override { return "Archive(" + name() + ")"; }
|
384 |
virtual CyString GetFullPackageName(int language, CyString byString) { return CyString("Archive(") + this->name() + ")"; }
|
365 |
virtual Utils::String getFullPackageName(int language, const Utils::String& byString) const override { return "Archive(" + name() + ")"; }
|
385 |
virtual CyString GetFullPackageName(int language, bool includeVersion = true, CyString byString = "by") { return CyString("Archive(") + this->name() + ")"; }
|
366 |
virtual Utils::String getFullPackageName(int language, bool includeVersion = true, const Utils::String& byString = "by") const override { return "Archive(" + name() + ")"; }
|
- |
|
367 |
|
386 |
virtual int GetType () { return TYPE_ARCHIVE; }
|
368 |
virtual BaseFileType type() const override { return BaseFileType::TYPE_ARCHIVE; }
|
387 |
};
|
369 |
};
|
388 |
|
370 |
|
389 |
#endif //__BASEFILE_H__
|
371 |
#endif //__BASEFILE_H__
|
390 |
|
372 |
|