Kaydet (Commit) 71d9a613 authored tarafından Christian Lohmaier's avatar Christian Lohmaier

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/44074Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>
üst b8d19441
......@@ -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,\
......
......@@ -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@
......
......@@ -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)
......
......@@ -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:
# -*- 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:
......@@ -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 \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment