summaryrefslogtreecommitdiff
path: root/instsetoo_native/CustomTarget_install.mk
diff options
context:
space:
mode:
authorPeter Foley <pefoley2@verizon.net>2013-02-21 20:40:59 -0500
committerDavid Ostrovsky <David.Ostrovsky@gmx.de>2013-02-24 17:26:19 +0000
commit1d84e9d1d363bd550129efcbeafe670c0a049dd0 (patch)
tree8dcabefa0b1456c1a509e1973485c3f8497326c2 /instsetoo_native/CustomTarget_install.mk
parent80dd07381bc7207520a4b7fb0d06e8cc5583ee76 (diff)
instsetoo_native: convert to gbuild
Removes: * instsetoo_native/util/update.xml - gen_update_info.pl can be removed ? On Windows the binary artifacts are created now in: workdir/*/installation/LibreOffice_Dev/native/install/en-US/*.msi Change-Id: I1c82ea9cb9d297cdd0e4f4b9b44606259eeeed49 Reviewed-on: https://gerrit.libreoffice.org/2242 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: David Ostrovsky <David.Ostrovsky@gmx.de> Tested-by: David Ostrovsky <David.Ostrovsky@gmx.de>
Diffstat (limited to 'instsetoo_native/CustomTarget_install.mk')
-rw-r--r--instsetoo_native/CustomTarget_install.mk121
1 files changed, 121 insertions, 0 deletions
diff --git a/instsetoo_native/CustomTarget_install.mk b/instsetoo_native/CustomTarget_install.mk
new file mode 100644
index 000000000000..6c44b7cbf498
--- /dev/null
+++ b/instsetoo_native/CustomTarget_install.mk
@@ -0,0 +1,121 @@
+# -*- 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/.
+#
+
+instsetoo_ULFLIST := ActionTe \
+ Control \
+ CustomAc \
+ Error \
+ LaunchCo \
+ Property \
+ RadioBut \
+ UIText
+
+$(eval $(call gb_CustomTarget_CustomTarget,instsetoo_native/install))
+
+$(eval $(call gb_CustomTarget_register_targets,instsetoo_native/install,\
+ install.phony \
+ $(if $(filter-out WNT,$(OS)),\
+ bin/find-requires-gnome.sh \
+ bin/find-requires-x11.sh) \
+ $(foreach ulf,$(instsetoo_ULFLIST),win_ulffiles/$(ulf).ulf) \
+))
+
+$(call gb_CustomTarget_get_workdir,instsetoo_native/install)/install.phony: \
+ $(SOLARENV)/bin/make_installer.pl \
+ $(foreach ulf,$(instsetoo_ULFLIST),$(call gb_CustomTarget_get_workdir,instsetoo_native/install)/win_ulffiles/$(ulf).ulf)
+
+$(call gb_CustomTarget_get_workdir,instsetoo_native/install)/bin/find-requires-%.sh: $(SRCDIR)/instsetoo_native/inc_openoffice/unix/find-requires-%.sh
+ cat $< | tr -d "\015" > $@
+ chmod a+x $@
+
+ifneq ($(WITH_LANG),)
+$(call gb_CustomTarget_get_workdir,instsetoo_native/install)/win_ulffiles/%.mlf: \
+ $(SRCDIR)/instsetoo_native/inc_openoffice/windows/msi_languages/%.ulf | \
+ $(call gb_Executable_get_runtime_dependencies,ulfex)
+ $(call gb_Output_announce,$@,$(true),SUM,1)
+ MERGEINPUT=`$(gb_MKTEMP)` && \
+ echo $(foreach lang,$(gb_TRANS_LANGS),$(gb_POLOCATION)/$(lang)/$(patsubst %/,%,$(dir $@)).po) > $${MERGEINPUT} && \
+ $(call gb_Helper_abbreviate_dirs,\
+ $(call gb_Executable_get_command,ulfex) -p instsetoo_native -i $< -o $@ -m $${MERGEINPUT} -l all ) && \
+ rm -rf $${MERGEINPUT}
+else
+$(call gb_CustomTarget_get_workdir,instsetoo_native/install)/win_ulffiles/%.ulf: \
+ $(SRCDIR)/instsetoo_native/inc_openoffice/windows/msi_languages/%.ulf
+ cp $< $@
+endif
+
+export ENABLE_DOWNLOADSETS ?= TRUE
+ifeq ($(OS),LINUX)
+export DONT_REMOVE_PACKAGE := TRUE
+endif
+export instsetoo_OUT := $(WORKDIR)/installation
+export LOCAL_OUT := $(instsetoo_OUT)
+export LOCAL_COMMON_OUT := $(instsetoo_OUT)
+
+instsetoo_native_WITH_LANG := en-US $(filter-out en-US,$(gb_WITH_LANG))
+
+ifeq (WNT,$(OS))
+define instsetoo_native_msitemplates
+TEMPLATE_DIR=$(dir $@)msi_templates \
+&& rm -rf $${TEMPLATE_DIR} \
+&& mkdir -p $${TEMPLATE_DIR}/Binary \
+&& $(GNUCOPY) $(SRCDIR)/instsetoo_native/inc_$(1)/windows/msi_templates/*.* $${TEMPLATE_DIR} \
+&& $(GNUCOPY) $(SRCDIR)/instsetoo_native/inc_common/windows/msi_templates/Binary/*.* $${TEMPLATE_DIR}/Binary
+endef
+else
+instsetoo_native_msitemplates :=
+endif
+
+define instsetoo_native_install_command
+$(call instsetoo_native_msitemplates,$(1))
+cd $(dir $@) \
+$(foreach pkgformat,$(5),\
+&& $(PERL) -w $< \
+ -f $(SRCDIR)/instsetoo_native/util/openoffice.lst \
+ -l $(subst $(WHITESPACE),$(COMMA),$(strip $(2))) \
+ -p LibreOffice$(if $(filter TRUE,$(ENABLE_RELEASE_BUILD)),,_Dev)$(3) \
+ -u $(instsetoo_OUT) \
+ -buildid $(BUILD) \
+ $(if $(filter WNT,$(OS)), \
+ -msitemplate $(dir $@)msi_templates \
+ -msilanguage $(dir $@)win_ulffiles \
+ ) \
+ $(4) \
+ -format $(pkgformat) \
+ $(if $(filter TRUE,$(VERBOSE)),-verbose, \
+ $(if $(findstring s,$(MAKEFLAGS)),-quiet)) \
+)
+endef
+
+$(call gb_CustomTarget_get_workdir,instsetoo_native/install)/install.phony:
+ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,2)
+ rm -rf $(instsetoo_OUT)
+ifeq (TRUE,$(LIBO_DEV_INSTALL))
+ $(call instsetoo_native_install_command,openoffice,en-US,,,archive)
+ unzip -q -d $(DEVINSTALLDIR) $(instsetoo_OUT)/LibreOffice/archive/install/en-US/LibreOffice*_archive.zip
+ mv $(DEVINSTALLDIR)/LibreOffice*_archive/* $(DEVINSTALLDIR)/opt
+else # LIBO_DEV_INSTALL
+ $(call instsetoo_native_install_command,openoffice,$(instsetoo_native_WITH_LANG),,,$(PKGFORMAT))
+ifeq (ODK,$(filter ODK,$(BUILD_TYPE)))
+ $(call instsetoo_native_install_command,sdkoo,en-US,_SDK,,$(PKGFORMAT))
+endif
+ifeq (,$(filter WNT MACOSX,$(OS)))
+ $(call instsetoo_native_install_command,not-used,en-US,_Test,,$(PKGFORMAT))
+endif
+ifeq (HELP,$(filter HELP,$(BUILD_TYPE))$(filter MACOSX,$(OS)))
+ $(foreach lang,$(filter-out $(WITH_POOR_HELP_LOCALIZATIONS),$(instsetoo_native_WITH_LANG)), \
+ $(call instsetoo_native_install_command,ooohelppack,$(lang),,-helppack,$(PKGFORMAT)))
+endif
+ifneq (WNT,$(OS))
+ $(foreach lang,$(instsetoo_native_WITH_LANG),\
+ $(call instsetoo_native_install_command,ooolangpack,$(lang),,-languagepack,$(PKGFORMAT)))
+endif
+endif # LIBO_DEV_INSTALL
+
+# vim: set noet sw=4 ts=4: