I don't have dls.log anywhere in my home directory (find . -type f -iname '*dls.log*' -> no output).
I tried to run game with GDB but I doubt log will be useful without debug binary.
If there's no DLS subfolder in your ~/Documents folder and you cannot find DLS.log anywhere it probably means that DLS doesn't have permissions to initialize its "file system".
The first thing DLS does when starting up is to figure out what's the installation path (readlink("/proc/self/exe", ...)) and under which folder it should create the DLS subfolder to store user-generated content. It first looks for the HOME environment variable. Then for the XDG_DATA_HOME environment variable and if none is defined, it uses the installation path.
After that the log is opened at <user-data-folder>/Documents/DLS/DLS.log
If you cannot find the log file, it means that the first step failed. Which either means that the above procedure has a bug (which I haven't found yet), or the paths are correctly read but DLS doesn't have permissions to create files and subfolders in them.
Will try to debug it by trying out all the different cases in the above procedure and will report back.
Thanks for trying to figure it out and sorry again for the trouble.
Ok, that explanation helped me to figure it out. I tried to run DLS with strace. Here is relevant part of the output:
readlink("/proc/self/exe", "/home/teddy/Pobrane/DLS/DLS_x64_"..., 512) = 39
mkdir("/home/teddy/Documents/DLS/", 0700) = -1 ENOENT (No such file or directory)
chdir("/home/teddy/Documents/DLS/") = -1 ENOENT (No such file or directory)
exit_group(-1) = ?
mkdir fails because I don't have Documents subdirectory (I'v got Polish
locale and it's ~/Dokumenty/ ony my system :D ). It's should be easy fix (temporary
workaround is to create ~/Documents directory manually).
Another thing is you implemented XDG spec incorrectly. If XDG_DATA_HOME is
not set or empty (usually it is) you should use $HOME/.local/share This way
you won't clutter user's home/Documents directory :) I suppose this is the best solution since it does not depend on system locale.
Thank you very much for taking the time to debug this. I haven't thought about that. The only reason I didn't create the path recursively (i.e. mkdir both Documents and DLS) was because I thought Documents will always be there...
Honestly I don't remember where I got XDG_DATA_HOME env var from and why it's there. I'll look into $HOME/.local/share and see what I can do. Since files/folders starting with a dot are by default invisible (I think so at least), using it for user generated content would make sharing stuff (schematic, scripts, etc) harder because it won't be immediately obvious where they are stored.
No problem :) XDG_DATA_HOME comes from XDG Base Directory Specification - it's worth checking out. Yeah, recursive mkdir would do the trick but it would be confusing for users with locales different than English. Yeah, dot directories are hidden. On the other hand programs dumping their content in $HOME are pretty annoying, Simple soluton might be „Open directory with schematics” button in game.
Anyway, feel free to remove this thread from comments if you like. It got quit big and since bug will be fixed there's no reason to scare potential users :D
I just uploaded v0.16.2 which changes the user data folder location on Linux. The order of the various checks is now the following:
I'll be glad to hear back from you once you find the time to test it.
There's no need to delete this thread even if the bug has been fixed. If you want, you can edit your first comment to mention that the bug has been fixed in v0.16.2 :)