]> git.lyx.org Git - lyx.git/blobdiff - src/support/Package.h
* layouttranslations.review - remove dupes
[lyx.git] / src / support / Package.h
index 887b6bcdb7cd6745d2d153dd6e6ce03abdbf94ce..e5cc32326044e6025ee96d9428c7d860e597cf6c 100644 (file)
@@ -25,14 +25,6 @@ namespace support {
 
 class Package;
 
-/** When run in-place <build-dir>/src/lyx is one level up from
- *  the <build-dir> whilst <build-dir>/src/tex2lyx/tex2lyx is
- *  two levels up.
- */
-enum exe_build_dir_to_top_build_dir {
-       top_build_dir_is_one_level_up,
-       top_build_dir_is_two_levels_up
-};
 
 
 /** Initialise package() with the command line data.
@@ -49,8 +41,7 @@ enum exe_build_dir_to_top_build_dir {
  */
 void init_package(std::string const & command_line_arg0,
                  std::string const & command_line_system_support_dir,
-                 std::string const & command_line_user_support_dir,
-                 exe_build_dir_to_top_build_dir);
+                 std::string const & command_line_user_support_dir);
 
 /** Accessor to the global data.
  *  Asserts that init_package() has been called first.
@@ -67,8 +58,7 @@ public:
         */
        Package(std::string const & command_line_arg0,
                std::string const & command_line_system_support_dir,
-               std::string const & command_line_user_support_dir,
-               exe_build_dir_to_top_build_dir);
+               std::string const & command_line_user_support_dir);
 
        /** The directory containing the main executable (LyX or tex2lyx).
         */
@@ -111,6 +101,12 @@ public:
         */
        FileName const & locale_dir() const { return locale_dir_; }
 
+       /** The file name that should contain the message file (.mo)
+        *  for language code \param c. Does not check whether the
+        *  file exists. Handles running in place.
+        */
+       FileName messages_file(std::string const & c) const;
+
        /** The default document directory.
         *  Can be reset by LyXRC.
         */
@@ -142,7 +138,7 @@ public:
         *  Caution: This is "ready-to-run", i.e. in the locale encoding, not
         *  utf8.
         */
-       std::string const & configure_command() const { return configure_command_; }
+       std::string const & configure_command() const;
 
 private:
        FileName binary_dir_;
@@ -155,8 +151,9 @@ private:
        mutable FileName document_dir_;
        mutable FileName temp_dir_;
        FileName system_temp_dir_;
-       std::string configure_command_;
+       mutable std::string configure_command_;
        bool explicit_user_support_dir_;
+       bool in_build_dir_;
 };
 
 } // namespace support