mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Finally got precompiled headers to work.
Now all C++ files need to #include <util/prec.hpp>
That is why all .cpp files are touched by this commit
Many changes to installers and update checking:
- the window is now called PackagesWindow, in a new source file
- update checking is now independent from the PackagesWindow. For update checking only a list of package versions are needed (vector<PackageDependency>). This is much less information to download at each startup.
- the list of available packages is now a list of available Installers, since an installer can contain multiple packages.
- moved the logic of dependency checking etc. to data/installer
- moved the actual installation to util/io/package_manager
- moved directory iteration/creation logic to util/file_utils
- added PackageDirectory: the local and global package directory now have their own object (was part of PackageManager)
- added PackageVersion: for detecting if a package has been modified after it was installed.
- added PackageDescription: description/header of a package. Basicly the same as what Packaged provides.
- added DownloadableInstaller: where to find an insaller, what does it contain?
- added InstallablePackage: brining it all together: installer, package, status, action.
Current status: the insaller is currently broken in a few places, more on that soon.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@792 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+17
-2
@@ -6,6 +6,7 @@
|
||||
|
||||
// ----------------------------------------------------------------------------- : Includes
|
||||
|
||||
#include <util/prec.hpp>
|
||||
#include <data/settings.hpp>
|
||||
#include <data/installer.hpp>
|
||||
#include <data/game.hpp>
|
||||
@@ -38,6 +39,15 @@ IMPLEMENT_REFLECTION_ENUM(InstallType) {
|
||||
VALUE_N("global", INSTALL_GLOBAL);
|
||||
}
|
||||
|
||||
bool is_install_local(InstallType type) {
|
||||
#ifdef __WXMSW__
|
||||
#define DEFAULT_INSTALL_LOCAL false
|
||||
#else
|
||||
#define DEFAULT_INSTALL_LOCAL true
|
||||
#endif
|
||||
return type == INSTALL_DEFAULT ? DEFAULT_INSTALL_LOCAL : type == INSTALL_LOCAL;
|
||||
}
|
||||
|
||||
IMPLEMENT_REFLECTION_ENUM(FilenameConflicts) {
|
||||
VALUE_N("keep old", CONFLICT_KEEP_OLD);
|
||||
VALUE_N("overwrite", CONFLICT_OVERWRITE);
|
||||
@@ -143,8 +153,10 @@ Settings::Settings()
|
||||
, symbol_grid_size (30)
|
||||
, symbol_grid (true)
|
||||
, symbol_grid_snap (false)
|
||||
, updates_url (_("http://magicseteditor.sourceforge.net/updates"))
|
||||
, package_versions_url (_("http://magicseteditor.sourceforge.net/packages"))
|
||||
, installer_list_url (_("http://magicseteditor.sourceforge.net/installers"))
|
||||
, check_updates (CHECK_IF_CONNECTED)
|
||||
, check_updates_all (true)
|
||||
, install_type (INSTALL_DEFAULT)
|
||||
, website_url (_("http://magicseteditor.sourceforge.net/"))
|
||||
{}
|
||||
@@ -221,8 +233,11 @@ IMPLEMENT_REFLECTION_NO_SCRIPT(Settings) {
|
||||
REFLECT(symbol_grid_snap);
|
||||
REFLECT(default_game);
|
||||
REFLECT(apprentice_location);
|
||||
REFLECT(updates_url);
|
||||
REFLECT_IGNORE(306,"updates url");
|
||||
REFLECT(package_versions_url);
|
||||
REFLECT(installer_list_url);
|
||||
REFLECT(check_updates);
|
||||
REFLECT(check_updates_all);
|
||||
REFLECT(install_type);
|
||||
REFLECT(website_url);
|
||||
REFLECT(game_settings);
|
||||
|
||||
Reference in New Issue
Block a user