]> git.lyx.org Git - lyx.git/blob - src/support/Package.cpp
Move debug.{cpp,h}, Messages.{cpp,h} and gettext.{cpp,h} to support/.
[lyx.git] / src / support / Package.cpp
1 // -*- C++ -*-
2 /**
3  * \file package.cpp
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Angus Leeming
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #include <config.h>
13
14 #include "support/Package.h"
15
16 #include "support/debug.h"
17 #include "support/environment.h"
18 #include "support/ExceptionMessage.h"
19 #include "support/filetools.h"
20 #include "support/gettext.h"
21 #include "support/lstrings.h"
22 #include "support/os.h"
23
24 #if defined (USE_WINDOWS_PACKAGING)
25 # include "support/os_win32.h"
26 #endif
27
28
29 #include <list>
30
31 #if !defined (USE_WINDOWS_PACKAGING) && \
32     !defined (USE_MACOSX_PACKAGING) && \
33     !defined (USE_POSIX_PACKAGING)
34 #error USE_FOO_PACKAGING must be defined for FOO = WINDOWS, MACOSX or POSIX.
35 #endif
36
37 #if defined (USE_MACOSX_PACKAGING)
38 # include <CoreServices/CoreServices.h> // FSFindFolder, FSRefMakePath
39 #endif
40
41 using std::string;
42
43 namespace lyx {
44 namespace support {
45
46 namespace {
47
48 Package package_;
49 bool initialised_ = false;
50
51 } // namespace anon
52
53
54 void init_package(string const & command_line_arg0,
55                   string const & command_line_system_support_dir,
56                   string const & command_line_user_support_dir,
57                   exe_build_dir_to_top_build_dir top_build_dir_location)
58 {
59         // Can do so only once.
60         if (initialised_)
61                 return;
62
63         package_ = Package(command_line_arg0,
64                            command_line_system_support_dir,
65                            command_line_user_support_dir,
66                            top_build_dir_location);
67         initialised_ = true;
68 }
69
70
71 Package const & package()
72 {
73         // Commented out because package().locale_dir() can be called
74         // from the message translation code in Messages.cpp before
75         // init_package() is called. Lars is on the case...
76         // BOOST_ASSERT(initialised_);
77         return package_;
78 }
79
80
81 namespace {
82
83 FileName const abs_path_from_binary_name(string const & exe);
84
85 void buildDirs(FileName const & abs_binary,
86         exe_build_dir_to_top_build_dir top_build_dir_location,
87         FileName &, FileName &);
88
89 FileName const get_document_dir(FileName const & home_dir);
90
91 FileName const get_home_dir();
92
93 FileName const get_locale_dir(FileName const & system_support_dir);
94
95 FileName const get_system_support_dir(FileName const & abs_binary,
96                                     string const & command_line_system_support_dir);
97
98 FileName const get_temp_dir();
99
100 FileName const get_default_user_support_dir(FileName const & home_dir);
101
102 bool userSupportDir(FileName const & default_user_support_dir,
103                      string const & command_line_user_support_dir, FileName & result);
104
105
106 string const & with_version_suffix();
107
108 } // namespace anon
109
110
111 Package::Package(string const & command_line_arg0,
112                  string const & command_line_system_support_dir,
113                  string const & command_line_user_support_dir,
114                  exe_build_dir_to_top_build_dir top_build_dir_location)
115         : explicit_user_support_dir_(false)
116 {
117         home_dir_ = get_home_dir();
118         system_temp_dir_ = get_temp_dir();
119         temp_dir_ = system_temp_dir_;
120         document_dir_ = get_document_dir(home_dir_);
121
122         FileName const abs_binary = abs_path_from_binary_name(command_line_arg0);
123         string const bdir = onlyPath(abs_binary.absFilename());
124         // We may be using libtools
125         if (suffixIs(bdir, ".libs/"))
126                 binary_dir_ = FileName(addPath(bdir, "../"));
127         else
128                 binary_dir_ = FileName(bdir);
129
130         // Is LyX being run in-place from the build tree?
131         buildDirs(abs_binary, top_build_dir_location,
132                 build_support_dir_, system_support_dir_);
133
134         if (build_support_dir_.empty())
135                 system_support_dir_ =
136                         get_system_support_dir(abs_binary,
137                                                command_line_system_support_dir);
138
139         locale_dir_ = get_locale_dir(system_support_dir_);
140
141         FileName const default_user_support_dir =
142                 get_default_user_support_dir(home_dir_);
143
144         explicit_user_support_dir_ = userSupportDir(default_user_support_dir,
145                                      command_line_user_support_dir, user_support_dir_);
146
147         FileName const configure_script(addName(system_support().absFilename(), "configure.py"));
148         configure_command_ = os::python() + ' ' +
149                         quoteName(configure_script.toFilesystemEncoding()) +
150                         with_version_suffix();
151
152         LYXERR(Debug::INIT, "<package>\n"
153                 << "\tbinary_dir " << binary_dir().absFilename() << '\n'
154                 << "\tsystem_support " << system_support().absFilename() << '\n'
155                 << "\tbuild_support " << build_support().absFilename() << '\n'
156                 << "\tuser_support " << user_support().absFilename() << '\n'
157                 << "\tlocale_dir " << locale_dir().absFilename() << '\n'
158                 << "\tdocument_dir " << document_dir().absFilename() << '\n'
159                 << "\ttemp_dir " << temp_dir().absFilename() << '\n'
160                 << "\thome_dir " << home_dir().absFilename() << '\n'
161                 << "</package>\n");
162 }
163
164
165 namespace {
166
167 // These next functions contain the stuff that is substituted at
168 // configuration-time.
169 FileName const hardcoded_localedir()
170 {
171         // FIXME UNICODE
172         // The build system needs to make sure that this is in utf8 encoding.
173         return FileName(LYX_ABS_INSTALLED_LOCALEDIR);
174 }
175
176
177 FileName const hardcoded_system_support_dir()
178 {
179         // FIXME UNICODE
180         // The build system needs to make sure that this is in utf8 encoding.
181         return FileName(LYX_ABS_INSTALLED_DATADIR);
182 }
183
184
185 string const & with_version_suffix()
186 {
187         static string const program_suffix = PROGRAM_SUFFIX;
188         static string const with_version_suffix =
189                 " --with-version-suffix=" PROGRAM_SUFFIX;
190         return program_suffix.empty() ? program_suffix : with_version_suffix;
191 }
192
193 } // namespace anon
194
195
196 FileName const & Package::top_srcdir()
197 {
198         // FIXME UNICODE
199         // The build system needs to make sure that this is in utf8 encoding.
200         static FileName const dir(LYX_ABS_TOP_SRCDIR);
201         return dir;
202 }
203
204
205 namespace {
206
207 bool check_command_line_dir(string const & dir,
208                             string const & file,
209                             string const & command_line_switch);
210
211 FileName const extract_env_var_dir(string const & env_var);
212
213 bool check_env_var_dir(FileName const & dir,
214                        string const & env_var);
215
216 bool check_env_var_dir(FileName const & dir,
217                        string const & file,
218                        string const & env_var);
219
220 string const relative_locale_dir();
221
222 string const relative_system_support_dir();
223
224
225 /**
226  * Convert \p name to internal path and strip a trailing slash, since it
227  * comes from user input (commandline or environment).
228  * \p name is encoded in utf8.
229  */
230 string const fix_dir_name(string const & name)
231 {
232         return rtrim(os::internal_path(name), "/");
233 }
234
235
236 FileName buildSupportDir(string const & binary_dir,
237                       exe_build_dir_to_top_build_dir top_build_dir_location)
238 {
239         string indirection;
240         switch (top_build_dir_location) {
241         case top_build_dir_is_one_level_up:
242                 indirection = "../lib";
243                 break;
244         case top_build_dir_is_two_levels_up:
245                 indirection = "../../lib";
246                 break;
247         }
248         return FileName(addPath(binary_dir, indirection));
249 }
250
251
252 void buildDirs(FileName const & abs_binary,
253   exe_build_dir_to_top_build_dir top_build_dir_location,
254         FileName & build_support_dir, FileName & system_support_dir)
255 {
256         string const check_text = "Checking whether LyX is run in place...";
257
258         // We're looking for "Makefile" in a directory
259         //   binary_dir/../lib
260         // We're also looking for "chkconfig.ltx" in a directory
261         //   top_srcdir()/lib
262         // If both are found, then we're running LyX in-place.
263
264         // Note that the name of the lyx binary may be a symbolic link.
265         // If that is the case, then we follow the links too.
266         FileName binary = abs_binary;
267         while (true) {
268                 // Try and find "lyxrc.defaults".
269                 string binary_dir = onlyPath(binary.absFilename());
270                 // We may be using libtools with static linking.
271                 if (suffixIs(binary_dir, ".libs/"))
272                         binary_dir = addPath(binary_dir, "../");
273                 build_support_dir = buildSupportDir(binary_dir, top_build_dir_location);
274                 if (!fileSearch(build_support_dir.absFilename(), "Makefile").empty()) {
275                         // Try and find "chkconfig.ltx".
276                         system_support_dir =
277                                 FileName(addPath(Package::top_srcdir().absFilename(), "lib"));
278
279                         if (!fileSearch(system_support_dir.absFilename(), "chkconfig.ltx").empty()) {
280                                 LYXERR(Debug::INIT, check_text << " yes");
281                                 return;
282                         }
283                 }
284
285                 // Check whether binary is a symbolic link.
286                 // If so, resolve it and repeat the exercise.
287                 if (!binary.isSymLink())
288                         break;
289
290                 FileName link;
291                 if (readLink(binary, link)) {
292                         binary = link;
293                 } else {
294                         // Unable to resolve the link.
295                         break;
296                 }
297         }
298
299         LYXERR(Debug::INIT, check_text << " no");
300         system_support_dir = FileName();
301         build_support_dir = FileName();
302 }
303
304
305 // Specification of document_dir_ may be reset by LyXRC,
306 // but the default is fixed for a given OS.
307 FileName const get_document_dir(FileName const & home_dir)
308 {
309 #if defined (USE_WINDOWS_PACKAGING)
310         (void)home_dir; // Silence warning about unused variable.
311         os::GetFolderPath win32_folder_path;
312         return FileName(win32_folder_path(os::GetFolderPath::PERSONAL));
313 #else // Posix-like.
314         return home_dir;
315 #endif
316 }
317
318
319 // The specification of home_dir_ is fixed for a given OS.
320 // A typical example on Windows: "C:/Documents and Settings/USERNAME"
321 // and on a Posix-like machine: "/home/USERNAME".
322 FileName const get_home_dir()
323 {
324 #if defined (USE_WINDOWS_PACKAGING)
325         string const home_dir = getEnv("USERPROFILE");
326 #else // Posix-like.
327         string const home_dir = getEnv("HOME");
328 #endif
329
330         return FileName(fix_dir_name(home_dir));
331 }
332
333
334 // Several sources are probed to ascertain the locale directory.
335 // The only requirement is that the result is indeed a directory.
336 FileName const get_locale_dir(FileName const & system_support_dir)
337 {
338         // 1. Use the "LYX_LOCALEDIR" environment variable.
339         FileName const path_env = extract_env_var_dir("LYX_LOCALEDIR");
340         if (!path_env.empty() && check_env_var_dir(path_env, "LYX_LOCALEDIR"))
341                 return path_env;
342
343         // 2. Search for system_support_dir / <relative locale dir>
344         // The <relative locale dir> is OS-dependent. (On Unix, it will
345         // be "../locale/".)
346         FileName path(addPath(system_support_dir.absFilename(),
347                 relative_locale_dir()));
348
349         if (path.exists() && path.isDirectory())
350                 return path;
351
352         // 3. Fall back to the hard-coded LOCALEDIR.
353         path = hardcoded_localedir();
354         if (path.exists() && path.isDirectory())
355                 return path;
356
357         return FileName();
358 }
359
360
361 // Specification of temp_dir_ may be reset by LyXRC,
362 // but the default is fixed for a given OS.
363 FileName const get_temp_dir()
364 {
365 #if defined (USE_WINDOWS_PACKAGING)
366         // Typical example: C:/TEMP/.
367         char path[MAX_PATH];
368         GetTempPath(MAX_PATH, path);
369         return FileName(to_utf8(from_local8bit(path)));
370 #else // Posix-like.
371         return FileName("/tmp");
372 #endif
373 }
374
375
376 // Extracts the absolute path from the foo of "-sysdir foo" or "-userdir foo"
377 FileName const abs_path_from_command_line(string const & command_line)
378 {
379         if (command_line.empty())
380                 return FileName();
381
382         string const path = fix_dir_name(command_line);
383         return os::is_absolute_path(path) ? FileName(path) : makeAbsPath(path);
384 }
385
386
387 // Does the grunt work for abs_path_from_binary_name()
388 FileName const get_binary_path(string const & exe)
389 {
390 #if defined (USE_WINDOWS_PACKAGING)
391         // The executable may have been invoked either with or
392         // without the .exe extension.
393         // Ensure that it is present.
394         string const as_internal_path = os::internal_path(exe);
395         string const exe_path = suffixIs(as_internal_path, ".exe") ?
396                 as_internal_path : as_internal_path + ".exe";
397 #else
398         string const exe_path = os::internal_path(exe);
399 #endif
400         if (os::is_absolute_path(exe_path))
401                 return FileName(exe_path);
402
403         // Two possibilities present themselves.
404         // 1. The binary is relative to the CWD.
405         FileName const abs_exe_path = makeAbsPath(exe_path);
406         if (abs_exe_path.exists())
407                 return abs_exe_path;
408
409         // 2. exe must be the name of the binary only and it
410         // can be found on the PATH.
411         string const exe_name = onlyFilename(exe_path);
412         if (exe_name != exe_path)
413                 return FileName();
414
415         std::vector<string> const path = getEnvPath("PATH");
416         std::vector<string>::const_iterator it = path.begin();
417         std::vector<string>::const_iterator const end = path.end();
418         for (; it != end; ++it) {
419                 // This will do nothing if *it is already absolute.
420                 string const exe_dir = makeAbsPath(*it).absFilename();
421
422                 FileName const exe_path(addName(exe_dir, exe_name));
423                 if (exe_path.exists())
424                         return exe_path;
425         }
426
427         // Didn't find anything.
428         return FileName();
429 }
430
431
432 // Extracts the absolute path to the binary name received as argv[0].
433 FileName const abs_path_from_binary_name(string const & exe)
434 {
435         FileName const abs_binary = get_binary_path(exe);
436         if (abs_binary.empty()) {
437                 // FIXME UNICODE
438                 throw ExceptionMessage(ErrorException,
439                         _("LyX binary not found"),
440                         bformat(_("Unable to determine the path to the LyX binary from the command line %1$s"),
441                                 from_utf8(exe)));
442         }
443         return abs_binary;
444 }
445
446
447 // A plethora of directories is searched to ascertain the system
448 // lyxdir which is defined as the first directory to contain
449 // "chkconfig.ltx".
450 FileName const
451 get_system_support_dir(FileName const & abs_binary,
452                   string const & command_line_system_support_dir)
453 {
454         string const chkconfig_ltx = "chkconfig.ltx";
455
456         // searched_dirs is used for diagnostic purposes only in the case
457         // that "chkconfig.ltx" is not found.
458         std::list<FileName> searched_dirs;
459
460         // 1. Use the -sysdir command line parameter.
461         FileName path = abs_path_from_command_line(command_line_system_support_dir);
462         if (!path.empty()) {
463                 searched_dirs.push_back(path);
464                 if (check_command_line_dir(path.absFilename(), chkconfig_ltx, "-sysdir"))
465                         return path;
466         }
467
468         // 2. Use the "LYX_DIR_15x" environment variable.
469         path = extract_env_var_dir("LYX_DIR_15x");
470         if (!path.empty()) {
471                 searched_dirs.push_back(path);
472                 if (check_env_var_dir(path, chkconfig_ltx, "LYX_DIR_15x"))
473                         return path;
474         }
475
476         // 3. Search relative to the lyx binary.
477         // We're looking for "chkconfig.ltx" in a directory
478         //   OnlyPath(abs_binary) / <relative dir> / PACKAGE /
479         // PACKAGE is hardcoded in config.h. Eg "lyx" or "lyx-1.3.6cvs".
480         // <relative dir> is OS-dependent; on Unix, it will be "../share/".
481         string const relative_lyxdir = relative_system_support_dir();
482
483         // One subtlety to be aware of. The name of the lyx binary may be
484         // a symbolic link. If that is the case, then we follow the links too.
485         FileName binary = abs_binary;
486         while (true) {
487                 // Try and find "chkconfig.ltx".
488                 string const binary_dir = onlyPath(binary.absFilename());
489
490                 FileName const lyxdir(addPath(binary_dir, relative_lyxdir));
491                 searched_dirs.push_back(lyxdir);
492
493                 if (!fileSearch(lyxdir.absFilename(), chkconfig_ltx).empty()) {
494                         // Success! "chkconfig.ltx" has been found.
495                         return lyxdir;
496                 }
497
498                 // Check whether binary is a symbolic link.
499                 // If so, resolve it and repeat the exercise.
500                 if (!binary.isSymLink())
501                         break;
502
503                 FileName link;
504                 if (readLink(binary, link)) {
505                         binary = link;
506                 } else {
507                         // Unable to resolve the link.
508                         break;
509                 }
510         }
511
512         // 4. Repeat the exercise on the directory itself.
513         FileName binary_dir(onlyPath(abs_binary.absFilename()));
514         while (true) {
515                 // This time test whether the directory is a symbolic link
516                 // *before* looking for "chkconfig.ltx".
517                 // (We've looked relative to the original already.)
518                 if (!binary.isSymLink())
519                         break;
520
521                 FileName link;
522                 if (readLink(binary_dir, link)) {
523                         binary_dir = link;
524                 } else {
525                         // Unable to resolve the link.
526                         break;
527                 }
528
529                 // Try and find "chkconfig.ltx".
530                 FileName const lyxdir(addPath(binary_dir.absFilename(),
531                         relative_lyxdir));
532                 searched_dirs.push_back(lyxdir);
533
534                 if (!fileSearch(lyxdir.absFilename(), chkconfig_ltx).empty()) {
535                         // Success! "chkconfig.ltx" has been found.
536                         return lyxdir;
537                 }
538         }
539
540         // 5. In desparation, try the hard-coded system support dir.
541         path = hardcoded_system_support_dir();
542         if (!fileSearch(path.absFilename(), chkconfig_ltx).empty())
543                 return path;
544
545         // Everything has failed :-(
546         // So inform the user and exit.
547         string searched_dirs_str;
548         typedef std::list<FileName>::const_iterator iterator;
549         iterator const begin = searched_dirs.begin();
550         iterator const end = searched_dirs.end();
551         for (iterator it = begin; it != end; ++it) {
552                 if (it != begin)
553                         searched_dirs_str += "\n\t";
554                 searched_dirs_str += it->absFilename();
555         }
556
557         // FIXME UNICODE
558         throw ExceptionMessage(ErrorException, _("No system directory"),
559                 bformat(_("Unable to determine the system directory "
560                                          "having searched\n"
561                                          "\t%1$s\n"
562                                          "Use the '-sysdir' command line parameter or "
563                                          "set the environment variable LYX_DIR_15x to "
564                                          "the LyX system directory containing the file "
565                                          "`chkconfig.ltx'."),
566                           from_utf8(searched_dirs_str)));
567
568         // Keep the compiler happy.
569         return FileName();
570 }
571
572
573 // Returns the absolute path to the user lyxdir, together with a flag
574 // indicating whether this directory was specified explicitly (as -userdir
575 // or through an environment variable) or whether it was deduced.
576 bool userSupportDir(FileName const & default_user_support_dir,
577         string const & command_line_user_support_dir, FileName & result)
578 {
579         // 1. Use the -userdir command line parameter.
580         result = abs_path_from_command_line(command_line_user_support_dir);
581         if (!result.empty())
582                 return true;
583
584         // 2. Use the LYX_USERDIR_15x environment variable.
585         result = extract_env_var_dir("LYX_USERDIR_15x");
586         if (!result.empty())
587                 return true;
588
589         // 3. Use the OS-dependent default_user_support_dir
590         result = default_user_support_dir;
591         return false;
592 }
593
594
595 // $HOME/.lyx on POSIX but on Win32 it will be something like
596 // "C:/Documents and Settings/USERNAME/Application Data/LyX"
597 FileName const get_default_user_support_dir(FileName const & home_dir)
598 {
599 #if defined (USE_WINDOWS_PACKAGING)
600         (void)home_dir; // Silence warning about unused variable.
601
602         os::GetFolderPath win32_folder_path;
603         return FileName(addPath(win32_folder_path(os::GetFolderPath::APPDATA), PACKAGE));
604
605 #elif defined (USE_MACOSX_PACKAGING)
606         (void)home_dir; // Silence warning about unused variable.
607
608         FSRef fsref;
609         OSErr const error_code =
610                 FSFindFolder(kUserDomain, kApplicationSupportFolderType,
611                              kDontCreateFolder, &fsref);
612         if (error_code != 0)
613                 return FileName();
614
615         // FSRefMakePath returns the result in utf8
616         char store[PATH_MAX + 1];
617         OSStatus const status_code =
618                 FSRefMakePath(&fsref,
619                               reinterpret_cast<UInt8*>(store), PATH_MAX);
620         if (status_code != 0)
621                 return FileName();
622
623         return FileName(addPath(reinterpret_cast<char const *>(store), PACKAGE));
624
625 #else // USE_POSIX_PACKAGING
626         return FileName(addPath(home_dir.absFilename(), string(".") + PACKAGE));
627 #endif
628 }
629
630
631 // Check that directory @c dir contains @c file.
632 // Else emit a warning about an invalid @c command_line_switch.
633 bool check_command_line_dir(string const & dir,
634                             string const & file,
635                             string const & command_line_switch)
636 {
637         FileName const abs_path = fileSearch(dir, file);
638         if (abs_path.empty()) {
639                 // FIXME UNICODE
640                 throw ExceptionMessage(WarningException, _("File not found"), bformat(
641                         _("Invalid %1$s switch.\nDirectory %2$s does not contain %3$s."),
642                         from_utf8(command_line_switch), from_utf8(dir),
643                         from_utf8(file)));
644         }
645
646         return !abs_path.empty();
647 }
648
649
650 // The environment variable @c env_var expands to a (single) file path.
651 FileName const extract_env_var_dir(string const & env_var)
652 {
653         string const dir = fix_dir_name(getEnv(env_var));
654         return dir.empty() ? FileName() : makeAbsPath(dir);
655 }
656
657
658 // Check that directory @c dir contains @c file.
659 // Else emit a warning about an invalid @c env_var.
660 bool check_env_var_dir(FileName const & dir,
661                        string const & file,
662                        string const & env_var)
663 {
664         FileName const abs_path = fileSearch(dir.absFilename(), file);
665         if (abs_path.empty()) {
666                 // FIXME UNICODE
667                 throw ExceptionMessage(WarningException, _("File not found"), bformat(
668                         _("Invalid %1$s environment variable.\n"
669                                 "Directory %2$s does not contain %3$s."),
670                         from_utf8(env_var), from_utf8(dir.absFilename()),
671                         from_utf8(file)));
672         }
673
674         return !abs_path.empty();
675 }
676
677
678 // Check that directory @c dir is indeed a directory.
679 // Else emit a warning about an invalid @c env_var.
680 bool check_env_var_dir(FileName const & dir,
681                        string const & env_var)
682 {
683         bool const success = dir.exists() && dir.isDirectory();
684
685         if (!success) {
686                 // Put this string on a single line so that the gettext
687                 // search mechanism in po/Makefile.in.in will register
688                 // Package.cpp.in as a file containing strings that need
689                 // translation.
690                 // FIXME UNICODE
691                 docstring const fmt =
692                         _("Invalid %1$s environment variable.\n%2$s is not a directory.");
693
694                 throw ExceptionMessage(WarningException, _("Directory not found"), bformat(
695                         fmt, from_utf8(env_var), from_utf8(dir.absFilename())));
696         }
697
698         return success;
699 }
700
701
702 // The locale directory relative to the LyX system directory.
703 string const relative_locale_dir()
704 {
705 #if defined (USE_WINDOWS_PACKAGING) || defined (USE_MACOSX_PACKAGING)
706         return "locale/";
707 #else
708         return "../locale/";
709 #endif
710 }
711
712
713 // The system lyxdir is relative to the directory containing the LyX binary.
714 string const relative_system_support_dir()
715 {
716         string result;
717
718 #if defined (USE_WINDOWS_PACKAGING) || defined (USE_MACOSX_PACKAGING)
719         result = "../Resources/";
720 #else // Posix-like.
721         result = addPath("../share/", PACKAGE);
722 #endif
723
724         return result;
725 }
726
727 } // namespace anon
728
729 } // namespace support
730 } // namespace lyx