Forum > macOS / Mac OS X

Problems with app title in TMainMenu [SOLVED]

(1/1)

carl_caulkett:
* 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?

carl_caulkett:
Turns out that all it takes is to tweak the CFBundleName in the Info.plist in the depths of the ".app" bundle.

--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict>    <key>CFBundleExecutable</key>    <string>OsmosePresets_macOS_aarch64</string>    <key>CFBundleIdentifier</key>    <string>com.yourcompany.OsmosePresets_macOS_aarch64</string>    <key>CFBundleName</key>    <string>Osmose Presets</string>.      <key>CFBundleInfoDictionaryVersion</key>    <string>6.0</string>    <key>CFBundlePackageType</key>    <string>APPL</string>    <key>CFBundleSignature</key>    <string>????</string>    <key>LSMinimumSystemVersion</key>    <string>10.12</string>    <key>NSHighResolutionCapable</key>    <true/></dict></plist> 

Navigation

[0] Message Index

Go to full version