Cordova runtime not installed when creating an HTML5 app template

Bug #1338445 reported by David Planella
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu HTML5 UI SDK
Invalid
Undecided
Alexandre Abreu
qtcreator-plugin-ubuntu
Fix Released
Undecided
Alexandre Abreu
qtcreator-plugin-ubuntu (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

When I try to create a new HTML5 app in Qt Creator as a template, it contains the following lines in index.html:

    <!-- Cordova platform API access - Uncomment this to have access to the Javascript APIs -->
    <!-- <script src="cordova/cordova.js"></script> -->

However, the cordova/cordova.js file is never copied to the project, making it impossible for app developers to use it.

Related branches

David Planella (dpm)
tags: added: html5-blocker
Revision history for this message
Alexandre Abreu (abreu-alexandre) wrote :

To have the cordova runtime imported locally to your project, in QtC you have to go to:

- Tools > Ubuntu > Add Cordova runtime to Html5 project

I'll add an update to the QtC template to improve the documentation for this since this is far from obvious

Changed in ubuntu-html5-theme:
status: New → Confirmed
status: Confirmed → Invalid
assignee: nobody → Alexandre Abreu (abreu-alexandre)
Changed in qtcreator-plugin-ubuntu:
assignee: nobody → Alexandre Abreu (abreu-alexandre)
Revision history for this message
David Planella (dpm) wrote :

Thanks Alex. Going forward, I would recommend to have a "Cordova" checkbox in the new template wizard, in the same way we have a drop-down list to choose the type of scope in the scope template.

Ticking the "Cordova" checkbox would then take care of the download for the developer.

Revision history for this message
Alexandre Abreu (abreu-alexandre) wrote :

David: yes this is something that makes sense

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtcreator-plugin-ubuntu - 3.1.1+14.10.20140724-0ubuntu1

---------------
qtcreator-plugin-ubuntu (3.1.1+14.10.20140724-0ubuntu1) utopic; urgency=low

  [ Zoltán Balogh ]
  * Making the webapp-container dependency arch-dependent
  * Add tests to check Ubuntu plugins and validate the simple qml app
    template

  [ Benjamin Zeller ]
  * Adding run support for HTML and webcontainer projects. Refactored
    some code to make the project easier to maintain. Remove MenuItems
    for HTML projects. Fix packaging widget to work correctly for the
    new HTML configurations. Adding UbuntuHtmlBuildConfiguration. Add
    TargetSetupPage to the new htmlproject wizard. Make sure trusty
    users get a list of available frameworks based on the. Toolchain
    they use Hardcode list of frameworks for now since click chroots are
    broken .
  * Fix execution of click review tools to handle package names with
    spaces correctly

  [ Alexandre Abreu ]
  * Add a bit of documentation in the html5 template index to guide the
    developer to the "import cordova runtime options" (LP: #1338445)

  [ Ubuntu daily release ]
  * New rebuild forced
 -- Ubuntu daily release <email address hidden> Thu, 24 Jul 2014 08:49:51 +0000

Changed in qtcreator-plugin-ubuntu (Ubuntu):
status: New → Fix Released
Changed in qtcreator-plugin-ubuntu:
status: New → Fix Released
Revision history for this message
Prateek Sharma (sharmaprateek007) wrote :

Hi,
I am also facing the same issue and I am not able to see the option "Tools > Ubuntu > Add Cordova runtime to Html5 project".
My tools menu doesn't contain " Add Cordova runtime to Html5 project" option.

I have installed cordova from their official page but still this option is not visible in qt-creator.
Please let me know how can I fix it

Revision history for this message
Alexandre Abreu (abreu-alexandre) wrote :

The "Add Cordova runtime to Html5 project" option has been removed from QtC. For cordova development, use the command line with the usual cordova commands and you have the full choice of development environment.
From QtC, we offer an entry point to HTML5 development not bounded to Cordova, and that has access to w3c APIs and extra Ubuntu APIs (to access Ubuntu services) when needed.

Revision history for this message
Stuart Langridge (sil) wrote :

The app.js file that's part of the default HTML app template makes reference to cordova.js, though, so I assumed that it was present somehow.

Revision history for this message
Gard Honningsø (gard-runar) wrote :

The app.js file of the Ubuntu SDK HTML5 app template still refers to cordova.js so this tripped me over for a while when I also couldnt figure out how to add Cordova support to my HTML5 app..

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.