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