Kaydet (Commit) 7f1f1f53 authored tarafından Juergen Funk's avatar Juergen Funk Kaydeden (comit) Michael Stahl

tdf#118303 - Wrong converting of the Vendor-String

Using the make-file function, in this case no converting

this problem was introduced by switching to native Win32 make:

* Makefiles don't have any metadata to specify the encoding
* all of the Cygwin tools in the build system assume
   everything is UTF-8 encoded
* Win32 make calls CreateProcessA(), which converts the
   arguments from some so-called "ANSI" codepage to UCS-2

hence in commands invoked from make, the UTF-8 string is
erroneously interpreted as latin1 and converted to UCS-2.

Change-Id: Ibf3e573b07e7e2d9119e0ff7b4972d8065d84bea
Reviewed-on: https://gerrit.libreoffice.org/56272Reviewed-by: 's avatarMichael Stahl <Michael.Stahl@cib.de>
Tested-by: 's avatarMichael Stahl <Michael.Stahl@cib.de>
üst a07bb28d
......@@ -149,21 +149,43 @@ $(call gb_CustomTarget_get_workdir,instsetoo_native/setup)/$(call gb_Helper_get_
&& echo 'UNO_SERVICES=$(if $(filter MACOSX,$(OS)),$${ORIGIN}/../share/misc/,$${ORIGIN}/)services.rdb $${URE_MORE_SERVICES}' \
) > $@
define instsetoo_native_genversionini
[Version]
AllLanguages=$(if $(gb_WITH_LANG),$(gb_WITH_LANG),en-US)
BuildVersion=$(BUILD_VER_STRING)
buildid=$(shell cd $(SRCDIR) && git log -1 --format=%H)
ExtensionUpdateURL=https://updateexte.libreoffice.org/ExtensionUpdateService/check.Update
UpdateChannel=$(if $(ENABLE_ONLINE_UPDATE_MAR),$(shell cd $(SRCDIR) && bin/update/get_update_channel.py $(UPDATE_CONFIG)))
ReferenceOOoMajorMinor=4.1
UpdateID=$(PRODUCTNAME)_$(LIBO_VERSION_MAJOR)_en-US
UpdateURL=$(if $(ENABLE_ONLINE_UPDATE),https://update.libreoffice.org/check.php$(if $(filter-out WNT,$(OS)),?pkgfmt=$(PKGFORMAT)))
UpdateUserAgent=<PRODUCT> ($${buildid}; $${_OS}; $${_ARCH}; <OPTIONAL_OS_HW_DATA>)
Vendor=$(OOO_VENDOR)
endef
.PHONY: $(call gb_CustomTarget_get_workdir,instsetoo_native/setup)/$(call gb_Helper_get_rcfile,version)
$(call gb_CustomTarget_get_workdir,instsetoo_native/setup)/$(call gb_Helper_get_rcfile,version) :
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
( \
echo '[Version]' \
&& echo 'AllLanguages=$(if $(gb_WITH_LANG),$(gb_WITH_LANG),en-US)' \
&& echo 'BuildVersion=$(BUILD_VER_STRING)' \
&& echo 'buildid=$(shell cd $(SRCDIR) && git log -1 --format=%H)' \
&& echo 'ExtensionUpdateURL=https://updateexte.libreoffice.org/ExtensionUpdateService/check.Update' \
&& echo 'UpdateChannel=$(if $(ENABLE_ONLINE_UPDATE_MAR),$(shell cd $(SRCDIR) && bin/update/get_update_channel.py $(UPDATE_CONFIG)))' \
&& echo 'ReferenceOOoMajorMinor=4.1' \
&& echo 'UpdateID=$(PRODUCTNAME)_$(LIBO_VERSION_MAJOR)_en-US' \
&& echo 'UpdateURL=$(if $(ENABLE_ONLINE_UPDATE),https://update.libreoffice.org/check.php$(if $(filter-out WNT,$(OS)),?pkgfmt=$(PKGFORMAT)))' \
&& echo 'UpdateUserAgent=<PRODUCT> ($${buildid}; $${_OS}; $${_ARCH}; <OPTIONAL_OS_HW_DATA>)' \
&& echo 'Vendor=$(OOO_VENDOR)' \
) > $@
ifeq ($(HAVE_GNUMAKE_FILE_FUNC),)
printf '[Version]\n' > $@ && \
printf 'AllLanguages=$(if $(gb_WITH_LANG),$(gb_WITH_LANG),en-US)\n' >> $@ && \
printf 'BuildVersion=$(BUILD_VER_STRING)\n' >> $@ && \
printf 'buildid=$(shell cd $(SRCDIR) && git log -1 --format=%H)\n' >> $@ && \
printf 'ExtensionUpdateURL=https://updateexte.libreoffice.org/ExtensionUpdateService/check.Update\n' >> $@ && \
printf 'UpdateChannel=$(if $(ENABLE_ONLINE_UPDATE_MAR),$(shell cd $(SRCDIR) && bin/update/get_update_channel.py $(UPDATE_CONFIG)))\n' >> $@ && \
printf 'ReferenceOOoMajorMinor=4.1\n' >> $@ && \
printf 'UpdateID=$(PRODUCTNAME)_$(LIBO_VERSION_MAJOR)_en-US\n' >> $@ && \
printf 'UpdateURL=$(if $(ENABLE_ONLINE_UPDATE),https://update.libreoffice.org/check.php$(if $(filter-out WNT,$(OS)),?pkgfmt=$(PKGFORMAT)))\n' >> $@ && \
printf 'UpdateUserAgent=<PRODUCT> ($${buildid}; $${_OS}; $${_ARCH}; <OPTIONAL_OS_HW_DATA>)\n' >> $@ && \
printf 'Vendor=$(OOO_VENDOR)\n' >> $@
else
$(file > $@, $(call instsetoo_native_genversionini))
endif
# vim: set noet sw=4 ts=4:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment