<link linkend="compile-and-install">&tdevelop; compilation and installation</link> leads you through all the steps of compilation and installation of the application.
<link linkend="make-api">How to obtain a &tdevelop; &API; documentation</link> tells what an API is and how you get such a useful tool for navigating the &tdevelop; sources.
&tdevelop; is available in binary form from many different &Linux; distributions such as <!--&SuSE;, &RedHat;//--> SuSE, RedHat and others. These binaries are packed in some convenient format, mostly RPM, for easy installation. To install, follow the standard instructions given in your distribution.
You may as well obtain the &tdevelop; sources, compile and install them by yourself. These sources can be found via the project home page at <ulink url="http://www.kdevelop.org"> http://www.kdevelop.org</ulink> or via the <ulink url="http://download.kde.org">&kde; ftp site</ulink>.
<para>The module name is <emphasis>tdevelop</emphasis> at <filename class="directory">svn co svn://anonsvn.kde.org/home/kde/branches/KDE/3.5/tdevelop</filename>.
To obtain an initial version of &tdevelop; you must download it from anonymous svn. For this so-called <emphasis>checkout</emphasis> operation follow these steps.
We assume you want to put your &tdevelop; copy into the <filename class="directory">trinitysrc</filename> subdirectory of your home directory (<filename class="directory">~</filename>).
Keep the server load low. <emphasis>Please do not checkout every time you want to keep your &tdevelop; up to date!</emphasis> Use svn update for this purpose.
Now you may compile your &tdevelop; version as shown in the <link linkend="compile-and-install">&tdevelop; Compilation and Installation</link> section.
After you checked out (and successfully compiled) &tdevelop; from svn as shown above, you'll want to keep it up to date in order to get all the patches. Follow these steps. (We again assume you have put your &tdevelop; copy into the <filename class="directory">trinitysrc</filename> directory.)
Note the <command>up</command> (= <emphasis>update</emphasis>) command instead of the <command>co</command> (which stands for <emphasis>checkout</emphasis>).
Now you can compile a new &tdevelop; version as shown in the <link linkend="compile-and-install-make-svn">Special svn compilation considerations</link> chapter.
In order to successfully compile and use &tdevelop;, you need the following programs and libraries. They are available on most platforms as distribution packages and thereby can be installed easily.
Available from <ulink url="www.kde.org">www.kde.org</ulink>
</para>
</listitem>
</itemizedlist>
<itemizedlist>
<title>Optional:</title>
<listitem><para>
The <emphasis><application>ctags</application></emphasis> source navigation tool, from <ulink url="http://ctags.sourceforge.net">http://ctags.sourceforge.net</ulink>, which enables you fast access to declarations and definitions by a few simple clicks on a name in the editor.
<indexterm><primary>ctags</primary></indexterm>
</para></listitem>
<listitem><para>
<emphasis><application>dot</application></emphasis>, a graphics language compiler, from <ulink url="http://www.graphviz.org">http:/www.graphviz.org</ulink>. This
<!-- ### temporarily disabled until the graphical class browser works again
allows you to navigate in a graphical view of your classes' dependencies. Likewise the <application>dot</application> //-->
tool is needed in conjunction with &doxygen; below if you want to have class relationships graphically displayed (which is highly recommended).
<indexterm><primary>dot</primary></indexterm>
</para></listitem>
<listitem><para>
The <emphasis>&doxygen;</emphasis> documentation tool, from <ulink url="http://www.doxygen.org">http://www.doxygen.org</ulink> if you want to generate concise and powerful API documentation from your projects.
<indexterm><primary>doxygen</primary></indexterm>
</para></listitem>
<listitem><para>
<emphasis><application>valgrind</application></emphasis> from <ulink url="http://developer.kde.org/~sewardj/">http://developer.kde.org/~sewardj/</ulink> helps you to find memory management problems in your applications.
<emphasis><application>svn</application></emphasis> from <ulink url="http://subversion.tigris.org/">http://subversion.tigris.org/</ulink> if you want to use the svn versioning system.
<indexterm>
<primary>svn</primary>
<secondary>requirements</secondary></indexterm>
</para></listitem>
<listitem><para>
Any other compiler and/or tool in case you want to develop for another language/platform than C++/&kde; or use some special facility.
You can, to a certain extent, circumvent the need for &autoconf; ≥ 2.52 and &automake; ≥ 1.6. Just remove the <filename class="directory">admin</filename> directory in your &tdevelop; installation directory and type
Be careful <emphasis>not to mix &Qt; versions</emphasis>. Always link &tdevelop; to the same &Qt; version your &kde; library was compiled. Otherwise you will most likely experience <emphasis>very strange</emphasis> behaviours.
<link linkend="compile-and-install-make">Compile &tdevelop;</link> deals with obtaining the &tdevelop; sources from svn, how to prepare them for the installation process, and finally shows the steps necessary to compile and install &tdevelop;.
<link linkend="compile-and-install-options">Some Notes on configure Options</link> tells you how to run &tdevelop; if it has been installed in a location other than the &kde; directory.
Before entering the compile sequence you must make sure all libraries and tools are available to the make system. To accomplish this some environment variables need to be properly set. The actual steps to be performed depend on the console shell you use.
</para>
<note><para>
To avoid typing in all the statements that set the necessary environment variables every time you want to compile, you should put them into your <filename>.bashrc</filename> or <filename>.cshrc</filename> file. This way the environment variables will be properly set every time you start the shell.
In the following discussion we assume that you have put your &tdevelop; sources in the <filename class="directory">~/trinitysrc/tdevelop</filename> directory.
In case you use a &tdevelop; snapshot from svn the initial compilation steps depend on whether you just did a complete checkout or only updated the source.
<term id="compile-and-install-make-svn-co">After a svn Checkout</term>
<listitem>
<para>
You must <emphasis>initialize the make system</emphasis> after a fresh checkout. The same is true every time you need to start over from scratch. Type:
and then <emphasis>all of the following steps</emphasis>.
</para>
<note><para>
You might need access to the svn repository for the clean-up if any corrupted or missing files must be reconstructed.
</para></note>
<important><para>
The <command>svn-clean</command> command will <emphasis>remove every file</emphasis> not in svn from the directory! Make sure to back up any valuable information before you issue this clean-up command.
</para></important>
</listitem>
</varlistentry>
<varlistentry>
<term id="compile-and-install-make-svn-up">After a svn Update</term>
<listitem>
<para>
The next step depends on the output of the svn update sequence. If you got something like (there may be a U or a P marker in the leftmost column, both denoting the file has been changed):
</para>
<screen>
U /some_directory_path/Makefile.am
</screen>
<para>
or if you just did a full checkout, you must enter:
Once the basic make system is set up you must decide which type of the &tdevelop; system you want to use. This is done in the following configure step which builds the actual <filename>Makefile</filename>s the <command>make</command> command will use.
You may drop the <option>--prefix</option> option in the following <command>configure</command> command lines if you want &tdevelop; be installed in the default &kde; directory. See the <link linkend="compile-and-install-options">Some notes on configure options</link> chapter for this.
If you want to keep track of what your &tdevelop; application does at run-time you may build a debug-compiled version. Just command <command>configure</command> to do so:
If you want to build your own <link linkend="make-api">API documentation</link> for &tdevelop; you must include yet another option in the <command>configure</command> command:
<command>configure</command> will check the system and build some <filename>Makefile</filename>s according to what it found. The <command>make</command> command will use the main <filename>Makefile</filename> by default. Thus
That's all. If you installed &tdevelop; in the default &kde; directory you may now run the IDE. Otherwise some additional steps will be necessary as shown in the <link linkend="compile-and-install-options-dir">Non-default installation directory</link> section below.
<listitem><para>The &tdevelop; IDE — this is the place where you will usually work.</para></listitem>
<listitem><para>The stand-alone &tdevelop; Assistant documentation browser — isolates all the powerful documentation facilities of the &tdevelop; IDE in a separate tool. This comes in handy when you want to look up some programming documentation but do not want to start the full IDE.</para></listitem>
<listitem><para>The &tdevelop; Designer — enhances the &Qt; User Interface Designer by &kde; specific elements and integrates nicely in the &tdevelop; IDE.</para></listitem>
By default <command>configure</command> prepares the IDE to be installed in the default &kde; directory. This is necessary because &tdevelop; assumes direct access to some tools and parts which reside there. If want to use your own installation directory, you must tell <command>configure</command> this by the <option>--prefix</option> option:
There is a caveat if you do so. You must provide a means for &tdevelop; to access the needed tools and parts in the &kde; directory when running. (You can still use the IDE without doing so, but with very restrained capabilities.)
<member>The <envar>TDEDIRS</envar> environment variable must be set to the <emphasis>list of active &kde; directories</emphasis> in your system. We use</member>
<member>The <filename class="directory">/usr/local/kde</filename> directory may for instance contain an incomplete &kde; version you compiled for debug purposes, and the <filename class="directory">/opt/trinity</filename> directory may in addition contain the standard &kde; version from your distribution that is used for everyday work.</member>
The <command>tdebuildsycoca</command> command (<quote>build system control cache</quote>) looks around for libraries and caches their location and version, so that &tdevelop; can find them. The caveat is that it takes noticeable time—and it has to be run any time you call up the shell to start &tdevelop; from a non-default directory. You may want to put the above commands into a shell script to reduce the typing effort.
(You could as well put the lines in your <filename>.bashrc</filename> or <filename>.cshrc</filename> file, but this is not advisable as <command>tdebuildsycoca</command> will then be run any time you call up the shell.)
The <command>tdebuildsycoca</command> command does not run from within the root. You must call it from a non-root user. (But is <emphasis>not a very good idea</emphasis> after all to do software development from within the root!)
API is the short form of <quote>Application Program Interface</quote>. Actually such an API cotains a series of descriptions (&ie; calling conventions) by which an application program can access the operating system and other services. In our context, however, a broader definition was adopted. The API of a &kde; or &Qt; application is an abstract of the classes and methods interfaces, a synopsis to be used like a dictionary to navigate the sources.
There is a version of the most current API available at the <ulink url="http://www.kdevelop.org/HEAD/doc/api/html/index.html">TDevelop-Home website</ulink>. It will be automatically updated every 24 hours so you can keep up.
Alas, this version is best used read-only over the internet. If you do not always have internet access you may as well build your own API documentation from the &tdevelop; sources. To do so, you must tell the automake system where to find the KDELIBS API in your system. This is accomplished by the special option <option>--with-tdelibsdoxy-dir</option> in the <command>configure</command> command when you prepare to compile the &tdevelop; sources:
(<command>make</command> will replace the global <varname>$TDEDIR</varname> variable with the actual &kde; directory setting recorded therein.) Then issue a <command>make</command> command <link linkend="compile-and-install-make-basic">as usual</link>. After the &tdevelop; IDE has been built you have the option to build the API as well. For this you must issue
This will build a <filename>Doxyfile</filename> in your &tdevelop; base directory which in turn will be processed by the <application>Doxygen</application> application to build quite a lot of <filename>.html</filename> API files. When this rather lengthy API building process (may last more than an hour on a slow system) finally comes to an end, you must install the API just like you have to install the &tdevelop; IDE itself. If necessary obtain superuser rights by
Once this is done, <command>make</command> will inform you about the directory where you can finally look at the API documentation's contents. Note this address, you can use it from &konqueror; as well as from inside &tdevelop;, in case you have set up the &tdevelop; sources themselves as a project to work on.
You will most probably see a lot of warning and/or error messages during the API build run by <application>Doxygen</application>. It is best to ignore them, they are of interest to the &tdevelop; developers only. If the API generation ever comes to a successful end, the <filename>.html</filename> API files will be usable.