Recent

Author Topic: Problems with app title in TMainMenu [SOLVED]  (Read 351 times)

carl_caulkett

  • Hero Member
  • *****
  • Posts: 649
Problems with app title in TMainMenu [SOLVED]
« on: October 21, 2024, 11:29:22 am »
* Mac Mini M1
* macOS 14.6.1
* Lazarus 3.99
* FPC 3.3.1

I am experimenting with a TMainMenu in my app, and am pleased with the way it translates the menu definition into the Mac way of doing things, with one exception. The 0th menu item is always showing the project name, which, in my case is "testmenubar". I've tried a few gpt4o suggested ways of fixing this, involving calls to objectiveC1 code, but none of them work!

Is there an easy way of overriding the 0th item?
« Last Edit: October 21, 2024, 05:46:50 pm by carl_caulkett »
"It builds... ship it!"

carl_caulkett

  • Hero Member
  • *****
  • Posts: 649
Re: Problems with app title in TMainMenu
« Reply #1 on: October 21, 2024, 05:45:15 pm »
Turns out that all it takes is to tweak the CFBundleName in the Info.plist in the depths of the ".app" bundle.
Code: Text  [Select][+][-]
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3. <plist version="1.0">
  4. <dict>
  5.     <key>CFBundleExecutable</key>
  6.     <string>OsmosePresets_macOS_aarch64</string>
  7.     <key>CFBundleIdentifier</key>
  8.     <string>com.yourcompany.OsmosePresets_macOS_aarch64</string>
  9.     <key>CFBundleName</key>
  10.     <string>Osmose Presets</string>.  
  11.     <key>CFBundleInfoDictionaryVersion</key>
  12.     <string>6.0</string>
  13.     <key>CFBundlePackageType</key>
  14.     <string>APPL</string>
  15.     <key>CFBundleSignature</key>
  16.     <string>????</string>
  17.     <key>LSMinimumSystemVersion</key>
  18.     <string>10.12</string>
  19.     <key>NSHighResolutionCapable</key>
  20.     <true/>
  21. </dict>
  22. </plist>
  23.  
"It builds... ship it!"

 

TinyPortal © 2005-2018