Open Karcharoth opened 3 months ago
Also, check that there is no instance of "1.3.0" - that should all be replaced with 1.0.0 for now.
And figure out what's up with the comments in Appdelegate.m!
And the org.rephial.narsil thing in Makefile.osx
So all that remains is the mac rephial narsil thingy.
src/cocoa/en.lproj/MainMenu.nib is essentially a compiled version of src/cocoa/Base.lproj/MainMenu.xib. To have the changes you made to the names show up in the Mac version, use Xcode to compile src/cocoa/Base.lproj/MainMenu.nib into a new src/cocoa/en.lproj/MainMenu.nib. The comments at the start of src/cocoa/AppDelegate.m outline how to do that. It may be possible to directly edit src/cocoa/en.lproj/MainMenu.nib to change the names, but I haven't tried that.
Oh, thank you! I have no doubt that without this I was going to be very confused in a month or two. Yikes. The thing I'm really curious about is the product name / organization identifier stuff. Frogcomposband still uses the basic Angband identifier, but you mention it being relevant for settings. Can I just freely change it to karcharoth.github.keys-of-orthanc and not worry about it, or is there something where it pulls settings that I need to customize?
Here is the link to Apple's reference documentation about bundle identifiers, https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleidentifier?language=objc . Since the usual recommendation is to use a DNS name in reverse order, you might use com.github.karcharoth.keys-of-orthanc as your bundle identifier. Setting it in Makefile.osx should be the only place that really matters (from there it is substituted into src/cocoa/KeysOfOrthanc-cocoa.xml to generate the Info.plist included in the application bundle). Specifying it when setting up a project in Xcode would only matter if you built the application you distributed within Xcode.
Since frogcomposband uses the same bundle identifier as Vanilla, they'll share the same configuration settings for the macOS front end (size and layout of the windows, tileset used, sound enabled). There's a minor feature, double clicking on a savefile to open it in the application, that may also be affected. That behavior is also affected by cocoa_file_open_hook() and ANGBAND_CREATOR in main-cocoa.m and line 48 of src/KeysOfOrthanc-cocoa.xml. The macOS front end is still using a mechanism inherited from macOS 9 and earlier: two 4 ASCII character codes to identify the type and creator of a file; some useful background for that is here, https://livecode.byu.edu/helps/file-creatorcodes.php . Vanilla uses 'SAVE' for save files with 'a271' as the creator. NarSil uses 'NSIL' for save files with 'a271' as the creator. The issue and related change where NarSil distinguished its savefiles from Vanilla's are https://github.com/NickMcConnell/NarSil/issues/238 and https://github.com/NickMcConnell/NarSil/commit/acec797b39735f4eabb074ac162a8e56fcfbbb5b .
Do I want to replace it with my own?