You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2015/11/20 01:18:37 UTC
[01/27] cordova-ubuntu git commit: build: fix mechanism for
additional dependencies
Repository: cordova-ubuntu
Updated Branches:
refs/heads/master 5af80bb36 -> 0f97fd32e
build: fix mechanism for additional dependencies
Instead of expecting plugins to store their configuration files in
a "configs/" directory, read the dependencies from the config.xml file.
The reason why the old method does not work is that the <resource-file>
element of the plugin.xml file doesn't support a "target-dir" attribute.
By using the <config-file> element, instead, we don't need to do any
changes to cordova lib, and all the plugin configuration can now be
stored in the plugin.xml file.
Example:
<config-file target="config.xml" parent="/*">
<feature name="FacebookConnect">
<param policy_group="accounts" policy_version="1" />
<param hook="account-application" value="qml/app.application" />
<param hook="account-service" value="qml/app.service" />
<deps>
<pkgConfig>["signond", "libsignon-qt5"]</pkgConfig>
<deb>["signond-dev:ARCH", "libsignon-qt5-dev:ARCH"]</deb>
</deps>
</feature>
</config-file>
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/d3a674f2
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/d3a674f2
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/d3a674f2
Branch: refs/heads/master
Commit: d3a674f2a07ab269bfb2e2acaa60dc2ab25c4d50
Parents: 13efcce
Author: Alberto Mardegan <ma...@users.sourceforge.net>
Authored: Thu Oct 8 09:36:31 2015 +0300
Committer: Alberto Mardegan <ma...@users.sourceforge.net>
Committed: Thu Oct 8 09:36:31 2015 +0300
----------------------------------------------------------------------
bin/templates/project/cordova/lib/build.js | 35 +++++++++----------------
1 file changed, 13 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/d3a674f2/bin/templates/project/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/lib/build.js b/bin/templates/project/cordova/lib/build.js
index 078974b..dbd73b1 100644
--- a/bin/templates/project/cordova/lib/build.js
+++ b/bin/templates/project/cordova/lib/build.js
@@ -26,6 +26,7 @@ var Q = require('q');
var path = require('path');
var shell = require('shelljs');
+var ConfigParser = require('./config_parser');
var Constants = require('./constants');
var Utils = require('./utils');
var Manifest = require('./manifest');
@@ -233,19 +234,13 @@ function fillTemplate(source, dest, obj) {
}
function additionalBuildDependencies(ubuntuDir) {
- var files = [];
- try {
- files = fs.readdirSync(path.join(ubuntuDir, 'configs')).filter(function(s) {
- return s[0] != '.';
- });
- } catch (e) {}
+ var config = new ConfigParser(path.join(ubuntuDir, 'config.xml'));
var pkgConfig = [];
- for (var i = 0; i < files.length; i++) {
- var config = JSON.parse(fs.readFileSync(path.join(ubuntuDir, 'configs', files[i])));
- if (config.pkgConfig)
- pkgConfig = pkgConfig.concat(config.pkgConfig);
- }
+ config.etree.getroot().findall('./feature/deps/pkgConfig').forEach(function (element) {
+ var list = JSON.parse(element.text);
+ pkgConfig = pkgConfig.concat(list);
+ });
return pkgConfig;
}
@@ -375,17 +370,13 @@ function checkChrootEnv(ubuntuDir, architecture, framework) {
}
function additionalDependencies(ubuntuDir) {
- var files = [];
- try {
- files = fs.readdirSync(path.join(ubuntuDir, 'configs')).filter(function(s) {
- return s[0] != '.';
- });
- } catch (e) {}
+ var config = new ConfigParser(path.join(ubuntuDir, 'config.xml'));
+
var deb = [];
- for (var i = 0; i < files.length; i++) {
- var config = JSON.parse(fs.readFileSync(path.join(ubuntuDir, 'configs', files[i])));
- if (config.deb)
- deb = deb.concat(config.deb);
- }
+ config.etree.getroot().findall('./feature/deps/deb').forEach(function (element) {
+ var list = JSON.parse(element.text);
+ deb = deb.concat(list);
+ });
+
return deb;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[03/27] cordova-ubuntu git commit: Merge pull request #1 from
mardy/additional-dependencies
Posted by st...@apache.org.
Merge pull request #1 from mardy/additional-dependencies
build: fix mechanism for additional plugin dependencies
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/7a5ac6db
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/7a5ac6db
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/7a5ac6db
Branch: refs/heads/master
Commit: 7a5ac6dbc046bb9fd75c5de313723ee90907f7d6
Parents: 13efcce d3a674f
Author: david-barth-canonical <da...@canonical.com>
Authored: Tue Oct 27 12:24:55 2015 +0100
Committer: david-barth-canonical <da...@canonical.com>
Committed: Tue Oct 27 12:24:55 2015 +0100
----------------------------------------------------------------------
bin/templates/project/cordova/lib/build.js | 35 +++++++++----------------
1 file changed, 13 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[18/27] cordova-ubuntu git commit: Merge pull request #2 from
cordova-ubuntu/CB-9806
Posted by st...@apache.org.
Merge pull request #2 from cordova-ubuntu/CB-9806
Cb 9806 - Add icon to project defaults
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/346d4390
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/346d4390
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/346d4390
Branch: refs/heads/master
Commit: 346d43905e1fe498d74f374e0b6cb1c10e0aa5d9
Parents: e4a3c9e 33f61c7
Author: david-barth-canonical <da...@canonical.com>
Authored: Wed Nov 18 14:57:44 2015 +0100
Committer: david-barth-canonical <da...@canonical.com>
Committed: Wed Nov 18 14:57:44 2015 +0100
----------------------------------------------------------------------
bin/templates/project/cordova/defaults.xml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[12/27] cordova-ubuntu git commit: Set VERSION to 4.4.0-dev (via coho)
Posted by st...@apache.org.
Set VERSION to 4.4.0-dev (via coho)
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/91f655d0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/91f655d0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/91f655d0
Branch: refs/heads/master
Commit: 91f655d03047583919582e841fb51c1f0df1ff63
Parents: eea2012
Author: David Barth <da...@canonical.com>
Authored: Wed Nov 18 12:19:02 2015 +0100
Committer: David Barth <da...@canonical.com>
Committed: Wed Nov 18 12:19:02 2015 +0100
----------------------------------------------------------------------
VERSION | 2 +-
bin/templates/project/cordova/version | 2 +-
package.json | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/91f655d0/VERSION
----------------------------------------------------------------------
diff --git a/VERSION b/VERSION
index 63d63a9..7075368 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-4.1.0-ppa
+4.4.0-dev
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/91f655d0/bin/templates/project/cordova/version
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/version b/bin/templates/project/cordova/version
index facd0f0..080c594 100755
--- a/bin/templates/project/cordova/version
+++ b/bin/templates/project/cordova/version
@@ -20,6 +20,6 @@
*/
// Coho updates this line:
-var VERSION = "4.1.0-dev";
+var VERSION = "4.4.0-dev";
console.log(VERSION);
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/91f655d0/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 0db5bf6..a59c584 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "cordova-ubuntu",
- "version": "4.1.0-dev",
+ "version": "4.4.0-dev",
"description": "Cordova tooling for the Ubuntu platform.",
"main": "bin/create",
"repository": {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[21/27] cordova-ubuntu git commit: fix email json typo
Posted by st...@apache.org.
fix email json typo
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/13ef191d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/13ef191d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/13ef191d
Branch: refs/heads/master
Commit: 13ef191d834ab5343e4e2fca777507b3c246aa88
Parents: 36c7775
Author: David Barth <da...@canonical.com>
Authored: Wed Nov 18 16:16:34 2015 +0100
Committer: David Barth <da...@canonical.com>
Committed: Wed Nov 18 16:16:34 2015 +0100
----------------------------------------------------------------------
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/13ef191d/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 15ca11b..b70b7fe 100644
--- a/package.json
+++ b/package.json
@@ -41,7 +41,7 @@
"email": "jean-francois.moy@canonical.com"
},
{
- "name": "David Barth"
+ "name": "David Barth",
"email": "david.barth@canonical.com"
}
],
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[23/27] cordova-ubuntu git commit: set version back to 4.3.1 (without
coho)
Posted by st...@apache.org.
set version back to 4.3.1 (without coho)
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/c32e7049
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/c32e7049
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/c32e7049
Branch: refs/heads/master
Commit: c32e70491218277ca0581a15823a5d22333a93e5
Parents: 443816e
Author: David Barth <da...@canonical.com>
Authored: Thu Nov 19 09:29:38 2015 +0100
Committer: David Barth <da...@canonical.com>
Committed: Thu Nov 19 09:29:38 2015 +0100
----------------------------------------------------------------------
VERSION | 2 +-
bin/templates/project/cordova/version | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/c32e7049/VERSION
----------------------------------------------------------------------
diff --git a/VERSION b/VERSION
index 7075368..f77856a 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-4.4.0-dev
+4.3.1
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/c32e7049/bin/templates/project/cordova/version
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/version b/bin/templates/project/cordova/version
index 080c594..9c8ef04 100755
--- a/bin/templates/project/cordova/version
+++ b/bin/templates/project/cordova/version
@@ -20,6 +20,6 @@
*/
// Coho updates this line:
-var VERSION = "4.4.0-dev";
+var VERSION = "4.3.1";
console.log(VERSION);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[06/27] cordova-ubuntu git commit: check if content src points to a
url or local file
Posted by st...@apache.org.
check if content src points to a url or local file
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/75819c81
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/75819c81
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/75819c81
Branch: refs/heads/master
Commit: 75819c8186476c7d7534e6e19c6faebecd7fc9cd
Parents: aaf201b
Author: David Barth <da...@canonical.com>
Authored: Wed Sep 30 16:51:05 2015 +0200
Committer: David Barth <da...@canonical.com>
Committed: Fri Nov 13 10:19:45 2015 +0100
----------------------------------------------------------------------
src/cordova.cpp | 22 +++++++++++++---------
tests/config.xml | 45 +++++++++++++++++++++++++++++++++++++++++++++
tests/main.cpp | 14 ++++++++++++++
3 files changed, 72 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/75819c81/src/cordova.cpp
----------------------------------------------------------------------
diff --git a/src/cordova.cpp b/src/cordova.cpp
index 48ca581..172f87f 100644
--- a/src/cordova.cpp
+++ b/src/cordova.cpp
@@ -25,16 +25,20 @@
#include <QQmlContext>
Cordova::Cordova(const QDir &wwwDir, QQuickItem *item, QObject *parent)
- : QObject(parent), _item(item), _www(wwwDir), _config(_www.absoluteFilePath("../config.xml")) {
+ : QObject(parent), _item(item), _www(wwwDir),
+ _config(_www.absoluteFilePath("../config.xml")) {
- qDebug() << "Using" << _www.absolutePath() << "as working dir";
+ qDebug() << "Work directory: " << _www.absolutePath();
- if (!_www.exists(_config.content()))
- qCritical() << _config.content() << "does not exists";
-
- _mainUrl = QUrl::fromUserInput(_www.absoluteFilePath(_config.content())).toString();
+ if (_config.content().contains(QRegExp("^(http://)"))) {
+ _mainUrl = QString(_config.content());
+ } else if (!_www.exists(_config.content())) {
+ qCritical() << _config.content() << "does not exist";
+ _mainUrl = QUrl::fromUserInput(_www.absoluteFilePath(_config.content()))
+ .toString();
+ }
- qDebug() << _mainUrl;
+ qDebug() << "Main URL: " << _mainUrl;
}
void Cordova::appLoaded() {
@@ -79,8 +83,8 @@ QString Cordova::getSplashscreenPath() {
}
const CordovaInternal::Config& Cordova::config() const {
- return _config;
-}
+ return _config;}
+
void Cordova::initPlugins() {
QList<QDir> searchPath = {get_app_dir()};
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/75819c81/tests/config.xml
----------------------------------------------------------------------
diff --git a/tests/config.xml b/tests/config.xml
new file mode 100644
index 0000000..4337265
--- /dev/null
+++ b/tests/config.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<widget xmlns = "http://www.w3.org/ns/widgets"
+ id = "io.cordova.helloCordova"
+ version = "2.0.0">
+ <name>Hello Cordova</name>
+
+ <description>
+ A sample Apache Cordova application that responds to the deviceready event.
+ </description>
+
+ <author href="http://cordova.io" email="dev@cordova.apache.org">
+ Apache Cordova Team
+ </author>
+
+ <access origin="*"/>
+
+ <content src="http://192.168.1.35:8100" original-src="index.html"/>
+
+ <preference name="loglevel" value="DEBUG" />
+ <!--
+ <preference name="splashscreen" value="resourceName" />
+ <preference name="backgroundColor" value="0xFFF" />
+ <preference name="loadUrlTimeoutValue" value="20000" />
+ <preference name="InAppBrowserStorageEnabled" value="true" />
+ <preference name="disallowOverscroll" value="true" />
+ -->
+</widget>
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/75819c81/tests/main.cpp
----------------------------------------------------------------------
diff --git a/tests/main.cpp b/tests/main.cpp
index b2f6c84..e267114 100644
--- a/tests/main.cpp
+++ b/tests/main.cpp
@@ -22,6 +22,7 @@
#include "../src/cplugin.h"
#include "../src/cordova_config.hpp"
+#include "../src/cordova.h"
TEST(CordovaInternal, format_double_int_int) {
auto t = std::make_tuple(1.1, 2, 3);
@@ -84,6 +85,19 @@ TEST(Cordova, WhiteList) {
EXPECT_EQ(app.exec(), 0);
}
+TEST(Cordova, loadURLSupport) {
+
+ CordovaInternal::Config config("config.xml");
+ QDir www("www");
+ QQuickItem item;;
+
+ Cordova *cordova = new Cordova(www, &item, NULL);
+
+ EXPECT_TRUE(cordova != NULL);
+ EXPECT_STREQ("http://192.168.1.35:8100",
+ cordova->mainUrl().toLatin1().data());
+}
+
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[26/27] cordova-ubuntu git commit: fix for update script
Posted by st...@apache.org.
fix for update script
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/4941dfad
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/4941dfad
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/4941dfad
Branch: refs/heads/master
Commit: 4941dfad8a69f5c52506183b1b233f488304bc35
Parents: 2ef1e97
Author: David Barth <da...@canonical.com>
Authored: Thu Nov 19 16:31:24 2015 +0100
Committer: David Barth <da...@canonical.com>
Committed: Thu Nov 19 16:32:03 2015 +0100
----------------------------------------------------------------------
bin/lib/update.js | 2 +-
bin/update | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/4941dfad/bin/lib/update.js
----------------------------------------------------------------------
diff --git a/bin/lib/update.js b/bin/lib/update.js
index f315501..3567d56 100644
--- a/bin/lib/update.js
+++ b/bin/lib/update.js
@@ -64,5 +64,5 @@ exports.updateProject = function(projectPath) {
shell.mv(path.join(tmp, 'coreplugins.cpp'), path.join(projectPath, 'build', 'src'));
shell.rm('-r', tmp);
- console.log('project updated'.green);
+ console.log('project updated');
}
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/4941dfad/bin/update
----------------------------------------------------------------------
diff --git a/bin/update b/bin/update
index 4f4328f..7ed55e5 100755
--- a/bin/update
+++ b/bin/update
@@ -28,6 +28,7 @@ var projectPath = args[2];
var currentVersion = fs.readFileSync(path.join(projectPath, 'build', 'VERSION'), {encoding: "utf8"});
var version = fs.readFileSync(path.join(ROOT, 'VERSION'), {encoding: "utf8"});
if (version !== currentVersion) {
+ var check_reqs = require('./lib/check_reqs').check_reqs;
check_reqs(function () {
require('./lib/update').updateProject(projectPath, ROOT);
});
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[16/27] cordova-ubuntu git commit: use QUrl::fromLocalFile()
Posted by st...@apache.org.
use QUrl::fromLocalFile()
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/cf5bbb63
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/cf5bbb63
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/cf5bbb63
Branch: refs/heads/master
Commit: cf5bbb6343aab3f0662550554c580bc464dc95d2
Parents: ac27c28
Author: David Barth <da...@canonical.com>
Authored: Wed Nov 18 14:56:36 2015 +0100
Committer: David Barth <da...@canonical.com>
Committed: Wed Nov 18 14:56:36 2015 +0100
----------------------------------------------------------------------
src/cordova.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/cf5bbb63/src/cordova.cpp
----------------------------------------------------------------------
diff --git a/src/cordova.cpp b/src/cordova.cpp
index 88296f8..152baa7 100644
--- a/src/cordova.cpp
+++ b/src/cordova.cpp
@@ -35,7 +35,7 @@ Cordova::Cordova(const QDir &wwwDir, QQuickItem *item, QObject *parent)
} else if (!_www.exists(_config.content())) {
qCritical() << _config.content() << "does not exist";
} else {
- _mainUrl = QUrl::fromUserInput(_www.absoluteFilePath(_config.content()))
+ _mainUrl = QUrl::fromLocalFile(_www.absoluteFilePath(_config.content()))
.toString();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[08/27] cordova-ubuntu git commit: set mainUrl when the file exists
Posted by st...@apache.org.
set mainUrl when the file exists
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/ac27c286
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/ac27c286
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/ac27c286
Branch: refs/heads/master
Commit: ac27c286c124776c2c4b938ccf86f2beaa20ac7e
Parents: 86e994a
Author: David Barth <da...@canonical.com>
Authored: Thu Nov 12 17:02:26 2015 +0100
Committer: David Barth <da...@canonical.com>
Committed: Fri Nov 13 10:20:16 2015 +0100
----------------------------------------------------------------------
src/cordova.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/ac27c286/src/cordova.cpp
----------------------------------------------------------------------
diff --git a/src/cordova.cpp b/src/cordova.cpp
index bc170af..88296f8 100644
--- a/src/cordova.cpp
+++ b/src/cordova.cpp
@@ -34,11 +34,11 @@ Cordova::Cordova(const QDir &wwwDir, QQuickItem *item, QObject *parent)
_mainUrl = QString(_config.content());
} else if (!_www.exists(_config.content())) {
qCritical() << _config.content() << "does not exist";
+ } else {
+ _mainUrl = QUrl::fromUserInput(_www.absoluteFilePath(_config.content()))
+ .toString();
}
- _mainUrl = QUrl::fromUserInput(_www.absoluteFilePath(_config.content()))
- .toString();
-
qDebug() << "Main URL: " << _mainUrl;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[14/27] cordova-ubuntu git commit: fix typo
Posted by st...@apache.org.
fix typo
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/6630211f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/6630211f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/6630211f
Branch: refs/heads/master
Commit: 6630211fd507766176b2f1a1ba9a7619339a486a
Parents: 8eeea8d
Author: David Barth <da...@canonical.com>
Authored: Wed Nov 18 14:51:34 2015 +0100
Committer: David Barth <da...@canonical.com>
Committed: Wed Nov 18 14:51:34 2015 +0100
----------------------------------------------------------------------
bin/lib/check_reqs.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/6630211f/bin/lib/check_reqs.js
----------------------------------------------------------------------
diff --git a/bin/lib/check_reqs.js b/bin/lib/check_reqs.js
index fbaa335..9363057 100644
--- a/bin/lib/check_reqs.js
+++ b/bin/lib/check_reqs.js
@@ -25,7 +25,7 @@ exports.check_reqs = function (callback) {
if (!checkNodeDependencies()) {
installNodeDependencies(checkUbuntuDependencies.bind(null, callback));
} else {
- // don't check platform dependeicies yet, as they depend on the target
+ // don't check platform dependencies yet, as they depend on the target
// architecture; the base cordova / node / npm install should be
// sufficient at this stage
callback();
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[15/27] cordova-ubuntu git commit: Merge pull request #4 from
cordova-ubuntu/CB-9868
Posted by st...@apache.org.
Merge pull request #4 from cordova-ubuntu/CB-9868
Cb 9868 - Should propose to install missing Ubuntu dependencies on platform add
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/51f8f3ce
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/51f8f3ce
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/51f8f3ce
Branch: refs/heads/master
Commit: 51f8f3ce5204beb731d0ea8c708c9c0c533232c1
Parents: aaf201b 6630211
Author: david-barth-canonical <da...@canonical.com>
Authored: Wed Nov 18 14:52:56 2015 +0100
Committer: david-barth-canonical <da...@canonical.com>
Committed: Wed Nov 18 14:52:56 2015 +0100
----------------------------------------------------------------------
bin/create | 7 +-
bin/lib/check_reqs.js | 33 +---
bin/templates/project/cordova/lib/build.js | 196 +++++++++++++++---------
3 files changed, 126 insertions(+), 110 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/51f8f3ce/bin/templates/project/cordova/lib/build.js
----------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[13/27] cordova-ubuntu git commit: Update JS snapshot to version
4.4.0-dev (via coho)
Posted by st...@apache.org.
Update JS snapshot to version 4.4.0-dev (via coho)
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/63d74032
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/63d74032
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/63d74032
Branch: refs/heads/master
Commit: 63d740326f2191de3bf568a06d8013395733ca2c
Parents: 91f655d
Author: David Barth <da...@canonical.com>
Authored: Wed Nov 18 12:19:04 2015 +0100
Committer: David Barth <da...@canonical.com>
Committed: Wed Nov 18 12:19:04 2015 +0100
----------------------------------------------------------------------
www/cordova.js | 238 ++++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 201 insertions(+), 37 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/63d74032/www/cordova.js
----------------------------------------------------------------------
diff --git a/www/cordova.js b/www/cordova.js
index 5ba03c1..f94fdad 100644
--- a/www/cordova.js
+++ b/www/cordova.js
@@ -1,5 +1,5 @@
// Platform: ubuntu
-// ab3fc0f59dbba0cc402d40a26276675f05924ae1
+// 8e9610fe33fc743fcaf5d920064f0deb2cad1715
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -19,7 +19,7 @@
under the License.
*/
;(function() {
-var PLATFORM_VERSION_BUILD_LABEL = '4.1.0-dev';
+var PLATFORM_VERSION_BUILD_LABEL = '4.4.0-dev';
// file: src/scripts/require.js
/*jshint -W079 */
@@ -101,10 +101,17 @@ if (typeof module === "object" && typeof require === "function") {
// file: src/cordova.js
define("cordova", function(require, exports, module) {
+// Workaround for Windows 10 in hosted environment case
+// http://www.w3.org/html/wg/drafts/html/master/browsers.html#named-access-on-the-window-object
+if (window.cordova && !(window.cordova instanceof HTMLElement)) {
+ throw new Error("cordova already defined");
+}
+
var channel = require('cordova/channel');
var platform = require('cordova/platform');
+
/**
* Intercept calls to addEventListener + removeEventListener and handle deviceready,
* resume, and pause events.
@@ -284,10 +291,16 @@ var cordova = {
if (callback) {
if (isSuccess && status == cordova.callbackStatus.OK) {
callback.success && callback.success.apply(null, args);
- } else {
+ } else if (!isSuccess) {
callback.fail && callback.fail.apply(null, args);
}
-
+ /*
+ else
+ Note, this case is intentionally not caught.
+ this can happen if isSuccess is true, but callbackStatus is NO_RESULT
+ which is used to remove a callback from the list without calling the callbacks
+ typically keepCallback is false in this case
+ */
// Clear callback if not expecting any more results
if (!keepCallback) {
delete cordova.callbacks[callbackId];
@@ -320,7 +333,6 @@ module.exports = cordova;
// file: src/common/argscheck.js
define("cordova/argscheck", function(require, exports, module) {
-var exec = require('cordova/exec');
var utils = require('cordova/utils');
var moduleExports = module.exports;
@@ -586,7 +598,6 @@ var utils = require('cordova/utils'),
* onDeviceReady* User event fired to indicate that Cordova is ready
* onResume User event fired to indicate a start/resume lifecycle event
* onPause User event fired to indicate a pause lifecycle event
- * onDestroy* Internal event fired when app is being destroyed (User should use window.onunload event, not this one).
*
* The events marked with an * are sticky. Once they have fired, they will stay in the fired state.
* All listeners that subscribe after the event is fired will be executed right away.
@@ -798,9 +809,6 @@ channel.create('onResume');
// Event to indicate a pause lifecycle event
channel.create('onPause');
-// Event to indicate a destroy lifecycle event
-channel.createSticky('onDestroy');
-
// Channels that must fire before "deviceready" is fired.
channel.waitForInitialization('onCordovaReady');
channel.waitForInitialization('onDOMContentLoaded');
@@ -809,7 +817,7 @@ module.exports = channel;
});
-// file: src/ubuntu/exec.js
+// file: /home/dbarth/devel/wily/cordova/cordova-ubuntu/cordova-js-src/exec.js
define("cordova/exec", function(require, exports, module) {
var cordova = require('cordova'),
@@ -980,6 +988,7 @@ if (!window.console.warn) {
// Register pause, resume and deviceready channels as events on document.
channel.onPause = cordova.addDocumentEventHandler('pause');
channel.onResume = cordova.addDocumentEventHandler('resume');
+channel.onActivated = cordova.addDocumentEventHandler('activated');
channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready');
// Listen for DOMContentLoaded and notify our channel subscribers.
@@ -1041,10 +1050,12 @@ define("cordova/init_b", function(require, exports, module) {
var channel = require('cordova/channel');
var cordova = require('cordova');
+var modulemapper = require('cordova/modulemapper');
var platform = require('cordova/platform');
+var pluginloader = require('cordova/pluginloader');
var utils = require('cordova/utils');
-var platformInitChannelsArray = [channel.onDOMContentLoaded, channel.onNativeReady];
+var platformInitChannelsArray = [channel.onDOMContentLoaded, channel.onNativeReady, channel.onPluginsReady];
// setting exec
cordova.exec = require('cordova/exec');
@@ -1107,6 +1118,7 @@ if (!window.console.warn) {
// Register pause, resume and deviceready channels as events on document.
channel.onPause = cordova.addDocumentEventHandler('pause');
channel.onResume = cordova.addDocumentEventHandler('resume');
+channel.onActivated = cordova.addDocumentEventHandler('activated');
channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready');
// Listen for DOMContentLoaded and notify our channel subscribers.
@@ -1128,10 +1140,19 @@ if (window._nativeReady) {
// Call the platform-specific initialization.
platform.bootstrap && platform.bootstrap();
+// Wrap in a setTimeout to support the use-case of having plugin JS appended to cordova.js.
+// The delay allows the attached modules to be defined before the plugin loader looks for them.
+setTimeout(function() {
+ pluginloader.load(function() {
+ channel.onPluginsReady.fire();
+ });
+}, 0);
+
/**
* Create all cordova objects once native side is ready.
*/
channel.join(function() {
+ modulemapper.mapModules(window);
platform.initialize && platform.initialize();
@@ -1250,7 +1271,104 @@ exports.reset();
});
-// file: src/ubuntu/platform.js
+// file: src/common/modulemapper_b.js
+define("cordova/modulemapper_b", function(require, exports, module) {
+
+var builder = require('cordova/builder'),
+ symbolList = [],
+ deprecationMap;
+
+exports.reset = function() {
+ symbolList = [];
+ deprecationMap = {};
+};
+
+function addEntry(strategy, moduleName, symbolPath, opt_deprecationMessage) {
+ symbolList.push(strategy, moduleName, symbolPath);
+ if (opt_deprecationMessage) {
+ deprecationMap[symbolPath] = opt_deprecationMessage;
+ }
+}
+
+// Note: Android 2.3 does have Function.bind().
+exports.clobbers = function(moduleName, symbolPath, opt_deprecationMessage) {
+ addEntry('c', moduleName, symbolPath, opt_deprecationMessage);
+};
+
+exports.merges = function(moduleName, symbolPath, opt_deprecationMessage) {
+ addEntry('m', moduleName, symbolPath, opt_deprecationMessage);
+};
+
+exports.defaults = function(moduleName, symbolPath, opt_deprecationMessage) {
+ addEntry('d', moduleName, symbolPath, opt_deprecationMessage);
+};
+
+exports.runs = function(moduleName) {
+ addEntry('r', moduleName, null);
+};
+
+function prepareNamespace(symbolPath, context) {
+ if (!symbolPath) {
+ return context;
+ }
+ var parts = symbolPath.split('.');
+ var cur = context;
+ for (var i = 0, part; part = parts[i]; ++i) {
+ cur = cur[part] = cur[part] || {};
+ }
+ return cur;
+}
+
+exports.mapModules = function(context) {
+ var origSymbols = {};
+ context.CDV_origSymbols = origSymbols;
+ for (var i = 0, len = symbolList.length; i < len; i += 3) {
+ var strategy = symbolList[i];
+ var moduleName = symbolList[i + 1];
+ var module = require(moduleName);
+ // <runs/>
+ if (strategy == 'r') {
+ continue;
+ }
+ var symbolPath = symbolList[i + 2];
+ var lastDot = symbolPath.lastIndexOf('.');
+ var namespace = symbolPath.substr(0, lastDot);
+ var lastName = symbolPath.substr(lastDot + 1);
+
+ var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null;
+ var parentObj = prepareNamespace(namespace, context);
+ var target = parentObj[lastName];
+
+ if (strategy == 'm' && target) {
+ builder.recursiveMerge(target, module);
+ } else if ((strategy == 'd' && !target) || (strategy != 'd')) {
+ if (!(symbolPath in origSymbols)) {
+ origSymbols[symbolPath] = target;
+ }
+ builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg);
+ }
+ }
+};
+
+exports.getOriginalSymbol = function(context, symbolPath) {
+ var origSymbols = context.CDV_origSymbols;
+ if (origSymbols && (symbolPath in origSymbols)) {
+ return origSymbols[symbolPath];
+ }
+ var parts = symbolPath.split('.');
+ var obj = context;
+ for (var i = 0; i < parts.length; ++i) {
+ obj = obj && obj[parts[i]];
+ }
+ return obj;
+};
+
+exports.reset();
+
+
+});
+
+// file: /home/dbarth/devel/wily/cordova/cordova-ubuntu/cordova-js-src/platform.js
define("cordova/platform", function(require, exports, module) {
module.exports = {
@@ -1380,6 +1498,54 @@ exports.load = function(callback) {
});
+// file: src/common/pluginloader_b.js
+define("cordova/pluginloader_b", function(require, exports, module) {
+
+var modulemapper = require('cordova/modulemapper');
+
+// Handler for the cordova_plugins.js content.
+// See plugman's plugin_loader.js for the details of this object.
+function handlePluginsObject(moduleList) {
+ // if moduleList is not defined or empty, we've nothing to do
+ if (!moduleList || !moduleList.length) {
+ return;
+ }
+
+ // Loop through all the modules and then through their clobbers and merges.
+ for (var i = 0, module; module = moduleList[i]; i++) {
+ if (module.clobbers && module.clobbers.length) {
+ for (var j = 0; j < module.clobbers.length; j++) {
+ modulemapper.clobbers(module.id, module.clobbers[j]);
+ }
+ }
+
+ if (module.merges && module.merges.length) {
+ for (var k = 0; k < module.merges.length; k++) {
+ modulemapper.merges(module.id, module.merges[k]);
+ }
+ }
+
+ // Finally, if runs is truthy we want to simply require() the module.
+ if (module.runs) {
+ modulemapper.runs(module.id);
+ }
+ }
+}
+
+// Loads all plugins' js-modules. Plugin loading is syncronous in browserified bundle
+// but the method accepts callback to be compatible with non-browserify flow.
+// onDeviceReady is blocked on onPluginsReady. onPluginsReady is fired when there are
+// no plugins to load, or they are all done.
+exports.load = function(callback) {
+ var moduleList = require("cordova/plugin_list");
+ handlePluginsObject(moduleList);
+
+ callback();
+};
+
+
+});
+
// file: src/common/urlutil.js
define("cordova/urlutil", function(require, exports, module) {
@@ -1459,15 +1625,14 @@ utils.typeName = function(val) {
/**
* Returns an indication of whether the argument is an array or not
*/
-utils.isArray = function(a) {
- return utils.typeName(a) == 'Array';
-};
+utils.isArray = Array.isArray ||
+ function(a) {return utils.typeName(a) == 'Array';};
/**
* Returns an indication of whether the argument is a Date or not
*/
utils.isDate = function(d) {
- return utils.typeName(d) == 'Date';
+ return (d instanceof Date);
};
/**
@@ -1501,17 +1666,25 @@ utils.clone = function(obj) {
* Returns a wrapped version of the function
*/
utils.close = function(context, func, params) {
- if (typeof params == 'undefined') {
- return function() {
- return func.apply(context, arguments);
- };
- } else {
- return function() {
- return func.apply(context, params);
- };
- }
+ return function() {
+ var args = params || arguments;
+ return func.apply(context, args);
+ };
};
+//------------------------------------------------------------------------------
+function UUIDcreatePart(length) {
+ var uuidpart = "";
+ for (var i=0; i<length; i++) {
+ var uuidchar = parseInt((Math.random() * 256), 10).toString(16);
+ if (uuidchar.length == 1) {
+ uuidchar = "0" + uuidchar;
+ }
+ uuidpart += uuidchar;
+ }
+ return uuidpart;
+}
+
/**
* Create a UUID
*/
@@ -1523,6 +1696,7 @@ utils.createUUID = function() {
UUIDcreatePart(6);
};
+
/**
* Extends a child object from a parent object using classical inheritance
* pattern.
@@ -1532,6 +1706,7 @@ utils.extend = (function() {
var F = function() {};
// extend Child from Parent
return function(Child, Parent) {
+
F.prototype = Parent.prototype;
Child.prototype = new F();
Child.__super__ = Parent.prototype;
@@ -1551,18 +1726,7 @@ utils.alert = function(msg) {
};
-//------------------------------------------------------------------------------
-function UUIDcreatePart(length) {
- var uuidpart = "";
- for (var i=0; i<length; i++) {
- var uuidchar = parseInt((Math.random() * 256), 10).toString(16);
- if (uuidchar.length == 1) {
- uuidchar = "0" + uuidchar;
- }
- uuidpart += uuidchar;
- }
- return uuidpart;
-}
+
});
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[04/27] cordova-ubuntu git commit: default icon name www/img/logo.png
Posted by st...@apache.org.
default icon name www/img/logo.png
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/33f61c7f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/33f61c7f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/33f61c7f
Branch: refs/heads/master
Commit: 33f61c7fb7d2370c907beec51a604026b62a57ea
Parents: 576fca8
Author: David Barth <da...@canonical.com>
Authored: Wed Oct 28 15:30:39 2015 +0100
Committer: David Barth <da...@canonical.com>
Committed: Wed Oct 28 15:31:57 2015 +0100
----------------------------------------------------------------------
bin/templates/project/cordova/defaults.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/33f61c7f/bin/templates/project/cordova/defaults.xml
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/defaults.xml b/bin/templates/project/cordova/defaults.xml
index 0a93442..ae08aee 100644
--- a/bin/templates/project/cordova/defaults.xml
+++ b/bin/templates/project/cordova/defaults.xml
@@ -20,7 +20,7 @@
<widget id="io.cordova.hellocordova" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<!-- icon requirement for Ubuntu click packages -->
- <icon src="www/img/icon.png" />
+ <icon src="www/img/logo.png" />
<preference name="loglevel" value="DEBUG" />
<!--
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[27/27] cordova-ubuntu git commit: add www sub-directory to let the
unit tests run properly
Posted by st...@apache.org.
add www sub-directory to let the unit tests run properly
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/0f97fd32
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/0f97fd32
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/0f97fd32
Branch: refs/heads/master
Commit: 0f97fd32eaadcc03e918c9598205125ec215b492
Parents: 4941dfa
Author: David Barth <da...@canonical.com>
Authored: Thu Nov 19 16:31:24 2015 +0100
Committer: David Barth <da...@canonical.com>
Committed: Thu Nov 19 17:27:12 2015 +0100
----------------------------------------------------------------------
tests/www/.touch | 0
1 file changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/0f97fd32/tests/www/.touch
----------------------------------------------------------------------
diff --git a/tests/www/.touch b/tests/www/.touch
new file mode 100644
index 0000000..e69de29
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[05/27] cordova-ubuntu git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/cordova-ubuntu
Posted by st...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cordova-ubuntu
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/aaf201b2
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/aaf201b2
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/aaf201b2
Branch: refs/heads/master
Commit: aaf201b289119f498866b4dbc16e6c581b15c2ac
Parents: 7a5ac6d 99f5f5b
Author: David Barth <da...@canonical.com>
Authored: Thu Nov 12 17:42:04 2015 +0100
Committer: David Barth <da...@canonical.com>
Committed: Thu Nov 12 17:42:04 2015 +0100
----------------------------------------------------------------------
CONTRIBUTING.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[19/27] cordova-ubuntu git commit: Merge branch 'master' of
github.com:cordova-ubuntu/cordova-ubuntu
Posted by st...@apache.org.
Merge branch 'master' of github.com:cordova-ubuntu/cordova-ubuntu
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/5cca7ca7
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/5cca7ca7
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/5cca7ca7
Branch: refs/heads/master
Commit: 5cca7ca72c65882053266d22023fb7a9cf8194a1
Parents: 63d7403 346d439
Author: David Barth <da...@canonical.com>
Authored: Wed Nov 18 15:57:42 2015 +0100
Committer: David Barth <da...@canonical.com>
Committed: Wed Nov 18 15:57:42 2015 +0100
----------------------------------------------------------------------
bin/create | 7 +-
bin/lib/check_reqs.js | 33 +---
bin/templates/project/cordova/defaults.xml | 4 +-
bin/templates/project/cordova/lib/build.js | 196 +++++++++++++++---------
src/cordova.cpp | 23 +--
tests/config.xml | 45 ++++++
tests/main.cpp | 14 ++
7 files changed, 202 insertions(+), 120 deletions(-)
----------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[02/27] cordova-ubuntu git commit: add defaut icon parameter to
config.xml
Posted by st...@apache.org.
add defaut icon parameter to config.xml
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/576fca86
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/576fca86
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/576fca86
Branch: refs/heads/master
Commit: 576fca86f5bc51df285ad5b3a94332039bf75161
Parents: 13efcce
Author: David Barth <da...@canonical.com>
Authored: Wed Sep 30 18:20:19 2015 +0200
Committer: David Barth <da...@canonical.com>
Committed: Thu Oct 15 15:11:42 2015 +0200
----------------------------------------------------------------------
bin/templates/project/cordova/defaults.xml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/576fca86/bin/templates/project/cordova/defaults.xml
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/defaults.xml b/bin/templates/project/cordova/defaults.xml
index 41fc654..0a93442 100644
--- a/bin/templates/project/cordova/defaults.xml
+++ b/bin/templates/project/cordova/defaults.xml
@@ -19,6 +19,9 @@
-->
<widget id="io.cordova.hellocordova" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+ <!-- icon requirement for Ubuntu click packages -->
+ <icon src="www/img/icon.png" />
+
<preference name="loglevel" value="DEBUG" />
<!--
<preference name="splashscreen" value="resourceName" />
@@ -27,7 +30,6 @@
<preference name="InAppBrowserStorageEnabled" value="true" />
<preference name="disallowOverscroll" value="true" />
-->
- <!-- <icon src="icon.png" /> -->
</widget>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[20/27] cordova-ubuntu git commit: CB-10030 Updated RELEASENOTES and
Version for release 4.3.1-dev
Posted by st...@apache.org.
CB-10030 Updated RELEASENOTES and Version for release 4.3.1-dev
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/36c77757
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/36c77757
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/36c77757
Branch: refs/heads/master
Commit: 36c777579ffcb8011dc1631981179a9421b9d83d
Parents: 5cca7ca
Author: David Barth <da...@canonical.com>
Authored: Wed Nov 18 16:13:46 2015 +0100
Committer: David Barth <da...@canonical.com>
Committed: Wed Nov 18 16:13:46 2015 +0100
----------------------------------------------------------------------
RELEASENOTES.md | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++
package.json | 8 +++-
2 files changed, 120 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/36c77757/RELEASENOTES.md
----------------------------------------------------------------------
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index 8e69c2a..bffd73c 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -20,6 +20,81 @@
-->
## Release Notes for Cordova Ubuntu ##
+### 4.3.1 ###
+
+* default icon name www/img/logo.png
+* add defaut icon parameter to config.xml
+* use QUrl::fromLocalFile()
+* set mainUrl when the file exists
+* fix critical issue introduced by general URL support changes earlier
+* check if content src points to a url or local file
+* fix typo
+* better info msg
+* don't check deps at create time and propose to auto-install once at build time; this is for the native/desktop build
+* Update JS snapshot to version 4.4.0-dev (via coho)
+* Set VERSION to 4.4.0-dev (via coho)
+
+### 4.1.0 (4.0.0) ? ###
+
+* CB-9836 Add .gitattributes to prevent CRLF line endings in repos
+* CB-9800 Fixing contribute link.
+* build: fix mechanism for additional dependencies
+* CB-8965 Copy cordova-js-src directory to platform folder during create. This closes #11
+* add default icon
+* build: split error message
+* use 1.3 policy_version for ubuntu-sdk-15.04+
+* fix desktop file generator
+* support ubuntu-sdk-15.04
+* CordovaViewInternal: provide ItemSelector for oxide
+* build: misc fix
+* build: suggest to install dependencies automatically
+* support Orientation preference from config.xml
+* add custom hooks into manifest.js
+* CB-8417 moved platform specific js into platform
+* Update JS snapshot to version 4.1.0-dev (via coho)
+* Set VERSION to 4.1.0-dev (via coho)
+
+### 3.7.0 ###
+
+* change version in CordovaUbuntu/qmldir
+* add missing license header
+* add missing license header
+* fix warning message about missing chroot
+* move manifest generator from cordova-lib
+* unit tests
+* misc
+* CB-5655: make visible cordova version(native)
+* set UBUNTU_TOUCH flag for device target
+* Added device flag in build for building for phone. Desktop otherwise.
+* set ubuntu-sdk-14.10 as default framework
+* Logger.warn instead of Logger.info for some key messages.
+* Use --verbose instead of --debug as argument to enabled additional output.
+* Run On Device was not working because of invalid calls.
+* Adb Exec Sync: fixed function call.
+* Added node_modules to .gitignore.
+* Added a new logging system as well as more meaningful debugging messages.
+* Corrected a spelling mistake in a msg property key.
+* Removed old msg.js file as we now use constants instead.
+* Added node_modules to .gitignore.
+* Run On Device was not working because of invalid calls.
+* Adb Exec Sync: fixed function call.
+* Fixed issues identified by @zaspire for merge request.
+* Separated ubuntu.js in multiple tasks files for better maintainability. Use template folder for storing project assets and tasks. Deleted unecessary package.json. Various improvements.
+* add wrapper class for cordova.xml
+* port to oxide
+* implement uri whitelist
+* bin/build/run: skip signature verification
+* add bin/update
+* bin/build/run: support deploying to latest Ubuntu Touch
+* bin/build: produce debian source package instead of binary
+* set correct deb dependencies
+* put icon into generated deb
+* make sure 'native' dir exist
+* Update JS snapshot to version 3.7.0-dev (via coho)
+* added RELEASENOTES.md
+* Update JS snapshot to version 3.7.0-dev (via coho)
+* Set VERSION to 3.7.0-dev (via coho)
+
### 3.6.0 ###
* Set VERSION to 3.6.0 (via coho)
@@ -43,3 +118,42 @@
* CB-6818 Add license for CONTRIBUTING.md
* Update JS snapshot to version 3.6.0-dev (via coho)
* Set VERSION to 3.6.0-dev (via coho)
+
+### 3.5.0 ###
+
+* CB-6954: updated version to 3.5.0 in package.json
+* another qt 5.2 workaround
+* allow inter plugin communication
+* add .editorconfig
+* workaround for qt 5.2
+* check requirements before build
+* bin/build/[build,run] always report errors
+* don't hard code cpu count
+* bin/build: fixes for --nobuild
+* bin/build: specify framework instead of series for click chroot
+* bin/build: switch to async shelljs.exec
+* CB-6559: added top level package.json
+* CB-6491 add CONTRIBUTING.md
+* Update JS snapshot to version 3.5.0-dev (via coho)
+* Update JS snapshot to version 3.5.0-dev (via coho)
+* Set VERSION to 3.5.0-dev (via coho)
+
+### 3.4.0 ###
+
+* support content property from config.xml
+* Expose main webview as a property
+* fix bin/build/version
+* src/cordova.cpp: better debug message
+* change compiler flags
+* bin/build/build: generate deb package
+* bin/build/run: --nobuild option
+* bin/build/run: --target option
+* bin/run: use optimist node module for option parsing
+* bin/build/run build only for target
+* bin/build/run: add --debug option
+* support running apps on device
+* Update JS snapshot to version 3.4.0-dev (via coho)
+* use child_process.exec correctly
+* bin/create check for shelljs/elementtree
+* Update JS snapshot to version 3.4.0-dev (via coho)
+* Set VERSION to 3.4.0-dev (via coho)
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/36c77757/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index a59c584..15ca11b 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "cordova-ubuntu",
- "version": "4.4.0-dev",
+ "version": "4.3.1-dev",
"description": "Cordova tooling for the Ubuntu platform.",
"main": "bin/create",
"repository": {
@@ -39,7 +39,11 @@
{
"name": "Jean-Francois Moy",
"email": "jean-francois.moy@canonical.com"
+ },
+ {
+ "name": "David Barth"
+ "email": "david.barth@canonical.com"
}
],
"license": "Apache Version 2.0"
-}
\ No newline at end of file
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[11/27] cordova-ubuntu git commit: Merge remote-tracking branch
'apache/master'
Posted by st...@apache.org.
Merge remote-tracking branch 'apache/master'
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/eea20122
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/eea20122
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/eea20122
Branch: refs/heads/master
Commit: eea201221e2cc2cdaef06a9187f4c7f0a8af754d
Parents: aaf201b 5af80bb
Author: David Barth <da...@canonical.com>
Authored: Wed Nov 18 11:29:12 2015 +0100
Committer: David Barth <da...@canonical.com>
Committed: Wed Nov 18 11:29:12 2015 +0100
----------------------------------------------------------------------
.gitattributes | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 94 insertions(+)
----------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[09/27] cordova-ubuntu git commit: don't check deps at create time
and propose to auto-install once at build time;
this is for the native/desktop build
Posted by st...@apache.org.
don't check deps at create time and propose to auto-install once at build time; this is for the native/desktop build
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/6fe31e7c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/6fe31e7c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/6fe31e7c
Branch: refs/heads/master
Commit: 6fe31e7cb0568bee263cdf4c39c829f9e9bf4c97
Parents: 13efcce
Author: David Barth <da...@canonical.com>
Authored: Wed Oct 28 19:50:38 2015 +0100
Committer: David Barth <da...@canonical.com>
Committed: Fri Nov 13 10:27:43 2015 +0100
----------------------------------------------------------------------
bin/create | 7 +-
bin/lib/check_reqs.js | 33 +---
bin/templates/project/cordova/lib/build.js | 196 +++++++++++++++---------
3 files changed, 126 insertions(+), 110 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/6fe31e7c/bin/create
----------------------------------------------------------------------
diff --git a/bin/create b/bin/create
index 942e4e7..f5113e4 100755
--- a/bin/create
+++ b/bin/create
@@ -21,9 +21,6 @@
var path = require('path');
var args = process.argv;
-var check_reqs = require('./lib/check_reqs').check_reqs;
-
-
if (args.length < 3 || (args[2] == '--help' || args[2] == '/?' || args[2] == '-h' ||
args[2] == 'help' || args[2] == '-help' || args[2] == '/help')) {
console.log('Usage: ' + path.relative(process.cwd(), path.join(ROOT, 'bin', 'create')) + ' <path_to_new_project> <package_name> <project_name>');
@@ -32,7 +29,5 @@ if (args.length < 3 || (args[2] == '--help' || args[2] == '/?' || args[2] == '-h
console.log(' <project_name>: Project name');
process.exit(1);
} else {
- check_reqs(function () {
- require('./lib/create').createProject(args[2], args[3], args[4], args[5]);
- });
+ require('./lib/create').createProject(args[2], args[3], args[4], args[5]);
}
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/6fe31e7c/bin/lib/check_reqs.js
----------------------------------------------------------------------
diff --git a/bin/lib/check_reqs.js b/bin/lib/check_reqs.js
index df0ffd6..fbaa335 100644
--- a/bin/lib/check_reqs.js
+++ b/bin/lib/check_reqs.js
@@ -21,42 +21,17 @@
var exec = require('child_process').exec;
-var DEPENDENCIES = [
- 'click',
- 'cmake',
- 'libicu-dev',
- 'pkg-config',
- 'devscripts',
- 'qtbase5-dev',
- 'qtchooser',
- 'qtdeclarative5-dev',
- 'qtfeedback5-dev',
- 'qtlocation5-dev',
- 'qtmultimedia5-dev',
- 'qtpim5-dev',
- 'libqt5sensors5-dev',
- 'qtsystems5-dev'
-];
-
exports.check_reqs = function (callback) {
if (!checkNodeDependencies()) {
installNodeDependencies(checkUbuntuDependencies.bind(null, callback));
} else {
- checkUbuntuDependencies(callback);
+ // don't check platform dependeicies yet, as they depend on the target
+ // architecture; the base cordova / node / npm install should be
+ // sufficient at this stage
+ callback();
}
};
-function checkUbuntuDependencies(callback) {
- var deps = DEPENDENCIES.join(' ');
- exec("dpkg-query -Wf'${db:Status-abbrev}\\n'" + deps, function (error, stdout, stderr) {
- if (error !== null) {
- console.error('Error: missing dependency ' + deps);
- process.exit(1);
- }
- callback();
- });
-}
-
function checkNodeDependencies() {
try {
require.resolve("shelljs");
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/6fe31e7c/bin/templates/project/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/lib/build.js b/bin/templates/project/cordova/lib/build.js
index 078974b..35ab340 100644
--- a/bin/templates/project/cordova/lib/build.js
+++ b/bin/templates/project/cordova/lib/build.js
@@ -130,7 +130,7 @@ function buildClickPackage(campoDir, ubuntuDir, nobuild, architecture, framework
}
function buildNative(campoDir, ubuntuDir, nobuild, debug) {
- logger.info('Building Desktop Application...');
+ logger.info('Building...');
var nativeDir = path.join(ubuntuDir, 'native');
var prefixDir = path.join(nativeDir, 'prefix');
@@ -139,86 +139,88 @@ function buildNative(campoDir, ubuntuDir, nobuild, debug) {
return Q();
}
- checkEnv(ubuntuDir);
+ return checkEnv(ubuntuDir).then(function() {
+ Manifest.generate(path.join(ubuntuDir, 'config.xml'), ubuntuDir);
- Manifest.generate(path.join(ubuntuDir, 'config.xml'), ubuntuDir);
-
- shell.rm('-rf', prefixDir);
+ shell.rm('-rf', prefixDir);
- shell.mkdir('-p', path.join(nativeDir, 'build'));
- shell.mkdir(prefixDir);
+ shell.mkdir('-p', path.join(nativeDir, 'build'));
+ shell.mkdir(prefixDir);
- Utils.pushd(path.join(nativeDir, 'build'));
+ Utils.pushd(path.join(nativeDir, 'build'));
- var buildType = '"Debug"';
- if (!debug)
- buildType = '"Release"';
+ var buildType = '"Debug"';
+ if (!debug)
+ buildType = '"Release"';
- var cmakeCmd = 'cmake ' + campoDir + ' -DCMAKE_INSTALL_PREFIX="' + prefixDir + '"'
+ var cmakeCmd = 'cmake ' + campoDir + ' -DCMAKE_INSTALL_PREFIX="' + prefixDir + '"'
+ ' -DCMAKE_BUILD_TYPE=' + buildType;
- var deps = additionalBuildDependencies(ubuntuDir).join(' ').replace(/ARCH/g, '');
- if (deps.length)
- cmakeCmd += ' -DADDITIONAL_DEPENDECIES="' + deps + '"';
-
- var debDir;
- return Utils.execAsync(cmakeCmd).then(function () {
- return Utils.execAsync('make -j ' + cpuCount() + '; make install');
- }).then(function () {
- Utils.cp(path.join(ubuntuDir, 'config.xml'), prefixDir);
- Utils.cp(path.join(ubuntuDir, 'www', '*'), path.join(prefixDir, 'www'));
- Utils.cp(path.join(ubuntuDir, 'qml', '*'), path.join(prefixDir, 'qml'));
-
- Utils.popd();
-
- var manifest = JSON.parse(fs.readFileSync(path.join(ubuntuDir, 'manifest.json'), {encoding: "utf8"}));
-
- assert(manifest.name.length);
- assert(manifest.name.indexOf(' ') == -1);
-
- debDir = path.join(nativeDir, manifest.name);
-
- shell.rm('-rf', debDir);
-
- shell.mkdir('-p', path.join(debDir, 'debian'));
- Utils.cp(path.join(campoDir, '*'), debDir);
-
- Utils.cp(path.join(ubuntuDir, 'config.xml'), path.join(debDir, 'debian'));
- Utils.cp(path.join(ubuntuDir, 'www', '*'), path.join(debDir, 'www'));
- Utils.cp(path.join(ubuntuDir, 'qml', '*'), path.join(debDir, 'qml'));
-
- var destDir = path.join('/opt', manifest.name);
-
- var icon = fs.readFileSync(path.join(ubuntuDir, 'cordova.desktop'), {encoding: "utf8"}).match(/^Icon=(.+)$/m);
- icon = icon ? '/opt/' + manifest.name + '/' + icon[1] : 'qmlscene';
-
- var maintainerEmail = manifest.maintainer.match('<.+>$');
- maintainerEmail = maintainerEmail?maintainerEmail[0]:'';
- var maintainerName = manifest.maintainer.replace(maintainerEmail, '').trim();
- maintainerEmail = maintainerEmail.replace('<', '').replace('>', '');
+ var deps = additionalBuildDependencies(ubuntuDir).join(' ').replace(/ARCH/g, '');
+ if (deps.length)
+ cmakeCmd += ' -DADDITIONAL_DEPENDECIES="' + deps + '"';
- var props = { PACKAGE_NAME: manifest.name,
- PACKAGE_TITLE: manifest.title,
- PACKAGE_VERSION: manifest.version,
- MAINTAINER_NAME: maintainerName,
- MAINTAINER_EMAIL: maintainerEmail,
- PACKAGE_DESCRIPTION: manifest.description,
- PACKAGE_ICON: icon };
- var templateDir = path.join(campoDir, 'bin', 'templates', 'project', 'misc');
- var templates = [{source: path.join(templateDir, 'changelog'), dest: path.join(debDir, 'debian', 'changelog')},
- {source: path.join(templateDir, 'compat'), dest: path.join(debDir, 'debian', 'compat')},
- {source: path.join(templateDir, 'control'), dest: path.join(debDir, 'debian', 'control')},
- {source: path.join(templateDir, 'rules'), dest: path.join(debDir, 'debian', 'rules')},
- {source: path.join(templateDir, 'cordova.desktop'), dest: path.join(debDir, 'debian', 'cordova.desktop')},
- {source: path.join(templateDir, 'install'), dest: path.join(debDir, 'debian', manifest.name + '.install')}];
- for (var i = 0; i < templates.length; i++) {
- fillTemplate(templates[i].source, templates[i].dest, props);
- }
- logger.warn('In order to build debian package, execute: ');
- logger.warn('cd ' + debDir + '; ' + 'debuild');
+ var debDir;
+ return Utils.execAsync(cmakeCmd).then(function () {
+ return Utils.execAsync('make -j ' + cpuCount() + '; make install');
+ }).then(function () {
+ Utils.cp(path.join(ubuntuDir, 'config.xml'), prefixDir);
+ Utils.cp(path.join(ubuntuDir, 'www', '*'), path.join(prefixDir, 'www'));
+ Utils.cp(path.join(ubuntuDir, 'qml', '*'), path.join(prefixDir, 'qml'));
+
+ Utils.popd();
+
+ var manifest = JSON.parse(fs.readFileSync(path.join(ubuntuDir, 'manifest.json'), {encoding: "utf8"}));
+
+ assert(manifest.name.length);
+ assert(manifest.name.indexOf(' ') == -1);
+
+ debDir = path.join(nativeDir, manifest.name);
+
+ shell.rm('-rf', debDir);
+
+ shell.mkdir('-p', path.join(debDir, 'debian'));
+ Utils.cp(path.join(campoDir, '*'), debDir);
+
+ Utils.cp(path.join(ubuntuDir, 'config.xml'), path.join(debDir, 'debian'));
+ Utils.cp(path.join(ubuntuDir, 'www', '*'), path.join(debDir, 'www'));
+ Utils.cp(path.join(ubuntuDir, 'qml', '*'), path.join(debDir, 'qml'));
+
+ var destDir = path.join('/opt', manifest.name);
+
+ var icon = fs.readFileSync(path.join(ubuntuDir, 'cordova.desktop'), {encoding: "utf8"}).match(/^Icon=(.+)$/m);
+ icon = icon ? '/opt/' + manifest.name + '/' + icon[1] : 'qmlscene';
+
+ var maintainerEmail = manifest.maintainer.match('<.+>$');
+ maintainerEmail = maintainerEmail?maintainerEmail[0]:'';
+ var maintainerName = manifest.maintainer.replace(maintainerEmail, '').trim();
+ maintainerEmail = maintainerEmail.replace('<', '').replace('>', '');
+
+ var props = { PACKAGE_NAME: manifest.name,
+ PACKAGE_TITLE: manifest.title,
+ PACKAGE_VERSION: manifest.version,
+ MAINTAINER_NAME: maintainerName,
+ MAINTAINER_EMAIL: maintainerEmail,
+ PACKAGE_DESCRIPTION: manifest.description,
+ PACKAGE_ICON: icon };
+ var templateDir = path.join(campoDir, 'bin', 'templates', 'project', 'misc');
+ var templates = [{source: path.join(templateDir, 'changelog'), dest: path.join(debDir, 'debian', 'changelog')},
+ {source: path.join(templateDir, 'compat'), dest: path.join(debDir, 'debian', 'compat')},
+ {source: path.join(templateDir, 'control'), dest: path.join(debDir, 'debian', 'control')},
+ {source: path.join(templateDir, 'rules'), dest: path.join(debDir, 'debian', 'rules')},
+ {source: path.join(templateDir, 'cordova.desktop'), dest: path.join(debDir, 'debian', 'cordova.desktop')},
+ {source: path.join(templateDir, 'install'), dest: path.join(debDir, 'debian', manifest.name + '.install')}];
+ for (var i = 0; i < templates.length; i++) {
+ fillTemplate(templates[i].source, templates[i].dest, props);
+ }
+ logger.warn('In order to build debian package, execute: ');
+ logger.warn('cd ' + debDir + '; ' + 'debuild');
+ });
});
};
+
+
/**
* Generates a file from a template source, injecting the values contained in the
* provided js object.
@@ -306,18 +308,62 @@ function cpuCount() {
}
function checkEnv(ubuntuDir) {
- var deps = additionalDependencies(ubuntuDir).join(' ');
+ var deps = [
+ 'click',
+ 'cmake',
+ 'libicu-dev',
+ 'pkg-config',
+ 'devscripts',
+ 'qtbase5-dev',
+ 'qtchooser',
+ 'qtdeclarative5-dev',
+ 'qtfeedback5-dev',
+ 'qtlocation5-dev',
+ 'qtmultimedia5-dev',
+ 'qtpim5-dev',
+ 'libqt5sensors5-dev',
+ 'qtsystems5-dev'
+ ];
+
+ deps = deps.concat(additionalDependencies(ubuntuDir));
+ deps = deps.join(' ');
deps = deps.replace(/:ARCH/g, '');
if (!deps.length)
return;
var cmd = "dpkg-query -Wf'${db:Status-abbrev}' " + deps;
- var res = Utils.execSync(cmd);
- if (res.code !== 0 || res.output.indexOf('un') !== -1) {
- logger.error("Error: missing packages" + deps);
- process.exit(1);
+ var installCmd = "sudo apt-get install " + deps;
+
+ var res = shell.exec(cmd);
+
+ if (res.code !== 0 || res.output.match(/[^i ]/)) {
+ logger.error("Error: missing packages " + deps);
+
+ var deferred = Q.defer();
+
+ var readline = require('readline');
+ var rl = readline.createInterface(process.stdin, process.stdout);
+ rl.setPrompt('Install missing packages? (Yn)> ');
+ rl.prompt();
+
+ rl.on('line', function(line) {
+ rl.close();
+ if (line !== 'Y' && line !== 'y') {
+ deferred.reject(new Error());
+ return;
+ }
+
+ Utils.execAsync(installCmd).then(function() {
+ deferred.resolve();
+ }).catch(function (error) {
+ deferred.reject(new Error());
+ }).done();
+ });
+
+ return deferred.promise;
}
+ return Q();
}
function checkChrootEnv(ubuntuDir, architecture, framework) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[25/27] cordova-ubuntu git commit: Set VERSION to 4.3.1 (via coho)
Posted by st...@apache.org.
Set VERSION to 4.3.1 (via coho)
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/2ef1e974
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/2ef1e974
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/2ef1e974
Branch: refs/heads/master
Commit: 2ef1e974429e08b34664011b29636e1379c623b0
Parents: d4e4f06
Author: David Barth <da...@canonical.com>
Authored: Thu Nov 19 09:30:04 2015 +0100
Committer: David Barth <da...@canonical.com>
Committed: Thu Nov 19 09:30:04 2015 +0100
----------------------------------------------------------------------
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/2ef1e974/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index af730d4..aeeee78 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "cordova-ubuntu",
- "version": "4.4.0-dev",
+ "version": "4.3.1",
"description": "Cordova tooling for the Ubuntu platform.",
"main": "bin/create",
"repository": {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[22/27] cordova-ubuntu git commit: Set VERSION to 4.4.0-dev (via coho)
Posted by st...@apache.org.
Set VERSION to 4.4.0-dev (via coho)
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/443816e8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/443816e8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/443816e8
Branch: refs/heads/master
Commit: 443816e8482960846bbd4cdba4deb9a585c2e8c1
Parents: 13ef191
Author: David Barth <da...@canonical.com>
Authored: Wed Nov 18 16:17:31 2015 +0100
Committer: David Barth <da...@canonical.com>
Committed: Wed Nov 18 16:17:31 2015 +0100
----------------------------------------------------------------------
package.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/443816e8/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index b70b7fe..af730d4 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "cordova-ubuntu",
- "version": "4.3.1-dev",
+ "version": "4.4.0-dev",
"description": "Cordova tooling for the Ubuntu platform.",
"main": "bin/create",
"repository": {
@@ -46,4 +46,4 @@
}
],
"license": "Apache Version 2.0"
-}
+}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[07/27] cordova-ubuntu git commit: fix critical issue introduced by
general URL support changes earlier
Posted by st...@apache.org.
fix critical issue introduced by general URL support changes earlier
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/86e994af
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/86e994af
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/86e994af
Branch: refs/heads/master
Commit: 86e994affa1d7406295952bfac2d2af634485d2c
Parents: 75819c8
Author: David Barth <da...@canonical.com>
Authored: Thu Nov 12 16:07:06 2015 +0100
Committer: David Barth <da...@canonical.com>
Committed: Fri Nov 13 10:20:06 2015 +0100
----------------------------------------------------------------------
src/cordova.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/86e994af/src/cordova.cpp
----------------------------------------------------------------------
diff --git a/src/cordova.cpp b/src/cordova.cpp
index 172f87f..bc170af 100644
--- a/src/cordova.cpp
+++ b/src/cordova.cpp
@@ -34,10 +34,11 @@ Cordova::Cordova(const QDir &wwwDir, QQuickItem *item, QObject *parent)
_mainUrl = QString(_config.content());
} else if (!_www.exists(_config.content())) {
qCritical() << _config.content() << "does not exist";
- _mainUrl = QUrl::fromUserInput(_www.absoluteFilePath(_config.content()))
- .toString();
}
+ _mainUrl = QUrl::fromUserInput(_www.absoluteFilePath(_config.content()))
+ .toString();
+
qDebug() << "Main URL: " << _mainUrl;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[24/27] cordova-ubuntu git commit: Update JS snapshot to version
4.3.1 (via coho)
Posted by st...@apache.org.
Update JS snapshot to version 4.3.1 (via coho)
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/d4e4f06c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/d4e4f06c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/d4e4f06c
Branch: refs/heads/master
Commit: d4e4f06c81d930c8130b1d436d2ed28ddeba8d30
Parents: c32e704
Author: David Barth <da...@canonical.com>
Authored: Thu Nov 19 09:30:04 2015 +0100
Committer: David Barth <da...@canonical.com>
Committed: Thu Nov 19 09:30:04 2015 +0100
----------------------------------------------------------------------
www/cordova.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/d4e4f06c/www/cordova.js
----------------------------------------------------------------------
diff --git a/www/cordova.js b/www/cordova.js
index f94fdad..4a735f1 100644
--- a/www/cordova.js
+++ b/www/cordova.js
@@ -19,7 +19,7 @@
under the License.
*/
;(function() {
-var PLATFORM_VERSION_BUILD_LABEL = '4.4.0-dev';
+var PLATFORM_VERSION_BUILD_LABEL = '4.3.1';
// file: src/scripts/require.js
/*jshint -W079 */
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[10/27] cordova-ubuntu git commit: better info msg
Posted by st...@apache.org.
better info msg
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/8eeea8d7
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/8eeea8d7
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/8eeea8d7
Branch: refs/heads/master
Commit: 8eeea8d71dabfa43bbaab240ecf666d1e89efa88
Parents: 6fe31e7
Author: David Barth <da...@canonical.com>
Authored: Thu Nov 12 16:06:16 2015 +0100
Committer: David Barth <da...@canonical.com>
Committed: Fri Nov 13 10:27:46 2015 +0100
----------------------------------------------------------------------
bin/templates/project/cordova/lib/build.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/8eeea8d7/bin/templates/project/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/lib/build.js b/bin/templates/project/cordova/lib/build.js
index 35ab340..f51b8ba 100644
--- a/bin/templates/project/cordova/lib/build.js
+++ b/bin/templates/project/cordova/lib/build.js
@@ -213,8 +213,8 @@ function buildNative(campoDir, ubuntuDir, nobuild, debug) {
for (var i = 0; i < templates.length; i++) {
fillTemplate(templates[i].source, templates[i].dest, props);
}
- logger.warn('In order to build debian package, execute: ');
- logger.warn('cd ' + debDir + '; ' + 'debuild');
+ logger.warn('Note: to build a debian package, run: ');
+ logger.warn(' cd ' + debDir + '; ' + 'debuild');
});
});
};
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[17/27] cordova-ubuntu git commit: Merge pull request #3 from
cordova-ubuntu/CB-9694
Posted by st...@apache.org.
Merge pull request #3 from cordova-ubuntu/CB-9694
Cb 9694 - Add support for HTTP urls
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/e4a3c9e3
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/e4a3c9e3
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/e4a3c9e3
Branch: refs/heads/master
Commit: e4a3c9e363b9d0ecda7536cc9b18342e3dfa1ab3
Parents: 51f8f3c cf5bbb6
Author: david-barth-canonical <da...@canonical.com>
Authored: Wed Nov 18 14:57:26 2015 +0100
Committer: david-barth-canonical <da...@canonical.com>
Committed: Wed Nov 18 14:57:26 2015 +0100
----------------------------------------------------------------------
src/cordova.cpp | 23 ++++++++++++++---------
tests/config.xml | 45 +++++++++++++++++++++++++++++++++++++++++++++
tests/main.cpp | 14 ++++++++++++++
3 files changed, 73 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org