Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
magicseteditor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
magicseteditor
Commits
9c2ef1cf
Commit
9c2ef1cf
authored
Dec 29, 2007
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Now actually downloads a list of installers.
parent
17319f04
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
109 additions
and
546 deletions
+109
-546
src/data/installer.cpp
src/data/installer.cpp
+1
-0
src/gui/packages_window.cpp
src/gui/packages_window.cpp
+100
-452
src/gui/packages_window.hpp
src/gui/packages_window.hpp
+4
-0
src/gui/update_checker.cpp
src/gui/update_checker.cpp
+2
-88
src/mse.vcproj
src/mse.vcproj
+0
-6
src/util/io/package_manager.cpp
src/util/io/package_manager.cpp
+2
-0
No files found.
src/data/installer.cpp
View file @
9c2ef1cf
...
...
@@ -327,6 +327,7 @@ void merge(InstallablePackages& installed, const DownloadableInstallerP& install
ip
->
installer
=
installer
;
ips
.
push_back
(
ip
);
}
sort
(
ips
);
merge
(
installed
,
ips
);
}
...
...
src/gui/packages_window.cpp
View file @
9c2ef1cf
This diff is collapsed.
Click to expand it.
src/gui/packages_window.hpp
View file @
9c2ef1cf
...
...
@@ -44,13 +44,17 @@ class PackagesWindow : public wxDialog {
InstallablePackageP
package
;
///< Selected package
PackageAction
where
;
///< Where to install? (PACKAGE_LOCAL or PACKAGE_GLOBAL)
bool
waiting_for_list
;
///< waiting for the list of installers?
DECLARE_EVENT_TABLE
();
void
onOk
(
wxCommandEvent
&
);
void
onActionChange
(
wxCommandEvent
&
);
void
onPackageSelect
(
wxCommandEvent
&
);
void
onUpdateUI
(
wxUpdateUIEvent
&
);
void
onIdle
(
wxIdleEvent
&
);
bool
checkInstallerList
();
/*
wxHtmlWindow* description_window;
...
...
src/gui/update_checker.cpp
View file @
9c2ef1cf
...
...
@@ -14,49 +14,16 @@
#include <util/io/package_manager.hpp>
#include <util/version.hpp>
#include <util/window_id.hpp>
#include <script/value.hpp> // for some strange reason the profile build needs this :(
#include <script/to_value.hpp>
//
#include <script/value.hpp> // for some strange reason the profile build needs this :(
//
#include <script/to_value.hpp>
#include <wx/dialup.h>
#include <wx/url.h>
#include <wx/html/htmlwin.h>
//%DECLARE_POINTER_TYPE(PackageVersionData);
DECLARE_POINTER_TYPE
(
VersionData
);
DECLARE_TYPEOF_COLLECTION
(
PackageDependencyP
);
// ----------------------------------------------------------------------------- : Update data
/*
/// Information on available packages
class PackageVersionData : public IntrusivePtrVirtualBase {
public:
PackageVersionData() {}
String name; ///< Name of the package
String type; ///< Type of package ("magic style" or "game")
String display_name; ///< Name to show on package list.
String description; ///< html description
String url; ///< Where can the package be downloaded?
Version version; ///< Version number of the download
Version app_version; ///< The minimium version of MSE required
vector<PackageDependencyP> depends; ///< Packages this depends on
DECLARE_REFLECTION();
};
/// Information on the latest available version
class VersionData : public IntrusivePtrBase<VersionData> {
public:
Version version; ///< Latest version number of MSE
String description; ///< html description of the latest MSE release
String new_updates_url; ///< updates url has moved?
vector<PackageVersionDataP> packages; ///< Available packages
DECLARE_REFLECTION();
};
*/
/// Information on the latest available versions
class
VersionData
:
public
IntrusivePtrBase
<
VersionData
>
{
public:
...
...
@@ -66,25 +33,6 @@ class VersionData : public IntrusivePtrBase<VersionData> {
DECLARE_REFLECTION
();
};
/*
IMPLEMENT_REFLECTION_NO_SCRIPT(PackageVersionData) {
REFLECT_NO_SCRIPT(name);
REFLECT_NO_SCRIPT(type);
REFLECT_NO_SCRIPT(display_name);
REFLECT_NO_SCRIPT(description);
REFLECT_NO_SCRIPT(url);
REFLECT_NO_SCRIPT(version);
REFLECT_NO_SCRIPT(app_version);
REFLECT_NO_SCRIPT_N("depends ons", depends);
}
IMPLEMENT_REFLECTION_NO_SCRIPT(VersionData) {
REFLECT_NO_SCRIPT(version);
REFLECT_NO_SCRIPT(description);
REFLECT_NO_SCRIPT(new_updates_url);
REFLECT_NO_SCRIPT(packages);
}*/
IMPLEMENT_REFLECTION_NO_SCRIPT
(
VersionData
)
{
REFLECT_NO_SCRIPT
(
packages
);
REFLECT_NO_SCRIPT
(
new_updates_url
);
...
...
@@ -113,12 +61,6 @@ bool update_available() {
// ----------------------------------------------------------------------------- : Update checking
BEGIN_DECLARE_EVENT_TYPES
()
DECLARE_EVENT_TYPE
(
UPDATE_CHECK_FINISHED_EVT
,
-
1
)
END_DECLARE_EVENT_TYPES
()
DEFINE_EVENT_TYPE
(
UPDATE_CHECK_FINISHED_EVT
)
// Thread to retrieve update information
// Checks if the current version is the latest version
// If not, displays a message
...
...
@@ -182,36 +124,8 @@ void check_updates_now(bool async) {
// ----------------------------------------------------------------------------- : Dialog
// A HTML control that opens all pages in an actual browser
struct
HtmlWindowToBrowser
:
public
wxHtmlWindow
{
HtmlWindowToBrowser
(
Window
*
parent
,
int
id
,
const
wxPoint
&
pos
,
const
wxSize
&
size
,
long
flags
)
:
wxHtmlWindow
(
parent
,
id
,
pos
,
size
,
flags
)
{}
virtual
void
OnLinkClicked
(
const
wxHtmlLinkInfo
&
info
)
{
wxLaunchDefaultBrowser
(
info
.
GetHref
()
);
}
};
void
show_update_dialog
(
Window
*
parent
)
{
if
(
!
update_available
()
||
shown_dialog
)
return
;
// we already have the latest version, or this has already been displayed.
shown_dialog
=
true
;
(
new
PackagesWindow
(
parent
))
->
Show
();
/*
// Show update dialog
wxDialog* dlg = new wxDialog(parent, wxID_ANY, _TITLE_("updates available"), wxDefaultPosition);
// controls
wxHtmlWindow* html = new HtmlWindowToBrowser(dlg, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO | wxSUNKEN_BORDER);
//% html->SetPage(update_version_data->description);
wxButton* close = new wxButton(dlg, wxID_OK, _BUTTON_("close"));
close->SetDefault();
// layout
wxSizer* s = new wxBoxSizer(wxVERTICAL);
s->Add(html, 1, wxEXPAND | wxALL, 8);
s->Add(close, 0, wxALIGN_RIGHT | wxALL & ~wxTOP, 8);
dlg->SetSizer(s);
dlg->SetSize(400,400);
dlg->Show();
// And never show it again this run
*/
}
src/mse.vcproj
View file @
9c2ef1cf
...
...
@@ -2088,12 +2088,6 @@
<File
RelativePath=
".\util\io\package_manager.hpp"
>
</File>
<File
RelativePath=
".\util\io\package_repository.cpp"
>
</File>
<File
RelativePath=
".\util\io\package_repository.hpp"
>
</File>
<File
RelativePath=
".\util\io\reader.cpp"
>
<FileConfiguration
...
...
src/util/io/package_manager.cpp
View file @
9c2ef1cf
...
...
@@ -156,6 +156,8 @@ void PackageManager::installedPackages(vector<InstallablePackageP>& packages) {
merge
(
packages
,
more_packages
);
// the magic appliation package
packages
.
push_back
(
mse_installable_package
());
// invariant: sorted:
sort
(
packages
);
}
void
PackageManager
::
install
(
const
InstallablePackage
&
package
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment