Turn on cmake mode after installing packages, and only set the menu bar if we have a window system.