summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2017-10-30 22:15:19 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2017-11-02 22:57:29 +0100
commit67940d53fd68283c7dbc70897063c33d5ede49df (patch)
tree45bb82b08ceeb823689144234dbd373f8391a7d1 /configure.ac
parent801a761c4f9a237ae7879e37ca043aa3e587a10c (diff)
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 <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> (cherry picked from commit 71d9a61302e65fe091cf70c13fa72b3df09b7e3a) Reviewed-on: https://gerrit.libreoffice.org/44122
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac28
1 files changed, 28 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index b4a2b14a7c77..74c1a21abf89 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6703,6 +6703,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
@@ -6710,8 +6717,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)