summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasily Melenchuk <vasily.melenchuk@cib.de>2020-07-08 17:47:41 +0300
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2020-07-13 11:12:24 +0200
commitf9b6f91b450963b84a072a71779ab0b0d6cd2d67 (patch)
treedc3221355c3404ea09009fe19eaaebff4ac337c5
parent5138cc34042b33f9c516c145e414b8b85c6a49ca (diff)
desktop: separate executable shortcut for safe-mode
In situations when no command line params are available (for example in Windows Store msix packages they are still missing) let's try to use another executable shortcut for soffice Change-Id: I6d083912dbed1166d2d68efa5eb0096b73cb58c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98382 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit d7ffeae2dd588a891d0aef5dd136f394a55200c0) Conflicts: Repository.mk desktop/Module_desktop.mk
-rw-r--r--Repository.mk1
-rw-r--r--desktop/Executable_soffice_safe.mk30
-rw-r--r--desktop/Module_desktop.mk1
-rw-r--r--desktop/win32/source/applauncher/soffice_safe.cxx14
4 files changed, 46 insertions, 0 deletions
diff --git a/Repository.mk b/Repository.mk
index c8170649f86a..5c17a4f00379 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -147,6 +147,7 @@ $(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \
$(if $(filter DESKTOP,$(BUILD_TYPE)),unopkg_bin) \
$(if $(filter WNT,$(OS)), \
soffice \
+ soffice_safe \
unoinfo \
unopkg \
unopkg_com \
diff --git a/desktop/Executable_soffice_safe.mk b/desktop/Executable_soffice_safe.mk
new file mode 100644
index 000000000000..aa1f6bc820b2
--- /dev/null
+++ b/desktop/Executable_soffice_safe.mk
@@ -0,0 +1,30 @@
+# -*- 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 the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Executable_Executable,soffice_safe))
+
+$(eval $(call gb_Executable_set_targettype_gui,soffice_safe,YES))
+
+$(eval $(call gb_Executable_add_ldflags,soffice_safe,\
+ /ENTRY:wWinMainCRTStartup \
+))
+
+$(eval $(call gb_Executable_use_static_libraries,soffice_safe,\
+ winlauncher \
+))
+
+$(eval $(call gb_Executable_add_exception_objects,soffice_safe,\
+ desktop/win32/source/applauncher/soffice_safe \
+))
+
+$(eval $(call gb_Executable_add_nativeres,soffice_safe,soffice/launcher))
+
+$(eval $(call gb_Executable_add_default_nativeres,soffice_safe,$(PRODUCTNAME)))
+
+# vim: set ts=4 sw=4 et:
diff --git a/desktop/Module_desktop.mk b/desktop/Module_desktop.mk
index 878febd603fb..71427963536d 100644
--- a/desktop/Module_desktop.mk
+++ b/desktop/Module_desktop.mk
@@ -79,6 +79,7 @@ $(eval $(call gb_Module_add_targets,desktop,\
Executable_simpress \
Executable_smath \
Executable_soffice \
+ Executable_soffice_safe \
Executable_sweb \
Executable_swriter \
Executable_unoinfo \
diff --git a/desktop/win32/source/applauncher/soffice_safe.cxx b/desktop/win32/source/applauncher/soffice_safe.cxx
new file mode 100644
index 000000000000..241a03b76496
--- /dev/null
+++ b/desktop/win32/source/applauncher/soffice_safe.cxx
@@ -0,0 +1,14 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "launcher.hxx"
+
+WCHAR APPLICATION_SWITCH[] = L"--safe-mode";
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */