1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
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/.
10 $(eval
$(call gb_CustomTarget_CustomTarget
,instsetoo_native
/setup
))
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
) \
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
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 $(call gb_Trace_StartRange
,$(subst $(WORKDIR
)/,,$@
),ECH
)
41 && echo
'InstallMode=<installmode>' \
42 && echo
'ProductKey=$(PRODUCTNAME) $(PRODUCTVERSION)' \
43 $(if
$(ENABLE_RELEASE_BUILD
),\
44 && 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', \
45 && echo
'UserInstallation=$$ORIGIN/..') \
47 $(call gb_Trace_EndRange
,$(subst $(WORKDIR
)/,,$@
),ECH
)
49 $(call gb_CustomTarget_get_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
)
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 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' \
59 && echo
'LO_JAVA_DIR=$${BRAND_BASE_DIR}/$(LIBO_SHARE_JAVA_FOLDER)' \
60 && echo
'LO_LIB_DIR=$${BRAND_BASE_DIR}/$(LIBO_LIB_FOLDER)' \
61 && echo
'BAK_EXTENSIONS=$${$$ORIGIN/$(call gb_Helper_get_rcfile,louno):TMP_EXTENSIONS}' \
62 && echo
'BUNDLED_EXTENSIONS=$${$$ORIGIN/$(call gb_Helper_get_rcfile,louno):BUNDLED_EXTENSIONS}' \
63 && echo
'BUNDLED_EXTENSIONS_USER=$${$$ORIGIN/$(call gb_Helper_get_rcfile,louno):BUNDLED_EXTENSIONS_USER}' \
64 && echo
'SHARED_EXTENSIONS_USER=$${$$ORIGIN/$(call gb_Helper_get_rcfile,louno):SHARED_EXTENSIONS_USER}' \
65 && echo
'UNO_SHARED_PACKAGES_CACHE=$${$$ORIGIN/$(call gb_Helper_get_rcfile,louno):UNO_SHARED_PACKAGES_CACHE}' \
66 && echo
'TMP_EXTENSIONS=$${$$ORIGIN/$(call gb_Helper_get_rcfile,louno):TMP_EXTENSIONS}' \
67 && echo
'UNO_USER_PACKAGES_CACHE=$${$$ORIGIN/$(call gb_Helper_get_rcfile,louno):UNO_USER_PACKAGES_CACHE}' \
68 && echo
'URE_BIN_DIR=$${BRAND_BASE_DIR}/$(LIBO_URE_BIN_FOLDER)' \
69 && echo
'URE_MORE_JAVA_CLASSPATH_URLS=$(if $(SYSTEM_HSQLDB),$(HSQLDB_JAR))' \
70 && echo
'URE_OVERRIDE_JAVA_JFW_SHARED_DATA=$${BRAND_BASE_DIR}/$(LIBO_SHARE_FOLDER)/config/javasettings_$${_OS}_$${_ARCH}.xml' \
71 && 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' \
72 && 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}' \
73 && 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>*' \
74 && 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}' \
76 $(call gb_Trace_EndRange
,$(subst $(WORKDIR
)/,,$@
),ECH
)
78 $(call gb_CustomTarget_get_workdir
,instsetoo_native
/setup
)/$(call gb_Helper_get_rcfile
,louno
) :
79 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),ECH
,1)
80 $(call gb_Trace_StartRange
,$(subst $(WORKDIR
)/,,$@
),ECH
)
83 && echo
'PKG_BundledUnoFile=$$BUNDLED_EXTENSIONS_USER/registry/com.sun.star.comp.deployment.component.PackageRegistryBackend/unorc' \
84 && echo
'PKG_SharedUnoFile=$$SHARED_EXTENSIONS_USER/registry/com.sun.star.comp.deployment.component.PackageRegistryBackend/unorc' \
85 && echo
'PKG_UserUnoFile=$$UNO_USER_PACKAGES_CACHE/registry/com.sun.star.comp.deployment.component.PackageRegistryBackend/unorc' \
86 && echo
'BAK_EXTENSIONS=$${$$BRAND_BASE_DIR/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,bootstrap):UserInstallation}/user/extensions/bak' \
87 && echo
'BUNDLED_EXTENSIONS=$$BRAND_BASE_DIR/$(LIBO_SHARE_FOLDER)/extensions' \
88 && echo
'BUNDLED_EXTENSIONS_USER=$${$$BRAND_BASE_DIR/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,bootstrap):UserInstallation}/user/extensions/bundled' \
89 && echo
'TMP_EXTENSIONS=$${$$BRAND_BASE_DIR/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,bootstrap):UserInstallation}/user/extensions/tmp' \
90 && echo
'SHARED_EXTENSIONS_USER=$${$$BRAND_BASE_DIR/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,bootstrap):UserInstallation}/user/extensions/shared' \
91 && echo
'UNO_SHARED_PACKAGES=$$BRAND_BASE_DIR/$(LIBO_SHARE_FOLDER)/uno_packages' \
92 && echo
'UNO_SHARED_PACKAGES_CACHE=$$UNO_SHARED_PACKAGES/cache' \
93 && echo
'UNO_USER_PACKAGES=$${$$BRAND_BASE_DIR/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,bootstrap):UserInstallation}/user/uno_packages' \
94 && echo
'UNO_USER_PACKAGES_CACHE=$$UNO_USER_PACKAGES/cache' \
96 $(call gb_Trace_EndRange
,$(subst $(WORKDIR
)/,,$@
),ECH
)
98 $(call gb_CustomTarget_get_workdir
,instsetoo_native
/setup
)/$(call gb_Helper_get_rcfile
,redirect
) :
99 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),ECH
,1)
100 $(call gb_Trace_StartRange
,$(subst $(WORKDIR
)/,,$@
),ECH
)
103 && echo
'URE_BOOTSTRAP=$${ORIGIN}/$(call gb_Helper_get_rcfile,fundamental)' \
105 $(call gb_Trace_EndRange
,$(subst $(WORKDIR
)/,,$@
),ECH
)
107 .PHONY
: $(call gb_CustomTarget_get_workdir
,instsetoo_native
/setup
)/$(call gb_Helper_get_rcfile
,setup
)
108 $(call gb_CustomTarget_get_workdir
,instsetoo_native
/setup
)/$(call gb_Helper_get_rcfile
,setup
) :
109 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),ECH
,1)
110 $(call gb_Trace_StartRange
,$(subst $(WORKDIR
)/,,$@
),ECH
)
113 && echo
'buildid=$(shell cd $(SRCDIR) && git log -1 --format=%H)' \
115 $(call gb_Trace_EndRange
,$(subst $(WORKDIR
)/,,$@
),ECH
)
117 # for release-builds (building installers) adjust values in openoffice.lst.in
118 # Added 'SecureUserConfig' flags to enable and safe user config files
119 # SecureUserConfig : boolean - switches securing on/off - default false
120 # SecureUserConfigCompress : boolean - defines if backup data will be compressed - default true
121 # SecureUserConfigNumCopies : integer - defines how many compressed copies of saved content will be kept - default 2
122 # SecureUserConfigMode: integer - defines what to secure, default is 1
123 # 0 : only registrymodifications.xcu
124 # 1 : a selected amount of user-defined configs
125 # 2 : everything in the user config directory
126 # SecureUserConfigExtensions: boolean - defines to also safe the extension configuration (which extensions
127 # are installed, which are activated) - default is true
128 $(call gb_CustomTarget_get_workdir
,instsetoo_native
/setup
)/$(call gb_Helper_get_rcfile
,soffice
) :
129 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),ECH
,1)
130 $(call gb_Trace_StartRange
,$(subst $(WORKDIR
)/,,$@
),ECH
)
133 && echo
'CrashDirectory=$${$$BRAND_BASE_DIR/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,bootstrap):UserInstallation}/crash' \
134 && echo
'CrashDumpEnable=$(DEFAULT_CRASHDUMP_VALUE)' \
135 && echo
'HideEula=1' \
137 && echo
'NativeProgress=false' \
138 && echo
'ProgressBarColor=0,0,0' \
139 && echo
'ProgressFrameColor=102,102,102' \
140 && echo
'ProgressPosition=30,145' \
141 && echo
'ProgressSize=385,8' \
142 && echo
'ProgressPositionHigh=30,200' \
143 && echo
'ProgressSizeHigh=650,12' \
144 && echo
'ProgressTextBaseline=170' \
145 && echo
'ProgressTextColor=0,0,0' \
146 && echo
'SecureUserConfig=true' \
147 && echo
'SecureUserConfigCompress=true' \
148 && echo
'SecureUserConfigExtensions=true' \
149 && echo
'SecureUserConfigMode=1' \
150 && echo
'SecureUserConfigNumCopies=2' \
151 && echo
'URE_BOOTSTRAP=$${ORIGIN}/$(call gb_Helper_get_rcfile,fundamental)' \
153 $(call gb_Trace_EndRange
,$(subst $(WORKDIR
)/,,$@
),ECH
)
155 $(call gb_CustomTarget_get_workdir
,instsetoo_native
/setup
)/$(call gb_Helper_get_rcfile
,uno
) :
156 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),ECH
,1)
157 $(call gb_Trace_StartRange
,$(subst $(WORKDIR
)/,,$@
),ECH
)
160 && echo
'URE_INTERNAL_LIB_DIR=$${ORIGIN}$(if $(filter MACOSX,$(OS)),/../../../Frameworks)' \
161 && echo
'URE_INTERNAL_JAVA_DIR=$(if $(filter MACOSX,$(OS)),$${ORIGIN}/../../java,$${ORIGIN}/classes)' \
162 && echo
'URE_INTERNAL_JAVA_CLASSPATH=$${URE_MORE_JAVA_TYPES}' \
163 && echo
'UNO_TYPES=$(if $(filter MACOSX,$(OS)),$${ORIGIN}/../share/misc/,$${ORIGIN}/)types.rdb $${URE_MORE_TYPES}' \
164 && echo
'UNO_SERVICES=$(if $(filter MACOSX,$(OS)),$${ORIGIN}/../share/misc/,$${ORIGIN}/)services.rdb $${URE_MORE_SERVICES}' \
166 $(call gb_Trace_EndRange
,$(subst $(WORKDIR
)/,,$@
),ECH
)
172 define instsetoo_native_genversionini
174 AllLanguages
=$(if
$(gb_WITH_LANG
),$(gb_WITH_LANG
),en-US
)
175 buildid
=$(shell cd
$(SRCDIR
) && git log
-1 --format
=%H
)
176 ExtensionUpdateURL
=https
://updateexte.libreoffice.org
/ExtensionUpdateService
/check.Update
177 UpdateChannel
=$(if
$(ENABLE_ONLINE_UPDATE_MAR
),$(shell cd
$(SRCDIR
) && bin
/update
/get_update_channel.py
$(UPDATE_CONFIG
)))
178 ReferenceOOoMajorMinor
=4.1
179 UpdateID
=$(PRODUCTNAME
)_
$(LIBO_VERSION_MAJOR
)_en-US
180 UpdateURL
=$(if
$(ENABLE_ONLINE_UPDATE
),https
://update.libreoffice.org
/check.php
$(if
$(filter-out WNT
,$(OS
)),?pkgfmt
=$(PKGFORMAT
)))
181 UpdateUserAgent
=<PRODUCT
> ($${buildid}; $${_OS}; $${_ARCH}; <OPTIONAL_OS_HW_DATA
>)
187 .PHONY
: $(call gb_CustomTarget_get_workdir
,instsetoo_native
/setup
)/$(call gb_Helper_get_rcfile
,version
)
188 $(call gb_CustomTarget_get_workdir
,instsetoo_native
/setup
)/$(call gb_Helper_get_rcfile
,version
) :
189 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),ECH
,1)
190 $(call gb_Trace_StartRange
,$(subst $(WORKDIR
)/,,$@
),ECH
)
191 ifeq ($(HAVE_GNUMAKE_FILE_FUNC
),)
192 printf
'[Version]\n' > $@
&& \
193 printf
'AllLanguages=$(if $(gb_WITH_LANG),$(gb_WITH_LANG),en-US)\n' >> $@
&& \
194 printf
'buildid=$(shell cd $(SRCDIR) && git log -1 --format=%H)\n' >> $@
&& \
195 printf
'ExtensionUpdateURL=https://updateexte.libreoffice.org/ExtensionUpdateService/check.Update\n' >> $@
&& \
196 printf
'UpdateChannel=$(if $(ENABLE_ONLINE_UPDATE_MAR),$(shell cd $(SRCDIR) && bin/update/get_update_channel.py $(UPDATE_CONFIG)))\n' >> $@
&& \
197 printf
'ReferenceOOoMajorMinor=4.1\n' >> $@
&& \
198 printf
'UpdateID=$(PRODUCTNAME)_$(LIBO_VERSION_MAJOR)_en-US\n' >> $@
&& \
199 printf
'UpdateURL=$(if $(ENABLE_ONLINE_UPDATE),https://update.libreoffice.org/check.php$(if $(filter-out WNT,$(OS)),?pkgfmt=$(PKGFORMAT)))\n' >> $@
&& \
200 printf
'UpdateUserAgent=<PRODUCT> ($${buildid}; $${_OS}; $${_ARCH}; <OPTIONAL_OS_HW_DATA>)\n' >> $@
&& \
201 printf
'Vendor=$(OOO_VENDOR)\n' >> $@
203 $(file
> $@
,$(call instsetoo_native_genversionini
))
205 $(call gb_Trace_EndRange
,$(subst $(WORKDIR
)/,,$@
),ECH
)
207 # vim: set noet sw=4 ts=4: