Ticket #506 (confirmed change)
MacOS: Keep SVN Angband from interfering with other versions
| Reported by: | roustk@… | Owned by: | |
|---|---|---|---|
| Milestone: | 3.1.3 | Keywords: | mac |
| Cc: |
Description
When I compiled a new version of Angband from SVN last night, I found that it interfered significantly with my existing v3.0.9 installation:
- MacOS associated savefiles with the SVN version.
- The SVN version could not parse and overwrote my window size and location preferences.
I would like to be able to use v3.0.9 for my real games, while using svn for testing.
I propose two changes that will isolate the new version and keep it from interfering with the main version:
- Add a compile-time switch to Makefile.osx that changes "PLIST = osx/Angband.xml" to "PLIST = osx/AngbandSafe.xml". (I'm not a Makefile guru, but it seems like this should be plausible.)
- Add a file osx/AngbandSafe.xml that is a copy of osx/Angband.xml with two modifications (see attached):
- Change CFBundleIdentifier to be "net.thangorodrim.$NAME$SVN" rather than "net.thangorodrim.$NAME$".
- Delete the entire CFBundleDocumentTypes branch.
The first change to the xml file will put window preferences in ~/Library/Preferences/net.thangorodrim.AngbandSVN.plist rather than the usual location. The second change will prevent the OS from associating savefiles with the new application bundle.
I have tested both these modifications (first by making the xml changes directly to trunk/Angband.app/Contents/Info.plist and later re-compiling as specified above) and everything seems to work as I would like -- double-click or 'open' a savefile opens 3.0.9, and 3.0.9 and SVN can maintain different window locations without interference.
Note carefully: under this proposal, both versions still access the same bone, data, score, and save directories (in ~/Library/Preferences/Angband). This certainly has the potential to be dangerous, but the worst effects can be avoided by just deleting the *.raw files when switching versions.
Kevin
