View Single Post
Old 06-21-2010, 03:41 AM   #5
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Thanks for trying.

My setting is
Code:
set CALIBRE_DEVELOP_FROM=C:\calibre_development\calibre\src
Calibre_development is the folder where I keep my various source trees (I have 6). calibre is the folder containing the managed source. It contains the files/folders: .settings, icons, resources, setup, src, .bzrignore, .project, .pydevproject, Changelog.yaml, COPYRIGHT, INSTALL, LICENSE, LICENSE.rtf, README, session.vim, setup.py, and .bzr. You won't have all of them, because some are put there the eclipse/pydev development environment. It is 'src' in this folder that must appear in the CALIBRE_DEVELOP_FROM variable.

The other trick is that you must set the environment variable so that calibre can see it. You can set it in the windows environment list (my computer, ..., environment), but that is harder to manage. For example, you usually need to reboot after changing it.

The easiest way (for me) to run calibre from source is to use a .bat (or .cmd) file and run from a cmd prompt. The file will contain the following, but with your path:
Code:
set CALIBRE_DEVELOP_FROM=C:\calibre_development\calibre\src
calibre-debug -g
This way you will see the debug output, which will help if something goes wrong.

If you want to use a different library, add the appropriate CALIBRE line(s) to the above. What I do is use different configuration folders so settings so my production library doesn't get touched. As such I add:
Code:
set CALIBRE_CONFIG_DIRECTORY=C:\calibre_development\config_test
to my .bat file, having copied my production config folder to there and then modifying the library path in global.py.

The same techniques work on linux systems, with syntax changes appropriate for the shell in use. Don't forget to export your environment variables if your shell requires it (most do).
chaley is offline   Reply With Quote