#297 Faster interface to add and remove roots

closed
2012-10-17
2011-08-27
U_Fischer
No

I'm developing latex packages. The development versions of packages are each in their own texmf tree. This means that I quite often add and remove roots in miktex settings e.g. to compare the development version with the current version. This is rather slow: When adding a root I have to click through the folder tree to find it. Also miktex quite often regenerate the FNDB of all roots in this cases.

Could you add something that allows to activate/deactivate a texmf tree faster? I wouldn't mind a command line tool or a command line option. It is also not necessary to regenerate the FNDB's (if something has changed in the root I can call initexmf -u manually).

Ulrike Fischer

Discussion

  • Christian Schenk

    The latest initexmf version supports registering/unregistering TEXMF roots.

    Say
    initexmf --register-root=C:\MyTEXMF
    to register the directory C:\MyTEXMF as a MiKTeX root directory for the current (logged-in) user. Say
    initexmf --admin --register-root=C:\MyTEXMF
    to register the MiKTeX root directory for all users.

    When you register a MiKTeX root directory, a corresponding filename database file will be created.

    To unregister a MiKTeX root directory, say:
    initexmf --unregister-root=C:\MyTEXMF
    Use the --admin option, if the root directory was registered for all users:
    initexmf --admin --unregister-root=C:\MyTEXMF

     
  • U_Fischer

    U_Fischer - 2011-09-23

    Thank you very much! This works fine. A small comment: I tried if the option could also be shorten (like -u) and got this output:

    I:\Z-Test>initexmf -unre=I:\TeX-Roots\garamond
    regroots ur=e=I:\TeX-Roots\garamond ud="" uc="" ui="" cr="" cd="" cc="" ci=""
    rm "C:\Dokumente und Einstellungen\USER\Lokale Einstellungen\Anwendungsdaten\MiKTeX\2.9\miktex/data/le\d2e37b15022f0f908819af79c2169dc6.fndb"
    fndbcreate "C:\Dokumente und Einstellungen\USER\Lokale Einstellungen\Anwendungsdaten\MiKTeX\2.9\miktex/data/le\d2e37b15022f0f908819af79c2169dc6.fndb" I:\TeX-Roots\garamond

    and the root was not unregistered. I'm not sure if this is intended. Should short names like -unreg or -reg work?

    Ulrike Fischer

    (And sorry for the various duplicates I produce. I and sourceforge seems not get along very well.)

     
  • Christian Schenk

    There are currently no short options for --register-root and --unregister-root.

    Please note that the single '-' prefixes a sequenze of single-letter options (aka short options). That is, if you specify -unre, you are actually invoking these options:

    --update-fndb
    --print-only
    --user-roots

    I would recommend, tha you always specify the "long options" (prefixed by two '-'). The
    short options (one '-') are only for backward compatibility.