Problems getting into programming

Jeroen Wijnhout Jeroen.Wijnhout at kdemail.net
Tue May 11 20:43:58 CEST 2004


On Tuesday 11 May 2004 18:14, Thomas McGuire wrote:
> How often should I update my CVS repository ?

Ideally, everyday, however considering your limited bandwidth I propose the 
following. Update whenever:
o you encounter a bug, weird behavior, etc.
o you are about to make changes in the code (this is really mandatory)
o you are about to review (i.e. try to reproduce) a bug

> I suspect that the most bandwidth comes from comparing the files,
> not from downloading updates.
> I really do not want to spend 1MB on comparing files when the
> downloaded updates only contain 10KB.

I guess CVS compares the revision numbers of the files, that shouldn't take 
that much bandwidth.

> If I had a DSL connection, this wouldn't be a problem, but with my
> modem, an update takes quite some time.
>
> How do I actually WORK with my local CVS repository?
>
> Should I simply modify some lines of code, then
> run ./module-build.sh (which will probably take hours), start a new
> KDE session and test if all behaves like I intended ?

This is of course the safest way (and the most time consuming). But if you 
know what you are doing, you can speed up things.

> Or should I just go to the directory and do make; make install?

Yes, in practice you often can. Suppose you make a change in KatePart (located 
in kdelibs/kate/part). Then just go to kdelibs/kate/part and do the 'make; 
make install' thing. After that you usually don't have to restart KDE, just 
open some app that uses the katepart (like Kate, Quanta, Kile, KDevelop). 
Usually this works, it is not guaranteed.

> This would of course be MUCH faster, since the above script allways
> rebuilds the whole module, but it seems to be still not very
> practical.
> Will a "make install" from a subdirectory (e.g. kdebase/konqueror)
> succeed?

Sure, this always works. Konqueror is a standalone application just like many 
other KDE applications. Some apps are in the kdebase directory, because they 
are essential to the KDE desktop environment, others are hosted elsewhere.

> How do I work with KDevelop? Most apps do not have a .kdevelop file
> (which is a shame), so do I have to import a makefile-based
> project?

Project->Import Existing Project, choose 'KDE C++ application' in 'Project 
Type'. You can even download a module from CVS here, but I've never tried 
this.

> Since this creates some KDevelop-related files, should I keep a
> backup of the folder I am working on?

Paranoia pays :-)

> If KDevelop succeeds in compiling the project, will it first install
> the files to ~/kde-unstable or does it only put the files somewhere
> in the build directory (or does it mess up with the makefile and
> and places the bins and libs in the CVS tree?)?

After compiling it will be in the "build" directory, but this is all 
configurable (Project->Project Options->Configure Options->Build Directory)

> If it does not install the files, is it possible to run and debug
> the app from within this build directory?

Yes, but this can give problems because KDE sometimes needs to find 
app-specific data (like icons or config files). It is best to install (i.e. 
'make install' it) the application and run it from its normal location.

> Will there be conflicts if I have for example Konqueror installed in
> ~/kde-unstable, and an other Konqueror, this time modified by me,
> started from KDevelop (from the build dir)? Which libs will "my"
> Konqueror use? The proper ones in the build dir, or the ones in my

The old ones, unless you add the build dir to the LD_LIBRARY_PATH environment 
variable.

> installation dir (~kde-unstable)? I am asking this especially
> because I previously tried to make some modifications (just for
> testing, noting serious) to kdegraphics/kghostview and had had
> troubles with my modifications not being shown because they were in
> some libs, which were not used.

Like I said, installing the app solves most of your problems. You don't _have_ 
to, but if you don't you end up settings several environment variables. If 
you are just beginning it is best to avoid that for a while. imo.

best,
Jeroen

-- 
Kile - an Integrated LaTeX Environment for KDE
http://kile.sourceforge.net


More information about the kde-quality mailing list