mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 13:17: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:
@@ -10,7 +10,6 @@
|
||||
// ----------------------------------------------------------------------------- : Includes
|
||||
|
||||
#include <util/prec.hpp>
|
||||
#include <gui/welcome_window.hpp>
|
||||
|
||||
// ----------------------------------------------------------------------------- : Update checking
|
||||
|
||||
@@ -27,63 +26,6 @@ void check_updates_now(bool async = true);
|
||||
* Call this function from an onIdle loop */
|
||||
void show_update_dialog(Window* parent);
|
||||
|
||||
// ----------------------------------------------------------------------------- : Update window
|
||||
|
||||
class PackageUpdateList;
|
||||
class wxHtmlWindow;
|
||||
|
||||
DECLARE_POINTER_TYPE(PackageVersionData);
|
||||
|
||||
/// A window that displays the updates and allows the user to select some.
|
||||
/** NOTE: cannot be called 'UpdateWindow' because there is a Win32 function with that name
|
||||
*/
|
||||
class UpdatesWindow : public Frame {
|
||||
public:
|
||||
UpdatesWindow();
|
||||
~UpdatesWindow();
|
||||
|
||||
void DrawTitles(wxPaintEvent&);
|
||||
|
||||
enum PackageStatus {
|
||||
STATUS_INSTALLED,
|
||||
STATUS_NOT_INSTALLED,
|
||||
STATUS_UPGRADEABLE
|
||||
};
|
||||
enum PackageAction {
|
||||
ACTION_INSTALL,
|
||||
ACTION_UNINSTALL,
|
||||
ACTION_UPGRADE,
|
||||
ACTION_NOTHING,
|
||||
ACTION_NEW_MSE // means that you need a new version of MSE to install/upgrade
|
||||
};
|
||||
|
||||
typedef pair<PackageStatus, PackageAction> PackageData;
|
||||
|
||||
map<PackageVersionDataP, PackageData> package_data;
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
PackageUpdateList* package_list; ///< List of available packages
|
||||
wxHtmlWindow* description_window;
|
||||
|
||||
wxStaticText *package_title, *type_title, *status_title, *new_title;
|
||||
wxButton *install_button, *upgrade_button, *remove_button, *cancel_button, *apply_button;
|
||||
|
||||
void onUpdateCheckFinished(wxCommandEvent&);
|
||||
void onPackageSelect(wxCommandEvent&);
|
||||
void onActionChange(wxCommandEvent&);
|
||||
void onApplyChanges(wxCommandEvent&);
|
||||
|
||||
void SelectPackageDependencies (PackageVersionDataP);
|
||||
void RemovePackageDependencies (PackageVersionDataP);
|
||||
void DowngradePackageDependencies(PackageVersionDataP);
|
||||
|
||||
/// Update the buttons to indicate that this is selected.
|
||||
void updateButtons(int index);
|
||||
|
||||
void setDefaultPackageStatus();
|
||||
};
|
||||
|
||||
/// Was update data found?
|
||||
bool update_data_found();
|
||||
/// Is there an update?
|
||||
|
||||
Reference in New Issue
Block a user