Today, I've tried to add DOSBox.app to the Keyboard system preferences panel to a list of applications that show function keys instead of touch bar (macOS 10.12.6). The control panel responded with an alert "You cannot add keyboard shortcuts for the application". The cause of the alert is that the panel tries to locate CFBundleIdentifier from the Info.plist inside DOSBox.app bundle but the key is missing. Each application bundle should contain a bundle identifier in its Info.plist such as:

<key>CFBundleIdentifier</key><string>com.dosbox.dosbox</string>

When the key is added the control panel no longer complaints, successfully adds DOSBox.app, and the touchbar shows function keys instead of icons.