File: Version.txt

package info (click to toggle)
openclonk 5.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 95,984 kB
  • ctags: 30,251
  • sloc: cpp: 156,513; ansic: 63,819; xml: 31,289; python: 1,090; php: 767; makefile: 138; ruby: 27; sh: 22
file content (77 lines) | stat: -rwxr-xr-x 2,849 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77

############################################################################
# Project version information
############################################################################

SET(C4PROJECT           "OpenClonk Project")
SET(C4PROJECT_DOMAIN    "openclonk")
SET(C4PROJECT_TLD       "org")
SET(C4PROJECT_URL       "http://${C4PROJECT_DOMAIN}.${C4PROJECT_TLD}")
SET(C4ENGINENAME        "OpenClonk")
SET(C4ENGINENICK        "openclonk")
SET(C4ENGINEID          "${C4PROJECT_TLD}.${C4PROJECT_DOMAIN}.${C4ENGINENICK}")

SET(C4XVER1             5)
SET(C4XVER2             5)
SET(C4XVER3             1)

# C4VERSIONBUILDNAME should be witty and somewhat frequently changing
# for alpha and beta releases, and meaningful and stable for stable releases.
# Both variables need to start with a space if they aren't empty.
SET(C4VERSIONBUILDNAME  "")
SET(C4VERSIONEXTRA      "")

############################################################################
# Get revision from Git
############################################################################
include(GitGetChangesetID)
git_get_changeset_id(C4REVISION)

############################################################################
# Get year
############################################################################

IF(CMAKE_HOST_UNIX)
	EXECUTE_PROCESS(COMMAND "date" "+%Y" OUTPUT_VARIABLE DATE)
ELSEIF(CMAKE_HOST_WIN32)
	EXECUTE_PROCESS(COMMAND "cscript.exe" "//nologo" "${CMAKE_CURRENT_SOURCE_DIR}/tools/get_current_year.vbs" OUTPUT_VARIABLE DATE)
ENDIF()
STRING(REGEX REPLACE "(.+)\n" "\\1" YEARFIXED "${DATE}")
SET(C4COPYRIGHT_YEAR ${YEARFIXED})

############################################################################
# Build version strings
############################################################################

SET(C4ENGINECAPTION     "${C4ENGINENAME}{$C4VERSIONBUILDNAME}")
set(C4ENGINEINFO        "${C4ENGINENAME}")

set(C4VERSION           "${C4XVER1}.${C4XVER2}.${C4XVER3}")

if(C4XVER4 LESS 10)
	set(C4VERSION       "${C4VERSION} [00${C4XVER4}]")
elseif(C4XVERBUILD LESS 100)
	set(C4VERSION       "${C4VERSION} [0${C4XVER4}]")
else()
	set(C4VERSION       "${C4VERSION} [${C4XVER4}]")
endif()

if(NOT ${C4VERSIONEXTRA} STREQUAL "")
	set(C4ENGINEINFO    "${C4ENGINENAME} ${C4VERSIONEXTRA}")
	set(C4VERSION       "${C4VERSION} ${C4VERSIONEXTRA}")
endif()

if(WIN32)
	set(C4VERSION       "${C4VERSION} win")
elseif(APPLE)
	set(C4VERSION       "${C4VERSION} mac")
elseif(UNIX)
	set(C4VERSION       "${C4VERSION} unix")
else()
	set(C4VERSION       "${C4VERSION} strange")
endif()

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/C4Version.h.in ${CMAKE_CURRENT_BINARY_DIR}/C4Version.h ESCAPE_QUOTES)
if(WIN32)
	configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/res/WindowsGamesExplorer.xml.in ${CMAKE_CURRENT_BINARY_DIR}/WindowsGamesExplorer.xml ESCAPE_QUOTES)
endif()