1# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- 2# 3# This file is part of the LibreOffice project. 4# 5# This Source Code Form is subject to the terms of the Mozilla Public 6# License, v. 2.0. If a copy of the MPL was not distributed with this 7# file, You can obtain one at http://mozilla.org/MPL/2.0/. 8# 9 10$(eval $(call gb_CustomTarget_CustomTarget,instsetoo_native/setup)) 11 12$(eval $(call gb_CustomTarget_register_targets,instsetoo_native/setup,\ 13 $(call gb_Helper_get_rcfile,bootstrap) \ 14 $(call gb_Helper_get_rcfile,fundamental) \ 15 $(call gb_Helper_get_rcfile,louno) \ 16 $(if $(filter DESKTOP,$(BUILD_TYPE)),$(if $(filter-out MACOSX,$(OS)), \ 17 $(call gb_Helper_get_rcfile,redirect))) \ 18 $(call gb_Helper_get_rcfile,setup) \ 19 $(call gb_Helper_get_rcfile,soffice) \ 20 $(call gb_Helper_get_rcfile,uno) \ 21 $(call gb_Helper_get_rcfile,version) \ 22 $(call gb_Helper_get_rcfile,crashreport) \ 23)) 24 25$(gb_CustomTarget_workdir)/instsetoo_native/setup/$(call gb_Helper_get_rcfile,bootstrap) \ 26$(gb_CustomTarget_workdir)/instsetoo_native/setup/$(call gb_Helper_get_rcfile,fundamental) \ 27$(gb_CustomTarget_workdir)/instsetoo_native/setup/$(call gb_Helper_get_rcfile,louno) \ 28$(gb_CustomTarget_workdir)/instsetoo_native/setup/$(call gb_Helper_get_rcfile,redirect) \ 29$(gb_CustomTarget_workdir)/instsetoo_native/setup/$(call gb_Helper_get_rcfile,setup) \ 30$(gb_CustomTarget_workdir)/instsetoo_native/setup/$(call gb_Helper_get_rcfile,soffice) \ 31$(gb_CustomTarget_workdir)/instsetoo_native/setup/$(call gb_Helper_get_rcfile,uno) \ 32$(gb_CustomTarget_workdir)/instsetoo_native/setup/$(call gb_Helper_get_rcfile,version) \ 33$(gb_CustomTarget_workdir)/instsetoo_native/setup/$(call gb_Helper_get_rcfile,crashreport) \ 34 : $(SRCDIR)/instsetoo_native/CustomTarget_setup.mk 35 36$(gb_CustomTarget_workdir)/instsetoo_native/setup/$(call gb_Helper_get_rcfile,bootstrap) : 37 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1) 38 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),ECH) 39 ( \ 40 echo '[Bootstrap]' \ 41 && echo 'InstallMode=<installmode>' \ 42 && echo 'ProductKey=$(PRODUCTNAME) $(PRODUCTVERSION)' \ 43 $(if $(ENABLE_RELEASE_BUILD),\ 44 && echo 'UserInstallation=$$SYSUSERCONFIG/$(shell echo $(PRODUCTNAME) | sed -e 's/ /%20/g' $(if $(filter-out HAIKU MACOSX WNT,$(OS)),| tr "[:upper:]" "[:lower:]"))/4', \ 45 && echo 'UserInstallation=$$ORIGIN/..') \ 46 ) > $@ 47 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),ECH) 48 49$(gb_CustomTarget_workdir)/instsetoo_native/setup/$(call gb_Helper_get_rcfile,fundamental) : 50 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1) 51 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),ECH) 52 ( \ 53 echo '[Bootstrap]' \ 54 && echo 'BRAND_BASE_DIR=$${ORIGIN}/..' \ 55 && echo 'BRAND_INI_DIR=$${ORIGIN}' \ 56 && echo 'BRAND_SHARE_SUBDIR=$(LIBO_SHARE_FOLDER)' \ 57 && echo 'BRAND_SHARE_RESOURCE_SUBDIR=$(LIBO_SHARE_RESOURCE_FOLDER)' \ 58 && echo 'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/$(LIBO_SHARE_FOLDER)/registry' \ 59 'res:$${BRAND_BASE_DIR}/$(LIBO_SHARE_FOLDER)/registry' \ 60 $(if $(ENABLE_DCONF),'dconf:* ') \ 61 $(if $(filter WNT,$(OS)),'winreg:LOCAL_MACHINE ') \ 62 'bundledext:$${$${BRAND_BASE_DIR}/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno):BUNDLED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini' \ 63 'sharedext:$${$${BRAND_BASE_DIR}/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno):SHARED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini' \ 64 'userext:$${$${BRAND_BASE_DIR}/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno):UNO_USER_PACKAGES_CACHE}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini' \ 65 $(if $(filter WNT,$(OS)),'winreg:CURRENT_USER ') \ 66 'user:!$${$$BRAND_BASE_DIR/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,bootstrap):UserInstallation}/user/registrymodifications.xcu' \ 67 && echo 'LO_DOTNET_DIR=$${BRAND_BASE_DIR}/$(LIBO_SHARE_DOTNET_FOLDER)' \ 68 && echo 'LO_JAVA_DIR=$${BRAND_BASE_DIR}/$(LIBO_SHARE_JAVA_FOLDER)' \ 69 && echo 'LO_LIB_DIR=$${BRAND_BASE_DIR}/$(LIBO_LIB_FOLDER)' \ 70 && echo 'BAK_EXTENSIONS=$${$$ORIGIN/$(call gb_Helper_get_rcfile,louno):TMP_EXTENSIONS}' \ 71 && echo 'BUNDLED_EXTENSIONS=$${$$ORIGIN/$(call gb_Helper_get_rcfile,louno):BUNDLED_EXTENSIONS}' \ 72 && echo 'BUNDLED_EXTENSIONS_USER=$${$$ORIGIN/$(call gb_Helper_get_rcfile,louno):BUNDLED_EXTENSIONS_USER}' \ 73 && echo 'SHARED_EXTENSIONS_USER=$${$$ORIGIN/$(call gb_Helper_get_rcfile,louno):SHARED_EXTENSIONS_USER}' \ 74 && echo 'UNO_SHARED_PACKAGES_CACHE=$${$$ORIGIN/$(call gb_Helper_get_rcfile,louno):UNO_SHARED_PACKAGES_CACHE}' \ 75 && echo 'TMP_EXTENSIONS=$${$$ORIGIN/$(call gb_Helper_get_rcfile,louno):TMP_EXTENSIONS}' \ 76 && echo 'UNO_USER_PACKAGES_CACHE=$${$$ORIGIN/$(call gb_Helper_get_rcfile,louno):UNO_USER_PACKAGES_CACHE}' \ 77 && echo 'URE_BIN_DIR=$${BRAND_BASE_DIR}/$(LIBO_URE_BIN_FOLDER)' \ 78 && echo 'URE_MORE_JAVA_CLASSPATH_URLS=$(if $(SYSTEM_HSQLDB),$(HSQLDB_JAR))' \ 79 && echo 'URE_OVERRIDE_JAVA_JFW_SHARED_DATA=$${BRAND_BASE_DIR}/$(LIBO_SHARE_FOLDER)/config/javasettings_$${_OS}_$${_ARCH}.xml' \ 80 && echo 'URE_OVERRIDE_JAVA_JFW_USER_DATA=$${$${BRAND_BASE_DIR}/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,bootstrap):UserInstallation}/user/config/javasettings_$${_OS}_$${_ARCH}.xml' \ 81 && echo 'URE_MORE_JAVA_TYPES=$${BRAND_BASE_DIR}/$(LIBO_SHARE_JAVA_FOLDER)/libreoffice.jar $${BRAND_BASE_DIR}/$(LIBO_SHARE_JAVA_FOLDER)/ScriptFramework.jar $${$${$$ORIGIN/$(call gb_Helper_get_rcfile,louno):PKG_UserUnoFile}:UNO_JAVA_CLASSPATH} $${$${$$ORIGIN/$(call gb_Helper_get_rcfile,louno):PKG_SharedUnoFile}:UNO_JAVA_CLASSPATH} $${$${$$ORIGIN/$(call gb_Helper_get_rcfile,louno):PKG_BundledUnoFile}:UNO_JAVA_CLASSPATH}' \ 82 && echo 'URE_MORE_SERVICES=$${$${$$ORIGIN/$(call gb_Helper_get_rcfile,louno):PKG_UserUnoFile}:UNO_SERVICES} $${$${$$ORIGIN/$(call gb_Helper_get_rcfile,louno):PKG_SharedUnoFile}:UNO_SERVICES} $${$${$$ORIGIN/$(call gb_Helper_get_rcfile,louno):PKG_BundledUnoFile}:UNO_SERVICES} <$$ORIGIN/services>*' \ 83 && echo 'URE_MORE_TYPES=<$$ORIGIN/types>* $${$${$$ORIGIN/$(call gb_Helper_get_rcfile,louno):PKG_UserUnoFile}:UNO_TYPES} $${$${$$ORIGIN/$(call gb_Helper_get_rcfile,louno):PKG_SharedUnoFile}:UNO_TYPES} $${$${$$ORIGIN/$(call gb_Helper_get_rcfile,louno):PKG_BundledUnoFile}:UNO_TYPES}' \ 84 ) > $@ 85 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),ECH) 86 87$(gb_CustomTarget_workdir)/instsetoo_native/setup/$(call gb_Helper_get_rcfile,louno) : 88 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1) 89 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),ECH) 90 ( \ 91 echo '[Bootstrap]' \ 92 && echo 'PKG_BundledUnoFile=$$BUNDLED_EXTENSIONS_USER/registry/com.sun.star.comp.deployment.component.PackageRegistryBackend/unorc' \ 93 && echo 'PKG_SharedUnoFile=$$SHARED_EXTENSIONS_USER/registry/com.sun.star.comp.deployment.component.PackageRegistryBackend/unorc' \ 94 && echo 'PKG_UserUnoFile=$$UNO_USER_PACKAGES_CACHE/registry/com.sun.star.comp.deployment.component.PackageRegistryBackend/unorc' \ 95 && echo 'BAK_EXTENSIONS=$${$$BRAND_BASE_DIR/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,bootstrap):UserInstallation}/user/extensions/bak' \ 96 && echo 'BUNDLED_EXTENSIONS=$$BRAND_BASE_DIR/$(LIBO_SHARE_FOLDER)/extensions' \ 97 && echo 'BUNDLED_EXTENSIONS_USER=$${$$BRAND_BASE_DIR/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,bootstrap):UserInstallation}/user/extensions/bundled' \ 98 && echo 'TMP_EXTENSIONS=$${$$BRAND_BASE_DIR/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,bootstrap):UserInstallation}/user/extensions/tmp' \ 99 && echo 'SHARED_EXTENSIONS_USER=$${$$BRAND_BASE_DIR/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,bootstrap):UserInstallation}/user/extensions/shared' \ 100 && echo 'UNO_SHARED_PACKAGES=$$BRAND_BASE_DIR/$(LIBO_SHARE_FOLDER)/uno_packages' \ 101 && echo 'UNO_SHARED_PACKAGES_CACHE=$$UNO_SHARED_PACKAGES/cache' \ 102 && echo 'UNO_USER_PACKAGES=$${$$BRAND_BASE_DIR/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,bootstrap):UserInstallation}/user/uno_packages' \ 103 && echo 'UNO_USER_PACKAGES_CACHE=$$UNO_USER_PACKAGES/cache' \ 104 ) > $@ 105 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),ECH) 106 107$(gb_CustomTarget_workdir)/instsetoo_native/setup/$(call gb_Helper_get_rcfile,redirect) : 108 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1) 109 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),ECH) 110 ( \ 111 echo '[Bootstrap]' \ 112 && echo 'URE_BOOTSTRAP=$${ORIGIN}/$(call gb_Helper_get_rcfile,fundamental)' \ 113 ) > $@ 114 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),ECH) 115 116.PHONY: $(gb_CustomTarget_workdir)/instsetoo_native/setup/$(call gb_Helper_get_rcfile,setup) 117$(gb_CustomTarget_workdir)/instsetoo_native/setup/$(call gb_Helper_get_rcfile,setup) : 118 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1) 119 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),ECH) 120 ( \ 121 echo '[Bootstrap]' \ 122 && echo 'buildid=$(shell cd $(SRCDIR) && git log -1 --format=%H)' \ 123 ) > $@ 124 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),ECH) 125 126# for release-builds (building installers) adjust values in openoffice.lst.in 127# Added 'SecureUserConfig' flags to enable and safe user config files 128# SecureUserConfig : boolean - switches securing on/off - default false 129# SecureUserConfigCompress : boolean - defines if backup data will be compressed - default true 130# SecureUserConfigNumCopies : integer - defines how many compressed copies of saved content will be kept - default 2 131# SecureUserConfigMode: integer - defines what to secure, default is 1 132# 0 : only registrymodifications.xcu 133# 1 : a selected amount of user-defined configs 134# 2 : everything in the user config directory 135# SecureUserConfigExtensions: boolean - defines to also safe the extension configuration (which extensions 136# are installed, which are activated) - default is true 137$(gb_CustomTarget_workdir)/instsetoo_native/setup/$(call gb_Helper_get_rcfile,soffice) : 138 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1) 139 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),ECH) 140 ( \ 141 echo '[Bootstrap]' \ 142 && echo 'CrashDirectory=$${$$BRAND_BASE_DIR/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,bootstrap):UserInstallation}/crash' \ 143 && echo 'CrashDumpEnable=$(DEFAULT_CRASHDUMP_VALUE)' \ 144 && echo 'HideEula=1' \ 145 && echo 'Logo=1' \ 146 && echo 'NativeProgress=false' \ 147 && echo 'ProgressBarColor=0,0,0' \ 148 && echo 'ProgressFrameColor=102,102,102' \ 149 && echo 'ProgressPosition=30,145' \ 150 && echo 'ProgressSize=385,8' \ 151 && echo 'ProgressPositionHigh=30,200' \ 152 && echo 'ProgressSizeHigh=650,12' \ 153 && echo 'ProgressTextBaseline=170' \ 154 && echo 'ProgressTextColor=0,0,0' \ 155 && echo 'SecureUserConfig=true' \ 156 && echo 'SecureUserConfigCompress=true' \ 157 && echo 'SecureUserConfigExtensions=true' \ 158 && echo 'SecureUserConfigMode=1' \ 159 && echo 'SecureUserConfigNumCopies=2' \ 160 && echo 'URE_BOOTSTRAP=$${ORIGIN}/$(call gb_Helper_get_rcfile,fundamental)' \ 161 ) > $@ 162 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),ECH) 163 164$(gb_CustomTarget_workdir)/instsetoo_native/setup/$(call gb_Helper_get_rcfile,uno) : 165 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1) 166 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),ECH) 167 ( \ 168 echo '[Bootstrap]' \ 169 && echo 'URE_INTERNAL_LIB_DIR=$${ORIGIN}$(if $(filter MACOSX,$(OS)),/../../../Frameworks)' \ 170 && echo 'URE_INTERNAL_JAVA_DIR=$(if $(filter MACOSX,$(OS)),$${ORIGIN}/../../java,$${ORIGIN}/classes)' \ 171 && echo 'URE_INTERNAL_JAVA_CLASSPATH=$${URE_MORE_JAVA_TYPES}' \ 172 && echo 'UNO_TYPES=$(if $(filter MACOSX,$(OS)),$${ORIGIN}/../share/misc/,$${ORIGIN}/)types.rdb $${URE_MORE_TYPES}' \ 173 && echo 'UNO_SERVICES=$(if $(filter MACOSX,$(OS)),$${ORIGIN}/../share/misc/,$${ORIGIN}/)services.rdb $${URE_MORE_SERVICES}' \ 174 ) > $@ 175 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),ECH) 176 177 178 179 180 181define instsetoo_native_genversionini 182[Version] 183AllLanguages=$(if $(gb_WITH_LANG),$(gb_WITH_LANG),en-US) 184buildid=$(shell cd $(SRCDIR) && git log -1 --format=%H) 185ExtensionUpdateURL=https://updateexte.libreoffice.org/ExtensionUpdateService/check.Update 186UpdateChannel=$(if $(ENABLE_ONLINE_UPDATE_MAR),LOOnlineUpdater) 187ReferenceOOoMajorMinor=4.1 188UpdateID=$(PRODUCTNAME)_$(LIBO_VERSION_MAJOR)_en-US 189UpdateURL=$(if $(ENABLE_ONLINE_UPDATE),https://update.libreoffice.org/check.php$(if $(filter-out WNT,$(OS)),?pkgfmt=$(PKGFORMAT))) 190UpdateUserAgent=<PRODUCT> ($${buildid}; $${_OS}; $${_ARCH}; <OPTIONAL_OS_HW_DATA>) 191Vendor=$(OOO_VENDOR) 192endef 193 194 195 196.PHONY: $(gb_CustomTarget_workdir)/instsetoo_native/setup/$(call gb_Helper_get_rcfile,version) 197$(gb_CustomTarget_workdir)/instsetoo_native/setup/$(call gb_Helper_get_rcfile,version) : 198 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1) 199 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),ECH) 200 $(file > $@,$(call instsetoo_native_genversionini)) 201 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),ECH) 202 203# vim: set noet sw=4 ts=4: 204
