Re: [Caprice32-devel] Re: Linux binary package
An emulator of the Amstrad CPC 8bit home computer range
Status: Alpha
Brought to you by:
udoewich
|
From: Stephane M. <mar...@ic...> - 2004-06-23 11:04:04
|
On Wed, Jun 23, 2004 at 08:23:51AM +0200, nu...@gm... wrote: > On Mon, Jun 21, 2004 at 05:58:48PM -0400, Ulrich Doewich wrote: > > we've got a GUI in place, we need to be able to write to the .cfg file > > again. I'd rather not add too much platform dependent code (like writing to > > the Windows Registry, or writing to the /etc directory)... > > Okay, if you want to keep this platform independant Caprice32 should > probably live inside it's own directory, store the config file there > (like I described for some Linux games like ut2004) and not care about > /etc or the windows registry at all. > Well, I have nothing against putting config files in /etc, but for example on OSX, people expect the config files to be in the same folder as the program itself (this allows the easy install/uninstall thing). > I think this is a completely valid decision as it keeps the code small, > clean and synchronized across different platforms. > > Arnold on the other hand has a complete source directory with front-end > code for each and every platform. The upside is that every port can > provide the interface that is best for the host platform. For example > the Mac version has a polished and very Macish interface. The downside > is that a lot of things have to be done again and again for every > platform and it is not always easy to decide which code should go into > the backend, which code should go into the platform depenent frontend > and how the interface between both sides should look like. By providing > one interface across all platforms Caprice32 can avoid this problem. > > However some platform depentend code will be needed when supporting > "unusual" platforms like the GBA. Even if kept to a minimum this has to > be structures well to avoid lots of #ifdefs. Sure, but maybe there can be an number of places where we can look for the config files, and this order would work on every platform. For example : - current directory - /etc (that's where unix users expect the config file to be) - user's home directory (~ on unix, and the equivalent windows 2000+ place if that's appropriate) - directory where the binay file resides (will work for OSX, and probably for windows too) Stephane |