Commit Graph

39 Commits (fb4cf44424786f94a964dc90e095eebe15a45d9f)

Author SHA1 Message Date
cybersphinx 6d7572131e Make the shell and C++ autorevision output the same. 2011-03-07 01:30:45 +01:00
cybersphinx 1d358beb19 Move _cstr creation into version.cpp. 2011-03-07 01:04:52 +01:00
cybersphinx 3490bf21d7 Make autorevision only output the things we actually need. 2011-03-07 00:24:25 +01:00
cybersphinx 784fe5f629 Always use static strings in autorevision.h. 2011-03-06 19:31:14 +01:00
cybersphinx a30a8d21ce Replace svn with vcs. 2011-03-06 19:23:33 +01:00
cybersphinx d2eb159216 Get rid of the SVN_WC_SWITCHED stuff. 2011-03-06 18:57:12 +01:00
cybersphinx 809d0ac456 Get rid of the SVN_LOW_REV stuff. 2011-03-06 18:46:38 +01:00
buginator c617bfd26c MSVC only change, using STLport to bypass the severe performance
hits with MSVC's STL code.

The change does *not* break MS's STL usage, so you can freely swap
between both of them.

When adding STL functions, it is best you use MS's STL for the extra
debugging code they throw in, it actually does catch some errors.
Once you don't need the extra debugging code, then I use STLport, since
MS's STL code can't disable all the checks, and it has a huge performance
hit.
2010-12-05 13:59:40 -05:00
Cyp 4c28815937 Add defaults to autorevision.cpp for when not in a git repository. 2010-11-01 19:16:18 +01:00
Cyp 3f5176be49 Fix "(modified locally)".
Was hard to see it was broken, since the po/ directory keeps getting modified, so "(modified locally)" is often correct.
2010-11-01 13:34:07 +01:00
Cyp 242fa66dd9 Add fallback to -42, if git rev-list doesn't support --count.
The --count option was introduced in f69c501832ecd6880602c55565508e70c3a013d5 in git v1.7.2-rc1.
2010-10-28 16:44:07 +02:00
Cyp 0ee3a2147b Add version stuff for mac, and shorten version display in-game to a 7 char hash. 2010-10-27 19:43:18 +02:00
Cyp ef4b894202 Make autorevision.cpp print Git commit SHA1s. 2010-10-07 14:40:12 +02:00
Buginator edb644a03b Fix (and add missing) headers to files.
2009  Warzone Resurrection Project -> 2010  Warzone 2100 Project

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11298 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-28 18:58:33 +02:00
Christian Ohm 55f12a5d52 Hurd build fixes.
Closes #969.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8706 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:44 +01:00
Per Inge Mathisen b29e9eeba1 Fix compile error on *BSD systems. Closes ticket:820, patch by brad@comstyle.com
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8016 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:10 +02:00
Giel van Schijndel ab5e599100 Don't use the deprecated git-$command interface anymore, instead use "git $command"
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6707 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-22 23:42:07 +00:00
Dennis Schridde aac41748dc Bump copyright
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6617 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 18:01:48 +00:00
Giel van Schijndel e81ac54c92 Mark removeAfterNewLine as static
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6149 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-14 12:58:53 +00:00
Dennis Schridde aa2c897bd2 Usage of system() requires inclusion of cstdlib
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5307 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-23 13:49:12 +00:00
Dennis Schridde d747950e75 Fix ambigous else
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4711 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 23:56:20 +00:00
Dennis Schridde d6347dd5e7 Include climits (instead of unistd.h) for PATH_MAX. Use C++ headers instead of C ones.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4398 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-28 19:24:31 +00:00
Giel van Schijndel 5e50119a53 Fix compilation of autorevision on Windows (a copy&paste error)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4387 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-28 15:24:37 +00:00
Giel van Schijndel 93517102da Add code for extracting the Subversion revision numbers from a git-svn repository
Inspired by http://svn.voria.com/code/synfig-studio/trunk/build_tools/autorevision.sh from Paul Wise
(GPLv2, git invocations where taken from that script)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4380 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-28 00:37:29 +00:00
Dennis Schridde 3cdcf273a4 Include cstring for gcc 4.3 compatibility.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3496 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-16 10:47:43 +00:00
Giel van Schijndel 764a456efc * In AutoRevision set 'LC_ALL' to 'C', as well as 'LANG' which already is set to 'C'
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2869 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-25 11:07:11 +00:00
Giel van Schijndel 94b04775fb * Make sure that AutorRevision can be compiled even when using Unicode (makes lots of WINAPI functions accept UTF-16 LE instead of ASCII)
* Use SetEnvironmentVariableA instead of SetEnvironmentVariable which is a macro
Issue pointed out by Buginator

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2748 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-06 19:24:48 +00:00
Giel van Schijndel 6a2d26babd * Try '''harder''' to detect Windows platforms
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2747 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-06 19:17:36 +00:00
Giel van Schijndel 9f9cc3b697 * When compiling AutoRevision on MSVC make sure to #define popen and pclose as _popen and _pclose respectively
Fix provided by Buginator in bug #10269


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2743 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-06 14:32:17 +00:00
Giel van Schijndel 854c5eba1c * In revision information extraction class RevSVNVersionQuery (uses "svnversion"), ignore its output if the word "exported" is encountered (that way compiling from an exported working copy is possible also)
* Parse the "/autorevision.conf" file as last
 * Add template class assign_once<T> which wraps a T object so that it can only be assigned to once (all following assignments will simply be NO-OPS)
 * Make all RevisionInformation members an assign_once<T> object instead of a T object
 * Make sure src/version.c can compile when there is little revision information available
 * Add autorevision.conf which will provide a sane default for wc_uri ("trunk")


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2731 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-05 18:43:30 +00:00
Giel van Schijndel 71a6991cd7 * Add a new revision info extraction class (subclass of RevisionExtractor): RevConfigFile
* This class extracts revision info from a "var=value" style text file (can be used in tarballs)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2721 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-05 01:41:59 +00:00
Giel van Schijndel eebb1dd97f * Add struct RevisionInformation to bind all revision info together
* Add a new subclass of RevisionExtractor: RevSVNVersionQuery
  * This subclass will use "svnversion" to additionally detect mixed revisions, modifications and switched paths in working copies
 * Add the "low revision", modification and switch state to the output


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2720 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-04 23:08:17 +00:00
Giel van Schijndel 39e6d26a1f * Add an abstract base class for the extraction of revision information: RevisionExtractor
* This class uses the "Chain of Responsibility" pattern to delegate a task the current subclass cannot perform to a successor in the chain
 * Make QuerySVN() and ParseFile() part of subclasses derived from RevisionExtractor
  * Also make these functions function properly in the chain of responsibility


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2716 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-04 18:20:00 +00:00
Giel van Schijndel 7191ed7e92 * Set LANG=C in AutoRevision before executing "svn info" rather than the non-portable LANG=en_US
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2656 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-29 15:40:34 +00:00
Giel van Schijndel ac60bfc81f * Modify function QuerySvn such that we take advantage of std::string's interface rather than using low-level (i.e. character-level) string manipulations (e.g. remove a whole chunk at the end of a string rather than a separate character every time)
* Allow the #definition of SVN_AUTOREVISION_STATIC before #include AutoRevision's output file
   * When #defined to "static" it will mark all variables created in AutoRevision as static
 * Additionally detect the "base-uri" of a working copy (e.g. "trunk", "branches/2.0", etc.) and dump it in the output header file


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2624 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-25 20:42:03 +00:00
Giel van Schijndel ae8c4b6d2f Autorevision:
* Make function WriteOutput const-correct
 * Mark global variables static
 * Add commandline option "+cstr" which results in Autorevision adding a C-style string into the produced header file
 * When no revision information could be extracted from a working copy give an error message
 * Add some comments
 * Move some variables into a more local scope
 * Don't use member function .close() on iostreams just before leaving scope (the destructor will take care of that!)
 * Don't write the header file in binary mode
 * Fix handling of do_translate
 * Now DO dump revision date as well
 * Add double-quotes around strings


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2578 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-21 17:02:16 +00:00
Giel van Schijndel 355c7a6b0b Autorevision:
* Use C++ iostreams for output as well as input (which was already being used)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2577 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-21 15:50:50 +00:00
Giel van Schijndel 4849d5bf94 * Use revision 3545 (in the Code::Blocks repository) of autorevision instead; it doesn't depend on TinyXML
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2576 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-21 15:11:43 +00:00
Giel van Schijndel 2ebe3ddc28 * Add a build-time tool "autorevision", which I copied from the Code::Blocks project (GPLv2+)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2575 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-21 14:33:16 +00:00