3 /* =====================================================
5 * =====================================================*/
7 #define DOSTRING( x ) #x
8 #define STRING( x ) DOSTRING( x )
9 #define DOCONCAT2( x, y ) x##y
10 #define CONCAT2( x, y) DOCONCAT2(x,y)
11 #define DOCONCAT3( x, y, z ) x##y##z
12 #define CONCAT3( x, y, z ) DOCONCAT3(x,y,z)
13 #define DOCONCAT4( x, y, z, a ) x##y##z##a
14 #define CONCAT4( x, y, z, a ) DOCONCAT4(x,y,z,a)
15 #define DOCONCAT5( x, y, z, a, b ) x##y##z##a##b
16 #define CONCAT5( x, y, z, a, b ) DOCONCAT5(x,y,z,a,b)
17 #define DOCONCAT6( x, y, z, a, b, c ) x##y##z##a##b##c
18 #define CONCAT6( x, y, z, a, b, c ) DOCONCAT6(x,y,z,a,b,c)
19 #define DOCONCAT7( x, y, z, a, b, c, u) x##y##z##a##b##c##u
20 #define CONCAT7( x, y, z, a, b, c, u) DOCONCAT7(x,y,z,a,b,c,u)
21 #define DOCONCAT8( x, y, z, a, b, c, u, v) x##y##z##a##b##c##u##v
22 #define CONCAT8( x, y, z, a, b, c, u, v) DOCONCAT8(x,y,z,a,b,c,u,v)
23 #define DOCONCAT9( x, y, z, a, b, c, u, v, w) x##y##z##a##b##c##u##v##w
24 #define CONCAT9( x, y, z, a, b, c, u, v, w) DOCONCAT9(x,y,z,a,b,c,u,v,w)
26 #define MOD_NAME_DESC(id) \
27 ALL_LANG(Name,STR_NAME_##id); \
28 ALL_LANG(Description,STR_DESC_##id)
30 #define MOD_NAME_DESC_ON_DESELECT(id) \
32 ALL_LANG(OnDeselect,STR_DESELECT_##id)
34 #define REG_VALUE_LNG(id) \
35 ALL_LANG(Value,STR_REG_VAL_##id);
37 #define FOLDERITEM_NAME_LNG(id) \
38 ALL_LANG(Name,STR_FI_NAME_##id);
40 #define ALL_LANG_STR_KEY(ident) \
43 #define ALL_LANG_STR_KEY_LNG(ident) \
44 ALL_LANG(Key,STR_KEY_##ident)
46 #define ALL_LANG_STR_VALUE_LNG(ident) \
47 ALL_LANG(Value,STR_VALUE_##ident)
49 #define ALL_LANG_VALUE(vident) \
50 ALL_LANG(Value,vident)
52 #define ALL_LANG_KEY(vident) \
58 #define UNXSUFFIX .dylib
65 #define LIBNAME(name) STRING(CONCAT4(lib,name,DLLPOSTFIX,UNXSUFFIX))
66 #define FILTER_LIBNAME(name) LIBNAME(name)
67 #define EXENAME(name) STRING(name)
68 #define PROFILENAME(name) STRING(CONCAT2(name,rc))
69 #define SPECIAL_NAME(name) STRING(CONCAT3(lib,name,UNXSUFFIX))
70 #define SPECIAL_COMPONENT_LIB_NAME(name) STRING(CONCAT2(name,UNXSUFFIX))
72 #define LIBNAME(name) STRING(CONCAT3(name,DLLPOSTFIX,.dll))
73 #define FILTER_LIBNAME(name) LIBNAME(name)
74 #define EXENAME(name) STRING(CONCAT2(name,.exe))
75 #define PROFILENAME(name) STRING(CONCAT2(name,.ini))
76 #define SPECIAL_NAME(name) STRING(CONCAT2(name,.dll))
77 #define SPECIAL_COMPONENT_LIB_NAME(name) STRING(CONCAT2(name,.dll))
80 #define RESFILENAME(name,lang) STRING(CONCAT3(name,lang,.res))
81 #define SHORTRESFILENAME(name,lang) STRING(CONCAT3(name,lang,.res))
82 #define READMETXTFILENAME(name,lang,ext) STRING(CONCAT4(name,lang,.,ext))
83 #define READMEFILENAME(name,lang) STRING(CONCAT2(name,lang))
84 #define HELPFILENAME(name,endung) STRING(CONCAT3(name,.,endung))
85 #define EXTRAFILENAME(name,lang) STRING(CONCAT3(name,lang,.zip))
86 #define CONFIGLANGFILENAME(name,lang,ext) STRING(CONCAT4(name,lang,.,ext))
89 #define SCP2_OOO_BIN_DIR gid_Brand_Dir_Program
91 #define SCP2_OOO_BIN_DIR gid_Dir_Program
94 #define BIN_FILE_BODY \
97 #define TXT_FILE_BODY \
100 #define USER_FILE_BODY \
103 #define PACKED_TXT_FILE_BODY \
107 #define PACKED_TXT_FILE_BODY_PATCH \
109 Styles = (PACKED,PATCH)
111 #define ARCHIVE_TXT_FILE_BODY \
115 #define ARCHIVE_TXT_FILE_BODY_PATCH \
117 Styles = (ARCHIVE,PATCH)
119 #define ARCHIVE_SUBST_FILE_BODY \
121 Styles = (ARCHIVE,SUBSTITUTE)
123 #define ARCHIVE_SUBST_FILE_BODY_PATCH \
125 Styles = (ARCHIVE,SUBSTITUTE,PATCH)
127 #define PACKED_LIB_FILE_BODY \
130 Dir = SCP2_OOO_BIN_DIR
132 #define PACKED_LIB_FILE_BODY_PATCH \
134 Styles = (PACKED,PATCH); \
135 Dir = SCP2_OOO_BIN_DIR
137 #define PACKED_FILTER_FILE_BODY \
142 #define PACKED_FILTER_FILE_BODY_PATCH \
144 Styles = (PACKED,PATCH); \
147 #define STD_LIB_FILE(id,name) \
149 Name = LIBNAME(name); \
150 PACKED_LIB_FILE_BODY; \
153 #define STD_LIB_FILE_PATCH(id,name) \
155 Name = LIBNAME(name); \
156 PACKED_LIB_FILE_BODY_PATCH; \
159 #define STD_RES_FILE(id,name) \
162 RESFILE_ALL_LANG(name); \
163 Dir = gid_Dir_Resource; \
167 #define BRAND_RES_FILE(id,name) \
170 RESFILE_ALL_LANG(name); \
171 Dir = gid_Brand_Dir_Resource; \
175 #define STD_RES_FILE_PATCH(id,name) \
178 RESFILE_ALL_LANG(name); \
179 Dir = gid_Dir_Resource; \
180 Styles = (PACKED,PATCH); \
183 #define STD_RES_FILE_ONLY_PATCH(id,name) \
186 RESFILE_ALL_LANG(name); \
187 Dir = gid_Dir_Resource; \
188 Styles = (PACKED,PATCH,PATCH_ONLY); \
191 #define STD_FILTER_FILE(id,name) \
193 PACKED_LIB_FILE_BODY; \
194 Name = FILTER_LIBNAME(name); \
197 #define STD_FILTER_FILE_PATCH(id,name) \
199 PACKED_LIB_FILE_BODY_PATCH; \
200 Name = FILTER_LIBNAME(name); \
203 #define STD_FONTUNX_FILE(id,name,fontname) \
206 Dir = gid_Dir_Fonts_Truetype; \
207 Styles = (PACKED, FONT_WARN_IF_EXISTS); \
208 Name = STRING(name) ; \
211 #define STD_FONTWIN_FILE(id,name,fontname) \
214 Dir = PREDEFINED_OSSYSTEMFONTDIR; \
215 Styles = (PACKED,FONT,DONT_DELETE,FONT_WARN_IF_EXISTS); \
216 Name = STRING(name) ; \
217 FontName = STRING(fontname) ; \
218 NetDir = gid_Dir_Winfonts; \
222 #define STD_FONT_FILE(id,name,fontname) \
225 Dir = gid_Dir_Fonts_Truetype; \
226 Styles = (PACKED, FONT_WARN_IF_EXISTS); \
227 Name = STRING(name) ; \
232 #define STD_FONT_FILE_DUO(id,name,unxfontname,winfontname) \
235 Dir = gid_Dir_Fonts_Truetype; \
236 Styles = (PACKED, FONT_WARN_IF_EXISTS); \
237 Name = STRING(name) ; \
242 #define STD_FONT_FILE(id,name,fontname) \
245 Dir = PREDEFINED_OSSYSTEMFONTDIR; \
246 Styles = (PACKED,FONT,DONT_DELETE,FONT_WARN_IF_EXISTS); \
247 Name = STRING(name) ; \
248 FontName = STRING(fontname) ; \
249 NetDir = gid_Dir_Winfonts; \
254 #define STD_FONT_FILE_DUO(id,name,unxfontname,winfontname) \
257 Dir = PREDEFINED_OSSYSTEMFONTDIR; \
258 Styles = (PACKED,FONT,DONT_DELETE,FONT_WARN_IF_EXISTS); \
259 Name = STRING(name) ; \
260 FontName = STRING(winfontname) ; \
261 NetDir = gid_Dir_Winfonts; \
265 #define STD_JAR_FILE(id,name) \
268 Name = STRING(CONCAT2(name,.jar)); \
269 Dir = gid_Dir_Classes; \
270 Styles = (PACKED,DONT_OVERWRITE); \
273 #define STD_JAR_FILE_PATCH(id,name) \
276 Name = STRING(CONCAT2(name,.jar)); \
277 Dir = gid_Dir_Classes; \
278 Styles = (PACKED,DONT_OVERWRITE,PATCH); \
281 #define UNO_JAR_FILE(id,name) \
284 Name = STRING(CONCAT2(name,.jar)); \
285 RegistryID = gid_Starregistry_Services_Rdb; \
286 Dir = gid_Dir_Classes; \
287 Styles = (PACKED,DONT_OVERWRITE, UNO_COMPONENT); \
290 #define UNO_JAR_FILE_PATCH(id,name) \
293 Name = STRING(CONCAT2(name,.jar)); \
294 RegistryID = gid_Starregistry_Services_Rdb; \
295 Dir = gid_Dir_Classes; \
296 Styles = (PACKED,DONT_OVERWRITE,UNO_COMPONENT,PATCH); \
299 #define JARFILENAME(name) STRING(CONCAT2(name,.jar))
301 #define PACKED_SHELLNEW_FILE_BODY \
303 Styles = (PACKED,WORKSTATION, OVERWRITE); \
304 Dir = PREDEFINED_OSSHELLNEWDIR; \
305 NetDir = gid_Dir_Shellnew
307 #define STD_SHELLNEW_FILE(id,name) \
309 PACKED_SHELLNEW_FILE_BODY; \
310 Name = STRING(name) ; \
313 #define PACKED_UNO_LIB_FILE_BODY \
315 Styles = (PACKED,UNO_COMPONENT); \
316 Dir = SCP2_OOO_BIN_DIR; \
317 RegistryID = gid_Starregistry_Services_Rdb
319 #define PACKED_UNO_LIB_FILE_BODY_PATCH \
321 Styles = (PACKED,UNO_COMPONENT,PATCH); \
322 Dir = SCP2_OOO_BIN_DIR; \
323 RegistryID = gid_Starregistry_Services_Rdb
325 #define STD_UNO_LIB_FILE(id,name) \
327 Name = LIBNAME(name); \
328 PACKED_UNO_LIB_FILE_BODY; \
331 #define STD_UNO_LIB_FILE_PATCH(id,name) \
333 Name = LIBNAME(name); \
334 PACKED_UNO_LIB_FILE_BODY_PATCH; \
337 #define SPECIAL_UNO_LIB_FILE(id,name) \
339 Name = SPECIAL_NAME(name); \
340 PACKED_UNO_LIB_FILE_BODY; \
343 #define SPECIAL_UNO_LIB_FILE_PATCH(id,name) \
345 Name = SPECIAL_NAME(name); \
346 PACKED_UNO_LIB_FILE_BODY_PATCH; \
349 #define SPECIAL_UNO_COMPONENT_LIB_FILE(id,name) \
351 Name = SPECIAL_COMPONENT_LIB_NAME(name); \
352 PACKED_UNO_LIB_FILE_BODY; \
355 #define SPECIAL_UNO_COMPONENT_LIB_FILE_PATCH(id,name) \
357 Name = SPECIAL_COMPONENT_LIB_NAME(name); \
358 PACKED_UNO_LIB_FILE_BODY_PATCH; \
361 #define WINW4WFILTERFILENAME(name) STRING(CONCAT2(name,f32w.dll))
363 #define STD_WIN_W4WFILTER_FILE(id,name) \
365 PACKED_FILTER_FILE_BODY; \
366 Name = WINW4WFILTERFILENAME(name); \
369 #define SOLSW4WFILTERFILENAME(name) STRING(CONCAT2(w4w, name))
371 #define STD_SOLS_W4WFILTER_FILE(id,name) \
375 Dir = gid_Dir_Filter; \
376 Name = SOLSW4WFILTERFILENAME(name); \
379 #define SPECIAL_NO_WARNING_IF_NOT_EXISTS_FILE(id,name) \
382 Name = LIBNAME(name); \
383 Dir = SCP2_OOO_BIN_DIR; \
384 Styles = (PACKED, NO_WARNING_IF_NOT_EXISTS); \
387 #define SPECIAL_UNO_NO_WARNING_IF_NOT_EXISTS_FILE(id,name) \
390 Name = LIBNAME(name); \
391 Dir = SCP2_OOO_BIN_DIR; \
392 Styles = (PACKED, NO_WARNING_IF_NOT_EXISTS, UNO_COMPONENT); \
393 RegistryID = gid_Starregistry_Services_Rdb; \
396 // ---------------------------------------
397 #define CONDITIONAL_MODULE_ENTRY(name,modid) \
398 Module gid_Module_Root_Reg_##name \
400 Name = STRING(CONCAT2(gid_Module_Root_,name)); \
401 Description = STRING(CONCAT2(gid_Module_Root_,name)); \
403 Styles = (HIDDEN_ROOT); \
406 #define REGISTRY_ENTRY_OPEN_WITH(name,cond,doc_type,modid,key) \
407 RegistryItem gid_Regitem_OpenOffice_##cond##_OpenWith_##doc_type \
408 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
410 Subkey = STRING(CONCAT3(.,key,\OpenWithProgIDs)); \
411 Name = STRING(CONCAT2(OpenOffice.org.,name)); \
415 #define CONDITIONAL_REGISTRY_ENTRY_EXT(name,cond,key) \
416 RegistryItem gid_Regitem__##name \
417 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
418 ModuleID = gid_Module_Root_Reg_##name; \
419 Subkey = STRING(CONCAT2(.,key)); \
420 Value = STRING(CONCAT2(OpenOffice.org.,name)); \
421 ComponentCondition = STRING(CONCAT3(REGISTER_,cond,=1)); \
424 #define REGISTRY_ENTRY_DOC(name,modid,disp_name) \
425 RegistryItem CONCAT2(gid_Regitem_Openoffice_,name) \
426 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
428 Subkey = STRING(CONCAT2(OpenOffice.org.,name)); \
429 REG_VALUE_LNG(disp_name) \
432 #define REGISTRY_ENTRY_ICON(name,modid,icon_id) \
433 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Defaulticon) \
434 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
436 Subkey = STRING(CONCAT3(OpenOffice.org.,name,\DefaultIcon)); \
437 Value = "<progpath>\program\soffice.exe," STRING(icon_id); \
440 #define REGISTRY_ENTRY_SHELL(name,default,modid) \
441 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell) \
442 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
444 Subkey = STRING(CONCAT3(OpenOffice.org.,name,\shell)); \
445 Value = STRING(default); \
448 #define REGISTRY_ENTRY_NEW_CMD(name,modid,app) \
449 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell_New) \
450 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
452 Subkey = STRING(CONCAT3(OpenOffice.org.,name,\shell\new)); \
455 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell_New_Command) \
456 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
458 Subkey = STRING(CONCAT3(OpenOffice.org.,name,\shell\new\command)); \
459 Value = "\"<progpath>\program\\" STRING(app) "\" -n \"%1\""; \
462 #define REGISTRY_ENTRY_OPEN_CMD(name,modid,app) \
463 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell_Open_Command) \
464 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
466 Subkey = STRING(CONCAT3(OpenOffice.org.,name,\shell\open\command)); \
467 Value = "\"<progpath>\program\\" STRING(app) "\" -o \"%1\""; \
470 #define REGISTRY_ENTRY_PRINT_CMD(name,modid,app) \
471 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell_Print_Command) \
472 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
474 Subkey = STRING(CONCAT3(OpenOffice.org.,name,\shell\print\command)); \
475 Value = "\"<progpath>\program\\" STRING(app) "\" -p \"%1\""; \
478 #define REGISTRY_ENTRY_PRINTTO_CMD(name,modid,app) \
479 RegistryItem CONCAT3(gid_Regitem_Openoffice_,name,_Shell_Printto_Command) \
480 ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
482 Subkey = STRING(CONCAT3(OpenOffice.org.,name,\shell\printto\command)); \
483 Value = "\"<progpath>\program\\" STRING(app) "\" -pt \"%2\" \"%1\""; \
486 #define REGISTRY_ENTRY_CAPABILITIES(name,modid,key,doc_type) \
487 RegistryItem CONCAT2(gid_Regitem_Software_Manufacturer_Productname_Productversion_Capabilities_FileAssociations_,name) \
488 ParentID = PREDEFINED_HKEY_LOCAL_MACHINE; \
490 Subkey = STRING(Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\Capabilities\FileAssociations); \
491 Name = STRING(CONCAT2(.,key)); \
492 Value = STRING(CONCAT3(opendocument.,doc_type,Document.1)); \
496 #define CONDITIONAL_REGISTER_DOC_EXTENSION(name,modid,key,cond,disp_name,icon_id,app,default,doc_type) \
497 CONDITIONAL_MODULE_ENTRY(name,modid) \
498 REGISTRY_ENTRY_OPEN_WITH(name,cond,doc_type,modid,key) \
499 CONDITIONAL_REGISTRY_ENTRY_EXT(name,cond,key) \
500 REGISTRY_ENTRY_DOC(name,modid,disp_name) \
501 REGISTRY_ENTRY_ICON(name,modid,icon_id) \
502 REGISTRY_ENTRY_SHELL(name,default,modid) \
503 REGISTRY_ENTRY_NEW_CMD(name,modid,app) \
504 REGISTRY_ENTRY_OPEN_CMD(name,modid,app) \
505 REGISTRY_ENTRY_PRINT_CMD(name,modid,app) \
506 REGISTRY_ENTRY_PRINTTO_CMD(name,modid,app) \
507 REGISTRY_ENTRY_CAPABILITIES(name,modid,key,doc_type) \
509 // ---------------------------------------
512 #define SCP2_URE_DL_DIR gid_Dir_Ure_Bin
513 #define SCP2_URE_DL_NORMAL(n) n ".dll"
514 #define SCP2_URE_DL_BARE(n) n ".dll"
515 #define SCP2_URE_DL_VER(n, v) n v ".dll"
516 #define SCP2_URE_DL_COMID_VER(n, v) n v STRING(COMID) ".dll"
517 #define SCP2_URE_DL_UNO_VER(n, v) n v ".dll"
518 #define SCP2_URE_DL_UNO_COMID_VER(n, v) n v STRING(COMID) ".dll"
519 #define SCP2_URE_SHARE_DIR gid_Dir_Common_Ure
520 #if defined _STLP_DEBUG
521 #define SCP2_STDLP_DEBUG "d"
523 #define SCP2_STDLP_DEBUG ""
526 #define SCP2_URE_DL_DIR gid_Dir_Ure_Lib
527 #define SCP2_URE_DL_NORMAL(n) "lib" n STRING(UNXSUFFIX)
528 #define SCP2_URE_DL_BARE(n) n STRING(UNXSUFFIX)
529 #define SCP2_URE_DL_VER(n, v) "lib" n STRING(UNXSUFFIX) "." v
530 #define SCP2_URE_DL_COMID_VER(n, v) \
531 "lib" n STRING(COMID) STRING(UNXSUFFIX) "." v
532 #define SCP2_URE_DL_UNO_VER(n, v) "libuno_" n STRING(UNXSUFFIX) "." v
533 #define SCP2_URE_DL_UNO_NORMAL(n) "libuno_" n STRING(UNXSUFFIX)
534 #define SCP2_URE_DL_UNO_COMID_VER(n, v) \
535 "libuno_" n STRING(COMID) STRING(UNXSUFFIX) "." v
536 #define SCP2_URE_DL_UNO_COMID_NORMAL(n) \
537 "libuno_" n STRING(COMID) STRING(UNXSUFFIX)
538 #define SCP2_URE_SHARE_DIR gid_Dir_Ure_Share
541 #define SCP2_URE_JDL_NORMAL(n) "lib" n ".jnilib"
543 #define SCP2_URE_JDL_NORMAL(n) SCP2_URE_DL_NORMAL(n)
546 #include <langmacros.inc>