mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Fixed some problems with the last commit (like I had to rewrite my
entire perl script, which was somehow deleted). git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@751 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -48,6 +48,8 @@ SymbolFontP SymbolFont::byName(const String& name) {
|
||||
}
|
||||
|
||||
IMPLEMENT_REFLECTION(SymbolFont) {
|
||||
REFLECT_BASE(Packaged);
|
||||
|
||||
REFLECT_ALIAS(300, "text align", "text alignment");
|
||||
|
||||
REFLECT_N("image font size", img_size);
|
||||
|
||||
@@ -28,7 +28,7 @@ DECLARE_TYPEOF_COLLECTION(PackageVersionDataP);
|
||||
/// Information on available packages
|
||||
class PackageVersionData : public IntrusivePtrBase<PackageVersionData> {
|
||||
public:
|
||||
PackageVersionData() : is_installer(true) {}
|
||||
PackageVersionData() {}
|
||||
|
||||
String name; ///< Name of the package
|
||||
String description; ///< html description
|
||||
@@ -402,7 +402,7 @@ void UpdatesWindow::onActionChange(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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
#!/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";
|
||||
}
|
||||
Reference in New Issue
Block a user