Apache Cordova under Visual Studio 2013 Update 4.  You go to
https://www.visualstudio.com/en-us/cordova-vs.aspx
and download Visual Studio Tools for Apache Cordova - CTP3.1. The convenience is that you get all the tools at once.
After the install, you will get the following:
Android SDK : c:\Program Files (x86)\Android\android-sdk
Apache Ant  : c:\apache-ant-1.9.3
Java JDKÂ Â Â Â Â Â : c:\Program Files (x86)\Java\jdk1.7.0_55
Git               : c:\Program Files (x86)\Git
Node.js        : c:\Program Files\nodejs
Index
How can I use 'cordova' like Linux environment?Since Visual Studio Built had an issue, I just wanted to use just a command line cordova.  Microsoft tools installer does not make cordova.cmd in the path. Furthermore, cordova.cmd is buried deep inside the npm. Therefore, I use the following two steps: 1. Create Cordova.cmd file in %USERPROFILE%\bin directory whose content is the following: @echo off set "Cordova=%USERPROFILE%\AppData\Roaming\npm\node_modules\vs-mda\node_modules\.bin\cordova.cmd" 2. When you want to use the command line to use 'cordova', you do %USERPROFILE%\bin\Cordova.cmd 3. Now you can issue 'cordova' command line, e.g. %Cordova% --help %Cordova% create myfirstprojectThe above sets up a macro named "Cordova" and thus you have to pre and post with '%' for Windows. This is slightly awkward, but you just substitute %Cordova% for 'cordova' in Linux example. I don't understand why such a long pathname is required for cordova.cmd. Anyway, using this method, I can go through "Apache Cordova in Action" by Raymond K. Amden (Manning Pub. 2015). How can I compile a Hello example?After installing Microsoft Apache Cordova CTP3.1 from http://www.microsoft.com/en-us/download/details.aspx?id=42675,I picked the project template for Javascript "Blank App (Apache Cordova)." When I tried build, I get the error 'node' is not recognized as an internal or external command. It turned out that Node.js installer seems to have not registered PATH for node and npm. In order to fix this, you use Joyent, Inc. Node.js in "Unisntall or change a program" in Control Panel. You right-click on it to pick 'Change' option. Make sure you select everything to write to the disk (one of the option is PATH). After this, open a command line and issue a command node -h. This will return usage for "node". Now you clean the project and rebuild it. How can I write "cli-version"?I set the target to "Ripple Android Galaxy S" and got the following error: C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CordovaTools\vs-mda-targets\Microsoft.MDA.targets(189,5): warning MSB3491: Could not write lines to file "D:\MyProgramming\ApachCordova\HelloCordova\HelloCordova\\bld\Debug\platforms\cli-version". Could not find a part of the path 'D:\MyProgramming\ApachCordova\HelloCordova\HelloCordova\bld\Debug\platforms\cli-version'. This is due to the setting in Microsoft.MDA.targets which has WriteLinesToFile tag specified wrong. Correct one: File="$(ProjectDir)\bld\Ripple\$(Platform)\$(Configuration)\platforms\cli-version" Wrong one: File="$(ProjectDir)\bld\$(Configuration)\platforms\cli-version" |
Programming‎ > ‎