Subversion Repositories spk

Rev

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

Rev 182 Rev 183
Line 48... Line 48...
48
	const Utils::String &myDocuments() { return m_sMyDoc; }
48
	const Utils::String &myDocuments() { return m_sMyDoc; }
49
	CGameExe *GetGameExe() { return &m_gameExe; }
49
	CGameExe *GetGameExe() { return &m_gameExe; }
50
	CLinkList<CBaseFile> *GetInstallPackageList() { return &m_lInstallList; }
50
	CLinkList<CBaseFile> *GetInstallPackageList() { return &m_lInstallList; }
51
 
51
 
52
	// installing/uninstalling
52
	// installing/uninstalling
53
	bool		InstallPackage ( CBaseFile *package, CyStringList *errors, CProgressInfo *progress = NULL, bool disabled = false );
53
	bool		installPackage(CBaseFile *package, Utils::CStringList *errors, CProgressInfo *progress = NULL, bool disabled = false);
54
	CBaseFile		*openPackage(const Utils::String &file, int *error, CProgressInfo *progress = NULL, int readtype = SPKREAD_ALL, int flags = READFLAG_NONE);
54
	CBaseFile		*openPackage(const Utils::String &file, int *error, CProgressInfo *progress = NULL, int readtype = SPKREAD_ALL, int flags = READFLAG_NONE);
55
	CMultiSpkFile	*openMultiPackage(const Utils::String &file, int *error, CProgressInfo *progress = NULL);
55
	CMultiSpkFile	*openMultiPackage(const Utils::String &file, int *error, CProgressInfo *progress = NULL);
56
	bool			 openMultiPackage(const Utils::String &file, CLinkList<CBaseFile> *packageList, int *error, CProgressInfo *progress = NULL );
56
	bool			 openMultiPackage(const Utils::String &file, CLinkList<CBaseFile> *packageList, int *error, CProgressInfo *progress = NULL );
57
	int			CheckInstallPackage(CBaseFile *package, int check = IC_ALL);
57
	int			CheckInstallPackage(CBaseFile *package, int check = IC_ALL);
58
	bool		RemoveFile(C_File *file, CyStringList *errors = NULL);
58
	bool		removeFile(C_File *file, Utils::CStringList *errors = NULL);
59
	void		PrepareUninstallPackage(CBaseFile *package);
59
	void		PrepareUninstallPackage(CBaseFile *package);
60
	bool		UninstallPreparedPackages(CyStringList *errors, CProgressInfo *progress, CLinkList<CBaseFile> *uninstalledPackages = NULL, CLinkList<CBaseFile> *disabledPackages = NULL);
60
	bool		uninstallPreparedPackages(Utils::CStringList *errors, CProgressInfo *progress, CLinkList<CBaseFile> *uninstalledPackages = NULL, CLinkList<CBaseFile> *disabledPackages = NULL);
61
	void		ConvertOldPackage(CBaseFile *p);
61
	void		ConvertOldPackage(CBaseFile *p);
62
	void		PurgeUninstallScripts(CBaseFile *package, CyStringList *errors);
62
	void		purgeUninstallScripts(CBaseFile *package, Utils::CStringList *errors);
63
	int 		PrepareInstallPackage(CBaseFile *package, bool disabled = false, bool force = false, int check = IC_ALL);
63
	int 		PrepareInstallPackage(CBaseFile *package, bool disabled = false, bool force = false, int check = IC_ALL);
64
	int			InstallPreparedPackages(CyStringList *errors, CProgressInfo *progress, CLinkList<CBaseFile> *errored, CLinkList<CBaseFile> *installedList = NULL);
64
	int			installPreparedPackages(Utils::CStringList *errors, CProgressInfo *progress, CLinkList<CBaseFile> *errored, CLinkList<CBaseFile> *installedList = NULL);
65
	void		RemovePreparedInstall(CBaseFile *package);
65
	void		RemovePreparedInstall(CBaseFile *package);
66
	int			GetNumPackagesInQueue() { return m_lInstallList.size(); }
66
	int			GetNumPackagesInQueue() { return m_lInstallList.size(); }
67
	int			checkOpenPackage(const Utils::String &file, int* error);
67
	int			checkOpenPackage(const Utils::String &file, int* error);
68
	bool		findAllNeededDependacies(CBaseFile *p, const CLinkList<CBaseFile> &packages, CLinkList<CBaseFile> *foundPackages, bool onlyEnabled = false, bool includePrepared = false) const;
