Repository.mk | 1 config_host.mk.in | 4 +- configure.ac | 45 ++++++++++++------------- external/msc-externals/Module_msc-externals.mk | 8 ++-- external/msc-externals/Package_ucrt.mk | 16 ++++++++ postprocess/CustomTarget_signing.mk | 3 + 6 files changed, 48 insertions(+), 29 deletions(-)
New commits: commit a100215a3eaed18707aa1a5db6589c266e3a8375 Author: Christian Lohmaier <[email protected]> AuthorDate: Mon Oct 30 22:15:19 2017 +0100 Commit: Andras Timar <[email protected]> CommitDate: Wed Oct 13 11:51:14 2021 +0200 tdf#108580 ship universal crts with the program as workaround the universal crts redistributables are available as part of the Windows 10 SDK. Point to the dir (or a copy of the dir) using --with-ucrt-dir Use --without-ucrt-dir (or --with-ucrt-dir=no) if you don't want to ship them as part of LO and are annoyed by the configure warning. Change-Id: I5487e3f6e583222fa053b2fc03176f061d57746c Reviewed-on: https://gerrit.libreoffice.org/44074 Tested-by: Jenkins <[email protected]> Reviewed-by: Christian Lohmaier <[email protected]> diff --git a/Repository.mk b/Repository.mk index 92f24a886b98..02f5a0b1683a 100644 --- a/Repository.mk +++ b/Repository.mk @@ -819,6 +819,7 @@ $(eval $(call gb_Helper_register_packages_for_install,ure,\ jvmfwk_jreproperties \ $(if $(filter MACOSX,$(OS)),bridges_jnilib_java_uno) \ ) \ + $(if $(UCRT_REDISTDIR),ucrt) \ )) $(eval $(call gb_Helper_register_packages_for_install,postgresqlsdbc,\ diff --git a/config_host.mk.in b/config_host.mk.in index 8cbbc5fee1d5..d8b0bbedfff9 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -582,8 +582,8 @@ export TMPDIR=@TEMP_DIRECTORY@ export TOUCH=@TOUCH@ export UCRTSDKDIR=@UCRTSDKDIR@ export UCRTVERSION=@UCRTVERSION@ -export VCREDIST_DIR=@VCREDIST_DIR@ -export VCREDIST_EXE=@VCREDIST_EXE@ +export UCRT_REDISTDIR=@UCRT_REDISTDIR@ +export UCRT_DLLS=@UCRT_DLLS@ export UNOWINREG_DLL=@UNOWINREG_DLL@ export USE_LIBRARY_BIN_TAR=@USE_LIBRARY_BIN_TAR@ export USE_XINERAMA=@USE_XINERAMA@ diff --git a/configure.ac b/configure.ac index f42f0f81436f..03a6d48d9cea 100644 --- a/configure.ac +++ b/configure.ac @@ -6477,13 +6477,13 @@ fi AC_SUBST([JITC_PROCESSOR_TYPE]) # Misc Windows Stuff -AC_ARG_WITH(vcredist-dir, - AS_HELP_STRING([--with-vcredist-dir], - [path to the directory with the arch-specific executables (vc_redist.x64.exe, vc_redist.x86.exe) - for packaging into the installsets (without those the target system needs to install +AC_ARG_WITH(ucrt-dir, + AS_HELP_STRING([--with-ucrt-dir], + [path to the directory with the arch-specific subdirectories of the Windows Universtal CRT redistributables + from the Windows 10 SDK for packaging into the installsets (without those the target system needs to install the Visual C++ Runtimes manually)]), ,) -VCREDIST_DIR="$with_vcredist_dir" +UCRT_REDISTDIR="$with_ucrt_dir" if test $_os = "WINNT"; then find_msvc_x64_dlls find_msms @@ -6491,30 +6491,29 @@ if test $_os = "WINNT"; then MSVC_DLLS="$msvcdlls" MSM_PATH="$msmdir" SCPDEFS="$SCPDEFS -DWITH_VC${VCVER}_REDIST" - if test "$VCREDIST_DIR" = "no"; then + if test "$UCRT_REDISTDIR" = "no"; then dnl explicitly disabled - VCREDIST_DIR="" - else - if test -f "$VCREDIST_DIR/vc_redist.$WINDOWS_SDK_ARCH.exe"; then - VCREDIST_EXE="vc_redist.$WINDOWS_SDK_ARCH.exe" + UCRT_REDISTDIR="" + else + UCRT_REDISTDIR="$UCRT_REDISTDIR/$WINDOWS_SDK_ARCH" + # https://blogs.msdn.microsoft.com/vcblog/2015/03/03/introducing-the-universal-crt/ + # "note that the set of DLLs are necessary is different on different + # versions of Windows, so you must include all of the DLLs in order for + # your program to run on all supported versions of Windows" + if test -f "$UCRT_REDISTDIR/ucrtbase.dll"; then + cd "$UCRT_REDISTDIR"; + UCRT_DLLS=$(ls *.dll | paste -d " " -s) + cd - else - VCREDIST_DIR="" - if test -n "$PKGFORMAT"; then - for i in "$PKGFORMAT"; do - case "$i" in - msi) - AC_MSG_WARN([--without-vcredist-dir not specified or exe not found - installer will have runtime dependency]) - add_warning "--without-vcredist-dir not specified or exe not found - installer will have runtime dependency" - ;; - esac - done - fi + UCRT_REDISTDIR="" + AC_MSG_WARN([No --with-ucrt-dir not specified or dlls not found - installer will have runtime dependency]) + add_warning "No --with-ucrt-dir not specified or dlls not found - installer will have runtime dependency" fi fi fi -AC_SUBST(VCREDIST_DIR) -AC_SUBST(VCREDIST_EXE) +AC_SUBST(UCRT_REDISTDIR) +AC_SUBST(UCRT_DLLS) AC_SUBST(MSVC_DLL_PATH) AC_SUBST(MSVC_DLLS) AC_SUBST(MSM_PATH) diff --git a/external/msc-externals/Module_msc-externals.mk b/external/msc-externals/Module_msc-externals.mk index b7f7f47034f9..9435d5d96059 100644 --- a/external/msc-externals/Module_msc-externals.mk +++ b/external/msc-externals/Module_msc-externals.mk @@ -17,11 +17,13 @@ $(eval $(call gb_Module_add_targets,msc-externals,\ endif -# Install the universal crts and VC runtimes (tdf#108580) -ifneq ($(VCREDIST_DIR),) +# TODO: hackaround to install the universal crts locally (tdf#108580) +# ideally we can create a chained installer or similar that installs them +# systemwide using windows update +ifneq ($(UCRT_REDISTDIR),) $(eval $(call gb_Module_add_targets,msc-externals,\ - Package_vcredist_exe \ + Package_ucrt \ )) endif diff --git a/external/msc-externals/Package_ucrt.mk b/external/msc-externals/Package_ucrt.mk new file mode 100644 index 000000000000..05d51d369f47 --- /dev/null +++ b/external/msc-externals/Package_ucrt.mk @@ -0,0 +1,16 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Package_Package,ucrt,$(UCRT_REDISTDIR))) + +$(eval $(call gb_Package_add_files,ucrt,program,\ + $(UCRT_DLLS) \ +)) + +# vim:set shiftwidth=4 tabstop=4 noexpandtab: diff --git a/postprocess/CustomTarget_signing.mk b/postprocess/CustomTarget_signing.mk index 0d9cfaaf6771..535404d505fc 100644 --- a/postprocess/CustomTarget_signing.mk +++ b/postprocess/CustomTarget_signing.mk @@ -32,7 +32,8 @@ ifneq ($(ENABLE_DBGUTIL),TRUE) EXCLUDELIST=$(shell $(gb_MKTEMP)) && \ cat $(SRCDIR)/postprocess/signing/no_signing.txt > $$EXCLUDELIST && \ echo "$(foreach lib,$(gb_MERGEDLIBS),$(call gb_Library_get_filename,$(lib)))" | tr ' ' '\n' >> $$EXCLUDELIST && \ - $(if $(BUILD_X64),chmod u+w $(foreach lib,$(MSVC_DLLS),$(INSTDIR)/program/shlxthdl/$(lib)) &&) \ + $(if $(UCRT_REDISTDIR),chmod u+w $(foreach lib,$(UCRT_DLLS),$(INSTDIR)/$(LIBO_URE_LIB_FOLDER)/$(lib)) &&) \ + chmod u+w $(foreach lib,$(MSVC_DLLS),$(INSTDIR)/program/shlxthdl/$(lib)) && \ $(PERL) $(SRCDIR)/postprocess/signing/signing.pl \ -e $$EXCLUDELIST \ -l $(subst .done,_log.txt,$@) \
