Phonegap is an Adobe project, based on (and almost identical to) the open source project Apache Cordova. As we’ll see later, Installing both projects is almost identical.
In this case, we’ll use NodeJS locally, as one of the tools in Phonegap set of tools. mainly we’re after a package manager tool called npm that will help us install more later.
Installing NodeJS is simple: just download the installaion file from NodeJS site,
(by pressing INSTALL on the main page) save the file in whatever directory and run it. No options to choose, no changes.
GIT is a version control tool created by Linus Torvalds, to manage the Linux source code. GIT let us get remote source from repositories, and that’s exactly what it’ll do for us later. Installing GIT is simple as well:
Download the installaion file from here, and run it (with a single change).
The only change:
When you get to the PATH definition, you should choose the 2nd or last options.
This will let us run GIT from any directory.
The rest of the installaion is straight forward.
Installing the CLI
This is the actual installaion of Phonegap itself.
Running Phonegap (or Cordova) is done using command-line interface (CLI) is a command prompt window. Installing these commands is done using NodeJS npm, so the is no need to download anything.
Open a command prompt, and type
npm -g phonegap install1
The result is:
It is easy to replace the installaion of Phonegap with Apache Cordova like this:
npm -g uninstall phonegap
npm -g install cordova
And that is all.
The rest of the installaion (will be covered in the next chapter) is identical in both cases.
In the next chapter, we’ll present more that we need in order to run Android app built with Phonegap.