68
	bool		findAllNeededDependacies(CBaseFile *p, const CLinkList<CBaseFile> &packages, CLinkList<CBaseFile> *foundPackages, bool onlyEnabled = false, bool includePrepared = false) const;
69
	int			GetMissingDependacies(CBaseFile *p, Utils::CStringList *list, bool onlyEnabled = false, bool includePrepared = false);
69
	int			GetMissingDependacies(CBaseFile *p, Utils::CStringList *list, bool onlyEnabled = false, bool includePrepared = false);
Line 79... Line 79...
79
	int			findAllPackages(CLinkList<CBaseFile> &packages, const Utils::String &dir);
79
	int			findAllPackages(CLinkList<CBaseFile> &packages, const Utils::String &dir);
80
	size_t		updateFoundPackages(const Utils::String& dir);
80
	size_t		updateFoundPackages(const Utils::String& dir);
81
	size_t		addFoundPackages(const Utils::String& dir);
81
	size_t		addFoundPackages(const Utils::String& dir);
82
 
82
 
83
	// enable/disable
83
	// enable/disable
84
	bool EnablePackage ( CBaseFile *package, CyStringList *errors, CProgressInfo *progress = NULL );
84
	bool enablePackage(CBaseFile *package, Utils::CStringList *errors, CProgressInfo *progress = NULL );
85
	bool DisablePackage ( CBaseFile *package, CyStringList *errors, CProgressInfo *progress = NULL );
85
	bool disablePackage(CBaseFile *package, Utils::CStringList *errors, CProgressInfo *progress = NULL );
86
	bool DisablePreparedPackages ( CyStringList *errors, CProgressInfo *progress, CLinkList<CBaseFile> *disabledPackages = NULL );
86
	bool disablePreparedPackages(Utils::CStringList *errors, CProgressInfo *progress, CLinkList<CBaseFile> *disabledPackages = NULL );
-
 
87
	bool enablePreparedPackages(Utils::CStringList* errors, CProgressInfo* progress, CLinkList<CBaseFile>* enabledPackages = NULL);
87
	bool PrepareEnablePackage(CBaseFile *package);
88
	bool PrepareEnablePackage(CBaseFile *package);
88
	bool PrepareDisablePackage(CBaseFile *package);
89
	bool PrepareDisablePackage(CBaseFile *package);
89
	bool EnablePreparedPackages ( CyStringList *errors, CProgressInfo *progress, CLinkList<CBaseFile> *enabledPackages = NULL );
-
 
90
	int  GetNumPackagesInEnabledQueue() { return m_lEnableList.size(); }
90
	int  GetNumPackagesInEnabledQueue() { return m_lEnableList.size(); }
91
	int  GetNumPackagesInDisabledQueue() { return m_lDisableList.size(); }
91
	int  GetNumPackagesInDisabledQueue() { return m_lDisableList.size(); }
92
	bool PrepareDisableForVanilla();
92
	bool PrepareDisableForVanilla();
93
	bool PrepareEnableLibrarys();
93
	bool PrepareEnableLibrarys();
94
	bool PrepareEnableFromVanilla();
94
	bool PrepareEnableFromVanilla();
95
 
95
 
96
	void WriteData();
96
	void WriteData();
97
	bool CloseDir ( CyStringList *errors = 0, CProgressInfo *progress = NULL, bool removedir = false );
97
	bool closeDir(Utils::CStringList *errors = 0, CProgressInfo *progress = NULL, bool removedir = false);
98
	bool RestoreFakePatch();
98
	bool RestoreFakePatch();
99
	bool ReadyFakePatch();
99
	bool ReadyFakePatch();
100
	bool checkValidPluginManagerFile(const Utils::String &filename) const;
100
	bool checkValidPluginManagerFile(const Utils::String &filename) const;
101
	bool checkIfPluginManagerFile(const Utils::String &filename) const;
101
	bool checkIfPluginManagerFile(const Utils::String &filename) const;
102
 
102
 
Line 143... Line 143...
143
	bool RemoveCurrentDirectory();
143
	bool RemoveCurrentDirectory();
144
	void RemoveCreatedFiles();
144
	void RemoveCreatedFiles();
145
	bool AnyUnusedShared();
145
	bool AnyUnusedShared();
146
 
146
 
147
	// util functions
147
	// util functions
148
	void RemoveUnusedDirectories(CyStringList& dirs, CyStringList* errors = NULL);
-
 
149
	void removeUnusedDirectories(const Utils::CStringList &dirs, Utils::CStringList* errors = NULL);
