diff --git a/binaries/data/mods/public/gui/common/functions_utility.js b/binaries/data/mods/public/gui/common/functions_utility.js index 1dfdb26ed6..6a51cc2bab 100644 --- a/binaries/data/mods/public/gui/common/functions_utility.js +++ b/binaries/data/mods/public/gui/common/functions_utility.js @@ -277,9 +277,9 @@ function hideRemaining(parentName, start = 0) function getBuildString() { - return sprintf(translate("Build: %(buildDate)s (%(revision)s)"), { + return sprintf(translate("Build: %(buildDate)s (%(version)s)"), { "buildDate": Engine.GetBuildDate(), - "revision": Engine.GetBuildRevision() + "version": Engine.GetBuildVersion() }); } diff --git a/binaries/data/mods/public/gui/session/top_panel/BuildLabel.xml b/binaries/data/mods/public/gui/session/top_panel/BuildLabel.xml index ed7e5d3b71..c82faf31be 100644 --- a/binaries/data/mods/public/gui/session/top_panel/BuildLabel.xml +++ b/binaries/data/mods/public/gui/session/top_panel/BuildLabel.xml @@ -6,7 +6,7 @@ Alpha XXVII: Agni - + build_version.txt diff --git a/build/svn_revision/svn_revision.txt b/build/build_version/build_version.txt similarity index 100% rename from build/svn_revision/svn_revision.txt rename to build/build_version/build_version.txt diff --git a/build/svn_revision/svn_revision.bat b/build/svn_revision/svn_revision.bat deleted file mode 100644 index cfd9f2be4c..0000000000 --- a/build/svn_revision/svn_revision.bat +++ /dev/null @@ -1,6 +0,0 @@ -@ECHO OFF -REM Generate a Unicode string constant from svnversion's output and -REM write it to svn_revision.txt -FOR /F "tokens=*" %%i IN ('..\bin\svnversion ..\..\source -n') DO SET output=%%i -SET output=L"%output%" -ECHO %output% > svn_revision.txt diff --git a/source/lib/svn_revision.cpp b/source/lib/build_version.cpp similarity index 90% rename from source/lib/svn_revision.cpp rename to source/lib/build_version.cpp index 8dc6b80e3b..2ba9cf5f59 100644 --- a/source/lib/svn_revision.cpp +++ b/source/lib/build_version.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2010 Wildfire Games. +/* Copyright (C) 2024 Wildfire Games. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -22,6 +22,6 @@ #include "precompiled.h" -wchar_t svn_revision[] = -#include "../../build/svn_revision/svn_revision.txt" +wchar_t build_version[] = +#include "../../build/build_version/build_version.txt" ; diff --git a/source/lib/svn_revision.h b/source/lib/build_version.h similarity index 93% rename from source/lib/svn_revision.h rename to source/lib/build_version.h index 2fc1aba6f6..d771b1230c 100644 --- a/source/lib/svn_revision.h +++ b/source/lib/build_version.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010 Wildfire Games. +/* Copyright (C) 2024 Wildfire Games. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -20,4 +20,4 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -extern wchar_t svn_revision[]; +extern wchar_t build_version[]; diff --git a/source/ps/GameSetup/HWDetect.cpp b/source/ps/GameSetup/HWDetect.cpp index d3e8d9ebf7..40a58134ba 100644 --- a/source/ps/GameSetup/HWDetect.cpp +++ b/source/ps/GameSetup/HWDetect.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2023 Wildfire Games. +/* Copyright (C) 2024 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -17,7 +17,7 @@ #include "precompiled.h" -#include "lib/svn_revision.h" +#include "lib/build_version.h" #include "lib/external_libraries/libsdl.h" #include "lib/posix/posix_utsname.h" #include "lib/timer.h" @@ -328,7 +328,7 @@ void RunHardwareDetection(bool writeSystemInfoBeforeDetection, Renderer::Backend Script::SetProperty(rq, settings, "build_opengles", CONFIG2_GLES); Script::SetProperty(rq, settings, "build_datetime", std::string(__DATE__ " " __TIME__)); - Script::SetProperty(rq, settings, "build_revision", std::wstring(svn_revision)); + Script::SetProperty(rq, settings, "build_version", std::wstring(build_version)); Script::SetProperty(rq, settings, "build_msc", (int)MSC_VERSION); Script::SetProperty(rq, settings, "build_icc", (int)ICC_VERSION); diff --git a/source/ps/Pyrogenesis.cpp b/source/ps/Pyrogenesis.cpp index d5ed1d7b6d..9e3486bee1 100644 --- a/source/ps/Pyrogenesis.cpp +++ b/source/ps/Pyrogenesis.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2024 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -22,7 +22,7 @@ #include "Pyrogenesis.h" #include "lib/sysdep/sysdep.h" -#include "lib/svn_revision.h" +#include "lib/build_version.h" const char* engine_version = "0.0.27"; const char* main_window_name = "0 A.D."; @@ -56,7 +56,7 @@ static void AppendAsciiFile(FILE* out, const OsPath& pathname) // for user convenience, bundle all logs into this file: void psBundleLogs(FILE* f) { - fwprintf(f, L"SVN Revision: %ls\n\n", svn_revision); + fwprintf(f, L"Build Version: %ls\n\n", build_version); fwprintf(f, L"Engine Version: %hs\n\n", engine_version); fwprintf(f, L"System info:\n\n"); diff --git a/source/ps/scripting/JSInterface_Debug.cpp b/source/ps/scripting/JSInterface_Debug.cpp index 92c5b5b7ae..78aa3bcc86 100644 --- a/source/ps/scripting/JSInterface_Debug.cpp +++ b/source/ps/scripting/JSInterface_Debug.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 Wildfire Games. +/* Copyright (C) 2024 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -20,7 +20,7 @@ #include "JSInterface_Debug.h" #include "i18n/L10n.h" -#include "lib/svn_revision.h" +#include "lib/build_version.h" #include "lib/debug.h" #include "scriptinterface/FunctionWrapper.h" #include "scriptinterface/ScriptRequest.h" @@ -75,17 +75,17 @@ double GetBuildTimestamp() return std::time(nullptr); } -// Return the revision number at which the current executable was compiled. -// - svn revision is generated by calling svnversion and cached in -// lib/svn_revision.cpp. it is useful to know when attempting to -// reproduce bugs (the main EXE and PDB should be temporarily reverted to -// that revision so that they match user-submitted crashdumps). -std::wstring GetBuildRevision() +// Return the build version of the current executable. +// - in nightly builds, build version is generated from the git HEAD branch and +// hash and cached in lib/build_version.cpp. it is useful to know when attempting +// to reproduce bugs (the main EXE and PDB should be temporarily reverted to +// that commit so that they match user-submitted crashdumps). +std::wstring GetBuildVersion() { - std::wstring svnRevision(svn_revision); - if (svnRevision == L"custom build") + std::wstring buildVersion(build_version); + if (buildVersion == L"custom build") return wstring_from_utf8(g_L10n.Translate("custom build")); - return svnRevision; + return buildVersion; } void RegisterScriptFunctions(const ScriptRequest& rq) @@ -96,6 +96,6 @@ void RegisterScriptFunctions(const ScriptRequest& rq) ScriptFunction::Register<&DisplayErrorDialog>(rq, "DisplayErrorDialog"); ScriptFunction::Register<&GetBuildDate>(rq, "GetBuildDate"); ScriptFunction::Register<&GetBuildTimestamp>(rq, "GetBuildTimestamp"); - ScriptFunction::Register<&GetBuildRevision>(rq, "GetBuildRevision"); + ScriptFunction::Register<&GetBuildVersion>(rq, "GetBuildVersion"); } } diff --git a/source/tools/autolog/SVNLog/Makefile.PL b/source/tools/autolog/SVNLog/Makefile.PL deleted file mode 100644 index cfdcbcf891..0000000000 --- a/source/tools/autolog/SVNLog/Makefile.PL +++ /dev/null @@ -1,17 +0,0 @@ -use inc::Module::Install; - -name('SVNLog'); -abstract('Catalyst Application'); -author('Catalyst developer'); -version_from('lib/SVNLog.pm'); -license('perl'); - -include('ExtUtils::AutoInstall'); - -requires( Catalyst => '5.60' ); - -catalyst_files(); - -install_script( glob('script/*.pl') ); -auto_install(); -&WriteAll; diff --git a/source/tools/autolog/SVNLog/config.yml b/source/tools/autolog/SVNLog/config.yml deleted file mode 100644 index 2c90348e53..0000000000 --- a/source/tools/autolog/SVNLog/config.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: SVNLog -svn: - username: philip - password: ???????? - url : http://svn.wildfiregames.com/svn/ps/trunk -cdbi: - dsn : dbi:SQLite:/var/svn/autolog/SVNLog/sql/svnlog.db -output: - filename: /var/svn/htdocs/log.html - filename_feed: /var/svn/htdocs/log.atom - feed_url: http://svn.wildfiregames.com/log.atom diff --git a/source/tools/autolog/SVNLog/lib/SVNLog.pm b/source/tools/autolog/SVNLog/lib/SVNLog.pm deleted file mode 100644 index 90bba7c584..0000000000 --- a/source/tools/autolog/SVNLog/lib/SVNLog.pm +++ /dev/null @@ -1,22 +0,0 @@ -package SVNLog; - -use strict; -use warnings; - -use YAML (); - -use Catalyst qw/FormValidator CDBI::Transaction/; - -our $VERSION = '0.01'; - -__PACKAGE__->config(YAML::LoadFile(__PACKAGE__->path_to('config.yml'))); - -__PACKAGE__->setup; - -sub end : Private { - my ($self, $c) = @_; - - $c->forward('SVNLog::View::TT') unless $c->response->body; -} - -1; diff --git a/source/tools/autolog/SVNLog/lib/SVNLog/Controller/LogUpdate.pm b/source/tools/autolog/SVNLog/lib/SVNLog/Controller/LogUpdate.pm deleted file mode 100644 index 3fa272e21f..0000000000 --- a/source/tools/autolog/SVNLog/lib/SVNLog/Controller/LogUpdate.pm +++ /dev/null @@ -1,219 +0,0 @@ -package SVNLog::Controller::LogUpdate; - -use strict; -use base 'Catalyst::Controller'; - -use XML::Simple; -use XML::Atom::SimpleFeed; -use Data::UUID; - -sub doupdate : Local -{ - my ($self, $c) = @_; - - my $latest = SVNLog::Model::CDBI::Logentry->maximum_value_of('revision') || 0; - my $min = $latest; - my $max = 'HEAD'; - - my $svn_cmd_data = '--username '.$c->config->{svn}{username}.' --password '.$c->config->{svn}{password}.' '.$c->config->{svn}{url}; - my $log_xml = `svn log --xml --verbose -r $min:$max $svn_cmd_data`; - die "SVN request failed" if not (defined $log_xml and $log_xml =~ m~~); - - my $log = XMLin($log_xml, ContentKey => 'path'); - - my $max_seen = -1; - - $c->transaction(sub { - for my $logentry (ref $log->{logentry} eq 'ARRAY' ? @{$log->{logentry}} : ($log->{logentry})) - { - $max_seen = $logentry->{revision} if $logentry->{revision} > $max_seen; - next if $logentry->{revision} <= $latest; - - my $paths = $logentry->{paths}->{path}; - delete $logentry->{paths}; - - # Convert into just a string (because XML::Simple doesn't know that's what it should be) - $logentry->{msg} = '' if ref $logentry->{msg}; - - my $entry = SVNLog::Model::CDBI::Logentry->insert($logentry); - - for my $path (ref $paths eq 'ARRAY' ? @$paths : ($paths)) - { - SVNLog::Model::CDBI::Paths->insert({logentry => $entry->id, filter_copyfrom(%$path)}); - } - } - }) or $c->log->error("Transaction failed: " . $c->error->[-1]); - - add_default_public_msgs($c); - - open my $text_fh, '>', $c->config->{output}{filename} or die $!; - print $text_fh $self->generate_text($c); - open my $feed_fh, '>', $c->config->{output}{filename_feed} or die $!; - print $feed_fh $self->generate_feed($c); - - $c->res->body("Updated log to $max_seen."); -} - -sub defaultise : Local -{ - my ($self, $c) = @_; - add_default_public_msgs($c); - $c->res->body("Done"); -} - -# (To reset the database: -# delete from public_message; delete from sqlite_sequence where name = "public_message"; -# ) - -sub add_default_public_msgs -{ - my ($c) = @_; - - $c->transaction(sub { - my @unmessaged = SVNLog::Model::CDBI::Logentry->retrieve_from_sql(qq{ - NOT (SELECT COUNT(*) FROM public_message WHERE public_message.logentry = logentry.id) - ORDER BY logentry.id - }); - for my $logentry (@unmessaged) - { - my @lines; - for (split /\n/, $logentry->msg) - { - push @lines, $_ if s/^#\s*//; - } - my $msg = join "\n", @lines; - - SVNLog::Model::CDBI::PublicMessage->insert({ - logentry => $logentry->id, - msg => $msg, - }); - } - }); -} - -sub createtext : Local -{ - my ($self, $c) = @_; - my $out = $self->generate_text($c); - $c->res->body($out); -} - -sub createfeed : Local -{ - my ($self, $c) = @_; - my $out = $self->generate_feed($c); - $c->res->body($out); -} - -sub get_log_entries -{ - my ($days, $max) = @_; - my @logentries = (); - for (SVNLog::Model::CDBI::Logentry->recent($days)) - { - my $msg = $_->public_msg; - next unless defined $msg and $msg->msg; # skip ones with empty messages - - push @logentries, $_; - - last if $max and @logentries >= $max; - } - return @logentries; -} - -sub generate_text -{ - my ($self, $c) = @_; - - my $feed_url = $c->config->{output}{feed_url}; - my $out = < -0 A.D. Revision Log - -Atom feed -EOF - - my @logentries = get_log_entries(28, 10); - - for (@logentries) - { - my ($revision, $author, $date, $msg) = ($_->revision, $_->author, $_->date, $_->public_msg); - - $date =~ s/T.*Z//; - $out .= <revision: $revision
-author: $author
-date: $date
-EOF - my $text = $msg->msg; - $text =~ s/&/&/g; - $text =~ s//>/g; - $text =~ s/\n/
/g; - $out .= $text . "\n
\n"; - } - - if (not @logentries) - { - $out .= 'Sorry, no data is available right now.'; - } - - return $out; -} - -sub generate_feed -{ - my ($self, $c) = @_; - - my $uid_gen = new Data::UUID; - - my $feed_url = $c->config->{output}{feed_url}; - - my $feed = new XML::Atom::SimpleFeed( - title => "0 A.D. Revision Log", - link => "http://play0ad.com/", - link => { rel => 'self', href => $feed_url }, - id => "urn:uuid:" . $uid_gen->create_from_name_str('WFG SVN feed', 'feed'), - ); - - my @logentries = get_log_entries(7); - - for (@logentries) - { - my ($revision, $author, $date, $msg) = ($_->revision, $_->author, $_->date, $_->public_msg); - - my $uid = $uid_gen->create_from_name_str('WFG SVN feed', $revision); - - $feed->add_entry( - title => "Revision $revision - ".$msg->msg, - id => "urn:uuid:$uid", - author => $author, - content => $msg->msg, - published => $date, - updated => $date, - link => "http://play0ad.com/", - ); - } - - return $feed->as_string; -} - -sub filter_copyfrom -{ - my @r = @_; - s/^(copyfrom)-(rev|path)$/$1_$2/ for @r; - @r; -} - -1; diff --git a/source/tools/autolog/SVNLog/lib/SVNLog/Controller/PublicMessage.pm b/source/tools/autolog/SVNLog/lib/SVNLog/Controller/PublicMessage.pm deleted file mode 100644 index 0af64cb87c..0000000000 --- a/source/tools/autolog/SVNLog/lib/SVNLog/Controller/PublicMessage.pm +++ /dev/null @@ -1,41 +0,0 @@ -package SVNLog::Controller::PublicMessage; - -use strict; -use base 'Catalyst::Base'; - -sub default : Private { - my ( $self, $c ) = @_; - $c->forward('list'); -} - -sub do_edit : Local { - my ( $self, $c, $id ) = @_; - $c->form(optional => [ SVNLog::Model::CDBI::PublicMessage->columns ], - missing_optional_valid => 1 ); - if ($c->form->has_missing) { - $c->stash->{message}='You have to fill in all fields.'. - 'the following are missing: '. - join(', ',$c->form->missing()).''; - } elsif ($c->form->has_invalid) { - $c->stash->{message}='Some fields are not correctly filled in.'. - 'the following are invalid: '. - join(', ',$c->form->invalid()).''; - } else { - SVNLog::Model::CDBI::PublicMessage->retrieve($id)->update_from_form( $c->form ); - $c->stash->{message}='Updated OK'; - } - $c->forward('edit'); -} - -sub edit : Local { - my ( $self, $c, $id ) = @_; - $c->stash->{item} = SVNLog::Model::CDBI::PublicMessage->retrieve($id); - $c->stash->{template} = 'PublicMessage/edit.tt'; -} - -sub list : Local { - my ( $self, $c ) = @_; - $c->stash->{template} = 'PublicMessage/list.tt'; -} - -1; diff --git a/source/tools/autolog/SVNLog/lib/SVNLog/Model/CDBI.pm b/source/tools/autolog/SVNLog/lib/SVNLog/Model/CDBI.pm deleted file mode 100644 index f7af8ec60c..0000000000 --- a/source/tools/autolog/SVNLog/lib/SVNLog/Model/CDBI.pm +++ /dev/null @@ -1,15 +0,0 @@ -package SVNLog::Model::CDBI; - -use strict; -use base 'Catalyst::Model::CDBI'; - -__PACKAGE__->config( - dsn => SVNLog->config->{cdbi}{dsn}, - user => '', - password => '', - options => {}, - relationships => 1, - additional_base_classes => [qw/Class::DBI::FromForm Class::DBI::AsForm/], -); - -1; diff --git a/source/tools/autolog/SVNLog/lib/SVNLog/Model/CDBI/Logentry.pm b/source/tools/autolog/SVNLog/lib/SVNLog/Model/CDBI/Logentry.pm deleted file mode 100644 index ac2fd231fa..0000000000 --- a/source/tools/autolog/SVNLog/lib/SVNLog/Model/CDBI/Logentry.pm +++ /dev/null @@ -1,9 +0,0 @@ -package SVNLog::Model::CDBI::Logentry; - -use strict; - -__PACKAGE__->add_constructor(recent => "datetime(substr(date, 0, 26)) >= datetime('now', -? || ' days') ORDER BY revision DESC"); - -__PACKAGE__->might_have(public_msg => 'SVNLog::Model::CDBI::PublicMessage'); - -1; diff --git a/source/tools/autolog/SVNLog/lib/SVNLog/Model/CDBI/Paths.pm b/source/tools/autolog/SVNLog/lib/SVNLog/Model/CDBI/Paths.pm deleted file mode 100644 index a697b11e8b..0000000000 --- a/source/tools/autolog/SVNLog/lib/SVNLog/Model/CDBI/Paths.pm +++ /dev/null @@ -1,5 +0,0 @@ -package SVNLog::Model::CDBI::Paths; - -use strict; - -1; diff --git a/source/tools/autolog/SVNLog/lib/SVNLog/Model/CDBI/PublicMessage.pm b/source/tools/autolog/SVNLog/lib/SVNLog/Model/CDBI/PublicMessage.pm deleted file mode 100644 index fa134cc2e2..0000000000 --- a/source/tools/autolog/SVNLog/lib/SVNLog/Model/CDBI/PublicMessage.pm +++ /dev/null @@ -1,13 +0,0 @@ -package SVNLog::Model::CDBI::PublicMessage; - -use strict; - -__PACKAGE__->set_sql(log_range => qq{ - SELECT __TABLE__.id - FROM __TABLE__ - JOIN logentry ON __TABLE__.logentry = logentry.id - ORDER BY revision DESC - LIMIT ? OFFSET ? -}); - -1; diff --git a/source/tools/autolog/SVNLog/lib/SVNLog/View/TT.pm b/source/tools/autolog/SVNLog/lib/SVNLog/View/TT.pm deleted file mode 100644 index 7d04f3eead..0000000000 --- a/source/tools/autolog/SVNLog/lib/SVNLog/View/TT.pm +++ /dev/null @@ -1,6 +0,0 @@ -package SVNLog::View::TT; - -use strict; -use base 'Catalyst::View::TT'; - -1; diff --git a/source/tools/autolog/SVNLog/root/PublicMessage/edit.tt b/source/tools/autolog/SVNLog/root/PublicMessage/edit.tt deleted file mode 100644 index 8a36157439..0000000000 --- a/source/tools/autolog/SVNLog/root/PublicMessage/edit.tt +++ /dev/null @@ -1,25 +0,0 @@ - -

[% message %]

- -
- - Revision
- [% item.logentry.revision %]
-
- - Log message
- [% item.logentry.msg | html_line_break %]
-
- - Public message
- [% - textarea = item.to_field('msg'); - CALL textarea.attr('rows', 10); - CALL textarea.attr('cols', 60); - textarea.as_XML - %] -
- -
-
-Back to list diff --git a/source/tools/autolog/SVNLog/root/PublicMessage/list.tt b/source/tools/autolog/SVNLog/root/PublicMessage/list.tt deleted file mode 100644 index c7dd906f70..0000000000 --- a/source/tools/autolog/SVNLog/root/PublicMessage/list.tt +++ /dev/null @@ -1,36 +0,0 @@ - -[% USE table_class = Class('SVNLog::Model::CDBI::PublicMessage') %] - - - - - - - - - [% - count = 20; - start = c.req.param('start') || 0; - %] - [% FOR object = table_class.search_log_range(count, start) %] - - - - - - - - - [% END %] -
RevisionAuthorDateLog messagePublic message -
[% object.logentry.revision %][% object.logentry.author %][% str = object.logentry.date.match('(\d{4}-\d{2}-\d{2}).(\d{2}:\d{2}:\d{2})'); - str.0 %] [% str.1 %][% object.logentry.msg | html | html_line_break %][% object.msg | html | html_line_break %] - - Edit - -
- -[% IF start > 0 %] - Previous page | -[% END %] -Next page diff --git a/source/tools/autolog/SVNLog/script/svnlog_cgi.pl b/source/tools/autolog/SVNLog/script/svnlog_cgi.pl deleted file mode 100644 index fd812823fc..0000000000 --- a/source/tools/autolog/SVNLog/script/svnlog_cgi.pl +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/perl -w - -BEGIN { $ENV{CATALYST_ENGINE} ||= 'CGI' } - -use strict; -use FindBin; -use lib "$FindBin::Bin/../lib"; -use SVNLog; - -SVNLog->run; - -1; - -=head1 NAME - -svnlog_cgi.pl - Catalyst CGI - -=head1 SYNOPSIS - -See L - -=head1 DESCRIPTION - -Run a Catalyst application as cgi. - -=head1 AUTHOR - -Sebastian Riedel, C - -=head1 COPYRIGHT - -Copyright 2004 Sebastian Riedel. All rights reserved. - -This library is free software, you can redistribute it and/or modify -it under the same terms as Perl itself. - -=cut diff --git a/source/tools/autolog/SVNLog/script/svnlog_create.pl b/source/tools/autolog/SVNLog/script/svnlog_create.pl deleted file mode 100644 index 6df1d3762e..0000000000 --- a/source/tools/autolog/SVNLog/script/svnlog_create.pl +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/perl -w - -use strict; -use Getopt::Long; -use Pod::Usage; -use Catalyst::Helper; - -my $force = 0; -my $mech = 0; -my $help = 0; - -GetOptions( - 'nonew|force' => \$force, - 'mech|mechanize' => \$mech, - 'help|?' => \$help - ); - -pod2usage(1) if ( $help || !$ARGV[0] ); - -my $helper = Catalyst::Helper->new( { '.newfiles' => !$force, mech => $mech } ); - -pod2usage(1) unless $helper->mk_component( 'SVNLog', @ARGV ); - -1; - -=head1 NAME - -svnlog_create.pl - Create a new Catalyst Component - -=head1 SYNOPSIS - -svnlog_create.pl [options] model|view|controller name [helper] [options] - - Options: - -force don't create a .new file where a file to be created exists - -mechanize use Test::WWW::Mechanize::Catalyst for tests if available - -help display this help and exits - - Examples: - svnlog_create.pl controller My::Controller - svnlog_create.pl -mechanize controller My::Controller - svnlog_create.pl view My::View - svnlog_create.pl view MyView TT - svnlog_create.pl view TT TT - svnlog_create.pl model My::Model - svnlog_create.pl model SomeDB CDBI dbi:SQLite:/tmp/my.db - svnlog_create.pl model AnotherDB CDBI dbi:Pg:dbname=foo root 4321 - - See also: - perldoc Catalyst::Manual - perldoc Catalyst::Manual::Intro - -=head1 DESCRIPTION - -Create a new Catalyst Component. - -Existing component files are not overwritten. If any of the component files -to be created already exist the file will be written with a '.new' suffix. -This behavior can be suppressed with the C<-force> option. - -=head1 AUTHOR - -Sebastian Riedel, C - -=head1 COPYRIGHT - -Copyright 2004 Sebastian Riedel. All rights reserved. - -This library is free software, you can redistribute it and/or modify -it under the same terms as Perl itself. - -=cut diff --git a/source/tools/autolog/SVNLog/script/svnlog_fastcgi.pl b/source/tools/autolog/SVNLog/script/svnlog_fastcgi.pl deleted file mode 100644 index a697351e7a..0000000000 --- a/source/tools/autolog/SVNLog/script/svnlog_fastcgi.pl +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/perl -w - -BEGIN { $ENV{CATALYST_ENGINE} ||= 'FastCGI' } - -use strict; -use Getopt::Long; -use Pod::Usage; -use FindBin; -use lib "$FindBin::Bin/../lib"; -use SVNLog; - -my $help = 0; -my ( $listen, $nproc, $pidfile, $manager, $detach ); - -GetOptions( - 'help|?' => \$help, - 'listen|l=s' => \$listen, - 'nproc|n=i' => \$nproc, - 'pidfile|p=s' => \$pidfile, - 'manager|M=s' => \$manager, - 'daemon|d' => \$detach, -); - -pod2usage(1) if $help; - -SVNLog->run( - $listen, - { nproc => $nproc, - pidfile => $pidfile, - manager => $manager, - detach => $detach, - } -); - -1; - -=head1 NAME - -svnlog_fastcgi.pl - Catalyst FastCGI - -=head1 SYNOPSIS - -svnlog_fastcgi.pl [options] - - Options: - -? -help display this help and exits - -l -listen Socket path to listen on - (defaults to standard input) - can be HOST:PORT, :PORT or a - filesystem path - -n -nproc specify number of processes to keep - to serve requests (defaults to 1, - requires -listen) - -p -pidfile specify filename for pid file - (requires -listen) - -d -daemon daemonize (requires -listen) - -M -manager specify alternate process manager - (FCGI::ProcManager sub-class) - or empty string to disable - -=head1 DESCRIPTION - -Run a Catalyst application as fastcgi. - -=head1 AUTHOR - -Sebastian Riedel, C - -=head1 COPYRIGHT - -Copyright 2004 Sebastian Riedel. All rights reserved. - -This library is free software, you can redistribute it and/or modify -it under the same terms as Perl itself. - -=cut diff --git a/source/tools/autolog/SVNLog/script/svnlog_server.pl b/source/tools/autolog/SVNLog/script/svnlog_server.pl deleted file mode 100644 index 46fe909490..0000000000 --- a/source/tools/autolog/SVNLog/script/svnlog_server.pl +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/perl -w - -BEGIN { - $ENV{CATALYST_ENGINE} ||= 'HTTP'; - $ENV{CATALYST_SCRIPT_GEN} = 27; -} - -use strict; -use Getopt::Long; -use Pod::Usage; -use FindBin; -use lib "$FindBin::Bin/../lib"; - -my $debug = 0; -my $fork = 0; -my $help = 0; -my $host = undef; -my $port = 3000; -my $keepalive = 0; -my $restart = 0; -my $restart_delay = 1; -my $restart_regex = '\.yml$|\.yaml$|\.pm$'; - -my @argv = @ARGV; - -GetOptions( - 'debug|d' => \$debug, - 'fork' => \$fork, - 'help|?' => \$help, - 'host=s' => \$host, - 'port=s' => \$port, - 'keepalive|k' => \$keepalive, - 'restart|r' => \$restart, - 'restartdelay|rd=s' => \$restart_delay, - 'restartregex|rr=s' => \$restart_regex -); - -pod2usage(1) if $help; - -if ( $restart ) { - $ENV{CATALYST_ENGINE} = 'HTTP::Restarter'; -} -if ( $debug ) { - $ENV{CATALYST_DEBUG} = 1; -} - -# This is require instead of use so that the above environment -# variables can be set at runtime. -require SVNLog; - -SVNLog->run( $port, $host, { - argv => \@argv, - 'fork' => $fork, - keepalive => $keepalive, - restart => $restart, - restart_delay => $restart_delay, - restart_regex => qr/$restart_regex/ -} ); - -1; - -=head1 NAME - -svnlog_server.pl - Catalyst Testserver - -=head1 SYNOPSIS - -svnlog_server.pl [options] - - Options: - -d -debug force debug mode - -f -fork handle each request in a new process - (defaults to false) - -? -help display this help and exits - -host host (defaults to all) - -p -port port (defaults to 3000) - -k -keepalive enable keep-alive connections - -r -restart restart when files got modified - (defaults to false) - -rd -restartdelay delay between file checks - -rr -restartregex regex match files that trigger - a restart when modified - (defaults to '\.yml$|\.yaml$|\.pm$') - - See also: - perldoc Catalyst::Manual - perldoc Catalyst::Manual::Intro - -=head1 DESCRIPTION - -Run a Catalyst Testserver for this application. - -=head1 AUTHOR - -Sebastian Riedel, C - -=head1 COPYRIGHT - -Copyright 2004 Sebastian Riedel. All rights reserved. - -This library is free software, you can redistribute it and/or modify -it under the same terms as Perl itself. - -=cut diff --git a/source/tools/autolog/SVNLog/script/svnlog_test.pl b/source/tools/autolog/SVNLog/script/svnlog_test.pl deleted file mode 100644 index 9bb45aaccd..0000000000 --- a/source/tools/autolog/SVNLog/script/svnlog_test.pl +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/perl -w - -use strict; -use Getopt::Long; -use Pod::Usage; -use FindBin; -use lib "$FindBin::Bin/../lib"; -use Catalyst::Test 'SVNLog'; - -my $help = 0; - -GetOptions( 'help|?' => \$help ); - -pod2usage(1) if ( $help || !$ARGV[0] ); - -print request($ARGV[0])->content . "\n"; - -1; - -=head1 NAME - -svnlog_test.pl - Catalyst Test - -=head1 SYNOPSIS - -svnlog_test.pl [options] uri - - Options: - -help display this help and exits - - Examples: - svnlog_test.pl http://localhost/some_action - svnlog_test.pl /some_action - - See also: - perldoc Catalyst::Manual - perldoc Catalyst::Manual::Intro - -=head1 DESCRIPTION - -Run a Catalyst action from the command line. - -=head1 AUTHOR - -Sebastian Riedel, C - -=head1 COPYRIGHT - -Copyright 2004 Sebastian Riedel. All rights reserved. - -This library is free software, you can redistribute it and/or modify -it under the same terms as Perl itself. - -=cut diff --git a/source/tools/autolog/SVNLog/sql/createdb.sh b/source/tools/autolog/SVNLog/sql/createdb.sh deleted file mode 100755 index 3414af3a50..0000000000 --- a/source/tools/autolog/SVNLog/sql/createdb.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -sqlite3 svnlog.db < svnlog.sql diff --git a/source/tools/autolog/SVNLog/sql/svnlog.sql b/source/tools/autolog/SVNLog/sql/svnlog.sql deleted file mode 100644 index 056d77f49d..0000000000 --- a/source/tools/autolog/SVNLog/sql/svnlog.sql +++ /dev/null @@ -1,24 +0,0 @@ -CREATE TABLE logentry ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - revision INTEGER UNIQUE, - author TEXT, - date TEXT, - msg TEXT -); - -CREATE TABLE paths ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - logentry INTEGER REFERENCES logentry, - action TEXT, - copyfrom_path TEXT, - copyfrom_rev INTEGER, - path TEXT -); - -CREATE TABLE public_message ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - logentry INTEGER REFERENCES logentry, - msg TEXT -); -CREATE INDEX public_message_logentry ON public_message (logentry); - diff --git a/source/tools/dist/0ad.nsi b/source/tools/dist/0ad.nsi index 98dbcf089d..8ffaddbc10 100644 --- a/source/tools/dist/0ad.nsi +++ b/source/tools/dist/0ad.nsi @@ -1,6 +1,6 @@ ; To generate the installer (on Linux): ; Do an 'svn export' into a directory called e.g. "export-win32" -; makensis -nocd -dcheckoutpath=export-win32 -drevision=1234 -dversion=0.1.2 -dprefix=0ad-0.1.2-alpha export-win32/source/tools/dist/0ad.nsi +; makensis -nocd -dcheckoutpath=export-win32 -dversion=0.1.2 -dprefix=0ad-0.1.2-alpha export-win32/source/tools/dist/0ad.nsi SetCompressor /SOLID LZMA @@ -164,7 +164,7 @@ Section "!Game and data files" GameSection WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\0 A.D." "DisplayName" "0 A.D." WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\0 A.D." "DisplayVersion" "${VERSION}" WriteRegDWORD SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\0 A.D." "VersionMajor" 0 - WriteRegDWORD SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\0 A.D." "VersionMinor" ${REVISION} + WriteRegDWORD SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\0 A.D." "VersionMinor" "${VERSION}" WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\0 A.D." "Publisher" "Wildfire Games" WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\0 A.D." "DisplayIcon" "$\"$INSTDIR\binaries\system\pyrogenesis.exe$\"" WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\0 A.D." "InstallLocation" "$\"$INSTDIR$\"" diff --git a/source/tools/dist/build-osx-executable.sh b/source/tools/dist/build-osx-executable.sh index cb83e52bb4..d61f79f7bb 100755 --- a/source/tools/dist/build-osx-executable.sh +++ b/source/tools/dist/build-osx-executable.sh @@ -27,10 +27,6 @@ if [ ! -d "${SYSROOT}" ]; then die "${SYSROOT} does not exist! You probably need to install Xcode" fi -# Assume this is called from trunk/ -SVN_REV=$(svnversion -n .) -echo "L\"${SVN_REV}-release\"" > build/svn_revision/svn_revision.txt - cd "build/workspaces/" JOBS=${JOBS:="-j5"} diff --git a/source/tools/dist/build-unix-win32.sh b/source/tools/dist/build-unix-win32.sh index 6a4c1c9781..ff5b67bac8 100755 --- a/source/tools/dist/build-unix-win32.sh +++ b/source/tools/dist/build-unix-win32.sh @@ -7,9 +7,6 @@ GZIP7ZOPTS="-mx=9" BUNDLE_VERSION=${BUNDLE_VERSION:="0.0.xxx"} PREFIX="0ad-${BUNDLE_VERSION}-alpha" -SVN_REV=${SVN_REV:=$(svnversion -n .)} -echo "L\"${SVN_REV}-release\"" > build/svn_revision/svn_revision.txt - # Collect the relevant files tar cf $PREFIX-unix-build.tar \ --exclude='*.bat' --exclude='*.dll' --exclude='*.exe' --exclude='*.lib' \ @@ -40,7 +37,6 @@ fi # This needs nsisbi for files > 2GB makensis -V4 -nocd \ -dcheckoutpath="." \ - -drevision=${SVN_REV} \ -dversion=${BUNDLE_VERSION} \ -dprefix=${PREFIX} \ -darchive_path="archives/" \ diff --git a/source/tools/webservices/userreport/views_private.py b/source/tools/webservices/userreport/views_private.py index fb4d5499c1..e167cee6a1 100644 --- a/source/tools/webservices/userreport/views_private.py +++ b/source/tools/webservices/userreport/views_private.py @@ -73,7 +73,7 @@ def report_performance(request): 'cpu_identifier': json['cpu_identifier'], 'device': report.gl_device_identifier(), 'build_debug': json['build_debug'], - 'build_revision': json['build_revision'], + 'build_version': json['build_version'], 'build_datetime': json['build_datetime'], 'gfx_res': (json['video_xres'], json['video_yres']), }