Added installer code.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@561 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
coppro
2007-07-12 22:48:20 +00:00
parent 858d7804c1
commit 8b069d3e6f
11 changed files with 127 additions and 49 deletions
+8
View File
@@ -497,3 +497,11 @@ void Packaged::validate(Version) {
packages.checkDependency(*dep, true);
}
}
// ----------------------------------------------------------------------------- : IncludePackage
String IncludePackage::typeName() const { return _("include"); }
IMPLEMENT_REFLECTION(IncludePackage) {
REFLECT_BASE(Packaged);
}
+10 -1
View File
@@ -171,8 +171,8 @@ class Package : public IntrusivePtrVirtualBase {
void openDirectory();
void openSubdir(const String&);
void openZipfile();
void saveToDirectory(const String&, bool);
void saveToZipfile(const String&, bool);
void saveToDirectory(const String&, bool);
FileInfos::iterator addFile(const String& file);
static String toStandardName(const String& file);
};
@@ -228,5 +228,14 @@ class Packaged : public Package {
friend struct JustAsPackageProxy;
};
// ----------------------------------------------------------------------------- : IncludePackage
/// A package that just contains a bunch of files that are used from other packages
class IncludePackage : public Packaged {
protected:
String typeName() const;
DECLARE_REFLECTION();
};
// ----------------------------------------------------------------------------- : EOF
#endif
-15
View File
@@ -15,21 +15,6 @@
#include <data/export_template.hpp>
#include <wx/stdpaths.h>
// ----------------------------------------------------------------------------- : IncludePackage
/// A package that just contains a bunch of files that are used from other packages
class IncludePackage : public Packaged {
protected:
String typeName() const;
DECLARE_REFLECTION();
};
String IncludePackage::typeName() const { return _("include"); }
IMPLEMENT_REFLECTION(IncludePackage) {
REFLECT_BASE(Packaged);
}
// ----------------------------------------------------------------------------- : PackageManager
PackageManager packages;
+3
View File
@@ -70,6 +70,9 @@ class PackageManager {
/// Check if the given dependency is currently installed
bool checkDependency(const PackageDependency& dep, bool report_errors = false);
inline String getGlobalDataDir() const { return global_data_directory; }
inline String getLocalDataDir() const { return local_data_directory; }
private:
map<String, PackagedP> loaded_packages;
-9
View File
@@ -21,15 +21,6 @@
// ----------------------------------------------------------------------------- : Linux
#ifdef __linux__
/// wxMkDir as documented
inline void wxMkDir(const String& dir) {
wxMkDir(wxConvLocal.cWX2MB(dir), 0777);
}
#endif
// ----------------------------------------------------------------------------- : GCC
#ifdef __GNUC__