ID:899559
 
Keywords: file_dir
Applies to:Dream Maker
Status: Open

Issue hasn't been assigned a status value.
Dream Maker seems to add every sub-directory in a project as a FILE_DIR automatically. There doesn't seem to be a way to turn this off, or to customize the behavior to omit certain directories.

This is unfortunate, because it f.ex also includes a .git subdirectory. The library I'm currently writing has, amongst its FILE_DIR entries, the following:

#define FILE_DIR ".git"
#define FILE_DIR ".git/hooks"
#define FILE_DIR ".git/info"
#define FILE_DIR ".git/logs"
#define FILE_DIR ".git/logs/refs"
#define FILE_DIR ".git/logs/refs/heads"
#define FILE_DIR ".git/logs/refs/remotes"
#define FILE_DIR ".git/logs/refs/remotes/origin"
#define FILE_DIR ".git/objects"
#define FILE_DIR ".git/objects/0b"
#define FILE_DIR ".git/objects/0f"
#define FILE_DIR ".git/objects/1a"
#define FILE_DIR ".git/objects/26"
#define FILE_DIR ".git/objects/2a"
#define FILE_DIR ".git/objects/31"
#define FILE_DIR ".git/objects/37"
#define FILE_DIR ".git/objects/46"
#define FILE_DIR ".git/objects/4e"
#define FILE_DIR ".git/objects/54"
#define FILE_DIR ".git/objects/69"
#define FILE_DIR ".git/objects/7c"
#define FILE_DIR ".git/objects/7d"
#define FILE_DIR ".git/objects/8c"
#define FILE_DIR ".git/objects/93"
#define FILE_DIR ".git/objects/ad"
#define FILE_DIR ".git/objects/b9"
#define FILE_DIR ".git/objects/bc"
#define FILE_DIR ".git/objects/bf"
#define FILE_DIR ".git/objects/cb"
#define FILE_DIR ".git/objects/d3"
#define FILE_DIR ".git/objects/d6"
#define FILE_DIR ".git/objects/e0"
#define FILE_DIR ".git/objects/e8"
#define FILE_DIR ".git/objects/e9"
#define FILE_DIR ".git/objects/ee"
#define FILE_DIR ".git/objects/f1"
#define FILE_DIR ".git/objects/f2"
#define FILE_DIR ".git/objects/fa"
#define FILE_DIR ".git/objects/fc"
#define FILE_DIR ".git/refs"
#define FILE_DIR ".git/refs/heads"
#define FILE_DIR ".git/refs/remotes"
#define FILE_DIR ".git/refs/remotes/origin"


I'm sure you can see how thats not exactly handy. That list will continue growing, as I commit to git. You could exclude .git, but I think the better solution altogether is to provide a project-specific setting/file, that allows you to provide a list of names that are excluded from FILE_DIR. Similar in function to how .gitignore works, where you can provide * as a wildcard as well.
You can disable it by going to Build->Preferences for [project] and unselecting "Automatically set FILE_DIR for sub-directories".

If you do that, then you can manually define whatever FILE_DIRs you need in a code file.
In response to DarkCampainger
DarkCampainger wrote:
You can disable it by going to Build->Preferences for [project] and unselecting "Automatically set FILE_DIR for sub-directories".

If you do that, then you can manually define whatever FILE_DIRs you need in a code file.

Aha. I actually did look for this, and somehow missed it >.<
Note that if you do this, your maps may or may not be compiled properly. (Dream Maker has an outstanding bug that strips the path information for random map instances.)
Is that bug reported?
In response to Tom
Tom wrote:
Is that bug reported?

It is, but it was deferred so I didn't bother with it any further. http://www.byond.com/forum/?post=754849

I'm pretty sure I still have a reproducible test case, but I'd have to check.
Ok, well if you can get a reproducible test case, we'll do what we can to fix it.