How to add "Preference" in a Mac MenuBar

I tried to enforce a Preference menu in the root menu list (you know, the classical “cmd+,”), but I dont manage to.
Anyone help ?

thank you.


I have and example project here:

…that does this. Haven’t checked it with the tip though.

Thank you. If I dont come back in this threas, it is because it works.
(I think a bit the same is possible with “search”)