2007-10-21 14:59:05 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2009-08-21 20:21:05 +00:00
|
|
|
/*
|
|
|
|
* This file is part of OpenTTD.
|
|
|
|
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
|
|
|
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2007-10-21 14:59:05 +00:00
|
|
|
/** @file rev.cpp Autogenerated file with the revision and such of OpenTTD. */
|
|
|
|
|
|
|
|
#include "stdafx.h"
|
2011-08-21 18:57:45 +00:00
|
|
|
#include "core/bitmath_func.hpp"
|
2008-05-04 21:53:36 +00:00
|
|
|
#include "rev.h"
|
2007-10-21 14:59:05 +00:00
|
|
|
|
2014-04-23 20:13:33 +00:00
|
|
|
#include "safeguards.h"
|
|
|
|
|
2011-08-21 18:57:45 +00:00
|
|
|
/**
|
|
|
|
* Is this version of OpenTTD a release version?
|
|
|
|
* @return True if it is a release version.
|
|
|
|
*/
|
|
|
|
bool IsReleasedVersion()
|
|
|
|
{
|
|
|
|
return HasBit(_openttd_newgrf_version, 19);
|
|
|
|
}
|
|
|
|
|
2007-10-21 14:59:05 +00:00
|
|
|
/**
|
|
|
|
* The text version of OpenTTD's revision.
|
|
|
|
* This will be either "<major>.<minor>.<build>[-RC<rc>]",
|
|
|
|
* "r<revision number>[M][-<branch>]" or "norev000".
|
|
|
|
*
|
|
|
|
* The major, minor and build are the numbers that describe releases of
|
|
|
|
* OpenTTD (like 0.5.3). "-RC" is used to flag release candidates.
|
|
|
|
*
|
|
|
|
* The revision number is fairly straight forward. The M is to show that
|
|
|
|
* the binary is made from modified source code. The branch shows the
|
|
|
|
* branch the revision is of and will not be there when it is trunk.
|
|
|
|
*
|
|
|
|
* norev000 is for non-releases that are made on systems without
|
|
|
|
* subversion or sources that are not a checkout of subversion.
|
|
|
|
*/
|
2009-05-16 12:36:33 +00:00
|
|
|
const char _openttd_revision[] = "!!VERSION!!";
|
2007-10-21 14:59:05 +00:00
|
|
|
|
2009-09-04 20:31:49 +00:00
|
|
|
/**
|
|
|
|
* The text version of OpenTTD's build date.
|
|
|
|
* Updating the build date in this file is the safest as it generally gets
|
|
|
|
* updated for each revision in contrary to most other files that only see
|
|
|
|
* updates when they are actually changed themselves.
|
|
|
|
*/
|
|
|
|
const char _openttd_build_date[] = __DATE__ " " __TIME__;
|
|
|
|
|
2008-06-03 18:35:58 +00:00
|
|
|
/**
|
|
|
|
* Let us know if current build was modified. This detection
|
2013-01-08 22:46:42 +00:00
|
|
|
* works even in the case when revision string is overridden by
|
2008-06-03 18:35:58 +00:00
|
|
|
* --revision argument.
|
|
|
|
* Value 0 means no modification, 1 is for unknown state
|
|
|
|
* (compiling from sources without any version control software)
|
|
|
|
* and 2 is for modified revision.
|
|
|
|
*/
|
2009-05-16 12:36:33 +00:00
|
|
|
const byte _openttd_revision_modified = !!MODIFIED!!;
|
2008-06-03 18:35:58 +00:00
|
|
|
|
2007-10-21 14:59:05 +00:00
|
|
|
/**
|
|
|
|
* The NewGRF revision of OTTD:
|
|
|
|
* bits meaning.
|
|
|
|
* 28-31 major version
|
|
|
|
* 24-27 minor version
|
|
|
|
* 20-23 build
|
|
|
|
* 19 1 if it is a release, 0 if it is not.
|
2018-04-11 18:43:54 +00:00
|
|
|
* 0-18 used to be the SVN revision, currently unused
|
2007-10-21 14:59:05 +00:00
|
|
|
*
|
|
|
|
* The 19th bit is there so the development/betas/alpha, etc. leading to a
|
|
|
|
* final release will always have a lower version number than the released
|
2013-01-08 22:46:42 +00:00
|
|
|
* version, thus making comparisons on specific revisions easy.
|
2007-10-21 14:59:05 +00:00
|
|
|
*/
|
2018-04-11 18:43:54 +00:00
|
|
|
const uint32 _openttd_newgrf_version = 1 << 28 | 9 << 24 | 0 << 20 | 0 << 19;
|
2007-10-21 14:59:05 +00:00
|
|
|
|
2007-09-12 07:11:48 +00:00
|
|
|
#ifdef __MORPHOS__
|
2007-10-21 14:59:05 +00:00
|
|
|
/**
|
|
|
|
* Variable used by MorphOS to show the version.
|
|
|
|
*/
|
2009-05-16 12:36:33 +00:00
|
|
|
extern const char morphos_versions_tag[] = "$VER: OpenTTD !!VERSION!! (!!DATE!!) OpenTTD Team [MorphOS, PowerPC]";
|
2007-09-12 07:11:48 +00:00
|
|
|
#endif
|