-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Location of game_data.ini on GNU/Linux #30
Comments
Looking through the source code I found what is causing the error. It's looking for both game_data.ini and memory_layouts using relative paths instead of absolute paths. I guess this is why it worked previously when I ran it directly in the build directory. The following modification fixes the issue. However it will no longer be possible to run Dwarf Therapist from the build directory.
Perhaps there's a better way to solve it? Which allows the user to use Dwarf Therapist in the build directory as well and for other operating systems? |
I'll have to move things around a bit to allow multiple, different search paths for the files for each operating system. The code above will break osx and windows since it's hard-coding linux file paths in the base Any other linux paths that should be checked by default? |
Yes I'm aware that it would mess up other operating systems. That's why I didn't create an actual pull request for the modification. Just wanted to inform you what's causing the issue. After applying the changes above it works correctly. Can't find any other issues. Thank you for your time! |
Actually I've a thought regarding directory structure. It would be neat if Dwarf Therapist would search "$HOME/.config/UDP\ Software/memory_layouts (user specific), /etc/dwarftherapist/ (system specific) and finally /usr/share/dwarftherapist/etc for memory_layouts as default. This would make it simpler to add new memory_layouts for a user in case an official one hasn't been released yet. I don't know if game_data.ini would be edited by users. Perhaps same logic should be applied to this file in that case. User settings for DT seems to be saved in $HOME/.config/UDP\ Software. That's why this directory was chosen for user-specific settings. |
That sounds like a plan. Normally users shouldn't mess around with the file, since it's normally overwritten when updating. |
Also build outside of bin.
Also build outside of bin.
Also build outside of bin.
Also build outside of bin.
Also build outside of bin. Conflicts: dwarftherapist.pro
Also build outside of bin. Conflicts: dwarftherapist.pro
Also build outside of bin. Conflicts: dwarftherapist.pro
Also build outside of bin.
Also build outside of bin.
Also build outside of bin.
Also build outside of bin.
In case anyone is concerned: I'm going to hardcode /etc/dwarftherapist for Debian. Some cross-platform solution leading to the same paths on Linux would be great but I'm fine with maintaining a Debian-specific patch. As a worst case you can add platform-specific ifdefs in those parts of the code. |
Have you had a look, or tried #150? Once it's validated for OSX I do plan to merge it into the DF2014 man branch. |
I think it is a good idea to allow users to provide newer .ini files without updating the software itself and this requires support for reading those files from /etc or the home dir. |
conjecture: it would be a good idea to peruse the contents of said ini file before making generalizations. |
I know that memory layout files are not user-writable configs. |
Hi,
I'm attempting to create a Dwarf Therapist ebuild (used by the package manager in Gentoo). However i stumbled upon this weird behaviour of game_data.ini. When Dwarf Therapist is installed it looks for game_data.ini in $HOME/etc instead of the installed location of game_data.ini (/usr/share/dwarftherapist/etc/game_data.ini).
Actual home directory replaced by $HOME.
After $HOME/etc was created and game_data.ini copied into that directory it worked.
Uncertain if I had done something wrong in the ebuild I compiled and built Dwarf Therapist from source manually and followed the supplied instructions (qmake, make, make install).
Interestingly enough it when I started Dwarf-Therapist (from /usr/bin/Dwarf-Therapist) it worked. However further investigation showed that it found game_data.ini in my build directory and not in /usr/share/dwarftherapist/etc).
When $HOME/temp/dwarftherapist was moved it stopped working since it was unable to find game_data.ini.
Dwarf Therapist does not seem to look for game_data.ini in the correct location or am I missing something?
The text was updated successfully, but these errors were encountered: