diff options
-rw-r--r-- | Repository.mk | 1 | ||||
-rw-r--r-- | config_host.mk.in | 2 | ||||
-rw-r--r-- | configure.ac | 28 | ||||
-rw-r--r-- | external/msc-externals/Module_msc-externals.mk | 11 | ||||
-rw-r--r-- | external/msc-externals/Package_ucrt.mk | 16 | ||||
-rw-r--r-- | postprocess/CustomTarget_signing.mk | 1 |
6 files changed, 59 insertions, 0 deletions
diff --git a/Repository.mk b/Repository.mk index 96cddc13b97d..19566560f60a 100644 --- a/Repository.mk +++ b/Repository.mk @@ -814,6 +814,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 13cef74e5216..7fca9f3601d3 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -570,6 +570,8 @@ export TMPDIR=@TEMP_DIRECTORY@ export TOUCH=@TOUCH@ export UCRTSDKDIR=@UCRTSDKDIR@ export UCRTVERSION=@UCRTVERSION@ +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 5535fa48bce5..752c78272d7c 100644 --- a/configure.ac +++ b/configure.ac @@ -6474,6 +6474,13 @@ fi AC_SUBST([JITC_PROCESSOR_TYPE]) # Misc Windows Stuff +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)]), +,) +UCRT_REDISTDIR="$with_ucrt_dir" if test $_os = "WINNT"; then find_msvc_x64_dlls find_msms @@ -6481,8 +6488,29 @@ if test $_os = "WINNT"; then MSVC_DLLS="$msvcdlls" MSM_PATH="$msmdir" SCPDEFS="$SCPDEFS -DWITH_VC${VCVER}_REDIST" + if test "$UCRT_REDISTDIR" = "no"; then + dnl explicitly disabled + 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 + 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(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 2fa56b458e71..9435d5d96059 100644 --- a/external/msc-externals/Module_msc-externals.mk +++ b/external/msc-externals/Module_msc-externals.mk @@ -17,4 +17,15 @@ $(eval $(call gb_Module_add_targets,msc-externals,\ endif +# 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_ucrt \ +)) + +endif + # vim: set noet sw=4 ts=4: 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 61336f40ac00..573c396f49de 100644 --- a/postprocess/CustomTarget_signing.mk +++ b/postprocess/CustomTarget_signing.mk @@ -32,6 +32,7 @@ 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 $(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 \ |