Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 21 22 [23] 24 25 ... 87

Author Topic: Dwarf Therapist v42.1.7 | DF 50.14  (Read 423534 times)

feelotraveller

  • Bay Watcher
  • (y-sqrt{|x|})^2+x^2=1
    • View Profile
Re: Dwarf Therapist (Really Maintained Branch) v.39.3 | DF 44.07
« Reply #330 on: March 25, 2018, 03:57:17 pm »

Maybe DwarfTherapist.ini, just for the advantage of keeping the same name across different systems? 

Linux won't allow spaces (more precisely the NUL '\0' character) in filenames but does not have a problem with upper case - in fact it is consistently case sensitive whereas windows is case insensitive on the gui (dwarf.txt is regarded as the same file as DWARF.TXT and as dWarf.txt, and so on) but case sensitive on the command line. If I remember correctly windows from the command line needs escaping of nul characters in filenames.  I can't comment on Mac, its been so long...
Logged

Clément

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Really Maintained Branch) v.39.3 | DF 44.07
« Reply #331 on: March 25, 2018, 05:03:21 pm »

Linux (and MacOS too, I guess) allows spaces and any weird characters (including control characters) except null and /. It is more about conventions than what is legal. And "dwarftherapist" has been used for a very long time for data files. I wanted to be coherent and use the same name for configuration files.
Logged

jecowa

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Really Maintained Branch) v.39.3 | DF 44.07
« Reply #332 on: March 25, 2018, 05:21:30 pm »

Yes, the memory layouts get downloaded by the auto updater just fine on Mac last time I checked. Applications on MacOS are actually folders called packages. This package contains the executable, the icon file, some libraries, and maybe UI graphics, and other stuff. The Mac version of Dwarf Therapist stores the memory layouts in a folder inside of its application package.  If you need to know the exact location, it's /DwarfTherapist.app/Contents/MacOS/share/memory_layouts/osx/

So the bundle is writable. You still need internet access on the first run to get the memory layout.

If I understand the paths correctly, the new standard path would be /DwarfTherapist.app/Contents/Resources/memory_layouts inside the bundle and new memory layouts would downloaded to ~/Library/Application Support/dwarftherapist/memory_layouts.

I just checked Dwarf Therapist v39.3.0 on macOS 10.12 Sierra. It does not include the memory layouts in the download, but after connecting to Dwarf Fortress, the memory layouts downloaded just fine to the share folder in the application package. Dwarf Therapist didn't create a folder in either application folder. I like memory layouts in the bundle. I think it's nice having it all together and makes it easy to copy to other computers without losing the layouts.

Maybe DwarfTherapist.ini, just for the advantage of keeping the same name across different systems? 

Linux won't allow spaces (more precisely the NUL '\0' character) in filenames but does not have a problem with upper case - in fact it is consistently case sensitive whereas windows is case insensitive on the gui (dwarf.txt is regarded as the same file as DWARF.TXT and as dWarf.txt, and so on) but case sensitive on the command line. If I remember correctly windows from the command line needs escaping of nul characters in filenames.  I can't comment on Mac, its been so long...

Mac allows spaces in filenames. Colons ":" are kind of weird on Mac and could cause confusion. Case sensitivity on Mac depends on the file system. It is a user-configurable option. It's not necessarily the same for everyone.

dwarftherapist.ini then, dtsettings.ini is not very good for search either. Maybe I should use different application names on different platforms. Linux prefers "dwarftherapist" (all lower case, no space), but Windows (and MacOS?) may prefer "Dwarf Therapist".
Yes, if you are cool with them being different, I think Mac would prefer changing it to "Dwarf Therapist.app".

Or are you talking about the executable? The executable is currently called "DwarfTherapist" on Mac. I'm not sure if you can have a space in the executable. My attempts at adding a space to it have failed, and this file is hidden from the user anyway.

Edit: I can't even get a renamed executable to launch, so I must be doing it wrong.
« Last Edit: March 25, 2018, 07:59:04 pm by jecowa »
Logged

