Subversion Repositories spk

Rev

Rev 126 | Rev 129 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 126 Rev 127
Line 35... Line 35...
35
 
35
 
36
	bool isOldDir(const Utils::String &dir);
36
	bool isOldDir(const Utils::String &dir);
37
	bool Read(CyString dir, CProgressInfo *progress = NULL);
37
	bool Read(CyString dir, CProgressInfo *progress = NULL);
38
	bool read(const Utils::String &dir, CProgressInfo *progress = NULL);
38
	bool read(const Utils::String &dir, CProgressInfo *progress = NULL);
39
	void Startup(CyString dir, CyString tempDir, CyString myDoc, CyString mod = NullString);
39
	void Startup(CyString dir, CyString tempDir, CyString myDoc, CyString mod = NullString);
-
 
40
	void startup(const Utils::String &dir, const Utils::String &tempDir, const Utils::String &myDoc);
-
 
41
	void startup(const Utils::String &dir, const Utils::String &tempDir, const Utils::String &myDoc, const Utils::String &mod);
40
 
42
 
-
 
43
	bool generatePackagerScript(CBaseFile *baseFile, bool wildcard, Utils::CStringList *list, int game, bool datafile = false) const;
41
	CBaseFile *LoadPackagerScript(CyString filename, int compression, CyString (*askFunc)(CyString), CyStringList *malformedLines = NULL, CyStringList *unknownCommands = NULL, CyStringList *variables = NULL);
44
	CBaseFile *LoadPackagerScript(CyString filename, int compression, Utils::String (*askFunc)(const Utils::String &), CyStringList *malformedLines = NULL, CyStringList *unknownCommands = NULL, CyStringList *variables = NULL);
42
	CyStringList *GetGlobals() { return &m_lGlobals; }
45
	CyStringList *GetGlobals() { return &m_lGlobals; }
43
	CyStringList *GetFakePatchOrder() { return &m_lFakePatchOrder; }
46
	CyStringList *GetFakePatchOrder() { return &m_lFakePatchOrder; }
44
	Utils::String getCurrentDirectory() const;
47
	Utils::String getCurrentDirectory() const;
45
	static CyString GetTempDirectory() { return m_sTempDir; }
48
	static CyString GetTempDirectory() { return m_sTempDir; }
46
	static Utils::String tempDirectory() { return m_sTempDir; }
49
	static const Utils::String &tempDirectory() { return m_sTempDir; }
47
	CyString GetMyDocuments() { return m_sMyDoc; }
50
	CyString GetMyDocuments() { return m_sMyDoc; }
-
 
51
	const Utils::String &myDocuments() { return m_sMyDoc; }
48
	CGameExe *GetGameExe() { return &m_gameExe; }
52
	CGameExe *GetGameExe() { return &m_gameExe; }
49
	CLinkList<CBaseFile> *GetInstallPackageList() { return &m_lInstallList; }
53
	CLinkList<CBaseFile> *GetInstallPackageList() { return &m_lInstallList; }
50
 
54
 
51
	// installing/uninstalling
55
	// installing/uninstalling
52
	bool		InstallPackage ( CBaseFile *package, CyStringList *errors, CProgressInfo *progress = NULL, bool disabled = false );
56
	bool		InstallPackage ( CBaseFile *package, CyStringList *errors, CProgressInfo *progress = NULL, bool disabled = false );
Line 155... Line 159...
155
	void AssignPackageNumbers();
159
	void AssignPackageNumbers();
156
	int  GetChildPackages(CBaseFile *package, CLinkList<CBaseFile> *children, bool recursive = false);
160
	int  GetChildPackages(CBaseFile *package, CLinkList<CBaseFile> *children, bool recursive = false);
157
	int  GetAllPackageFiles(CBaseFile *package, CLinkList<C_File> *fileList, bool includeChild);
161
	int  GetAllPackageFiles(CBaseFile *package, CLinkList<C_File> *fileList, bool includeChild);
