From e607beeed1b391ee2a622494700d78d68dd2868f Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Fri, 30 Aug 2019 13:29:56 +0300 Subject: [PATCH] Introduce gb_Executable_add_default_nativeres to add version resource ... to executables on Windows Change-Id: I31bd2447052915bb299820034f99128e0e97db54 Reviewed-on: https://gerrit.libreoffice.org/78290 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- shell/Executable_spsupp_helper.mk | 2 ++ solenv/gbuild/platform/com_MSC_class.mk | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/shell/Executable_spsupp_helper.mk b/shell/Executable_spsupp_helper.mk index 5daeff28da56..c905118bef58 100644 --- a/shell/Executable_spsupp_helper.mk +++ b/shell/Executable_spsupp_helper.mk @@ -30,6 +30,8 @@ $(eval $(call gb_Executable_add_exception_objects,spsupp_helper,\ $(eval $(call gb_Executable_add_nativeres,spsupp_helper,spsupp_dlg)) +$(eval $(call gb_Executable_add_default_nativeres,spsupp_helper)) + $(eval $(call gb_Executable_use_system_win32_libs,spsupp_helper,\ shell32 \ )) diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk index 64615ea13282..b77f9f98d731 100644 --- a/solenv/gbuild/platform/com_MSC_class.mk +++ b/solenv/gbuild/platform/com_MSC_class.mk @@ -328,6 +328,23 @@ $(call gb_Library_get_clean_target,$(1)) : $(call gb_WinResTarget_get_clean_targ endef +define gb_Executable_add_default_nativeres +$(call gb_WinResTarget_WinResTarget_init,$(1)/default) +$(call gb_WinResTarget_set_rcfile,$(1)/default,include/default) +$(call gb_WinResTarget_add_defs,$(1)/default,\ + -DVERVARIANT="$(LIBO_VERSION_PATCH)" \ + -DRES_APP_VENDOR="$(OOO_VENDOR)" \ + -DORG_NAME="$(call gb_Executable_get_filename,$(1))"\ + -DINTERNAL_NAME="$(subst $(gb_Executable_EXT),,$(call gb_Executable_get_filename,$(1)))" \ + -DADDITIONAL_VERINFO1="" \ + -DADDITIONAL_VERINFO2="" \ + -DADDITIONAL_VERINFO3="" \ +) +$(call gb_Executable_add_nativeres,$(1),$(1)/default) +$(call gb_Executable_get_clean_target,$(1)) : $(call gb_WinResTarget_get_clean_target,$(1)/default) + +endef + define gb_LinkTarget_add_nativeres $(call gb_LinkTarget_get_target,$(1)) : $(call gb_WinResTarget_get_target,$(2)) $(call gb_LinkTarget_get_target,$(1)) : NATIVERES += $(call gb_WinResTarget_get_target,$(2))