summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Repository.mk1
-rw-r--r--RepositoryExternal.mk4
-rw-r--r--config_host.mk.in4
-rw-r--r--configure.ac37
-rw-r--r--external/msc-externals/Module_msc-externals.mk8
-rw-r--r--external/msc-externals/Package_vcredist_exe.mk (renamed from external/msc-externals/Package_ucrt.mk)6
-rw-r--r--instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt2
-rw-r--r--instsetoo_native/inc_openoffice/windows/msi_templates/RegLocat.idt2
-rw-r--r--postprocess/CustomTarget_signing.mk1
-rw-r--r--scp2/InstallModule_windows.mk8
-rw-r--r--scp2/source/ooo/vc_redist.scp26
-rw-r--r--solenv/bin/modules/installer/windows/idtglobal.pm2
12 files changed, 65 insertions, 36 deletions
diff --git a/Repository.mk b/Repository.mk
index ef2b12a9bc0f..4e9728adc5c6 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -828,7 +828,6 @@ $(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/RepositoryExternal.mk b/RepositoryExternal.mk
index c72d12b678d9..30709792c010 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -4123,4 +4123,8 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
))
endif
+$(eval $(call gb_Helper_register_packages_for_install,vcredist_exe_binarytable,\
+ $(if $(VCREDIST_DIR),vcredist_exe) \
+))
+
# vim: set noet sw=4 ts=4:
diff --git a/config_host.mk.in b/config_host.mk.in
index 648212d00b0d..0cc343cd351d 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -583,8 +583,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 VCREDIST_DIR=@VCREDIST_DIR@
+export VCREDIST_EXE=@VCREDIST_EXE@
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 bd5f184f66ae..a0e38999258c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6565,13 +6565,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 Universal CRT redistributables
- from the Windows 10 SDK for packaging into the installsets (without those the target system needs to install
+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
the Visual C++ Runtimes manually)]),
,)
-UCRT_REDISTDIR="$with_ucrt_dir"
+VCREDIST_DIR="$with_vcredist_dir"
if test $_os = "WINNT"; then
find_msvc_x64_dlls
find_msms
@@ -6579,27 +6579,20 @@ if test $_os = "WINNT"; then
MSVC_DLLS="$msvcdlls"
MSM_PATH="$msmdir"
SCPDEFS="$SCPDEFS -DWITH_VC${VCVER}_REDIST"
- if test "$UCRT_REDISTDIR" = "no"; then
+ if test "$VCREDIST_DIR" = "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 -
+ VCREDIST_DIR=""
+ else
+ if test -f "$VCREDIST_DIR/vc_redist.$WINDOWS_SDK_ARCH.exe"; then
+ VCREDIST_EXE="vc_redist.$WINDOWS_SDK_ARCH.exe"
else
- UCRT_REDISTDIR=""
+ VCREDIST_DIR=""
if test -n "$PKGFORMAT"; then
for i in "$PKGFORMAT"; do
case "$i" in
msi)
- AC_MSG_WARN([--without-ucrt-dir not specified or dlls not found - installer will have runtime dependency])
- add_warning "--without-ucrt-dir not specified or dlls not found - installer will have runtime dependency"
+ 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
@@ -6608,8 +6601,8 @@ if test $_os = "WINNT"; then
fi
fi
-AC_SUBST(UCRT_REDISTDIR)
-AC_SUBST(UCRT_DLLS)
+AC_SUBST(VCREDIST_DIR)
+AC_SUBST(VCREDIST_EXE)
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 9435d5d96059..b7f7f47034f9 100644
--- a/external/msc-externals/Module_msc-externals.mk
+++ b/external/msc-externals/Module_msc-externals.mk
@@ -17,13 +17,11 @@ $(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),)
+# Install the universal crts and VC runtimes (tdf#108580)
+ifneq ($(VCREDIST_DIR),)
$(eval $(call gb_Module_add_targets,msc-externals,\
- Package_ucrt \
+ Package_vcredist_exe \
))
endif
diff --git a/external/msc-externals/Package_ucrt.mk b/external/msc-externals/Package_vcredist_exe.mk
index 05d51d369f47..bf9ef632285c 100644
--- a/external/msc-externals/Package_ucrt.mk
+++ b/external/msc-externals/Package_vcredist_exe.mk
@@ -7,10 +7,10 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
-$(eval $(call gb_Package_Package,ucrt,$(UCRT_REDISTDIR)))
+$(eval $(call gb_Package_Package,vcredist_exe,$(VCREDIST_DIR)))
-$(eval $(call gb_Package_add_files,ucrt,program,\
- $(UCRT_DLLS) \
+$(eval $(call gb_Package_add_files,vcredist_exe,$(LIBO_ETC_FOLDER),\
+ $(VCREDIST_EXE) \
))
# vim:set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt
index 3968375a8815..095cf907bf46 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt
@@ -5,3 +5,5 @@ INSTALLLOCATION installuser
INSTALLLOCATION installuser_
INSTALLLOCATION installmachine
INSTALLLOCATION installmachine_
+VCREDISTINSTALLED_X86 VCREDISTINSTALLED_X86
+VCREDISTINSTALLED_X64 VCREDISTINSTALLED_X64
diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/RegLocat.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/RegLocat.idt
index c082322086ad..7e59ef3c6663 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/RegLocat.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/RegLocat.idt
@@ -5,3 +5,5 @@ installuser 1 Software\LibreOffice\Layers\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION]
installuser_ 1 Software\LibreOffice\Layers_\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] INSTALLLOCATION 2
installmachine 2 Software\LibreOffice\Layers\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] INSTALLLOCATION 2
installmachine_ 2 Software\LibreOffice\Layers_\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] INSTALLLOCATION 2
+VCREDISTINSTALLED_X86 2 Software\Microsoft\VisualStudio\14.0\VC\Runtimes\x86 Version 2
+VCREDISTINSTALLED_X64 2 Software\Microsoft\VisualStudio\14.0\VC\Runtimes\x64 Version 2
diff --git a/postprocess/CustomTarget_signing.mk b/postprocess/CustomTarget_signing.mk
index b3aaf264f76c..b8a764d899e4 100644
--- a/postprocess/CustomTarget_signing.mk
+++ b/postprocess/CustomTarget_signing.mk
@@ -32,7 +32,6 @@ 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)) &&) \
$(if $(BUILD_X64),chmod u+w $(foreach lib,$(MSVC_DLLS),$(INSTDIR)/program/shlxthdl/$(lib)) &&) \
$(PERL) $(SRCDIR)/postprocess/signing/signing.pl \
-e $$EXCLUDELIST \
diff --git a/scp2/InstallModule_windows.mk b/scp2/InstallModule_windows.mk
index 296f7fccfa5b..ecba37c42bca 100644
--- a/scp2/InstallModule_windows.mk
+++ b/scp2/InstallModule_windows.mk
@@ -17,11 +17,17 @@ $(eval $(call gb_InstallModule_add_defs,scp2/windows,\
$(if $(WINDOWS_SDK_HOME),\
-DHAVE_WINDOWS_SDK \
) \
+ $(if $(MSM_PATH),\
+ -DMSM_PATH \
+ ) \
+ $(if $(VCREDIST_DIR),\
+ -DVCREDIST_EXE_NAME="$(VCREDIST_EXE)" \
+ ) \
))
$(eval $(call gb_InstallModule_add_scpfiles,scp2/windows,\
scp2/source/ooo/folder_ooo \
- $(if $(MSM_PATH),scp2/source/ooo/vc_redist) \
+ scp2/source/ooo/vc_redist \
scp2/source/ooo/windowscustomaction_ooo \
))
diff --git a/scp2/source/ooo/vc_redist.scp b/scp2/source/ooo/vc_redist.scp
index 9b534a3f27fd..40c6a7e8902e 100644
--- a/scp2/source/ooo/vc_redist.scp
+++ b/scp2/source/ooo/vc_redist.scp
@@ -18,6 +18,8 @@
#include "macros.inc"
+#if defined(MSM_PATH)
+
#if defined(WITH_VC140_REDIST)
#if defined WINDOWS_X64
@@ -56,3 +58,27 @@ End
#endif
+#endif // MSM_PATH
+
+#if defined(VCREDIST_EXE_NAME)
+
+File gid_File_Vcredist_Exe
+ Name = VCREDIST_EXE_NAME;
+ Dir = gid_Brand_Dir_Program;
+ Styles = (PACKED, BINARYTABLE, BINARYTABLE_ONLY);
+End
+
+WindowsCustomAction gid_Customaction_InstallVCRedist
+ Name = "InstallVCRedist";
+ Typ = "66"; /* 0x02 = exe in a binary table stream; 0x40 = ignore exit code and continue */
+ Source = VCREDIST_EXE_NAME;
+ Target = "/repair /norestart /passive";
+ Inbinarytable = 1;
+#if defined WINDOWS_X64
+ Assignment1 = ("InstallUISequence", "Not Installed And ( Not VCREDISTINSTALLED_X64 Or VCREDISTINSTALLED_X64 < \"v14.0.24215.0\" )", "behind_ExecuteAction");
+#else
+ Assignment1 = ("InstallUISequence", "Not Installed And ( Not VCREDISTINSTALLED_X86 Or VCREDISTINSTALLED_X86 < \"v14.0.24215.0\" )", "behind_ExecuteAction");
+#endif
+End
+
+#endif
diff --git a/solenv/bin/modules/installer/windows/idtglobal.pm b/solenv/bin/modules/installer/windows/idtglobal.pm
index a8b9ea6097dc..3cf086c7a206 100644
--- a/solenv/bin/modules/installer/windows/idtglobal.pm
+++ b/solenv/bin/modules/installer/windows/idtglobal.pm
@@ -1014,7 +1014,7 @@ sub set_custom_action
# is the $exefilename a library that is included into the binary table
- if ( $inbinarytable ) { $customaction_exefilename =~ s/\.//; } # this is the entry in the binary table ("abc.dll" -> "abcdll")
+ if ( $inbinarytable ) { $customaction_exefilename =~ s/\.//g; } # this is the entry in the binary table ("abc.dll" -> "abcdll")
# is the $exefilename included into the product?