mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Updated OS X development environment instructions to reflect changes necessary to set CALIBRE_DEVELOP_FROM in 10.8
This commit is contained in:
parent
c21ca60dc9
commit
f07c874d4f
@ -149,17 +149,20 @@ the previously checked out |app| code directory, for example::
|
|||||||
|
|
||||||
calibre is the directory that contains the src and resources sub-directories. Ensure you have installed the |app| commandline tools via :guilabel:`Preferences->Advanced->Miscellaneous` in the |app| GUI.
|
calibre is the directory that contains the src and resources sub-directories. Ensure you have installed the |app| commandline tools via :guilabel:`Preferences->Advanced->Miscellaneous` in the |app| GUI.
|
||||||
|
|
||||||
The next step is to set the environment variable ``CALIBRE_DEVELOP_FROM`` to the absolute path of the src directory.
|
The next step is to create a bash script that will set the environment variable ``CALIBRE_DEVELOP_FROM`` to the absolute path of the src directory when running calibre in debug mode.
|
||||||
So, following the example above, it would be ``/Users/kovid/work/calibre/src``. Apple
|
|
||||||
`documentation <http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/EnvironmentVars.html#//apple_ref/doc/uid/20002093-BCIJIJBH>`_
|
|
||||||
on how to set environment variables.
|
|
||||||
|
|
||||||
Once you have set the environment variable, open a new Terminal and check that it was correctly set by using
|
Create a plain text file:
|
||||||
the command::
|
#!/bin/sh
|
||||||
|
export CALIBRE_DEVELOP_FROM="/Users/kovid/work/calibre/src"
|
||||||
|
calibre-debug -g
|
||||||
|
|
||||||
echo $CALIBRE_DEVELOP_FROM
|
Save this file as ``/usr/bin/calibre-develop``, then set its permissions so that it can be run:
|
||||||
|
chmod +x /usr/bin/calibre-develop
|
||||||
|
|
||||||
Setting this environment variable means that |app| will now load all its Python code from the specified location.
|
Once you have done this, type
|
||||||
|
calibre-develop
|
||||||
|
|
||||||
|
You should see some diagnostic information in the Terminal window as calibre starts up, and you should see an asterisk after the version number in the GUI window, indicating that you are running from source.
|
||||||
|
|
||||||
That's it! You are now ready to start hacking on the |app| code. For example, open the file :file:`src/calibre/__init__.py`
|
That's it! You are now ready to start hacking on the |app| code. For example, open the file :file:`src/calibre/__init__.py`
|
||||||
in your favorite editor and add the line::
|
in your favorite editor and add the line::
|
||||||
|
Loading…
x
Reference in New Issue
Block a user