feelotraveller

  • Bay Watcher
  • (y-sqrt{|x|})^2+x^2=1
    • View Profile
Re: Dwarf Therapist (Really Maintained Branch) v.39.3 | DF 44.07
« Reply #333 on: March 25, 2018, 07:43:29 pm »

dwarftherapist.ini sounds perfect to me, but I thought you had some reservation about using it for windows?

Regardless my suggestion about not including a space in the filename is in terms of best practice.  So for example while Dwarf Therapist.ini works fine on my current linux system for reading to and writing from DT (presumably because QT?) there are some oddities if I try to open it with different text editors.  1) Geany which I usually use opens it fine no matter what.  2) After cd to correct directory, nano Dwarf Therapist.ini opens a new file Dwarf.  But nano *.* opens it (the only file in the diectory) fine.  3) Again after cd, mousepad Dwarf Therapist.ini opens two files Dwarf and Therapist.ini.  But using 'open with mousepad' from the gui opens it correctly.  4) Although my knowledge is provisionally outdated here it used to be that using the command line in windows to for example copy the file to a new location required escaping the name, i.e., "Dwarf Therapist.ini" rather than merely Dwarf Therapist.ini.  Just seemed like the perfert time to change to the most robust form.  8)
Logged

jecowa

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Really Maintained Branch) v.39.3 | DF 44.07
« Reply #334 on: March 25, 2018, 07:52:08 pm »

Yeah, it might help to escape. Try these out:
  • nano Dwarf\ Therapist.ini
  • nano "Dwarf Therapist.ini"
Logged

feelotraveller

  • Bay Watcher
  • (y-sqrt{|x|})^2+x^2=1
    • View Profile
Re: Dwarf Therapist (Really Maintained Branch) v.39.3 | DF 44.07
« Reply #335 on: March 25, 2018, 08:18:09 pm »

Oh yeah, it can be worked around, and although I haven't tried those specifically here I expect that they would work - at least in general they will.  But not everyone will be in the position to know to try, thinking new users.  Also downstream it might add just a smidgeon more convenience.  Just thought a call for filename sanity might be appropriate here.

(Slightly off-topic: for linux there are only filenames, not extensions.)
Logged

Clément

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Really Maintained Branch) v.39.3 | DF 44.07
« Reply #336 on: March 26, 2018, 05:16:15 am »

Like jecowa said, you need to escape or quote the spaces. It is not a editor issue but the command line. It's annoying (but auto-completion can help) and that is why command line users dislike spaces.

I like memory layouts in the bundle. I think it's nice having it all together and makes it easy to copy to other computers without losing the layouts.

Personally, I think this kind of bundle should be immutable. But I know some like portable software, that why I am proposing this mode. It would store updated memory layout and configuration file inside the bundle. Currently if you copy the bundle to another computer, you lose the configuration, and custom roles or grid views can be more difficult to recreate than downloading memory layouts. Anyway the bundle should contain the memory layouts and not require an internet access on the first run, this is a bug.

Case sensitivity on Mac depends on the file system. It is a user-configurable option. It's not necessarily the same for everyone.
Weird, I thought case sensitivity was mandatory for POSIX systems.

Yes, if you are cool with them being different, I think Mac would prefer changing it to "Dwarf Therapist.app".
I see a lot spaces in standard paths but bundle names are usually "MyApp.app" (see doc). I think the bundle name is generated by cmake from the executable name.

Or are you talking about the executable? The executable is currently called "DwarfTherapist" on Mac. I'm not sure if you can have a space in the executable. My attempts at adding a space to it have failed, and this file is hidden from the user anyway.

I am talking about Qt's application name, it is a string that is used for creating paths for settings or standard paths. The current value is "Dwarf Therapist" and it is only used for QSettings. But if I use QStandardPaths, it will also be used there. That is why I wanted to change it on linux to keep the data in "dwarftherapist".

