Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
erlang
5325-Make-copyright-year-dynamic.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 5325-Make-copyright-year-dynamic.patch of Package erlang
From 5cc0194befd4e7b4d9e695eaa8e7af738ef77c4e Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson <dgud@erlang.org> Date: Tue, 31 Jan 2023 11:03:42 +0100 Subject: [PATCH 5/5] Make copyright year dynamic Copyright year inside installer and resource file is NOT automaticly updated by the release scripts so update them from the makefiles. --- erts/etc/common/Makefile.in | 3 +++ erts/etc/win32/erl.rc | 2 +- erts/etc/win32/nsis/Makefile | 3 +++ erts/etc/win32/nsis/erlang20.nsi | 2 +- erts/etc/win32/version.h.src | 2 ++ 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/erts/etc/common/Makefile.in b/erts/etc/common/Makefile.in index 42d4395eb2..2abf7e2725 100644 --- a/erts/etc/common/Makefile.in +++ b/erts/etc/common/Makefile.in @@ -336,11 +336,14 @@ OTP_VSN_COMMA_SEP := $(wordlist 1,4, $(OTP_VSN_COMMA_SEP)) ERTS_VSN_COMMA_SEP := $(subst $(SPACE_CHAR),$(COMMA_CHAR),$(ERTS_VSN_COMMA_SEP)) OTP_VSN_COMMA_SEP := $(subst $(SPACE_CHAR),$(COMMA_CHAR),$(OTP_VSN_COMMA_SEP)) +YEAR := $(shell date +%Y) + $(WINETC)/version.h: $(WINETC)/version.h.src $(vsn_verbose)sed -e 's;%ERTS_VERSION%;$(VSN);' \ -e 's;%ERTS_VERSION_INTS%;$(ERTS_VSN_COMMA_SEP);' \ -e 's;%OTP_VERSION%;$(OTP_VERSION);' \ -e 's;%OTP_VERSION_INTS%;$(OTP_VSN_COMMA_SEP);' \ + -e 's;%YEAR%;$(YEAR);' \ $(WINETC)/version.h.src > $(WINETC)/version.h $(OBJDIR)/$(ERLRES_OBJ): $(WINETC)/erl.rc $(WINETC)/erlang.ico \ diff --git a/erts/etc/win32/erl.rc b/erts/etc/win32/erl.rc index 53231ec065..e553064624 100644 --- a/erts/etc/win32/erl.rc +++ b/erts/etc/win32/erl.rc @@ -34,7 +34,7 @@ VS_VERSION_INFO VERSIONINFO VALUE "CompanyName", "Ericsson AB\0" VALUE "FileDescription", "Erlang\0" VALUE "FileVersion", ERTS_VERSION_STR - VALUE "LegalCopyright", "Copyright Ericsson AB 2010-2023. All Rights Reserved.\0" + VALUE "LegalCopyright", OTP_LEGAL_STR VALUE "ProductName", "Erlang/OTP\0" VALUE "ProductVersion", OTP_VERSION_STR } diff --git a/erts/etc/win32/nsis/Makefile b/erts/etc/win32/nsis/Makefile index 0eef4d5707..79814f1521 100644 --- a/erts/etc/win32/nsis/Makefile +++ b/erts/etc/win32/nsis/Makefile @@ -67,8 +67,10 @@ REDIST_DLL_NAME=$(shell (sh ./dll_version_helper.sh -n "$(NICEREDISTFILE)" || ec # $(info $$REDIST_DLL_VERSION = [${REDIST_DLL_VERSION}]) # $(info $$REDIST_DLL_NAME = [${REDIST_DLL_NAME}]) # $(info $$REDIST_FILE = [${REDIST_FILE}]) + # NSIS really want the product version number to be at least 4 digits long OTP_VERSION_LONG=$(shell $(ERL_TOP)/bootstrap/bin/escript.exe vsn_number.escript $(OTP_VERSION)) +YEAR=$(shell date +%Y) release_spec: @NSIS_VER=`makensis.exe -version`; \ @@ -83,6 +85,7 @@ release_spec: echo '!define TESTROOT "$(WTESTROOT)"' >> $(VERSION_HEADER);\ echo '!define OUTFILEDIR "$(WTARGET_DIR)"' >> $(VERSION_HEADER);\ echo '!define WINTYPE "$(WINTYPE)"' >> $(VERSION_HEADER);\ + echo '!define YEAR "$(YEAR)"' >> $(VERSION_HEADER);\ if [ -f $(CUSTOM_MODERN) ];\ then \ echo '!define HAVE_CUSTOM_MODERN 1' >> $(VERSION_HEADER); \ diff --git a/erts/etc/win32/nsis/erlang20.nsi b/erts/etc/win32/nsis/erlang20.nsi index 765b93e82a..33f67659bd 100644 --- a/erts/etc/win32/nsis/erlang20.nsi +++ b/erts/etc/win32/nsis/erlang20.nsi @@ -106,7 +106,7 @@ VIProductVersion "${OTP_VERSION_LONG}" VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "Ericsson AB" VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${OTP_VERSION}" VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Erlang/OTP installer" -VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright Ericsson AB 2010-2023. All Rights Reserved." +VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright Ericsson AB 2010-${YEAR}. All Rights Reserved." VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "Erlang/OTP" VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "${OTP_VERSION}" diff --git a/erts/etc/win32/version.h.src b/erts/etc/win32/version.h.src index 266ebda47d..45c1e9944e 100644 --- a/erts/etc/win32/version.h.src +++ b/erts/etc/win32/version.h.src @@ -5,3 +5,5 @@ #define OTP_VERSION_INTS %OTP_VERSION_INTS% #define OTP_VERSION_STR "%OTP_VERSION%\0" + +#define OTP_LEGAL_STR "Copyright Ericsson AB 2010-%YEAR%. All Rights Reserved.\0" -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor