Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
4114-Use-OTP-version-as-product-version-in-inst...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 4114-Use-OTP-version-as-product-version-in-installer.patch of Package erlang
From 964c7b7a4718318f5a3499318dac54082d105719 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson <dgud@erlang.org> Date: Tue, 31 Jan 2023 10:45:35 +0100 Subject: [PATCH 4/5] Use OTP version as product version in installer The ProductVersion must be of the format X.X.X.X so we can't use the release version as ProductVersion. Use OTP_VERSION instead this also makes sense for the windows installer as we on windows always delivers a complete OTP. --- erts/etc/win32/nsis/Makefile | 3 +++ erts/etc/win32/nsis/erlang20.nsi | 8 ++++---- erts/etc/win32/nsis/vsn_number.escript | 9 +++++++++ 3 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 erts/etc/win32/nsis/vsn_number.escript diff --git a/erts/etc/win32/nsis/Makefile b/erts/etc/win32/nsis/Makefile index 1b01ab7b06..0eef4d5707 100644 --- a/erts/etc/win32/nsis/Makefile +++ b/erts/etc/win32/nsis/Makefile @@ -67,6 +67,8 @@ 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)) release_spec: @NSIS_VER=`makensis.exe -version`; \ @@ -76,6 +78,7 @@ release_spec: v3.*) \ echo '!define OTP_RELEASE "$(SYSTEM_VSN)"' > $(VERSION_HEADER);\ echo '!define OTP_VERSION "$(OTP_VERSION)"' >> $(VERSION_HEADER);\ + echo '!define OTP_VERSION_LONG "$(OTP_VERSION_LONG)"' >> $(VERSION_HEADER);\ echo '!define ERTS_VERSION "$(VSN)"' >> $(VERSION_HEADER);\ echo '!define TESTROOT "$(WTESTROOT)"' >> $(VERSION_HEADER);\ echo '!define OUTFILEDIR "$(WTARGET_DIR)"' >> $(VERSION_HEADER);\ diff --git a/erts/etc/win32/nsis/erlang20.nsi b/erts/etc/win32/nsis/erlang20.nsi index 9a63842ac0..765b93e82a 100644 --- a/erts/etc/win32/nsis/erlang20.nsi +++ b/erts/etc/win32/nsis/erlang20.nsi @@ -102,13 +102,13 @@ Var STARTMENU_FOLDER ;-------------------------------- ; Installer file properties -VIProductVersion "${OTP_RELEASE}" +VIProductVersion "${OTP_VERSION_LONG}" VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "Ericsson AB" -VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Erlang" -VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${ERTS_VERSION}" +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} "ProductName" "Erlang/OTP" -VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "${OTP_RELEASE}" +VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "${OTP_VERSION}" ;-------------------------------- ;Language Strings diff --git a/erts/etc/win32/nsis/vsn_number.escript b/erts/etc/win32/nsis/vsn_number.escript new file mode 100644 index 0000000000..3b3093e010 --- /dev/null +++ b/erts/etc/win32/nsis/vsn_number.escript @@ -0,0 +1,9 @@ + + +main([OtpVsn]) -> + case string:lexemes(OtpVsn, ".") of + [_,_,_,_|_] -> io:format("~s~n", [OtpVsn]); + [_,_,_] -> io:format("~s.0~n",[OtpVsn]); + [_,_] -> io:format("~s.0.0~n",[OtpVsn]); + [_] -> io:format("~s.0.0.0~n",[OtpVsn]) + end. -- 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