summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2023-05-14 18:28:44 +0300
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2023-05-23 11:47:19 +0200
commit0f6bf89b1f3fb7e089d928d3ac27bed59fd7d364 (patch)
tree30793515fa58f0151b4adca9b4a085dda77a2043
parentofz#59210 Abrt (diff)
downloadcore-0f6bf89b1f3fb7e089d928d3ac27bed59fd7d364.tar.gz
core-0f6bf89b1f3fb7e089d928d3ac27bed59fd7d364.zip
Add configure switch to enable building the installer with WiX.
Change-Id: I5b1cf7a4a90c65b27fd3a9e2f33c9ffe044704e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151738 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r--configure.ac20
-rw-r--r--instsetoo_native/CustomTarget_install.mk1
2 files changed, 21 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index e7ad75620e59..e86e3c30141d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1893,6 +1893,11 @@ AC_ARG_ENABLE(silent-msi,
[Enable MSI with LIMITUI=1 (silent install).]),
,)
+AC_ARG_ENABLE(wix,
+ AS_HELP_STRING([--enable-wix],
+ [Build Windows installer using WiX.]),
+,)
+
AC_ARG_ENABLE(macosx-code-signing,
AS_HELP_STRING([--enable-macosx-code-signing=<identity>],
[Sign executables, dylibs, frameworks and the app bundle. If you
@@ -13427,6 +13432,21 @@ else
fi
AC_SUBST(ENABLE_SILENT_MSI)
+dnl ===================================================================
+dnl Check for WiX tools.
+dnl ===================================================================
+if test "$enable_wix" = "" -o "enable_wix" = "no"; then
+ AC_MSG_RESULT([no])
+ ENABLE_WIX=
+else
+ AC_MSG_RESULT([yes])
+ if ! which candle >/dev/null 2>&1; then
+ AC_MSG_ERROR([WiX requested but WiX toolset not found.])
+ fi
+ ENABLE_WIX=TRUE
+fi
+AC_SUBST(ENABLE_SILENT_MSI)
+
AC_MSG_CHECKING([whether and how to use Xinerama])
if test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
if test "$x_libraries" = "default_x_libraries"; then
diff --git a/instsetoo_native/CustomTarget_install.mk b/instsetoo_native/CustomTarget_install.mk
index ee69d07ebd8f..f05b771fa107 100644
--- a/instsetoo_native/CustomTarget_install.mk
+++ b/instsetoo_native/CustomTarget_install.mk
@@ -116,6 +116,7 @@ $(call gb_CustomTarget_get_workdir,instsetoo_native/install)/install.phony: $(in
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,2)
$(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),PRL)
ifeq (TRUE,$(LIBO_TEST_INSTALL))
+ $(if $(ENABLE_WIX),$(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/msicreator/create_installer.py $(BUILDDIR) $(SRCDIR) $(LIBO_VERSION) $(PRODUCTNAME_WITHOUT_SPACES))
unzip -q -d $(TESTINSTALLDIR) $(instsetoo_OUT)/$(PRODUCTNAME_WITHOUT_SPACES)/archive/install/en-US/LibreOffice*_archive.zip
mv $(TESTINSTALLDIR)/LibreOffice*_archive/LibreOffice*/* $(TESTINSTALLDIR)/
rmdir $(TESTINSTALLDIR)/LibreOffice*_archive/LibreOffice*