[Libreoffice-commits] core.git: desktop/Executable_soffice_bin.mk desktop/Library_sofficeapp.mk solenv/gbuild

2022-11-30 Thread Thorsten Behrens (via logerrit)
 desktop/Executable_soffice_bin.mk  |8 
 desktop/Library_sofficeapp.mk  |9 +
 solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk |2 +-
 3 files changed, 10 insertions(+), 9 deletions(-)

New commits:
commit ce60a3dd4dbff0dcb5b82c9053ae5d90f8ac929d
Author: Thorsten Behrens 
AuthorDate: Wed Apr 27 15:36:25 2022 +
Commit: Thorsten Behrens 
CommitDate: Wed Nov 30 23:57:54 2022 +0100

Add LOKit functions and whitelist export for it to WASM

For calling into LOWA from native JS, make lokit functions available

Change-Id: I6458806f33131e48692f35f2a2438b35efb1f06c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143497
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/desktop/Executable_soffice_bin.mk 
b/desktop/Executable_soffice_bin.mk
index a3c3ff258613..ce908c1be318 100644
--- a/desktop/Executable_soffice_bin.mk
+++ b/desktop/Executable_soffice_bin.mk
@@ -47,4 +47,12 @@ endif
 
 endif
 
+ifeq ($(OS),EMSCRIPTEN)
+
+$(eval $(call gb_Executable_add_ldflags,soffice_bin,\
+   -s 
EXPORTED_FUNCTIONS=["_main"$(COMMA)"_libreofficekit_hook"$(COMMA)"_libreofficekit_hook_2"$(COMMA)"_lok_preinit"$(COMMA)"_lok_preinit_2"]
 \
+))
+
+endif
+
 # vim: set ts=4 sw=4 et:
diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk
index 70f4b07ea045..c315a113ca89 100644
--- a/desktop/Library_sofficeapp.mk
+++ b/desktop/Library_sofficeapp.mk
@@ -137,20 +137,13 @@ $(eval $(call 
gb_Library_add_exception_objects,sofficeapp,\
desktop/source/lib/lokandroid) \
 ))
 else
-ifeq ($(USING_X11),TRUE)
+ifneq ($(filter TRUE,$(USING_X11) $(DISABLE_GUI))($filter EMSCRIPTEN,$(OS)),)
 $(eval $(call gb_Library_add_exception_objects,sofficeapp,\
desktop/source/lib/init \
desktop/source/lib/lokinteractionhandler \
desktop/source/lib/lokclipboard \
 ))
 endif
-ifeq ($(DISABLE_GUI),TRUE)
-$(eval $(call gb_Library_add_exception_objects,sofficeapp,\
-desktop/source/lib/init \
-desktop/source/lib/lokinteractionhandler \
-desktop/source/lib/lokclipboard \
-))
-endif
 endif
 
 # vim: set ts=4 sw=4 et:
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk 
b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index 35a136b2f38d..b0629894a07e 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -27,7 +27,7 @@ gb_EMSCRIPTEN_LDFLAGS += -s TOTAL_MEMORY=1GB -s 
PTHREAD_POOL_SIZE=4
 # To keep the link time (and memory) down, prevent all rewriting options from 
wasm-emscripten-finalize
 # See emscripten.py, finalize_wasm, modify_wasm = True
 # So we need WASM_BIGINT=1 and ASSERTIONS=1 (2 implies STACK_OVERFLOW_CHECK)
-gb_EMSCRIPTEN_LDFLAGS += --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s 
ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s 
EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16","printErr"]
+gb_EMSCRIPTEN_LDFLAGS += --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s 
ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s 
EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16","UTF8ToString","allocateUTF8","printErr","ccall","cwrap"]
 gb_EMSCRIPTEN_QTDEFS := -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS 
-DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG 
-DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
 
 gb_Executable_EXT := .html


[Libreoffice-commits] core.git: desktop/Executable_soffice_bin.mk solenv/gbuild static/emscripten

