Skip to content

Commit

Permalink
Added DOOMSDAY_RELEASE_TYPE and a more logical version ID.
Browse files Browse the repository at this point in the history
The Doomsday version text now contains the release type
(unstable, candidate, stable). Revised the way the version
text is generated so it's more logical. Replaced the old
"DGL" (Doomsday GL) with "OpenGL" as the renderer implementation
in the version ID.

The platform_release script reads the release type, but it
doesn't currently affect the build in any way. Ultimately it
will have an effect on the produced file name and where the
file is copied in the apt repository.

Also, added headers to engine sources in CMakeLists.txt so
that they appear in Qt Creator as part of the project.
  • Loading branch information
skyjake committed Mar 7, 2011
1 parent ea23838 commit e9074ea
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 22 deletions.
12 changes: 10 additions & 2 deletions distrib/platform_release.py
Expand Up @@ -13,6 +13,7 @@
OUTPUT_DIR = os.path.join(os.getcwd(), 'releases')
DOOMSDAY_VERSION = "0.0.0-Name"
DOOMSDAY_VERSION_PLAIN = "0.0.0"
DOOMSDAY_RELEASE_TYPE = "Unstable"
now = time.localtime()
DOOMSDAY_BUILD = 'build' + str((now.tm_year - 2011)*365 + now.tm_yday)
TIMESTAMP = time.strftime('%y-%m-%d')
Expand Down Expand Up @@ -55,30 +56,37 @@ def copytree(s, d):


def find_version():
print "Determining Doomsday version number...",
print "Determining Doomsday version...",

versionBase = None
versionName = None
releaseType = "Unstable"

f = file(os.path.join(DOOMSDAY_DIR, "engine", "portable", "include", "dd_version.h"), 'rt')
for line in f.readlines():
line = line.strip()
if line[:7] != "#define": continue
baseAt = line.find("DOOMSDAY_VERSION_BASE")
nameAt = line.find("DOOMSDAY_RELEASE_NAME")
typeAt = line.find("DOOMSDAY_RELEASE_TYPE")
if baseAt > 0:
versionBase = line[baseAt + 21:].replace('\"','').strip()
if nameAt > 0:
versionName = line[nameAt + 21:].replace('\"','').strip()
if typeAt > 0:
releaseType = line[typeAt + 21:].replace('\"','').strip()

global DOOMSDAY_VERSION
global DOOMSDAY_VERSION_PLAIN
global DOOMSDAY_RELEASE_TYPE

DOOMSDAY_RELEASE_TYPE = releaseType
DOOMSDAY_VERSION_PLAIN = versionBase
DOOMSDAY_VERSION = versionBase
if versionName:
DOOMSDAY_VERSION += "-" + versionName

print DOOMSDAY_VERSION
print DOOMSDAY_VERSION + " (%s)" % releaseType


def prepare_work_dir():
Expand Down
7 changes: 4 additions & 3 deletions doomsday/CMakeLists.txt
Expand Up @@ -463,13 +463,13 @@ ADD_DEFINITIONS (-D__DOOMSDAY__ )

INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/engine/api ${CMAKE_SOURCE_DIR}/engine/portable/include )

