Re: [Plib-devel] Mac Updates/Patches (Tux too!)
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2000-08-04 04:52:49
|
Darrell Walisser wrote: > > For relative paths, I am pretty sure folders end in ':' and files do not. > > For PLIB, I think we will make all our paths relative. Therefore *all* paths > will have ':' at the beginning. Since we are not opening directories, > I don't think we have to worry about trailing ':' > > so UNIX -> "foo.bar" -> MAC ":foo.bar" > > or "../foo.bar" -> "::foo.bar" > > UNIX -> /usr/local/share -> MAC ":usr:local:share" > > Hopefully that last one doesn't come up too often ;-) We just have to remind > developers to always use relative pathnames (even on UNIX/WINDOWS) and we > should have no problems. Iguess that makes sense because: 1) It avoids the drive name issue under Windoze ('C:', etc) 2) It's unlikely that an absolute path under one OS would even exist under another. > This reminds me, when needing full paths, like for home directory or > whatnot, I think the usual is to call getenv ("HOME"). But MacOS has no > concept of $HOME. In fact, the CodeWarrior C Library function getenv() on > MacOS always returns NULL. > > I think we should add getHome to our file class. > The MacOS version can return the path to the preferences folder (global > place where 99% of Mac apps store settings, hence why mine has 500 some-odd > files in it ;-) ). Yes - I think that's a good plan. We'd also need a way to get a path from a 'shell variable' - or whatever other preferences mechanism you have - that would let (for example) a game find all it's data files. Since the preference mechanisms vary - and the path name you get from that mechanism will be in LOCAL form - not in the form that the game writer was necessarily expecting - that will have to be handled within the library. -- Steve Baker HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://web2.airmail.net/sjbaker1 Projects : http://plib.sourceforge.net http://tuxaqfh.sourceforge.net http://tuxkart.sourceforge.net http://prettypoly.sourceforge.net |