Skip to content

Commit

Permalink
Remove now unused year member from version.py
Browse files Browse the repository at this point in the history
We changed copyright to use "present" for the current year, so we no
longer need to hardcode this and (like now) forget to bump it yearly.
  • Loading branch information
akien-mga committed Jan 25, 2024
1 parent 4b6ad34 commit e0dc233
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 26 deletions.
1 change: 0 additions & 1 deletion core/config/engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ Dictionary Engine::get_version_info() const {
dict["hex"] = VERSION_HEX;
dict["status"] = VERSION_STATUS;
dict["build"] = VERSION_BUILD;
dict["year"] = VERSION_YEAR;

String hash = String(VERSION_HASH);
dict["hash"] = hash.is_empty() ? String("unknown") : hash;
Expand Down
6 changes: 6 additions & 0 deletions core/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@

#include "core/version_generated.gen.h"

// Copied from typedefs.h to stay lean.
#ifndef _STR
#define _STR(m_x) #m_x
#define _MKSTR(m_x) _STR(m_x)
#endif

// Godot versions are of the form <major>.<minor> for the initial release,
// and then <major>.<minor>.<patch> for subsequent bugfix releases where <patch> != 0
// That's arbitrary, but we find it pretty and it's the current policy.
Expand Down
1 change: 0 additions & 1 deletion doc/classes/Engine.xml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@
[code]status[/code] - Holds the status (e.g. "beta", "rc1", "rc2", ... "stable") as a String
[code]build[/code] - Holds the build name (e.g. "custom_build") as a String
[code]hash[/code] - Holds the full Git commit hash as a String
[code]year[/code] - Holds the year the version was released in as an int
[code]string[/code] - [code]major[/code] + [code]minor[/code] + [code]patch[/code] + [code]status[/code] + [code]build[/code] in a single String
The [code]hex[/code] value is encoded as follows, from left to right: one byte for the major, one byte for the minor, one byte for the patch version. For example, "3.1.12" would be [code]0x03010C[/code]. [b]Note:[/b] It's still an int internally, and printing it will give you its decimal representation, which is not particularly meaningful. Use hexadecimal literals for easy version comparisons from code:
[codeblocks]
Expand Down
2 changes: 0 additions & 2 deletions methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ def get_version_info(module_version_string="", silent=False):
"status": str(version.status),
"build": str(build_name),
"module_config": str(version.module_config) + module_version_string,
"year": int(version.year),
"website": str(version.website),
"docs_branch": str(version.docs),
}
Expand Down Expand Up @@ -232,7 +231,6 @@ def generate_version_header(module_version_string=""):
#define VERSION_STATUS "{status}"
#define VERSION_BUILD "{build}"
#define VERSION_MODULE_CONFIG "{module_config}"
#define VERSION_YEAR {year}
#define VERSION_WEBSITE "{website}"
#define VERSION_DOCS_BRANCH "{docs_branch}"
#define VERSION_DOCS_URL "https://docs.godotengine.org/en/" VERSION_DOCS_BRANCH
Expand Down
14 changes: 5 additions & 9 deletions platform/windows/godot_res.rc
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
#include "core/version.h"
#ifndef _STR
#define _STR(m_x) #m_x
#define _MKSTR(m_x) _STR(m_x)
#endif

GODOT_ICON ICON platform/windows/godot.ico

1 VERSIONINFO
FILEVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_PATCH,0
PRODUCTVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_PATCH,0
FILEOS 4
FILETYPE 1
FILEVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_PATCH,0
PRODUCTVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_PATCH,0
FILEOS 4
FILETYPE 1
BEGIN
BLOCK "StringFileInfo"
BEGIN
Expand All @@ -21,7 +17,7 @@ BEGIN
VALUE "FileVersion", VERSION_NUMBER
VALUE "ProductName", VERSION_NAME
VALUE "Licence", "MIT"
VALUE "LegalCopyright", "Copyright (c) 2007-" _MKSTR(VERSION_YEAR) " Juan Linietsky, Ariel Manzur and contributors"
VALUE "LegalCopyright", "(c) 2007-present Juan Linietsky, Ariel Manzur and Godot Engine contributors"
VALUE "Info", "https://godotengine.org"
VALUE "ProductVersion", VERSION_FULL_BUILD
END
Expand Down
14 changes: 5 additions & 9 deletions platform/windows/godot_res_wrap.rc
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
#include "core/version.h"
#ifndef _STR
#define _STR(m_x) #m_x
#define _MKSTR(m_x) _STR(m_x)
#endif

GODOT_ICON ICON platform/windows/godot_console.ico

1 VERSIONINFO
FILEVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_PATCH,0
PRODUCTVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_PATCH,0
FILEOS 4
FILETYPE 1
FILEVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_PATCH,0
PRODUCTVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_PATCH,0
FILEOS 4
FILETYPE 1
BEGIN
BLOCK "StringFileInfo"
BEGIN
Expand All @@ -21,7 +17,7 @@ BEGIN
VALUE "FileVersion", VERSION_NUMBER
VALUE "ProductName", VERSION_NAME " (Console)"
VALUE "Licence", "MIT"
VALUE "LegalCopyright", "Copyright (c) 2007-" _MKSTR(VERSION_YEAR) " Juan Linietsky, Ariel Manzur and contributors"
VALUE "LegalCopyright", "(c) 2007-present Juan Linietsky, Ariel Manzur and Godot Engine contributors"
VALUE "Info", "https://godotengine.org"
VALUE "ProductVersion", VERSION_FULL_BUILD
END
Expand Down
4 changes: 1 addition & 3 deletions thirdparty/miniupnpc/src/miniupnpcstrings.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#ifndef MINIUPNPCSTRINGS_H_INCLUDED
#define MINIUPNPCSTRINGS_H_INCLUDED

#include "core/version.h"

#define OS_STRING VERSION_NAME "/1.0"
#define OS_STRING "Godot Engine/1.0"
#define MINIUPNPC_VERSION_STRING "2.2.5"

#if 0
Expand Down
1 change: 0 additions & 1 deletion version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
patch = 0
status = "dev"
module_config = ""
year = 2023
website = "https://godotengine.org"
docs = "latest"

0 comments on commit e0dc233

Please sign in to comment.