solenv/gbuild/platform/com_MSC_class.mk           |    4 ++--
 solenv/gbuild/platform/win_compatibility.manifest |   15 +++++++++++++++
 2 files changed, 17 insertions(+), 2 deletions(-)

New commits:
commit 736a4e659cff2ef5f900301d7d288494f9b98178
Author: Mike Kaganski <[email protected]>
Date:   Fri Sep 29 13:04:23 2017 +0300

    Add compatibility information to binary manifests on Windows
    
    Without that, Windows (since 8.1) may apply compatibility mode
    (at least its version API really works differently: see
    
https://blogs.msdn.microsoft.com/cjacks/2014/06/23/why-windows-8-1-sometimes-tells-you-it-is-windows-8-0).
    
    Change-Id: I99f0c81aac669f21c737753bc806565c794281f2
    Reviewed-on: https://gerrit.libreoffice.org/42934
    Tested-by: Jenkins <[email protected]>
    Reviewed-by: Mike Kaganski <[email protected]>

diff --git a/solenv/gbuild/platform/com_MSC_class.mk 
b/solenv/gbuild/platform/com_MSC_class.mk
index b6f2c38d1cb5..79107f926760 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -186,8 +186,8 @@ $(call gb_Helper_abbreviate_dirs,\
                        -pdb:$(call 
gb_LinkTarget__get_pdb_filename,$(WORKDIR)/LinkTarget/$(2))) \
                $(if $(ILIBTARGET),-out:$(1) -implib:$(ILIBTARGET),-out:$(1)); 
RC=$$?; rm $${RESPONSEFILE} \
        $(if $(filter Library,$(TARGETTYPE)),; if [ ! -f $(ILIBTARGET) ]; then 
rm -f $(1); exit 42; fi) \
-       $(if $(filter Library,$(TARGETTYPE)),&& if [ -f 
$(WORKDIR)/LinkTarget/$(2).manifest ]; then mt.exe $(MTFLAGS) -nologo -manifest 
$(WORKDIR)/LinkTarget/$(2).manifest -outputresource:$(1)\;2 && touch -r $(1) 
$(WORKDIR)/LinkTarget/$(2).manifest $(ILIBTARGET); fi) \
-       $(if $(filter Executable,$(TARGETTYPE)),&& if [ -f 
$(WORKDIR)/LinkTarget/$(2).manifest ]; then mt.exe $(MTFLAGS) -nologo -manifest 
$(WORKDIR)/LinkTarget/$(2).manifest -outputresource:$(1)\;1 && touch -r $(1) 
$(WORKDIR)/LinkTarget/$(2).manifest; fi) \
+       $(if $(filter Library,$(TARGETTYPE)),&& if [ -f 
$(WORKDIR)/LinkTarget/$(2).manifest ]; then mt.exe $(MTFLAGS) -nologo -manifest 
$(WORKDIR)/LinkTarget/$(2).manifest 
$(SRCDIR)/solenv/gbuild/platform/win_compatibility.manifest 
-outputresource:$(1)\;2 && touch -r $(1) $(WORKDIR)/LinkTarget/$(2).manifest 
$(ILIBTARGET); fi) \
+       $(if $(filter Executable,$(TARGETTYPE)),&& if [ -f 
$(WORKDIR)/LinkTarget/$(2).manifest ]; then mt.exe $(MTFLAGS) -nologo -manifest 
$(WORKDIR)/LinkTarget/$(2).manifest 
$(SRCDIR)/solenv/gbuild/platform/win_compatibility.manifest 
-outputresource:$(1)\;1 && touch -r $(1) $(WORKDIR)/LinkTarget/$(2).manifest; 
fi) \
        $(if $(filter YES,$(TARGETGUI)),&& if [ -f 
$(SRCDIR)/solenv/inc/DeclareDPIAware.manifest ]; then mt.exe $(MTFLAGS) -nologo 
-manifest $(SRCDIR)/solenv/inc/DeclareDPIAware.manifest -updateresource:$(1)\;1 
; fi) \
        $(if $(filter Library,$(TARGETTYPE)),&& \
                echo $(notdir $(1)) > $(WORKDIR)/LinkTarget/$(2).exports.tmp && 
\
diff --git a/solenv/gbuild/platform/win_compatibility.manifest 
b/solenv/gbuild/platform/win_compatibility.manifest
new file mode 100644
index 000000000000..709f6f3c705b
--- /dev/null
+++ b/solenv/gbuild/platform/win_compatibility.manifest
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+       <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+               <application>
+                       <!-- Windows 10 -->
+                       <supportedOS 
Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
+                       <!-- Windows 8.1 -->
+                       <supportedOS 
Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
+                       <!-- Windows 8 -->
+                       <supportedOS 
Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+                       <!-- Windows 7 -->
+                       <supportedOS 
Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
+               </application>
+       </compatibility>
+</assembly>
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to