2022-01-19 Thread Jan-Marek Glogowski (via logerrit)
 desktop/Executable_soffice_bin.mk  |2 ++
 solenv/gbuild/CppunitTest.mk   |1 +
 solenv/gbuild/Executable.mk|1 +
 solenv/gbuild/LinkTarget.mk|   10 ++
 solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk |8 
 solenv/gbuild/platform/unxgcc.mk   |2 +-
 static/emscripten/environment.js   |5 +
 static/emscripten/soffice_args.js  |6 ++
 8 files changed, 34 insertions(+), 1 deletion(-)

New commits:
commit a27296ded79e9eb8fa325ea05fcd560d171cabbd
Author: Jan-Marek Glogowski 
AuthorDate: Sat Oct 2 23:57:44 2021 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Wed Jan 19 10:56:49 2022 +0100

WASM gbuild: add --pre-js dependencies

Currently includes environment.js for general environment settings
and soffice_args.js for soffice command line flags.

Change-Id: I1166c5a9ae53c56a69b9223c865b4df525d07450
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128590
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/desktop/Executable_soffice_bin.mk 
b/desktop/Executable_soffice_bin.mk
index 14a72ab6c055..a3c3ff258613 100644
--- a/desktop/Executable_soffice_bin.mk
+++ b/desktop/Executable_soffice_bin.mk
@@ -27,6 +27,8 @@ $(eval $(call gb_Executable_add_cobjects,soffice_bin,\
 desktop/source/app/main \
 ))
 