158
	int	 GetAllPackageFiles(CLinkList<CBaseFile> *list, CLinkList<C_File> *fileList, bool includeChild);
162
	int	 GetAllPackageFiles(CLinkList<CBaseFile> *list, CLinkList<C_File> *fileList, bool includeChild);
159
	void AddLogEntry(int type, CyString args, CyStringList *errors);
163
	void AddLogEntry(int type, CyString args, CyStringList *errors);
160
	CyString FindDataDir(CyString dir, CyString file);
164
	Utils::String findDataDir(const Utils::String &dir, const Utils::String &file);
161
	int  CountPackages(int type, bool onlyEnabled);
165
	int  CountPackages(int type, bool onlyEnabled);
162
	int  CountBuiltInPackages(bool onlyEnabled);
166
	int  CountBuiltInPackages(bool onlyEnabled);
163
	bool isCurrentDir(const Utils::String &dir) const;
167
	bool isCurrentDir(const Utils::String &dir) const;
164
	bool CheckOtherPackage(CBaseFile *package);
168
	bool CheckOtherPackage(CBaseFile *package);
165
	int CheckPreparedInstallRequired(CLinkList<CBaseFile> *list);
169
	int CheckPreparedInstallRequired(CLinkList<CBaseFile> *list);
Line 282... Line 286...
282
	//setting functions
286
	//setting functions
283
	void SetRenameText(bool b) { m_bRenameText = b; }
287
	void SetRenameText(bool b) { m_bRenameText = b; }
284
	void SetLanguage(int i) { m_iLanguage = i; }
288
	void SetLanguage(int i) { m_iLanguage = i; }
285
	void SetAutoEnable(bool b) { m_bAutoEnableChild = b; }
289
	void SetAutoEnable(bool b) { m_bAutoEnableChild = b; }
286
	void SetForceModInstall(bool b) { m_bForceModInstall = b; }
290
	void SetForceModInstall(bool b) { m_bForceModInstall = b; }
287
	void SetTempDirectory(CyString s) { m_sTempDir = s.ToString(); }
-
 
288
	void setTempDirectory(const Utils::String &s) { m_sTempDir = s; }
291
	void setTempDirectory(const Utils::String &s) { m_sTempDir = s; }
289
	void SetMyDocuments(CyString s) { m_sMyDoc = s; }
292
	void setMyDocuments(const Utils::String &s) { m_sMyDoc = s; }
290
	void SetForceEMP(bool b) { m_bForceEMP = b; }
293
	void SetForceEMP(bool b) { m_bForceEMP = b; }
291
	void SetSurpressProtectedWarning(bool b) { m_bSurpressProtectedWarning = b; }
294
	void SetSurpressProtectedWarning(bool b) { m_bSurpressProtectedWarning = b; }
292
	void SurpressProtectedWarning() { m_bSurpressProtectedWarning = true; }
295
	void SurpressProtectedWarning() { m_bSurpressProtectedWarning = true; }
293
	bool IsSupressProtectedWarning() { return m_bSurpressProtectedWarning; }
296
	bool IsSupressProtectedWarning() { return m_bSurpressProtectedWarning; }
294
 
297
 
Line 334... Line 337...
334
	void _removeWareOverride(enum WareTypes type, int pos, const Utils::String &id);
337
	void _removeWareOverride(enum WareTypes type, int pos, const Utils::String &id);
335
 
338
 
336
private:
339
private:
337
	CyString	m_sCurrentDir;
340
	CyString	m_sCurrentDir;
338
	static Utils::String	m_sTempDir;
341
	static Utils::String	m_sTempDir;
339
	CyString	m_sMyDoc;
342
	Utils::String			m_sMyDoc;
340
	CyString	m_sSetMod;
343
	CyString	m_sSetMod;
341
	Utils::String _sSaveDir;
344
	Utils::String _sSaveDir;
342
	GameDirectory *_pCurrentDir;
345
	GameDirectory *_pCurrentDir;
343
 
346
 
344
	// global files list
347
	// global files list