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.
*/
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.
*/
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 LyX executable.
+ /** The directory containing the main executable (LyX or tex2lyx).
*/
FileName const & binary_dir() const { return binary_dir_; }
+ /** The absolute path to the LyX executable.
+ */
+ FileName const & lyx_binary() const { return lyx_binary_; }
+
+ /** The absolute path to the LyX package directory.
+ * This is one level up from the binary dir.
+ */
+ FileName const & lyx_dir() const { return lyx_dir_; }
+
/** The top of the LyX source code tree.
*/
static FileName const & top_srcdir();
* for the dump.
* This may be empty (e. g. when run under a CGI environment)
*/
- FileName const & home_dir() const { return home_dir_; }
+ static FileName const & get_home_dir();
/** Command to run the configure script.
* Caution: This is "ready-to-run", i.e. in the locale encoding, not
private:
FileName binary_dir_;
+ FileName lyx_binary_;
+ FileName lyx_dir_;
FileName system_support_dir_;
FileName build_support_dir_;
FileName user_support_dir_;
mutable FileName document_dir_;
mutable FileName temp_dir_;
FileName system_temp_dir_;
- FileName home_dir_;
std::string configure_command_;
bool explicit_user_support_dir_;
};