You are not logged in.

Latem

Beginner

  • "Latem" started this thread

Posts: 31

Location: New Brunswick, Canada

Occupation: Student/Programmer

  • Send private message

1

Thursday, May 26th 2005, 1:35am

Load parts w/o install

Hello, if you have like a standard kde KParts application (for example the result of "Application Framework (KParts)" wizard in KDevelop), is there any way of getting the application running, and the app's kpart loaded properly, without doing make install. I am inclined you should be able to do this by adding to KDEDIR env variable, but I couldn't get it to work.

For example, if I add this to my .bash_profile

Quoted

KDEDIR=$KDEDIR:/home/me/Documents/Code/kapp/debug/src
export KDEDIR


that is where the binaries are compiled to.

I relogin, and when I try to run the app, the part fails to load. So I get the "Could not find our part" error message.

if I echo $KDEDIR, sure enough I get

Quoted

:/home/me/Documents/Code/kapp/debug/src


As you can see, I do not have KDEDIR set globaly.

I am not sure what I am doing wrong? Also similar way should work to get images and rc files working as well? Any suggestions?

I just want to get this working while I am debugging, and playing around with things, so I don't have to be doing make install all the time.

Thanks a lot,

Latem
The march of progress:
C:
printf("%10.2f", x);
C++:
cout << setw(10) << setprecision(2) << showpoint << x;
Java:
java.text.NumberFormat formatter = java.text.NumberFormat.getNumberInstance();
formatter.setMinimumFractionDigits(2);
formatter.setMaximumFractionDigits(2);
String s = formatter.format(x);
for (int i = s.length(); i < 10; i++) System.out.print(' ');
System.out.print(s);

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

2

Thursday, May 26th 2005, 10:15am

RE: Load parts w/o install

Quoted

Originally posted by Latem
For example, if I add this to my .bash_profile


.bash_profile might not be read by the shell executing the startkde script.

If you are on KDE>=3.3 you can add the export to a file in .kde/env
The file needs a .sh extention but doesn't need to be a script or be executable, it is sourced by startkde

Quoted


Source code

1
2
KDEDIR=$KDEDIR:/home/me/Documents/Code/kapp/debug/src
export KDEDIR


that is where the binaries are compiled to.


Be aware that KDEDIRS points to base directories which have the files in subdirectories.

I recommend using a local --prefix with configure while developing and do ake install into that, user local directory.

Cheers,
_
Qt/KDE Developer
Debian User

Latem

Beginner

  • "Latem" started this thread

Posts: 31

Location: New Brunswick, Canada

Occupation: Student/Programmer

  • Send private message

3

Friday, May 27th 2005, 11:05pm

Thanks for the reply.

I am using KDE 3.2.3. I tried the --prefix suggestion, but w/o success.
I did:

Quoted

./configure --prefix=/home/me/Documents/Code/kapp/bin
make
make install

Everything built fine. In the bin directory, there was now a "bin" directory, a "lib" directory (with kde3 directory in it, and library files in there), and a "share" directory with bunch of other folders for docs, images, etc...

However, when I ran the binary in the bin directory, I still got the error message.

Maybe I don't understand what "make install" really is. I thought it basically just copies the results of compilation, and documents, and images to the appropriate places. So by defualt, the binary would go into /usr/bin, the libs into /usr/lib/kde3, and so on. /usr is the default install directory (like default --prefix). at least I think it's the default for Mandrake 10.1.

Here --prefix was given, and it moved the files exactly so, relative to the given --prefix. But how should KDE know, when I run the program, to look for the files in the directory given by --prefix, instead of the standard global directory (ex. /usr/lib/kde3)? I didn't really understand why should giving a local --prefix and "make install" work in the first place? Did I do something wrong?

Thanks,

Latem
The march of progress:
C:
printf("%10.2f", x);
C++:
cout << setw(10) << setprecision(2) << showpoint << x;
Java:
java.text.NumberFormat formatter = java.text.NumberFormat.getNumberInstance();
formatter.setMinimumFractionDigits(2);
formatter.setMaximumFractionDigits(2);
String s = formatter.format(x);
for (int i = s.length(); i < 10; i++) System.out.print(' ');
System.out.print(s);

This post has been edited 2 times, last edit by "Latem" (May 27th 2005, 11:07pm)


anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

4

Monday, May 30th 2005, 1:50pm

Quoted

Originally posted by Latem
However, when I ran the binary in the bin directory, I still got the error message.


It seems you forgot to add /home/me/Documents/Code/kapp/bin to KDEDIRS

Cheers,
_
Qt/KDE Developer
Debian User

Latem

Beginner

  • "Latem" started this thread

Posts: 31

Location: New Brunswick, Canada

Occupation: Student/Programmer

  • Send private message

5

Monday, May 30th 2005, 5:09pm

Nope I didn't do that. And that makes sense. I'll try it when I get home.
But just so I know for sure, is the variable name exactly "KDEDIR" or "KDEDIRS"?

Thanks,

Latem
The march of progress:
C:
printf("%10.2f", x);
C++:
cout << setw(10) << setprecision(2) << showpoint << x;
Java:
java.text.NumberFormat formatter = java.text.NumberFormat.getNumberInstance();
formatter.setMinimumFractionDigits(2);
formatter.setMaximumFractionDigits(2);
String s = formatter.format(x);
for (int i = s.length(); i < 10; i++) System.out.print(' ');
System.out.print(s);

This post has been edited 1 times, last edit by "Latem" (May 30th 2005, 5:10pm)


anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

6

Monday, May 30th 2005, 5:59pm

Quoted

Originally posted by Latem
Nope I didn't do that. And that makes sense. I'll try it when I get home.
But just so I know for sure, is the variable name exactly "KDEDIR" or "KDEDIRS"?


KDEDIRS

KDEDIR is an older, deprecated form, allowing only one directory while the newer KDEDRIS allows listing any number of directories.

http://www.kde.org/areas/sysadmin/fsh.php

Cheers,
_
Qt/KDE Developer
Debian User

Latem

Beginner

  • "Latem" started this thread

Posts: 31

Location: New Brunswick, Canada

Occupation: Student/Programmer

  • Send private message

7

Monday, May 30th 2005, 9:23pm

Ok setting KDEDIRS worked. Thanks.

Latem
The march of progress:
C:
printf("%10.2f", x);
C++:
cout << setw(10) << setprecision(2) << showpoint << x;
Java:
java.text.NumberFormat formatter = java.text.NumberFormat.getNumberInstance();
formatter.setMinimumFractionDigits(2);
formatter.setMaximumFractionDigits(2);
String s = formatter.format(x);
for (int i = s.length(); i < 10; i++) System.out.print(' ');
System.out.print(s);