FILE (GLOB DENG_PORTABLE_SOURCES ${CMAKE_SOURCE_DIR}/engine/portable/src/*.c )
FILE (GLOB DENG_PORTABLE_SOURCES ${CMAKE_SOURCE_DIR}/engine/portable/src/*.c ${CMAKE_SOURCE_DIR}/engine/portable/include/*.h )

SET ( DENG_PORTABLE_SOURCES ${DENG_PORTABLE_SOURCES} ${CMAKE_SOURCE_DIR}/plugins/common/src/m_fixed.c )

IF (UNIX)
INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/engine/unix/include )
FILE (GLOB DENG_ARCH_SPECIFIC_SOURCES ${CMAKE_SOURCE_DIR}/engine/unix/src/*.c )
FILE (GLOB DENG_ARCH_SPECIFIC_SOURCES ${CMAKE_SOURCE_DIR}/engine/unix/src/*.c ${CMAKE_SOURCE_DIR}/engine/unix/include/*.h )
SET (DENG_ARCH_SPECIFIC_SOURCES ${DENG_ARCH_SPECIFIC_SOURCES} ${LZSS_SOURCES})
ENDIF (UNIX)

Expand All @@ -478,7 +478,8 @@ IF (APPLE)
INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/engine/mac/include )
FILE (GLOB DENG_OSX_SOURCES
${CMAKE_SOURCE_DIR}/engine/mac/src/*.m
${CMAKE_SOURCE_DIR}/engine/mac/src/*.c )
${CMAKE_SOURCE_DIR}/engine/mac/src/*.c
${CMAKE_SOURCE_DIR}/engine/mac/include/*.h )
SET (DENG_ARCH_SPECIFIC_SOURCES ${DENG_ARCH_SPECIFIC_SOURCES} ${DENG_OSX_SOURCES})
ENDIF (APPLE)

Expand Down
20 changes: 11 additions & 9 deletions doomsday/engine/portable/include/dd_def.h
Expand Up @@ -49,20 +49,22 @@
# define RANGECHECK
#endif

#ifndef DOOMSDAY_VER_ID
# ifdef _DEBUG
# define DOOMSDAY_VER_ID "+D DGL"
# else
# define DOOMSDAY_VER_ID "DGL"
# endif
#ifdef RANGECHECK
# define DOOMSDAY_VER_ID_RANGECHECK " +R"
#else
# define DOOMSDAY_VER_ID_RANGECHECK ""
#endif

#ifdef RANGECHECK
# define DOOMSDAY_VERSIONTEXT DOOMSDAY_VERSION_TEXT" +R "__DATE__" ("DOOMSDAY_VER_ID")"
#ifdef _DEBUG
# define DOOMSDAY_VER_ID_DEBUG " +D"
#else
# define DOOMSDAY_VERSIONTEXT DOOMSDAY_VERSION_TEXT" "__DATE__" ("DOOMSDAY_VER_ID")"
# define DOOMSDAY_VER_ID_DEBUG ""
#endif

#define DOOMSDAY_VER_ID DOOMSDAY_RELEASE_TYPE DOOMSDAY_VER_ID_DEBUG DOOMSDAY_VER_ID_RANGECHECK " OpenGL"

#define DOOMSDAY_VERSIONTEXT DOOMSDAY_VERSION_TEXT" "__DATE__" ("DOOMSDAY_VER_ID")"

#define SAFEDIV(x,y) (!(y) || !((x)/(y))? 1 : (x)/(y))
#define ORDER(x,y,a,b) ( (x)<(y)? ((a)=(x),(b)=(y)) : ((b)=(x),(a)=(y)) )
#define LAST_CHAR(str) (str[strlen(str) - 1])
Expand Down
24 changes: 16 additions & 8 deletions doomsday/engine/portable/include/dd_version.h
Expand Up @@ -47,6 +47,22 @@
#define DOOMSDAY_VERSION_NUMBER 1,9,7,0 // For WIN32 version info.
//#define DOOMSDAY_RELEASE_NAME "Example"

/**
* DOOMSDAY_RELEASE_TYPE determines the classification of the release.
* Possible values are "Unstable", "Candidate" and "Stable".
*/
#define DOOMSDAY_RELEASE_TYPE "Unstable"
//#define DOOMSDAY_RELEASE_TYPE "Candidate"
//#define DOOMSDAY_RELEASE_TYPE "Stable"

/**
* If DOOMSDAY_RELEASE_FULL is NOT defined, the Win32 version info
* will be marked accordingly, indicating that this is a special build,
* for example, an alpha/beta/release candidate/etc and the SpecialBuild
* string will be populated with the content of DOOMSDAY_RELEASE_NAME.
*/
#define DOOMSDAY_RELEASE_FULL 1

/**
* Version constants. The Game module can use DOOMSDAY_VERSION to
* verify that the engine is new enough. Don't change
Expand All @@ -61,12 +77,4 @@

#define DOOMSDAY_PROJECTURL "http://sourceforge.net/projects/deng/"

/**
* If DOOMSDAY_RELEASE_FULL is NOT defined, the Win32 version info
* will be marked accordingly, indicating that this is a special build,
* for example, an alpha/beta/release candidate/etc and the SpecialBuild
* string will be populated with the content of DOOMSDAY_RELEASE_NAME.
*/
#define DOOMSDAY_RELEASE_FULL 1

#endif

0 comments on commit e9074ea

Please sign in to comment.