Menu

#26 File organization

v0.64
closed-works-for-me
None
3
2017-01-03
2015-02-27
Anonymous
No

Could there be a less drastic way to install databases than copying them to ~/.jgamebase?

Typically I will download one of these databases with the game files and other extras included and these collections are large, reaching into the gigabytes. I have a big hard disk which is good for unpacking this kind of stuff to. However my home directory is on an SSD and it will fill up pretty quickly if I dump 5 GBs of files in there for every retro gaming machine I have a passing interest in. In my opinion the home directory should just be for files that I have 'created' myself, which I couldn't just replace by re-downloading (hence I include my home directory in backups). In the case of most programs this means config files.

I reckon that all jGameBase should really store in the home directory is a config file with one or more pairs of database name (eg. "GameBase 64 v0.7") and the directory path in which that database and its associated files can be found (eg. "/mnt/big_disk/games/C64/GameBase64v0.7"). Then when you start jGameBase you choose one from the menu and the program essentially cd's into the database directory and carries on from there. Better still - and this is a more focused feature request that basically amounts to the same thing - jGameBase should have a command-line option to set the directory in which it looks for databases, instead of ~/.jgamebase.

I have managed to make jGameBase work with databases in arbitrary paths on my Linux machine by symlinking the directories into ~/.jgamebase, but it strikes me as an awkward solution - symlinked dirs always give me the fear of accidentally losing stuff in recursive deletions, you have to go into your backup system and specifically exclude them, etc. Also I occasionally use Windows too and though it does now have things that work like symlinks as well, no doubt there are subtle differences I'm not aware of from the Unix ones which mean I'd rather not tangle with them if at all possible.

I might be up for diving into the code and trying to implement this myself, but I thought I'd post the idea here first to see if there's any agreement with my general view of how stuff should work.

Discussion

  • Daniel Lopez

    Daniel Lopez - 2015-02-27

    Oops, didn't realise it was possible to post here anonymously. That wasn't intended. Well, this is me anyway.

    -Daniel

     
  • F. Gerbig

    F. Gerbig - 2015-03-02

    Hi Daniel,

    sorry - it's a long time that I wrote jGamebase; perhaps not all I remember is acurate and still working:

    1. jGamebase should only copy the directories needed writable, not the large ones like "Games" and "Extras" (but I would have to verify that)

    2. There is a global setting (e.g. for windows systems) preventing all of this copying: Set "FHS=false" in the file "global.ini" (in linux located in "/usr/share/games/jgamebase") - Ok, it is perhaps no good idea to have the ini-file not writable; but on unixoid systems I like the FHS layout :-).

    3. Instead of symlinking: you can tell jGamebase where to look for the files, the given paths are searched first (no harm if the dir is empty), but if I remember correctly you should be able to specify more search paths for (nearly) everything.

    The whole copying comes from me using linux and packaging the software and databases in debian packages. The packages get extracted to read-only places, but jGamebase needs write access to the db, config and so on. So I had this idea with the copying.

    I for my part use the "FHS=true" copying layout and have the big dirs symlinked.

    I would be glad if you would implement new features - simply download the source and bin package, extract them to the same place and import this as eclipse project.

    Hope that helps :-)

    Kind regards,
    Frank.

     
  • F. Gerbig

    F. Gerbig - 2015-03-02
    • status: open --> pending
    • assigned_to: F. Gerbig
    • Priority: 5 --> 3
     
  • F. Gerbig

    F. Gerbig - 2017-01-03
    • status: pending --> closed-works-for-me
     

Anonymous
Anonymous

Add attachments
Cancel