robojumper / DarkestDungeonSaveEditor

Darkest Dungeon Save File (.json) Reader, Writer, Editor. Also, Spreadsheets.
MIT License
74 stars 8 forks source link

Can't choose game directory on OSX #6

Closed robojumper closed 5 years ago

robojumper commented 5 years ago

Per comment on reddit:

One note, I had to copy the game files on OSX to a separate location because the browser you're using couldn't open the package contents (the stupid mac zip).

I don't have a Mac, help wanted!

jeremy1015 commented 5 years ago

Actually I figured I should be part of the solution and not part of the problem.

My box is totally not set up for Java development right now, but I did go into your source code and do a little research.

You need to set a property in order for JFileChooser to treat .app files as a directory:

JFileChooser.appBundleIsTraversable

I think you just need to set that to "always"

So, in the file DarkestDungeonSaveEditor/src/main/java/de/robojumper/ddsavereader/ui/MainWindow.java

After line 460

chooser.putClientProperty("JFileChooser.appBundleIsTraversable","always");

I think would do it. It would be pretty non-trivial for me to get the JDK installed and whatnot, but I'm happy to test it if you'd like.

Got my information from here: https://www.fenestrated.net/mirrors/Apple%20Technotes%20(As%20of%202002)/tn/tn2042.html

https://docs.oracle.com/javase/8/docs/api/javax/swing/JComponent.html#putClientProperty-java.lang.Object-java.lang.Object-

robojumper commented 5 years ago

Released v0.0.63 with this change. Thank you very much for your help, let me know if this fixes it.

jeremy1015 commented 5 years ago

Confirmed fixed. Thanks so much!