+$(eval $(call 
gb_Executable_add_prejs,soffice_bin,$(SRCDIR)/static/emscripten/soffice_args.js))
+
 ifeq ($(OS),WNT)
 
 $(eval $(call gb_Executable_set_targettype_gui,soffice_bin,NO))
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index e3a5b58233d1..7fc1cd79c12d 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -491,5 +491,6 @@ gb_CppunitTest_use_clang = $(call 
gb_CppunitTest__forward_to_Linktarget,$(0),$(1
 gb_CppunitTest_set_clang_precompiled_header = $(call 
gb_CppunitTest__forward_to_Linktarget,$(0),$(1),$(2),$(3))
 gb_CppunitTest_use_glxtest = $(call 
gb_CppunitTest__forward_to_Linktarget,$(0),$(1),$(2),$(3))
 gb_CppunitTest_use_vclmain = $(call 
gb_CppunitTest__forward_to_Linktarget,$(0),$(1),$(2),$(3))
+gb_CppunitTest_add_prejs = $(call 
gb_CppunitTest__forward_to_Linktarget,$(0),$(1),$(2),$(3))
 
 # vim: set noet sw=4:
diff --git a/solenv/gbuild/Executable.mk b/solenv/gbuild/Executable.mk
index e0622b4bdd55..a2ffd3aa351b 100644
--- a/solenv/gbuild/Executable.mk
+++ b/solenv/gbuild/Executable.mk
@@ -156,6 +156,7 @@ gb_Executable_use_clang = $(call 
gb_Executable__forward_to_Linktarget,$(0),$(1),
 gb_Executable_set_clang_precompiled_header = $(call 
gb_Executable__forward_to_Linktarget,$(0),$(1),$(2),$(3))
 gb_Executable_use_glxtest = $(call 
gb_Executable__forward_to_Linktarget,$(0),$(1),$(2),$(3))
 gb_Executable_use_vclmain = $(call 
gb_Executable__forward_to_Linktarget,$(0),$(1),$(2),$(3))
+gb_Executable_add_prejs = $(call 
gb_Executable__forward_to_Linktarget,$(0),$(1),$(2),$(3))
 
 # Run-time use
 
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 22fe3bafc3ff..a0c199ac765f 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -1067,6 +1067,7 @@ $(call gb_LinkTarget_get_target,$(1)) : T_CC :=
 $(call gb_LinkTarget_get_target,$(1)) : T_CXX :=
 $(call gb_LinkTarget_get_target,$(1)) : T_USE_LD := $(USE_LD)
 $(call gb_LinkTarget_get_target,$(1)) : T_LTOFLAGS := $(gb_LTOFLAGS)
+$(call gb_LinkTarget_get_target,$(1)) : T_PREJS :=
 
 ifeq ($(gb_FULLDEPS),$(true))
 ifeq (depcache:,$(filter depcache,$(.FEATURES)):$(gb_PARTIAL_BUILD))
@@ -2276,4 +2277,13 @@ endef
 # call gb_LinkTarget__set_plugin_for_nodep,linktarget,loader
 gb_LinkTarget__set_plugin_for_nodep = $(call 
gb_LinkTarget__set_plugin_for,$(1),$(2),$(true))
 
+# call gb_LinkTarget_add_prejs,linktarget,js_file
+define gb_LinkTarget_add_prejs
+ifeq (EMSCRIPTEN,$(OS))
+$(call gb_LinkTarget_get_target,$(1)) : T_PREJS += $(2)
+$(call gb_LinkTarget_get_target,$(1)) : $(2)
+endif
+
+endef
+
 # vim: set noet sw=4:
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk 
b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index 2dd31741d3a0..ae2ba0620edb 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -11,6 +11,10 @@ gb_UnoApiHeadersTarget_select_variant = $(if $(filter 
udkapi,$(1)),comprehensive
 
 include $(GBUILDDIR)/platform/unxgcc.mk
 
+# don't sort; later can override previous settings!
+gb_EMSCRIPTEN_PRE_JS_FILES = \
+$(SRCDIR)/static/emscripten/environment.js \
+
 gb_RUN_CONFIGURE := $(SRCDIR)/solenv/bin/run-configure
 # avoid -s SAFE_HEAP=1 - c.f. gh#8584 this breaks source maps
 gb_EMSCRIPTEN_CPPFLAGS := -pthread -s USE_PTHREADS=1
@@ -53,6 +57,8 @@ $(call gb_LinkTarget_add_auxtargets,$(2),\
 $(patsubst %.lib,%.worker.js,$(3)) \
 )
 
+$(foreach pre_js,$(gb_EMSCRIPTEN_PRE_JS_FILES),$(call 
gb_Executable_add_prejs,$(1),$(pre_js)))
+
 endef
 
 define 

[Libreoffice-commits] core.git: desktop/Executable_soffice_bin.mk desktop/source

2021-12-02 Thread Jan-Marek Glogowski (via logerrit)
 desktop/Executable_soffice_bin.mk |4 
 desktop/source/app/main.c |4 
 2 files changed, 8 insertions(+)

New commits:
commit 6ac1e9e7f0be23b529992c268d2c563fe40fff76
Author: Jan-Marek Glogowski 
AuthorDate: Wed Dec 1 19:37:19 2021 +0100
Commit: Jan-Marek Glogowski 
CommitDate: Fri Dec 3 04:56:36 2021 +0100

Disable the xmlCleanupParser test in a static build

Linking the static soffice.bin results in a failure, because
of the duplicate xmlCleanupParser symbol. I don't think there
is a sensible, alternative runtime test for a static LO build.
You could analyse the static binary itself...

Change-Id: Ib871e378a28affca24c4285d396d8bcae478f1f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126198
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/desktop/Executable_soffice_bin.mk 
b/desktop/Executable_soffice_bin.mk
index 9c08a28361df..14a72ab6c055 100644
--- a/desktop/Executable_soffice_bin.mk
+++ b/desktop/Executable_soffice_bin.mk
@@ -14,6 +14,10 @@ $(eval $(call gb_Executable_set_include,soffice_bin,\
 -I$(SRCDIR)/desktop/source/inc \
 ))
 
+$(eval $(call gb_Executable_add_defs,soffice_bin,\
+$(if $(DISABLE_DYNLOADING),$(if 
$(SYSTEM_LIBXML),,-DNOTEST_xmlCleanupParser)) \
+))
+
 $(eval $(call gb_Executable_use_libraries,soffice_bin,\
 sal \
 sofficeapp \
diff --git a/desktop/source/app/main.c b/desktop/source/app/main.c
index 6631c3ceb337..fdd2eb3505dc 100644
--- a/desktop/source/app/main.c
+++ b/desktop/source/app/main.c
@@ -21,6 +21,7 @@
 
 #include "sofficemain.h"
 
+#ifndef NOTEST_xmlCleanupParser
 #ifdef DBG_UTIL
 #ifdef __gnu_linux__
 #include 
@@ -43,14 +44,17 @@ __attribute__((visibility("default"))) void 
xmlCleanupParser(void)
 }
 #endif
 #endif
+#endif // NOTEST_xmlCleanupParser
 
 SAL_IMPLEMENT_MAIN()
 {
 int ret = soffice_main();
+#ifndef NOTEST_xmlCleanupParser
 #ifdef DBG_UTIL
 #ifdef __gnu_linux__
 g_Exiting = 1;
 #endif
+#endif
 #endif
 return ret;
 }


[Libreoffice-commits] core.git: desktop/Executable_soffice_bin.mk vcl/inc vcl/osx vcl/quartz

2021-01-17 Thread Thorsten Wagner (via logerrit)
 desktop/Executable_soffice_bin.mk |   12 -
 vcl/inc/quartz/salgdi.h   |   16 +
 vcl/osx/salinst.cxx   |   15 +
 vcl/quartz/salbmp.cxx |   22 +-
 vcl/quartz/salgdi.cxx |8 
 vcl/quartz/salgdicommon.cxx   |  315 +++---
 vcl/quartz/salgdiutils.cxx|   41 
 vcl/quartz/salvd.cxx  |  124 +-
 8 files changed, 260 insertions(+), 293 deletions(-)

New commits:
commit 1a167625314bf36b735176ed488e6ba9b5e9b675
Author: Thorsten Wagner 
AuthorDate: Sun Jan 10 23:49:25 2021 +0100
Commit: Tor Lillqvist 
CommitDate: Sun Jan 17 19:21:15 2021 +0100

tdf#138122 Add window scaling for retina displays on macOS

(1) Remove hack to make application look as if being linked against SDK 
10.13

(2) Use quad storage size on virtual devices for displaying on retina 
displays thereafter

(3) Apply workaround to downsample bitmaps from scaled layers (to be 
implemented)

(4) Disable dark mode (to be implemented)

(5) Provide new environment variables:

VCL_MACOS_FORCE_WINDOW_SCALING:
window scaling on non retina displays

VCL_MACOS_FORCE_DARK_MODE:
enable dark mode (macOS 10.14, iOS 13 and newer)

VCL_MACOS_USE_SYSTEM_APPEARANCE:
use light mode or dark mode (macOS 10.14, iOS 13 and newer) as configured 
by system preferences

Change-Id: I99877cd62a98cb91bcbf27af62b043c31c5f5fc9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109072
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/desktop/Executable_soffice_bin.mk 
b/desktop/Executable_soffice_bin.mk
index 5c895ed0e7cb..9c08a28361df 100644
--- a/desktop/Executable_soffice_bin.mk
+++ b/desktop/Executable_soffice_bin.mk
@@ -23,18 +23,6 @@ $(eval $(call gb_Executable_add_cobjects,soffice_bin,\
 desktop/source/app/main \
 ))
 
-ifeq ($(OS),MACOSX)
-# At least when building against SDK 10.15, changing the LC_VERSION_MIN_MACOSX 
load command's sdk
-# value from 10.15 to "n/a" (i.e., 0.0.0) is necessary to avoid blurry text in 
the LO UI (see
-# 

-# "[driver][darwin] Pass -platform_version flag to the linker instead of the
-# -_version_min flag", 
clang/test/Driver/darwin-ld-platform-version-macos.c in particular,
-# for the -platform_version that Clang passes by default to new-enough ld):
-$(eval $(call gb_Executable_add_ldflags,soffice_bin, \
--Xlinker -platform_version -Xlinker macos -Xlinker 
$(MACOSX_DEPLOYMENT_TARGET) -Xlinker 0.0.0 \
-))
-endif
-
 ifeq ($(OS),WNT)
 
 $(eval $(call gb_Executable_set_targettype_gui,soffice_bin,NO))
diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h
index 6d7db6a6dd60..eb3e7563c898 100644
--- a/vcl/inc/quartz/salgdi.h
+++ b/vcl/inc/quartz/salgdi.h
@@ -174,6 +174,7 @@ class AquaSalGraphics : public SalGraphics
 #ifdef MACOSX
 /// is this a window graphics
 boolmbWindow;
+boolmbWindowScaling;
 
 #else // IOS
 
@@ -189,10 +190,10 @@ public:
 boolIsPenVisible() const{ return 
maLineColor.IsVisible(); }
 boolIsBrushVisible() const  { return 
maFillColor.IsVisible(); }
 
+float   GetWindowScaling();
 voidSetWindowGraphics( AquaSalFrame* pFrame );
-voidSetPrinterGraphics(
-CGContextRef, sal_Int32 nRealDPIX, sal_Int32 nRealDPIY );
-voidSetVirDevGraphics(CGLayerHolder const & rLayer, 
CGContextRef, int nBitDepth = 0);
+voidSetPrinterGraphics(CGContextRef, sal_Int32 
nRealDPIX, sal_Int32 nRealDPIY);
+voidSetVirDevGraphics(CGLayerHolder const , 
CGContextRef, int nBitDepth = 0);
 #ifdef MACOSX
 voidinitResolution( NSWindow* );
 voidcopyResolution( AquaSalGraphics& );
@@ -299,9 +300,14 @@ public:
 virtual booldrawAlphaRect( tools::Long nX, tools::Long nY, 
tools::Long nWidth,
tools::Long nHeight, sal_uInt8 
nTransparency ) override;
 
+protected:
+virtual voidcopyScaledArea( tools::Long nDestX, tools::Long 
nDestY, tools::Long nSrcX, tools::Long nSrcY,
+tools::Long nSrcWidth, 
tools::Long nSrcHeight, SalGraphics* pSrcGraphics );
+
 // native widget rendering methods that require mirroring
+
 #ifdef MACOSX
-protected:
+
 virtual boolisNativeControlSupported( ControlType nType, 
ControlPart nPart ) override;
 
 virtual boolhitTestNativeControl( ControlType nType, 
ControlPart nPart, const tools::Rectangle& rControlRegion,
@@ -313,9 +319,9 @@ protected:
 const ImplControlValue& 
aValue, const 

[Libreoffice-commits] core.git: desktop/Executable_soffice_bin.mk

2020-02-14 Thread Stephan Bergmann (via logerrit)
 desktop/Executable_soffice_bin.mk |4 
 1 file changed, 4 deletions(-)

New commits:
commit f67e5ef9a5c71f3b35b1c67eb72794e44cc15410
Author: Stephan Bergmann 
AuthorDate: Fri Feb 14 11:22:22 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Feb 14 14:04:04 2020 +0100

Drop broken filter-out of -bind_at_load for Executable_soffice_bin on macOS

We generally use -bind_at_load ("Sets a bit in the mach header of the 
resulting
binary which tells dyld to bind all symbols when the binary is loaded, 
rather
than lazily." according to Xcode 11.3.1 ld(1) man page) since
4c9c1957cfc7c9de3def35dab4dcd07e76992ddd "INTEGRATION: CWS geordi2q01: 
#i18350#:
join changes from CWS ooo11rc3" (lacking any explanation; later carried over
into solenv/gbuild/platform/macosx.mk).

And we filtered out -bind_at_load for Executable_soffice_bin (and others, 
back
then, which have become irrelevant by now) with
13be934b43266d3df966ce40c00316401cea7a90 "INTEGRATION: CWS geordi2q14: 
#111934#:
merge CWS ooo111fix2" (again, lacking any explanation).

However, the latter was effectively broken when
6df9c479f58ea94141a3a43eb7fd6fb4d1fd5c8b "gbuildize desktop" rewrote it in
desktop/Executable_soffice.bin.mk as

  $(eval $(call gb_Executable_set_ldflags,\
  $(filter-out -bind_at_load,$$(LDFLAGS)) \
  ))

lacking an "soffice_bin," at the end of the first line.

Given that the soffice executable is apparently built with -bind_at_load 
ever
since 2011, without causing any issues, lets assume that filtering it out 
is no
longer necessary (if it ever was), and drop that.

(Maybe it was once necessary for some reason when the file system layout of 
OOo/
LO executables and dynamic libraries was different.  But today, the soffice
executable finds its dependent libraries, sal and sofficeapp, via
@executable_path just fine.)

Change-Id: Ifa379237cce4fa6d5ea0e2c1f1d84263f9007c50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88680
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/desktop/Executable_soffice_bin.mk 
b/desktop/Executable_soffice_bin.mk
index 2a146dfd44d8..f9be897ffa1f 100644
--- a/desktop/Executable_soffice_bin.mk
+++ b/desktop/Executable_soffice_bin.mk
@@ -25,10 +25,6 @@ $(eval $(call gb_Executable_add_cobjects,soffice_bin,\
 
 ifeq ($(OS),MACOSX)
 
-$(eval $(call gb_Executable_set_ldflags,\
-$(filter-out -bind_at_load,$$(LDFLAGS)) \
-))
-
 # At least when building against SDK 10.15, changing the LC_VERSION_MIN_MACOSX 
load command's sdk
 # value from 10.15 to "n/a" (i.e., 0.0) is necessary to avoid blurry text in 
the LO UI:
 $(eval $(call gb_Executable_add_ldflags,soffice_bin, \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/Executable_soffice_bin.mk

2020-02-13 Thread Stephan Bergmann (via logerrit)
 desktop/Executable_soffice_bin.mk |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 645fe53be0dc36535dba0ed684e21ca4cda80d70
Author: Stephan Bergmann 
AuthorDate: Fri Feb 14 01:37:10 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Feb 14 08:13:00 2020 +0100

tdf#122218: Hack to avoid blurry text with macOS SDK 10.15

...by setting the LC_VERSION_MIN_MACOSX load command's sdk value to n/a in 
the
soffice executable.

See  for 
how
this helps, even though I have no idea why it helps.

(Adding that -platform_version linker option appears to generate warnings 
like

> ld: warning: passed two min versions (10.13.0, 10.13) for platform macOS. 
Using 10.13.

but which are probably harmless.)

Change-Id: I043498c7ff2d148d4a7e1e0e9d46241b638f2eba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88667
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/desktop/Executable_soffice_bin.mk 
b/desktop/Executable_soffice_bin.mk
index cabd31af29f2..2a146dfd44d8 100644
--- a/desktop/Executable_soffice_bin.mk
+++ b/desktop/Executable_soffice_bin.mk
@@ -29,6 +29,13 @@ $(eval $(call gb_Executable_set_ldflags,\
 $(filter-out -bind_at_load,$$(LDFLAGS)) \
 ))
 
+# At least when building against SDK 10.15, changing the LC_VERSION_MIN_MACOSX 
load command's sdk
+# value from 10.15 to "n/a" (i.e., 0.0) is necessary to avoid blurry text in 
the LO UI:
+$(eval $(call gb_Executable_add_ldflags,soffice_bin, \
+-Xlinker -platform_version -Xlinker macos -Xlinker 
$(MAC_OS_X_VERSION_MIN_REQUIRED_DOTS) \
+-Xlinker 0.0 \
+))
+
 endif
 
 ifeq ($(OS),WNT)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/Executable_soffice_bin.mk desktop/Executable_soffice_com.mk desktop/Executable_soffice_exe.mk desktop/Executable_soffice.mk desktop/Executable_unopkg.mk desktop

2018-11-20 Thread Libreoffice Gerrit user
 Repository.mk  |3 
 RepositoryFixes.mk |3 
 desktop/Executable_soffice.mk  |   31 --
 desktop/Executable_soffice_bin.mk  |4 
 desktop/Executable_soffice_com.mk  |   29 ++
 desktop/Executable_soffice_exe.mk  |   29 ++
 desktop/Executable_unopkg.mk   |4 
 desktop/Module_desktop.mk  |3 
 desktop/source/app/cmdlinehelp.cxx |   79 +--
 desktop/win32/source/loader.cxx|  193 ++
 desktop/win32/source/loader.hxx|4 
 desktop/win32/source/officeloader/officeloader.cxx |  221 -
 desktop/win32/source/officeloader/soffice_com.cxx  |   19 +
 desktop/win32/source/officeloader/soffice_exe.cxx  |   19 +
 scp2/source/ooo/folderitem_ooo.scp |   12 -
 15 files changed, 326 insertions(+), 327 deletions(-)

New commits:
commit 506173a7f42f34821238a63f3f8c7362c9fae9d9
Author: Mike Kaganski 
AuthorDate: Mon Nov 19 13:07:20 2018 +0300
Commit: Mike Kaganski 
CommitDate: Wed Nov 21 08:19:38 2018 +0100

tdf#112536 related: make soffice.bin a proper console application on Win

Being a GUI application on Windows (with related flag in the executable 
header
- see https://blogs.msdn.microsoft.com/oldnewthing/20090101-00/?p=19643/), 
OS
would detect the subsystem before launching the application, and won't 
attach
the parent console or redirected output handles from it to the application.
Also, different hacks to reattach the GUI application to the console later 
are
unreliable on different Windows versions, and work improperly (the output 
goes
to the console after the launch command has already returned, which is wrong
in batch files). This makes it extremily difficult to do CLI operations with
LibreOffice on Windows, with error codes/warnings/messages/output missing or
going to wrong consoles.

Making an executable for CUI subsystem, on the other hand, makes Windows to
allocate a console before starting it when the program is run by itself. 
This
makes the console window to appear on screen unconditionally, even if it's
hidden later when the program has started. This flashing is undesirable.

But we use a wrapper executable on Windows, called soffice.exe, which is 
what
actually launched by user, and which runs soffice.bin. This allows us to 
make
soffice.bin the proper console application, and thus make it capable to 
behave
properly in CLI scenarios, while avoid the console flashing when run from 
the
soffice.exe (which would suppress the console creation using 
DETACHED_PROCESS
creation flag to CreateProcessW).

Also creating a new wrapper for console (soffice.com) allows to use command
lines which omit explicit executable extension (no ".bin"), like this:

"C:\Program Files\LibreOffice\program\soffice" --help

which allows to continue using multiple available help resources unchanged,
since .com extension is tried prior to .exe by Windows' cmd.exe.

Change-Id: I089d0f30f860da6cfc781b4383f6598a08a4d238
Reviewed-on: https://gerrit.libreoffice.org/63572
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/Repository.mk b/Repository.mk
index 36b35b7a4262..d23d93aaa9f5 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -145,7 +145,8 @@ $(eval $(call 
gb_Helper_register_executables_for_install,OOO,brand, \
soffice_bin \
$(if $(filter DESKTOP,$(BUILD_TYPE)),unopkg_bin) \
$(if $(filter WNT,$(OS)), \
-   soffice \
+   soffice_exe \
+   soffice_com \
unoinfo \
unopkg \
unopkg_com \
diff --git a/RepositoryFixes.mk b/RepositoryFixes.mk
index 82c0701e59dd..55c69ef11dba 100644
--- a/RepositoryFixes.mk
+++ b/RepositoryFixes.mk
@@ -37,6 +37,9 @@ else
 gb_Executable_FILENAMES := $(patsubst 
soffice_bin:soffice_bin%,soffice_bin:soffice.bin,$(gb_Executable_FILENAMES))
 endif
 
+gb_Executable_FILENAMES := $(patsubst 
soffice_exe:soffice_exe%,soffice_exe:soffice.exe,$(gb_Executable_FILENAMES))
+gb_Executable_FILENAMES := $(patsubst 
soffice_com:soffice_com%,soffice_com:soffice.com,$(gb_Executable_FILENAMES))
+
 gb_Executable_FILENAMES_FOR_BUILD := $(subst 
$(gb_Executable_EXT),$(gb_Executable_EXT_for_build),$(gb_Executable_FILENAMES))
 
 # fixes for .jnilibs on Mac OS X that are not also needed as .dylibs:
diff --git a/desktop/Executable_soffice.mk b/desktop/Executable_soffice.mk
deleted file mode 100644
index d1847d7bf76a..
--- a/desktop/Executable_soffice.mk
+++ /dev/null
@@ -1,31 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of