Install Phonegap on Windows

Required tools

1. PhoneGap Desktop application.

This will let you easily transfer the application to the mobile device without necessity to compile the application on host computer and transfer the .apk file (in case of Android device).

Install the PhoneGap Desktop application as described here. Download the installer and run it.

2. PhoneGap CLI

If your goal is simple Javascript applications, you can stop after the previous step. But I’m going to use plugins, so I’ll need a command line tool.

Prerequisite is node.js. Download it and install. I will use the latest version, but LTS is always safer. Note, that on different versions of Windows node.js behaves differently. On Windows8 I recall I got a separate console for Node.js. On Windows7 it can be run from a normal Windows console (type cmd  in the command search).

Now from console run the following command:

npm install -g phonegap@latest

From now on we can use phonegap  command from the command line.

3. Android SDK manager

On windows this comes as a part of Android Studio, though it’s possible to install it separately: http://developer.android.com/sdk/installing/index.html

I will download Android Studio: http://developer.android.com/sdk/index.html and call SDK Manager from the toolbar.

Optional tools

I store my code on Github, so I’ll need Git.

Git

Download the installer here and run it.

When the installer asks about the PATH modification, I prefer to choose the option to allow git to run from command line (third option on the picture below):
Git installer

 

Git for Windows as a perfect installer

I just have installed git under Windows and what I want to say: this was probably the most perfect program installer I’ve ever seen.

Usually I have to check if the program didn’t check unnecessary checkboxes and whether it doesn’t try to install some additional crapware. In best cases you just click through without modifying checkboxes.

In case of git I even had to decrease the ‘safety level’ of some options. I just see that this was made with love to users and that creators really thought what people need from their program and how they’re going to use it.

With love to git.