Posted by & filed under News.

Here’s a quick step-by step guide for getting node-webkit running on your Mac and making self-contained, double-clickable apps:

1. First, get node-webkit from this GitHub repository:  https://github.com/rogerwang/node-webkit using this download link for the Mac version: http://dl.node-webkit.org/v0.10.5/node-webkit-v0.10.5-osx-x64.zip (note this is the current released version and there are newer RC versions if you are brave.) Note that you can actually skip this step if you just want to try packaging and running an existing project. You’ll need node-webkit during development of your own apps, however.

 

2. Second, get the Web2Executable app for bundling up node-webkit apps from here: https://github.com/jyapayne/Web2Executable or download directly from: http://www.mediafire.com/download/saazkyniauznlgh/Web2ExeMac-v0.1.9b.zip

 

3. Make a new folder called “hello”.

 

4. Use the text editor of your choice and make a new text file in the “hello” folder called “package.json” with the following contents:

{
   "name":"hello",
   "main":"index.html",
   "window":{
     "toolbar":false,
     "width":800,
     "height":600
   }
}

5. Make another text file in the “hello” folder called “index.html” with the following contents:

<!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
        <script>
         document.write("Hello **World**!");
        </script>
    </body>
</html>

6. Run the Web2Executable app to start the packaging process.

  • Click the “…” button to the right of the Project Directory field and select your “hello” folder.
  • In the Export section near the bottom, check the checkbox to the right of “Mac”.
  • Click the Export button in the lower right.

7. Open your hello folder, then open the newly created “output” folder, and navigate down to the “hello.app” file. Run it!

That’s all there is to it!

Comments are closed.