Commit 1da4fce3 authored by coppro's avatar coppro

Fixed some problems with the last commit (like I had to rewrite my

entire perl script, which was somehow deleted).
parent cd0af675
...@@ -48,6 +48,8 @@ SymbolFontP SymbolFont::byName(const String& name) { ...@@ -48,6 +48,8 @@ SymbolFontP SymbolFont::byName(const String& name) {
} }
IMPLEMENT_REFLECTION(SymbolFont) { IMPLEMENT_REFLECTION(SymbolFont) {
REFLECT_BASE(Packaged);
REFLECT_ALIAS(300, "text align", "text alignment"); REFLECT_ALIAS(300, "text align", "text alignment");
REFLECT_N("image font size", img_size); REFLECT_N("image font size", img_size);
......
...@@ -28,7 +28,7 @@ DECLARE_TYPEOF_COLLECTION(PackageVersionDataP); ...@@ -28,7 +28,7 @@ DECLARE_TYPEOF_COLLECTION(PackageVersionDataP);
/// Information on available packages /// Information on available packages
class PackageVersionData : public IntrusivePtrBase<PackageVersionData> { class PackageVersionData : public IntrusivePtrBase<PackageVersionData> {
public: public:
PackageVersionData() : is_installer(true) {} PackageVersionData() {}
String name; ///< Name of the package String name; ///< Name of the package
String description; ///< html description String description; ///< html description
...@@ -402,7 +402,7 @@ void UpdatesWindow::onActionChange(wxCommandEvent& ev) { ...@@ -402,7 +402,7 @@ void UpdatesWindow::onActionChange(wxCommandEvent& ev) {
} }
void UpdatesWindow::onApplyChanges(wxCommandEvent& ev) { void UpdatesWindow::onApplyChanges(wxCommandEvent& ev) {
FOREACH(update_version_data->packages, pack) { FOR_EACH(pack, update_version_data->packages) {
PackageAction action = package_data[pack].second; PackageAction action = package_data[pack].second;
} }
} }
......
#!/usr/bin/perl
#
#Perl script to create updates.
#Just run with first argument being the folder all the installers are in, and the others being the packages
# e.g. ./create-package-list.pl http://magicseteditor.sf.net/packages/ ../../data/*
$url = shift;
while ($ARGV = shift) {
$f = $ARGV =~ /(([-a-z]+).mse-(game|style|symbol-font|include|export-template|locale))/;
if (!$f) {
warn "$ARGV not an appropriate package.";
next;
}
$fullname = $1;
$name = $2;
open(FILE, "$ARGV/$3");
$version = $msever = $dependencies = "";
while (<FILE>) {
$version = $1 if /^(?:\xef\xbb\xbf)?version: (.*)$/;
$msever = $1 if /^(?:\xef\xbb\xbf)?mse[ _]version: (.*)$/;
while (/^(?:\xef\xbb\xbf)?depends[ _]on:\s*$/) {
$dep = $depver = "";
while (<FILE>) {
$version = $1 if /^(?:\xef\xbb\xbf)?version: (.*)$/;
$msever = $1 if /^(?:\xef\xbb\xbf)?mse[ _]version: (.*)$/;
last unless /^\t/;
$dep = $1 if /^\tpackage: (.*)$/;
$depver = $1 if /^\tversion: (.*)$/;
}
if (!$dep || !$depver) {
warn "$ARGV has an invalid dependency!";
next;
}
$dependencies .= "\tdepends on:\n\t\tpackage: $dep\n\t\tversion: $depver\n";
}
}
close(FILE);
if (!$version || !$msever) {
warn "$ARGV does not have a version" unless $version;
warn "$ARGV does not have an application version" unless $msever;
next;
}
print "package:\n\tname: $fullname\n\turl: $url$name.mse-installer\n\tversion: $version\n\tapp version: $msever\n$dependencies\tdescription:\n\n";
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment