gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS Misc > [Big Small Request] Data Directory

#96291 - arlow - Wed Aug 02, 2006 10:19 am

Hi,

My idea was to use a data Directory for all homebrew that needs extra data on the SD/CF. So far as I know homebrew can't detect from which folder it has been started and that is why every data folder has to be in the root of your SD/CF. But why doesn't all homebrew use something familiar with Documents and Settings in Windows.

For example:
/data/DSOrganize/ instead of /DSOrganizeand
/data/MoonShell instead of /shell
/data/NDSMail/ instead of having config files in root
/data/linux instead of /linus
etc. etc.

I'll try and post this everywhere I can please support I think this makes some things a little bit easier and nicer to look at.

Greetings r-low
_________________
Hardware:
- 2 Nintendo DS (original V2; now FlashMe V6)
- 1 SuperPass 2
- 2 SuperCard SD + 1 * 2GB SanDisc miniSD + 1 * 3rdParty 512MB SD
(Could get together 7 DS + 7 SCSD)

Languages: English, German

#96294 - freemaan - Wed Aug 02, 2006 10:36 am

Good idea!

Even better:
/NDS/data/DSorganize/
/NDS/data/moonshell/
/NDS/data/something/
/NDS/temp (for temporary files/logfiles)
/NDS/DSorganize.nds
/NDS/moonshell.nds
/NDS/something.nds

#96321 - Darkflame - Wed Aug 02, 2006 4:02 pm

Great idea!
Id love to see less duplication about the place and shareing resources too.

eg.
Moonshell already has plugins for media formats....wouldnt it be great for other things (DSorganiser) to use the same files ?


A predictable directory structure would help make this possible.
(oh, and purhapes actual file assoiation one day for stuff like emulated roms)
_________________
Darkflames Reviews --
Make your own at;
Rateoholic:Reviews for anything, by anyone.

#96401 - HyperHacker - Thu Aug 03, 2006 2:30 am

Yeah, it'd be kinda nice if every app didn't need stuff in root and could share common code/resources. The big problem is how do you agree on a directory structure? For example, I'd like all my images in \Image, but maybe others want them in \Pictures or something.

What might be done is to have all programs use one config.ini or something in the root telling them where to store their data and where things like other apps can be found. Heck, you could have them store all their settings here, but I'd worry that one glitch (which seems to be common enough when writing to memory cards) could wipe out the file.
_________________
I'm a PSP hacker now, but I still <3 DS.

#96431 - MaHe - Thu Aug 03, 2006 11:27 am

Yes, there should be a global configuration file for use with applications (just like Windows uses the registry), or maybe somebody could make a loader (based on Mighty Max' exec() example, that would have it's own .ini file with application settings and then 'emulate' the 'root' directory for them ... ?
_________________
[ Crimson and Black Nintendo DS Lite | CycloDS Evolution | EZ-Flash 3-in-1 | 1 GB Transcend microSD ]

#96465 - strager - Thu Aug 03, 2006 2:47 pm

In my opinion, I think it would be best to have the program's "home" directory be the directory of the .nds file. This way you can rename (the home folder) "DSOrganize" or "DSO" or something. The program's root directory would somehow be passed to the program when booting so it knows where to look. And of course, you would want linking so that you could put all your executables in a single directory; maybe a special .nds template that boots another .nds?

Example:
Code:
/
/_BOOT_MP.nds       (link -> /dsorganize.nds)
/dsorganize.nds     (link -> /dso/dsorganize.nds)
/moonshell.nds      (link -> /mshell/moonshell.nds)
/dso/
/dso/dsorganize.nds
/dso/dsorganize/[system files and directories]
/mshell/
/mshell/moonshell.nds
/mshell/shell/[system files and directories]
...

and so on for all your applications.

The home directory for programs would be similar to Linux (where "~/" is home). The default directory would be home, too, of course. The only problem with this that I see is if the programs normally access the root directory themselves instead of using relative paths: the programs would have to be modified to use the tilde-slash instead.

#96767 - arlow - Sat Aug 05, 2006 12:59 pm

Don't make it to complicated. Just a directory with data/HomebrewName/files.
By the way DSOrganize already supports the data directory.
_________________
Hardware:
- 2 Nintendo DS (original V2; now FlashMe V6)
- 1 SuperPass 2
- 2 SuperCard SD + 1 * 2GB SanDisc miniSD + 1 * 3rdParty 512MB SD
(Could get together 7 DS + 7 SCSD)

Languages: English, German

#96918 - zzo38computer - Sun Aug 06, 2006 4:20 pm

You could also store saver files in the /saver directory (most of my programs do that), but everything else listed in this thread works just as well.
_________________
Important: Please send messages about FWNITRO to the public forum, not privately to me.

#96947 - Devil_Spawn - Sun Aug 06, 2006 8:10 pm

idunno about you guys but all those annoying folders i just right click + hide, simple as that

#97022 - Darkflame - Mon Aug 07, 2006 12:43 pm

Yes, but it would be nice if apps could share resources.

I think its just a shame theres a fair amunt of duplication going on.
_________________
Darkflames Reviews --
Make your own at;
Rateoholic:Reviews for anything, by anyone.

#97023 - bjoerngiesler - Mon Aug 07, 2006 12:48 pm

arlow wrote:
Don't make it to complicated. Just a directory with data/HomebrewName/files.


Good one. I suggest an additional directory named

/data/settings

which contains settings files for all applications. That's the way the Mac does it (there, it's ~/Library/Preferences). DSOrganize's settings file would be called /data/settings/DSOrganize.whatever, for example.

Makes separation of read-only and user-modifiable content much easier.

#97027 - kevinc - Mon Aug 07, 2006 2:06 pm

So... what if I want my folder names in Spanish?

#97028 - Mrshlee - Mon Aug 07, 2006 2:12 pm

with the ability to boot nds files. might be a good idea to organise a single standard of conf.

I'm sure the root:/Homebrew.nds with
root:/settings/homebrew.conf
root:/settings/homebrew.motd

whatever.. might actually do worth it.
_________________
MrShlee.com
Projects
Dev-Scene
MyTechpedia

#97030 - Dan2552 - Mon Aug 07, 2006 2:27 pm

kevinc wrote:
So... what if I want my folder names in Spanish?


well the project name folders wouldn't be in Spanish, because they don't have special Spanish names

if it were

/data/DSOrganize/
/data/MoonShell
/data/NDSMail/
/data/linux

I'm sure you could cope with the 1 English directory 'data'?

#97032 - bjoerngiesler - Mon Aug 07, 2006 2:36 pm

Please, let's stick to standardized (English) filesystem names, otherwise writing programs to use them will become a nightmare. Apple handles it this way. They present internationalized names in the file manager ("Bibliothek" instead of "Library", for example), which is trivial to implement if there is a clean filesystem standard. But there must be one and only one actual name.

#97036 - Darkflame - Mon Aug 07, 2006 3:28 pm

agreed.

I think we should clearly write the preposed systems down logicaly, weigh the pro's and cons.
(esp from people developing stuff)

The have a big vote no?
_________________
Darkflames Reviews --
Make your own at;
Rateoholic:Reviews for anything, by anyone.

#97045 - bjoerngiesler - Mon Aug 07, 2006 4:44 pm

Great idea. I'd suggest:


    like arlow suggested, a folder named /data with a subfolder for each application that needs to store data

    a folder named /data/settings to store configuration in (preferably in a common format, as Mrshlee suggested -- XML?)

    keeping simple .nds applications wherever

    keeping .nds applications inside a folder with the .app extension, like on MacOS X, if they require read-only resources stored in the file system. Those would be bundled inside the same app folder.

#97351 - bjoerngiesler - Wed Aug 09, 2006 11:27 am

Since I'm just at the point where I need a config file for my FTP server: Any ideas for a common file format? What do you think about XML? Too heavyweight? Other suggestions?

#97449 - HyperHacker - Wed Aug 09, 2006 9:05 pm

XML seems a bit bloated for what could potentially be as little as a 16MB card. Standard INIs seem like the way to go.
_________________
I'm a PSP hacker now, but I still <3 DS.