Christian Ehrlicher schrieb: > Michael Dr?ing schrieb: > >> Hi, >> >> OK, now that I have DCOPserver up and running, I fixed a small TODO in >> dcopserver_shutdown, which prevented it from running. >> Here's the patch: >> >> Index: dcopserver_shutdown.c >> =================================================================== >> --- dcopserver_shutdown.c (revision 512583) >> +++ dcopserver_shutdown.c (working copy) >> @@ -90,8 +90,11 @@ >> int n; >> >> n = max_length; >> - /* TODO: (rh) add win32 home dir */ >> +#ifdef _WIN32 >> + home_dir = getenv("USERPROFILE"); >> +#else >> home_dir = getenv("HOME"); >> +#endif >> strncpy(dcop_file, home_dir, n); >> dcop_file[ n - 1 ] = '\0'; >> n -= strlen(home_dir); >> >> >> I suppose this is for W2k/NT only, I don't know (and, honestly, I don't >> really care ;-) if Win9x also has that variable defined..... >> > Do you really think this is a good idea? I mean - do you really want to > replace 'HOME' with 'USERPROFILE' in every kde app? For this we used > kde_bootstrap() which currently doesn't work because we don't want to > use the kdemain()-hack anymore... > There are several places in kdelibs where user specific settings are retrieved in an platform dependend way (especiall environment vars). I think all such calls should be replaced by platform independed function. If there are QT based replacements like QDir::homePath() in this example, this should be used, if not, a wrapper should be created anywhere. The question is where in kdecore ? > I think it's a better idea to work on compiler/linker errors or help > porting to Qt4 rather than try to get dcop working - afaik it gets > removed in kde4. > Will a working replacement will come in the next few weeks ? And will all the client code be updated to use the new api ? How do you will run the test programms from kdecore and kdeui in the next weeks, when dcop does not run with cmake ? Ralf