Menu

#18 Suggestion: Make KLatexFormula portable (i.e. executable from an USB drive)

(all)
closed-fixed
nobody
None
5
2017-07-07
2014-10-29
lujomu
No

This only concerns the Windows version of KLatexFormula.

MiKTeX alredy provides a portable version (http://miktex.org/portable) to install on a USB drive and I think KLatexFormula would be a great match for that. Especially since it seems that KLatexFormula's entanglement with Windows is minimal already (no settings are stored in the registry, it accepts relative paths for 'latex', 'dvips' and 'gs' etc.).

As far as I can see the only thing that would need to be added, is a way to point KLatexFormula to a custom data directory where the settings and databases are stored. Popular solutions therefor are
a) an empty dummy file in the app directory (e.g. named 'portable') that causes (upon its existence) KLatexFormula to use a subdirectory of the app directory as its data directory.
b) a command line option where a custom data directory can be specified. E.g. 'klatexformula --datadir \App\KLatexFormula\data' or short 'klatexformula --datadir data'

Bonus benefit: It would make it easier to try new beta versions without compromising the configuration of an installed stable version.

For your consideration.
lujomu

Discussion

  • Philippe Faist

    Philippe Faist - 2014-11-05

    This should be fairly easy to implement, thanks for the suggestion. I'll do this when I find a little time.

     
  • lujomu

    lujomu - 2014-11-05

    Just a quick correction: If the temp path is provided as a relative path (e.g. '\Temp') it breaks the drag and drop functionality for some apps. I suggest to internally complete all relative paths to absolute ones.

     
  • Philippe Faist

    Philippe Faist - 2017-02-07

    Starting from KLatexFormula 4.0, application paths may be set at compile-time and at run-time, which should make KLatexFormula fully portable. KLatexFormula needs to locate the following directories:

    • the shared data directory, such as /usr/share/klatexformula, which only has to be read-only;

    • the home config directory, such as ~/.klatexformula, which stores the user configuration and which should be writeable.

    At compile-time, the preprocessor defines KLF_SHARE_DIR and KLF_HOME_CONFIG_DIR may be used to override defaults. CMake already sets KLF_SHARE_DIR based on the installation paths.

    At run-time, the environment variables KLF_SHARE_DIR and KLF_HOME_CONFIG_DIR may be set to override any paths set at compile time or any other default paths.

    Paths may start with ~/, which expands to the user's home directory (on all platforms). Non-absolute paths are interpreted as relative to the application executable location, and not relative to the current working directory.

     
  • lujomu

    lujomu - 2017-02-17

    Works great! Thanks for this addition!

     
  • Philippe Faist

    Philippe Faist - 2017-07-07
    • status: open --> closed-fixed
     
MongoDB Logo MongoDB