===
- The project supports Cordova on Win8, and uses WinLib4JS for most implementation (others with SQLite3, Jscex and so on).
- The wiki about Cordova-Win8: Impl and not Impl.
-
Who want to develop Cordova API
-
You could use the project in
src
folder directly. -
If you want to export the project with zip package, open the project in
\tool\CordovaBuilder
with Visual Studio (Administrator
) , build and run it, then open you command prompt(Administrator
), type the command according to the guide:Usage: CordovaBuilder [ BuildOutputPath -c:Type ]. BuildOutputPath : path to save the built application. -c : which type of project you want to create, 0 for Metro App developers, 1 for Cordova API developers, default is 0. examples: CordovaBuilder bin\Debug. CordovaBuilder bin\Release -c:1.
-
A ZIP file named CordovaStarter.zip will be generated.
- Who want to develop Metro App by using Cordova API
- Do the same steps as above. -c:Type should be 0.
- A Visual Studio template named Cordova-Metro.zip will be generated. Move it to the directory of your VS Template. You do not need to unzip it.
e.g.:
C:\Users\xxxx\Documents\Visual Studio 2012\Templates\ProjectTemplates
- Open the VS,
FILE
->New
->Project...
, input the template name 'Cordova-Metro' in the search textField. Select the template and modify items about your new proj at the bottom of the pop-up window.
- Open the
samples\TestAppCordova\TestAppCordova.sln
with visual studio. - Build and run.
- Play around with accelerometer, geolocation, and compass.
- Open the
src\src.sln
with Visual Studio. - Build or re-build the project.
- Modify the
default.html
undertest
folder, choose the test case you want to run, and comment out any other tests.
<!-- Tests -->
<!--
<script type="text/javascript" src="tests/accelerometer.tests.js"></script>
<script type="text/javascript" src="tests/battery.tests.js"></script>
<script type="text/javascript" src="tests/camera.tests.js"></script>
<script type="text/javascript" src="tests/capture.tests.js"></script>
-->
<script type="text/javascript" src="tests/compass.tests.js"></script>
>!--
<script type="text/javascript" src="tests/contacts.tests.js"></script>
<script type="text/javascript" src="tests/device.tests.js"></script>
<script type="text/javascript" src="tests/file.tests.js"></script>
<script type="text/javascript" src="tests/filetransfer.tests.js"></script>
<script type="text/javascript" src="tests/geolocation.tests.js"></script>
<script type="text/javascript" src="tests/media.tests.js"></script>
<script type="text/javascript" src="tests/network.tests.js"></script>
<script type="text/javascript" src="tests/notification.tests.js"></script>
<script type="text/javascript" src="tests/platform.tests.js"></script>
<script type="text/javascript" src="tests/storage.tests.js"></script>
-->
- Now run the project, and you will get a result page as below.