summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskswales <stuart.swales.croftnuisk@gmail.com>2016-06-02 23:58:50 +0100
committerjan iversen <jani@documentfoundation.org>2016-06-23 09:56:15 +0000
commit8ab7db320ff158949d2eadaa6e654115201ddf61 (patch)
tree52ba200acf13ce1aed831497a581f5858ba12eec
parent8d8b9b80b114b94b20b0bf1438d80e925b49e3bf (diff)
tdf#97872 File association in Windows registry
Fix for double backslashes in paths to programs in shell/open etc. registry entries for all non-native file types such as .doc that are mapped by installer to use scalc.exe/swriter.exe etc. Change-Id: Ice8033d4fee079c0fb6d8f84e00ebd784e85d135 Reviewed-on: https://gerrit.libreoffice.org/25849 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
-rw-r--r--scp2/inc/macros.inc28
1 files changed, 20 insertions, 8 deletions
diff --git a/scp2/inc/macros.inc b/scp2/inc/macros.inc
index 7b895b61eb1f..30f6760164c5 100644
--- a/scp2/inc/macros.inc
+++ b/scp2/inc/macros.inc
@@ -298,7 +298,7 @@ End
Value = STRING(default); \
End
-#define REGISTRY_ENTRY_NEW_CMD(name,modid,app) \
+#define REGISTRY_ENTRY_NEW_CMD_PPA(name,modid,progpath_program_app) \
RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell_New) \
ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
ModuleID = modid; \
@@ -309,33 +309,45 @@ End
ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
ModuleID = modid; \
Subkey = STRING(CONCAT3(LibreOffice.,name,\shell\new\command)); \
- Value = "\"<progpath>\program\\" STRING(app) "\" -n \"%1\""; \
+ Value = "\"" STRING(progpath_program_app) "\" -n \"%1\""; \
End
-#define REGISTRY_ENTRY_OPEN_CMD(name,modid,app) \
+#define REGISTRY_ENTRY_NEW_CMD(name,modid,app) \
+ REGISTRY_ENTRY_NEW_CMD_PPA(name,modid,<progpath>\program\app)
+
+#define REGISTRY_ENTRY_OPEN_CMD_PPA(name,modid,progpath_program_app) \
RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell_Open_Command) \
ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
ModuleID = modid; \
Subkey = STRING(CONCAT3(LibreOffice.,name,\shell\open\command)); \
- Value = "\"<progpath>\program\\" STRING(app) "\" -o \"%1\""; \
+ Value = "\"" STRING(progpath_program_app) "\" -o \"%1\""; \
End
-#define REGISTRY_ENTRY_PRINT_CMD(name,modid,app) \
+#define REGISTRY_ENTRY_OPEN_CMD(name,modid,app) \
+ REGISTRY_ENTRY_OPEN_CMD_PPA(name,modid,<progpath>\program\app)
+
+#define REGISTRY_ENTRY_PRINT_CMD_PPA(name,modid,progpath_program_app) \
RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell_Print_Command) \
ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
ModuleID = modid; \
Subkey = STRING(CONCAT3(LibreOffice.,name,\shell\print\command)); \
- Value = "\"<progpath>\program\\" STRING(app) "\" -p \"%1\""; \
+ Value = "\"" STRING(progpath_program_app) "\" -p \"%1\""; \
End
-#define REGISTRY_ENTRY_PRINTTO_CMD(name,modid,app) \
+#define REGISTRY_ENTRY_PRINT_CMD(name,modid,app) \
+ REGISTRY_ENTRY_PRINT_CMD_PPA(name,modid,<progpath>\program\app)
+
+#define REGISTRY_ENTRY_PRINTTO_CMD_PPA(name,modid,progpath_program_app) \
RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell_Printto_Command) \
ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
ModuleID = modid; \
Subkey = STRING(CONCAT3(LibreOffice.,name,\shell\printto\command)); \
- Value = "\"<progpath>\program\\" STRING(app) "\" -pt \"%2\" \"%1\""; \
+ Value = "\"" STRING(progpath_program_app) "\" -pt \"%2\" \"%1\""; \
End
+#define REGISTRY_ENTRY_PRINTTO_CMD(name,modid,app) \
+ REGISTRY_ENTRY_PRINTTO_CMD_PPA(name,modid,<progpath>\program\app)
+
#define REGISTRY_ENTRY_CAPABILITIES(name,modid,key,doc_type) \
RegistryItem CONCAT2(gid_Regitem_Software_Manufacturer_Productname_Productversion_Capabilities_FileAssociations_,name) \
ParentID = PREDEFINED_HKEY_LOCAL_MACHINE; \