I am using NW.js to create a standalone application for Mac OS X. The application launches fine, but the application menu (just to the right of the Apple menu) contains no items. I had understood that a default set of menus and menu items would be created, as shown in this screenshot, taken from Arvind Ravulavaru' tutorial.
Here are my bare-bones files:
index.html
<!DOCTYPE html>
<html>
<head>
<title>Hello World</title>
</head>
<body>
<h1>Hello World</h1>
</body>
</html>
package.json
{
"name": "Hello World"
, "version": "0.0.1"
, "description": "Barebones NW.js app"
, "main": "index.html"
, "window": {
"toolbar": false
, "width": 800
, "height": 600
}
, "scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
}
, "author": ""
, "license": "MIT"
}
Here are my steps:
- Select index.html and package.json and use Finder's File > Compress 2 items to create a ZIP file from them.
- Rename this ZIP file app.nw
- Download the 64-bit build of NW.js for Mac OS X
- Unzip the downloaded file, to create a folder contain nwjs.app
- Right-click on the nwjs.app and choose Show Package Contents from the contextual menu
- Navigate to nwjs.app/Content/Resources
- Place the app.nw file inside this Resources folder

- Modify the file at nwjs.app/Content/Info.plist so that
<key>CFBundleName</key>is associated with<string>Hello World</string>. (This defines the name of the application menu.) - Rename the nwjs.app as HelloWorld.app
- Right-click on the HelloWorld.app and select Open from the contextual menu
- Enter an admin username and password to allow the app to open
- Click the Hello World application menu — nothing happens apart from a highlight
What do I need to do to get a functional application menu, with a Quit item to close the app?

