[haiku-development] Re: Separation of application configuration, data and cache

  • From: "Christoph .J Thompson" <cjsthompson@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 11 Nov 2009 14:24:27 +0100

On Wed, 11 Nov 2009 13:23:05 +0100 CET
"François Revol" <revol@xxxxxxx> wrote:
> SDL doesn't have that indeed...
> Maybe Glib (not glibc) has some though... many apps now use Glib 
> without GTK.

Yes, I think glib has it (or is it Gtk+ ? I'm not sure). But there's
no need to worry about those apps as eventually the GNOME/Xfce
communities will fix them all to work with the XDG scheme. As far
as Haiku is concerned if there is ever a need for Gtk+ apps or
apps that use Glib. Then Glib itself can be modified to use
Haiku's find_directory() and everything will work nicely.

> FindDirectory.h can be included in C code, there is a C version of the 
> call.

> Well, just have the app have its own abstraction code.
> 
> See find_resource() in netsurf for ex:
> http://source.netsurf-browser.org/trunk/netsurf/beos/beos_gui.cpp?revision=8752&view=markup
> it tries find_directory() then fallbacks to the *nix stuff.
> 
> François.

Thanks for the info and the sample implementation.

PulkoMandy wrote:
>SDL doesn't handle anything related to files at all. Anyway, when you make  
>a multiplatform SDL app using files, you have to get some  
>platform-dependant code to run on windows, osX, and unix. Haiku is just  
>one more case to handle in there, so not a big problem. Just tell people  
>how to do it or submit patches on a per-application basis.

That's what I want to do, that is submit patches on a per-application basis.

As the goal of SDL is to be multiplatform, it wouldn't hurt for it to have
functions that would abstract the XDG scheme and find_directory().

>If we have an XDG-compatible API, then fine, quick-done POSIX-ports of  
>well-xritten apps will handle things correctly. But this should be the  
>porter job to handle this kind of things in the first place. Same holds  
>for console apps. Don't try to bend Haiku to make it UNIX-like, and don't  
>even try to bend UNIX to make it more Haiku-Like, they will not follow you  
>:)

Yes, it's the porter's job to this, but hopefully the porter wouldn't have
to patch every new version of an app for this.

As it seems there's momentum within the GNOME and Xfce communities to fix
the issue of separation of application config, data and cache probably
other people will be receptive to this "BeOS was doing it 10 years ago"
idea :)

>Yes it makes more work for porters. But it also avoids having 2 different  
>APIs for doing the same thing, which is something we could call "bloat".

That is also a concern indeed.

-- 
PGP: 0xC189F229

Other related posts: