how to change VASSAL directory in linux?

Thus spake “surflut”:

There’s presently no way to change this. I agree that it should be
~/.VASSAL on Linux (and probably also on Mac OS X). This will be fixed
in VASSAL 3.2.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

On Apr 8, 2010, at 1:29 PM, Joel Uckelman wrote:

I would argue against .VASSAL on Mac OS X. The problem is that hidden
files like that are really hard to get to using the regular Mac
Finder, so it will be rather mystifying for users who aren’t handy in
Unix and the Terminal. So I would just leave well enough alone on the
Mac.

It would be nice to be able to configure that, though. On the other
hand, one would then need some other fixed place to store the
information about exactly where that folder was. But that can
presumably just go into the normal preferences file, I guess.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake Thomas Russ:

This fails due to circularity, since the preferences file lives in that
directory.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

On Apr 8, 2010, at 2:37 PM, Joel Uckelman wrote:

Yeah, I thought it would be something like that.

If one wanted to be fully consistent with Mac practices, the Preferences would be stored in ~/Library/Preferences directory, presumable under a Vassal subdirectory. Other preference information could go there. Other files that the application needs would be traditionally stored in ~/Library/Application Support/Vassal

Except from developer.apple.com/Mac/library/ … aAPIs.html

===== begin quote ====

"Preferences

The Preferences API is fully supported in Mac OS X, but there are two details you should be aware of to provide the best experience to users:

• The preferences files generated by the Preferences API are named com.apple.java.util.prefs. The user’s preferences file is stored in their home directory (~/Library/Preferences/). The system preferences are stored in/Library/Preferences/ and are only persisted to disk if the user is an administrator.

• To be consistent with the Mac OS X user experience, your preferences should be available from the application menu. The com.apple.eawt.Application class provides a mechanism for doing this. See J2SE 5.0 Apple Extensions Reference for more information."

===== end quote ====

More about the Library and Application Support directories.

Basic background:
developer.apple.com/mac/library/ … Files.html

Here’s a nice little cross-platform discussion of application support issues with some sample code:
forums.sun.com/thread.jspa?threadID=5386564

the only thing that isn’t covered by this is what to do on non-English operating system installations. It looks like that is handled on the Mac by the
com.apple.eio.FileManager
class with its static findFolder function. It would seem that this should work for both the Preferences and Application Support folders, although the javadocs maddeningly enough don’t seem to give the list of allowable folderType codes. These must be constants somewhere, but I’m having trouble locating them.
Let’s see what I can find.
It seems that the best solution is to call
com.apple.eio.FileManager(com.apple.eio.FileManager.kUserDomain,
???,
true)
which will return the appropriate directory string for the user, creating it if necessary. The problem is finding the proper integers to pass for the folder types. I couldn’t find it in the Apple documentation anywhere, but I did find an email from the Java dev list that pretty much reverse engineered it from the C sources:

lists.apple.com/archives/java-de … 00612.html

which show 0x61737570 for Application Support, 0xx70726566 for Preferences and 0xx74656D70 for Temp.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)