148
	void removeUnusedDirectories(const Utils::CStringList &dirs, Utils::CStringList* errors = NULL);
150
	int  RemoveUninstallScripts(CyStringList *errors = 0, CProgressInfo *progress = NULL);
149
	int  removeUninstallScripts(Utils::CStringList *errors = 0, CProgressInfo *progress = NULL);
151
	bool RemoveUninstallFile(C_File *file, CyStringList *errors = 0);
150
	bool removeUninstallFile(C_File *file, Utils::CStringList *errors = 0);
152
	int  RemoveUnusedSharedFiles(CyStringList *errors = 0, CProgressInfo *progress = NULL);
151
	int  removeUnusedSharedFiles(Utils::CStringList *errors = 0, CProgressInfo *progress = NULL);
153
	bool RemoveSharedFile(C_File *file, CyStringList *errors = NULL);
152
	bool removeSharedFile(C_File *file, Utils::CStringList *errors = NULL);
154
	void ShufflePatchTo(C_File *file, int to, CyStringList *errors);
153
	void shufflePatchTo(C_File *file, int to, Utils::CStringList *errors);
155
	void ShuffleFakePatches(CyStringList *errors);
154
	void shuffleFakePatches(Utils::CStringList *errors);
156
	void ShuffleTextFiles(CyStringList *errors);
155
	void shuffleTextFiles(Utils::CStringList *errors);
157
	int  findNextFakePatch(int start = 0, const Utils::String &dir = Utils::String::Null()) const;
156
	int  findNextFakePatch(int start = 0, const Utils::String &dir = Utils::String::Null()) const;
158
	unsigned int  findNextTextFile(unsigned int start = 4) const;
157
	unsigned int  findNextTextFile(unsigned int start = 4) const;
159
	unsigned int  findNextTextFile(const Utils::String &dir, unsigned int start = 4) const;
158
	unsigned int  findNextTextFile(const Utils::String &dir, unsigned int start = 4) const;
160
	int  findLastFakePatch(int start = 99, const Utils::String &dir = Utils::String::Null()) const;
159
	int  findLastFakePatch(int start = 99, const Utils::String &dir = Utils::String::Null()) const;
161
	int  findLastTextFile(int start = 9999, const Utils::String &dir = Utils::String::Null()) const;
160
	int  findLastTextFile(int start = 9999, const Utils::String &dir = Utils::String::Null()) const;
162
	int  FindLowestFakePatchInstalled();
161
	int  FindLowestFakePatchInstalled();
163
	void ReadGameLanguage(bool force = true);
162
	void ReadGameLanguage(bool force = true);
164
	int	 RemoveAllPackages(CyStringList *errors = NULL, CProgressInfo *progress = NULL);
163
	int	 removeAllPackages(Utils::CStringList *errors = NULL, CProgressInfo *progress = NULL);
165
	void AssignPackageNumbers();
164
	void AssignPackageNumbers();
166
	int  GetChildPackages(CBaseFile *package, CLinkList<CBaseFile> *children, bool recursive = false);
165
	int  GetChildPackages(CBaseFile *package, CLinkList<CBaseFile> *children, bool recursive = false);
167
	int  GetAllPackageFiles(CBaseFile *package, CLinkList<C_File> *fileList, bool includeChild);
166
	int  GetAllPackageFiles(CBaseFile *package, CLinkList<C_File> *fileList, bool includeChild);
168
	int	 GetAllPackageFiles(CLinkList<CBaseFile> *list, CLinkList<C_File> *fileList, bool includeChild);
167
	int	 GetAllPackageFiles(CLinkList<CBaseFile> *list, CLinkList<C_File> *fileList, bool includeChild);
169
	void AddLogEntry(int type, CyString args, CyStringList* errors);
-
 
170
	void addLogEntry(int type, const Utils::String &args, Utils::CStringList* errors);
168
	void addLogEntry(int type, const Utils::String &args, Utils::CStringList* errors);
171
	Utils::String findDataDir(const Utils::String &dir, const Utils::String &file);
169
	Utils::String findDataDir(const Utils::String &dir, const Utils::String &file);
172
	int  countPackages(int type, bool onlyEnabled) const;
170
	int  countPackages(int type, bool onlyEnabled) const;
173
	int  CountBuiltInPackages(bool onlyEnabled);
171
	int  CountBuiltInPackages(bool onlyEnabled);
174
	bool isCurrentDir(const Utils::String &dir) const;
172
	bool isCurrentDir(const Utils::String &dir) const;