]> git.lyx.org Git - lyx.git/blobdiff - src/support/Package.h
add debug function which prints the callstack to stderr, disabled by default
[lyx.git] / src / support / Package.h
index 0cb4336ee236bd777858dc5bfd35b61ef6f3b000..b8eb197fc4ef1d02fb420ca8a881f21be5112a34 100644 (file)
@@ -52,6 +52,8 @@ void init_package(std::string const & command_line_arg0,
                  std::string const & command_line_user_support_dir,
                  exe_build_dir_to_top_build_dir);
 
+bool packageInitialized();
+
 /** Accessor to the global data.
  *  Asserts that init_package() has been called first.
  */
@@ -70,10 +72,19 @@ public:
                std::string const & command_line_user_support_dir,
                exe_build_dir_to_top_build_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();
@@ -94,7 +105,7 @@ public:
 
        /** The user_support directory was set explicitly using either
         *  the -userdir command line switch or
-        *  the LYX_USERDIR_16x environment variable.
+        *  the LYX_USERDIR_${major}${minor}x environment variable.
         */
        bool explicit_user_support() const { return explicit_user_support_dir_; }
 
@@ -112,11 +123,11 @@ public:
         */
        FileName const & system_temp_dir() const { return system_temp_dir_; }
 
-       /** The path to the temporary directory used by LyX.
+       //@{
+       /** The path to the temporary directory used by %LyX.
         *  (Eg /tmp/lyx_tmpdir800nBI1z9 on *nix.)
         *  Can be reset by LyXRC.
         */
-       //@{
        FileName const & temp_dir() const { return temp_dir_; }
        void set_temp_dir(FileName const & temp_dir) const;
        //@}
@@ -137,6 +148,8 @@ public:
 
 private:
        FileName binary_dir_;
+       FileName lyx_binary_;
+       FileName lyx_dir_;
        FileName system_support_dir_;
        FileName build_support_dir_;
        FileName user_support_dir_;