On MacOS, Qt also need an organization domain or name, for creating path like ~/Library/Application Support/com.example.MyApp/. If the bundle identifier is used, it may also be best to configure it in cmake. I don't how cmake is generating it (if you have a look in Info.plist, check the value of CFBundleIdentifier).

Edit: I can't even get a renamed executable to launch, so I must be doing it wrong.
You may need to edit a file to change the executable name, Contents/Info.plist I think.
Logged

jecowa

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Really Maintained Branch) v.39.3 | DF 44.07
« Reply #337 on: March 26, 2018, 06:52:39 am »

Weird, I thought case sensitivity was mandatory for POSIX systems.
I think they only need to have case sensitivity as an option. I used to use case sensitivity, but it cause problems in some apps.

On MacOS, Qt also need an organization domain or name, for creating path like ~/Library/Application Support/com.example.MyApp/. If the bundle identifier is used, it may also be best to configure it in cmake. I don't how cmake is generating it (if you have a look in Info.plist, check the value of CFBundleIdentifier).
Your builds of Dwarf Therapist include a blank BundleIdentifier, but Fricy used "com.yourcompany.DwarfTherapist" as the BundleIdentifier in his builds. I've been adding this to it just in case it's important.
Logged

Starver

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Really Maintained Branch) v.39.3 | DF 44.07
« Reply #338 on: March 26, 2018, 08:02:35 am »

(...) windows is case insensitive on the gui but case sensitive on the command line.
I had to look this up, before replying. DOS, both as OS in its own right and later as a shell under the Windows OS, has always been case-insensitive as far as I've known it, though case-preserving under all LFN iterations which also support whitespace.

It seems that NTFS may support case-differentiation (POSIX-related low-level calls create them, only one of which would be accessible from the usual Windows-and-maybe-DOS references) but sounds like something I should have seen being deliberately being exploited for good or ill, similar to ADS, yet it has clearly passed me by. I now know what I'm trying, next time I'm on a newer Windows box...  ;)

Logged

feelotraveller

  • Bay Watcher
  • (y-sqrt{|x|})^2+x^2=1
    • View Profile
Re: Dwarf Therapist (Really Maintained Branch) v.39.3 | DF 44.07
« Reply #339 on: March 26, 2018, 08:56:13 pm »

Thanks for the correction.  :)  (In explanation I can only say that I have experienced case sensitivity from the windows command line...)  But a bit of research makes clear that it is a characteristic of the underlying filesystem, which then may be enabled or not by the system.  The clearest and most comprehensive exposition of it for windows that I found was: http://www.nicklowe.org/2012/02/understanding-case-sensitivity-in-windows-obcaseinsensitive-file_case_sensitive_search/.  That should give you some ideas if you want to play around.  ;)  Oh, and there is always Cygwin...

p.s. Apologies to Clément for muddying up the discussion.  :-[
Logged

strainer

  • Bay Watcher
  • Goatherd
    • View Profile
Re: Dwarf Therapist (Really Maintained Branch) v.39.3 | DF 44.07
« Reply #340 on: March 27, 2018, 09:34:10 pm »

Seems bEst all rounD heRe to aVoid case Sensitivity and_spaces_in_CrossPlatformFilenames.
Logged
Klok the Kloker !

Starver

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Really Maintained Branch) v.39.3 | DF 44.07
« Reply #341 on: March 28, 2018, 03:31:11 am »

How about sticking to 8POINTTH.REE format?

:P
Logged

Clément

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Really Maintained Branch) v.39.3 | DF 44.07
« Reply #342 on: March 29, 2018, 04:08:28 am »

Logged

Clément

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Really Maintained Branch) v.39.3 | DF 44.07
« Reply #343 on: March 30, 2018, 08:28:50 am »

I started trying to make preference columns. (PR #74).

With text and box modes


The tool-tip gives the list of matched preferences.

Is this what you had in mind?
Logged

Clément

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Really Maintained Branch) v.39.3 | DF 44.07
« Reply #344 on: April 01, 2018, 02:52:24 am »

Logged
Pages: 1 ... 21 22 [23] 24 25 ... 87