You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by za...@apache.org on 2015/07/23 13:18:03 UTC
[01/10] cordova-ubuntu git commit: add custom hooks into manifest.js
Repository: cordova-ubuntu
Updated Branches:
refs/heads/master a00fa7c47 -> e312e20b8
add custom hooks into manifest.js
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/1fd49d70
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/1fd49d70
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/1fd49d70
Branch: refs/heads/master
Commit: 1fd49d70f843e3fcfa36dea161fd0e46bd0a09a4
Parents: a00fa7c
Author: Maxim Ermilov <ma...@canonical.com>
Authored: Thu Jan 15 17:47:12 2015 +0300
Committer: Maxim Ermilov <ma...@canonical.com>
Committed: Thu Jul 23 11:03:00 2015 +0300
----------------------------------------------------------------------
bin/templates/project/cordova/lib/manifest.js | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/1fd49d70/bin/templates/project/cordova/lib/manifest.js
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/lib/manifest.js b/bin/templates/project/cordova/lib/manifest.js
index 648819c..9afa3ad 100644
--- a/bin/templates/project/cordova/lib/manifest.js
+++ b/bin/templates/project/cordova/lib/manifest.js
@@ -50,11 +50,18 @@ module.exports = {
},
generateManifest: function(config, dir) {
+ var hooks = { cordova: { desktop: 'cordova.desktop',
+ apparmor: 'apparmor.json' } };
+
+ config.etree.getroot().findall('./feature/param').forEach(function (element) {
+ if (element.attrib.hook)
+ hooks.cordova[element.attrib.hook] = element.attrib.value;
+ });
+
var manifest = { name: config.id(),
version: config.version(),
title: config.name(),
- hooks: { cordova: { desktop: 'cordova.desktop',
- apparmor: 'apparmor.json' } },
+ hooks: hooks,
maintainer: sanitize(config.author()) + ' <' + config.email() + '>',
description: sanitize(config.description()) };
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[04/10] cordova-ubuntu git commit: build: misc fix
Posted by za...@apache.org.
build: misc fix
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/84c68f69
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/84c68f69
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/84c68f69
Branch: refs/heads/master
Commit: 84c68f69bf1afddf4ddff36cbf8900c6a18f0e74
Parents: e6cfbb8
Author: Maxim Ermilov <ma...@canonical.com>
Authored: Mon Jan 19 17:31:57 2015 +0300
Committer: Maxim Ermilov <ma...@canonical.com>
Committed: Thu Jul 23 11:03:13 2015 +0300
----------------------------------------------------------------------
bin/templates/project/cordova/lib/manifest.js | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/84c68f69/bin/templates/project/cordova/lib/manifest.js
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/lib/manifest.js b/bin/templates/project/cordova/lib/manifest.js
index 9afa3ad..99f18d0 100644
--- a/bin/templates/project/cordova/lib/manifest.js
+++ b/bin/templates/project/cordova/lib/manifest.js
@@ -21,6 +21,7 @@ var ConfigParser = require('./config_parser');
var path = require('path');
var fs = require('fs');
var logger = require('./logger');
+var Utils = require('./utils');
function sanitize(str) {
return str.replace(/\n/g, ' ').replace(/^\s+|\s+$/g, '');
@@ -30,6 +31,12 @@ module.exports = {
generate: function(path, outDir) {
var config = new ConfigParser(path);
+
+ if (!config.author()) {
+ logger.error("\nconfig.xml should contain author");
+ process.exit(1);
+ }
+
this.generateDesktopFile(config, outDir);
this.generateManifest(config, outDir);
this.generateApparmorProfile(config, outDir);
@@ -39,7 +46,9 @@ module.exports = {
var name = sanitize(config.name()); //FIXME: escaping
var content = '[Desktop Entry]\nName=' + name + '\nExec=./cordova-ubuntu www/\nTerminal=false\nType=Application\nX-Ubuntu-Touch=true';
- if (config.icon() && fs.existsSync(path.join(dir, 'www', config.icon()))) {
+ if (config.icon() && fs.existsSync(path.join(dir, '../..', config.icon()))) {
+ Utils.cp(path.join(dir, '../..', config.icon()), path.join(dir, 'www'));
+
content += '\nIcon=www/' + config.icon();
} else {
logger.error("Missing icon");
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[05/10] cordova-ubuntu git commit: CordovaViewInternal: provide
ItemSelector for oxide
Posted by za...@apache.org.
CordovaViewInternal: provide ItemSelector for oxide
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/4696b630
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/4696b630
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/4696b630
Branch: refs/heads/master
Commit: 4696b6309e14bf62ca7b2ef678c2f3a862b06ce8
Parents: 84c68f6
Author: Maxim Ermilov <ma...@canonical.com>
Authored: Fri May 15 15:28:35 2015 +0300
Committer: Maxim Ermilov <ma...@canonical.com>
Committed: Thu Jul 23 11:03:16 2015 +0300
----------------------------------------------------------------------
CordovaUbuntu/CordovaViewInternal.qml | 4 ++
CordovaUbuntu/ItemSelector.qml | 67 ++++++++++++++++++++++++++++++
2 files changed, 71 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/4696b630/CordovaUbuntu/CordovaViewInternal.qml
----------------------------------------------------------------------
diff --git a/CordovaUbuntu/CordovaViewInternal.qml b/CordovaUbuntu/CordovaViewInternal.qml
index f9ba11c..62d354b 100644
--- a/CordovaUbuntu/CordovaViewInternal.qml
+++ b/CordovaUbuntu/CordovaViewInternal.qml
@@ -57,6 +57,10 @@ OrientationHelper {
request.action = NavigationRequest.ActionReject;
}
+ popupMenu: ItemSelector {
+ automaticOrientation: false
+ }
+
preferences.remoteFontsEnabled: true
preferences.javascriptCanAccessClipboard: true
preferences.canDisplayInsecureContent: true
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/4696b630/CordovaUbuntu/ItemSelector.qml
----------------------------------------------------------------------
diff --git a/CordovaUbuntu/ItemSelector.qml b/CordovaUbuntu/ItemSelector.qml
new file mode 100644
index 0000000..2bf20a6
--- /dev/null
+++ b/CordovaUbuntu/ItemSelector.qml
@@ -0,0 +1,67 @@
+/*
+ *
+ * Copyright 2013 Canonical Ltd.
+ *
+ * Licensed 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.
+ *
+*/
+
+import QtQuick 2.0
+import Ubuntu.Components 1.1
+import Ubuntu.Components.ListItems 1.0 as ListItems
+import Ubuntu.Components.Popups 1.0
+
+Popover {
+ id: itemSelector
+ caller: parent
+
+ contentWidth: Math.min(parent.width - units.gu(11), units.gu(39))
+ contentHeight: Math.min(parent.height - units.gu(11), listContentHeight)
+ property real listContentHeight: 0
+
+ property QtObject selectorModel: model
+
+ ListView {
+ clip: true
+ width: itemSelector.contentWidth
+ height: itemSelector.contentHeight
+
+ model: selectorModel.items
+
+ delegate: ListItems.Standard {
+ text: model.text
+ enabled: model.enabled
+ selected: model.selected
+ onClicked: {
+ selectorModel.items.select(model.index)
+ selectorModel.accept()
+ }
+ }
+
+ section.property: "group"
+ section.delegate: ListItems.Header {
+ text: section
+ }
+
+ onContentHeightChanged: itemSelector.listContentHeight = contentHeight
+ }
+
+ Component.onCompleted: show()
+
+ onVisibleChanged: {
+ if (!visible) {
+ selectorModel.cancel()
+ }
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[07/10] cordova-ubuntu git commit: fix desktop file generator
Posted by za...@apache.org.
fix desktop file generator
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/09c95eba
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/09c95eba
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/09c95eba
Branch: refs/heads/master
Commit: 09c95eba2910037954a3a1b9f688db71395920f2
Parents: 2151c7a
Author: Maxim Ermilov <ma...@canonical.com>
Authored: Thu Jul 9 13:35:36 2015 +0300
Committer: Maxim Ermilov <ma...@canonical.com>
Committed: Thu Jul 23 11:03:26 2015 +0300
----------------------------------------------------------------------
VERSION | 2 +-
bin/templates/project/cordova/lib/manifest.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/09c95eba/VERSION
----------------------------------------------------------------------
diff --git a/VERSION b/VERSION
index 4aa925d..63d63a9 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-4.1.0-dev
+4.1.0-ppa
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/09c95eba/bin/templates/project/cordova/lib/manifest.js
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/lib/manifest.js b/bin/templates/project/cordova/lib/manifest.js
index 99f18d0..abb976e 100644
--- a/bin/templates/project/cordova/lib/manifest.js
+++ b/bin/templates/project/cordova/lib/manifest.js
@@ -49,7 +49,7 @@ module.exports = {
if (config.icon() && fs.existsSync(path.join(dir, '../..', config.icon()))) {
Utils.cp(path.join(dir, '../..', config.icon()), path.join(dir, 'www'));
- content += '\nIcon=www/' + config.icon();
+ content += '\nIcon=www/' + path.basename(config.icon());
} else {
logger.error("Missing icon");
process.exit(1);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[08/10] cordova-ubuntu git commit: use 1.3 policy_version for
ubuntu-sdk-15.04+
Posted by za...@apache.org.
use 1.3 policy_version for ubuntu-sdk-15.04+
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/02cd9d9c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/02cd9d9c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/02cd9d9c
Branch: refs/heads/master
Commit: 02cd9d9c499e31089d34e92e446a06c8fee927ce
Parents: 09c95eb
Author: Maxim Ermilov <ma...@canonical.com>
Authored: Thu Jul 23 11:12:13 2015 +0300
Committer: Maxim Ermilov <ma...@canonical.com>
Committed: Thu Jul 23 11:12:13 2015 +0300
----------------------------------------------------------------------
bin/templates/project/cordova/lib/build.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/02cd9d9c/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 9d41b07..3ed2462 100644
--- a/bin/templates/project/cordova/lib/build.js
+++ b/bin/templates/project/cordova/lib/build.js
@@ -110,7 +110,11 @@ function buildClickPackage(campoDir, ubuntuDir, nobuild, architecture, framework
fs.writeFileSync(path.join(prefixDir, 'manifest.json'), JSON.stringify(content));
content = JSON.parse(fs.readFileSync(path.join(ubuntuDir, 'apparmor.json'), {encoding: "utf8"}));
- content.policy_version = 1.2;
+ if (framework === "ubuntu-sdk-14.10") {
+ content.policy_version = 1.2;
+ } else {
+ content.policy_version = 1.3;
+ }
content.policy_groups.push('webview');
fs.writeFileSync(path.join(prefixDir, 'apparmor.json'), JSON.stringify(content));
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[10/10] cordova-ubuntu git commit: add default icon
Posted by za...@apache.org.
add default icon
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/e312e20b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/e312e20b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/e312e20b
Branch: refs/heads/master
Commit: e312e20b847166d7ebe9d13c15f5942c3d19f7cf
Parents: 49bbb5a
Author: Maxim Ermilov <ma...@canonical.com>
Authored: Thu Jul 23 11:35:49 2015 +0300
Committer: Maxim Ermilov <ma...@canonical.com>
Committed: Thu Jul 23 11:35:49 2015 +0300
----------------------------------------------------------------------
bin/templates/project/cordova/lib/manifest.js | 6 +++---
default_icon.png | Bin 0 -> 35964 bytes
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/e312e20b/bin/templates/project/cordova/lib/manifest.js
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/lib/manifest.js b/bin/templates/project/cordova/lib/manifest.js
index abb976e..bdc49ca 100644
--- a/bin/templates/project/cordova/lib/manifest.js
+++ b/bin/templates/project/cordova/lib/manifest.js
@@ -45,14 +45,14 @@ module.exports = {
generateDesktopFile: function(config, dir) {
var name = sanitize(config.name()); //FIXME: escaping
var content = '[Desktop Entry]\nName=' + name + '\nExec=./cordova-ubuntu www/\nTerminal=false\nType=Application\nX-Ubuntu-Touch=true';
-
if (config.icon() && fs.existsSync(path.join(dir, '../..', config.icon()))) {
Utils.cp(path.join(dir, '../..', config.icon()), path.join(dir, 'www'));
content += '\nIcon=www/' + path.basename(config.icon());
} else {
- logger.error("Missing icon");
- process.exit(1);
+ Utils.cp(path.join(dir, 'build', 'default_icon.png'), path.join(dir, 'www'));
+
+ content += '\nIcon=www/default_icon.png';
}
fs.writeFileSync(path.join(dir, 'cordova.desktop'), content);
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/e312e20b/default_icon.png
----------------------------------------------------------------------
diff --git a/default_icon.png b/default_icon.png
new file mode 100644
index 0000000..72331a3
Binary files /dev/null and b/default_icon.png differ
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[03/10] cordova-ubuntu git commit: build: suggest to install
dependencies automatically
Posted by za...@apache.org.
build: suggest to install dependencies automatically
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/e6cfbb86
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/e6cfbb86
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/e6cfbb86
Branch: refs/heads/master
Commit: e6cfbb865b75a21b6ab4145c4355a3a29b516269
Parents: 8db47ce
Author: Maxim Ermilov <ma...@canonical.com>
Authored: Mon Jan 19 16:36:38 2015 +0300
Committer: Maxim Ermilov <ma...@canonical.com>
Committed: Thu Jul 23 11:03:08 2015 +0300
----------------------------------------------------------------------
bin/templates/project/cordova/lib/build.js | 70 +++++++++++++++++--------
1 file changed, 48 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/e6cfbb86/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 e0fd4c6..a8f966b 100644
--- a/bin/templates/project/cordova/lib/build.js
+++ b/bin/templates/project/cordova/lib/build.js
@@ -72,28 +72,27 @@ function buildClickPackage(campoDir, ubuntuDir, nobuild, architecture, framework
return Q();
}
- checkChrootEnv(ubuntuDir, architecture, framework);
+ return checkChrootEnv(ubuntuDir, architecture, framework).then(function() {
+ shell.rm('-rf', path.join(archDir, 'build'));
- shell.rm('-rf', path.join(archDir, 'build'));
+ shell.rm('-rf', prefixDir);
+ shell.mkdir(path.join(archDir, 'build'));
+ shell.mkdir(prefixDir);
- shell.rm('-rf', prefixDir);
- shell.mkdir(path.join(archDir, 'build'));
- shell.mkdir(prefixDir);
-
- Utils.pushd(path.join(archDir, 'build'));
-
- var buildType = '"Debug"';
- if (!debug)
- buildType = '"Release"';
+ Utils.pushd(path.join(archDir, 'build'));
- var cmakeCmd = 'click chroot -a ' + architecture + ' -f ' + framework + ' run cmake ' + campoDir
- + ' -DCMAKE_INSTALL_PREFIX="' + prefixDir + '"' + ' -DCMAKE_BUILD_TYPE=' + buildType +' -DUBUNTU_TOUCH="1"';
+ var buildType = '"Debug"';
+ if (!debug)
+ buildType = '"Release"';
- var deps = additionalBuildDependencies(ubuntuDir).join(' ').replace(/ARCH/g, architecture);
- if (deps.length)
- cmakeCmd += ' -DADDITIONAL_DEPENDECIES="' + deps + '"';
+ var cmakeCmd = 'click chroot -a ' + architecture + ' -f ' + framework + ' run cmake ' + campoDir
+ + ' -DCMAKE_INSTALL_PREFIX="' + prefixDir + '"' + ' -DCMAKE_BUILD_TYPE=' + buildType +' -DUBUNTU_TOUCH="1"';
- return Utils.execAsync(cmakeCmd).then(function () {
+ var deps = additionalBuildDependencies(ubuntuDir).join(' ').replace(/ARCH/g, architecture);
+ if (deps.length)
+ cmakeCmd += ' -DADDITIONAL_DEPENDECIES="' + deps + '"';
+ return Utils.execAsync(cmakeCmd);
+ }).then(function () {
if (architecture != "i386")
Utils.execSync('find . -name AutomocInfo.cmake | xargs sed -i \'s;AM_QT_MOC_EXECUTABLE .*;AM_QT_MOC_EXECUTABLE "/usr/lib/\'$(dpkg-architecture -qDEB_BUILD_MULTIARCH)\'/qt5/bin/moc");\'');
return Utils.execAsync('click chroot -a ' + architecture + ' -f ' + framework + ' run make -j ' + cpuCount());
@@ -323,13 +322,40 @@ function checkChrootEnv(ubuntuDir, architecture, framework) {
deps = deps.replace(/ARCH/g, architecture);
var cmd = "click chroot -a " + architecture + " -f " + framework + " run dpkg-query -Wf'${db:Status-abbrev}' " + deps;
+
+ var chrootCreateCmd = "sudo click chroot -a " + architecture + " -f " + framework + " create";
+ var chrootInstallCmd = "sudo click chroot -a " + architecture + " -f " + framework + " install " + deps;
+
var res = shell.exec(cmd);
- if (res.code !== 0 || res.output.indexOf('un') !== -1) {
- logger.error("Error: missing " + architecture + " chroot");
- logger.error("run:\nsudo click chroot -a " + architecture + " -f " + framework + " create");
- logger.error("sudo click chroot -a " + architecture + " -f " + framework + " install " + deps);
- process.exit(1);
+ if (res.code !== 0 || res.output.match(/[^i ]/)) {
+ logger.error("\nError: missing " + architecture + " chroot");
+ logger.error("run:\n" + chrootCreateCmd);
+ logger.error(chrootInstallCmd);
+
+ var deferred = Q.defer();
+
+ var readline = require('readline');
+ var rl = readline.createInterface(process.stdin, process.stdout);
+ rl.setPrompt('Do you want install it now? (Yn)> ');
+ rl.prompt();
+
+ rl.on('line', function(line) {
+ rl.close();
+ if (line !== 'Y' && line !== 'y') {
+ deferred.reject(new Error());
+ return;
+ }
+
+ Utils.execAsync(chrootInstallCmd).then(function() {
+ deferred.resolve();
+ }).catch(function (error) {
+ deferred.reject(new Error());
+ }).done();
+ });
+
+ return deferred.promise;
}
+ return Q();
}
function additionalDependencies(ubuntuDir) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[09/10] cordova-ubuntu git commit: build: split error message
Posted by za...@apache.org.
build: split error message
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/49bbb5ac
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/49bbb5ac
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/49bbb5ac
Branch: refs/heads/master
Commit: 49bbb5ac6a579af16ca3e3259b8ad595006153e4
Parents: 02cd9d9
Author: Maxim Ermilov <ma...@canonical.com>
Authored: Thu Jul 23 11:24:05 2015 +0300
Committer: Maxim Ermilov <ma...@canonical.com>
Committed: Thu Jul 23 11:24:05 2015 +0300
----------------------------------------------------------------------
bin/templates/project/cordova/lib/build.js | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/49bbb5ac/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 3ed2462..078974b 100644
--- a/bin/templates/project/cordova/lib/build.js
+++ b/bin/templates/project/cordova/lib/build.js
@@ -325,16 +325,28 @@ function checkChrootEnv(ubuntuDir, architecture, framework) {
deps += additionalDependencies(ubuntuDir).join(' ');
deps = deps.replace(/ARCH/g, architecture);
- var cmd = "click chroot -a " + architecture + " -f " + framework + " run dpkg-query -Wf'${db:Status-abbrev}' " + deps;
-
var chrootCreateCmd = "sudo click chroot -a " + architecture + " -f " + framework + " create";
var chrootInstallCmd = "sudo click chroot -a " + architecture + " -f " + framework + " install " + deps;
+ var cmd = "click chroot -a " + architecture + " -f " + framework + " run echo 1";
var res = shell.exec(cmd);
- if (res.code !== 0 || res.output.match(/[^i ]/)) {
+
+ if (res.code !== 0) {
logger.error("\nError: missing " + architecture + " chroot");
logger.error("run:\n" + chrootCreateCmd);
- logger.error(chrootInstallCmd);
+
+ var deferred = Q.defer();
+ deferred.reject(new Error());
+
+ return deferred.promise;
+ }
+
+ cmd = "click chroot -a " + architecture + " -f " + framework + " run dpkg-query -Wf'${db:Status-abbrev}' " + deps;
+
+ res = shell.exec(cmd);
+ if (res.code !== 0 || res.output.match(/[^i ]/)) {
+ logger.error("\nError: missing dependency inside " + architecture + " chroot");
+ logger.error("run:\n" + chrootInstallCmd);
var deferred = Q.defer();
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[06/10] cordova-ubuntu git commit: support ubuntu-sdk-15.04
Posted by za...@apache.org.
support ubuntu-sdk-15.04
Project: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/commit/2151c7a7
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/2151c7a7
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/2151c7a7
Branch: refs/heads/master
Commit: 2151c7a70a256c1dcb61f4597971f143e304130f
Parents: 4696b63
Author: Maxim Ermilov <ma...@canonical.com>
Authored: Thu Jul 9 13:22:50 2015 +0300
Committer: Maxim Ermilov <ma...@canonical.com>
Committed: Thu Jul 23 11:03:21 2015 +0300
----------------------------------------------------------------------
bin/templates/project/cordova/lib/build.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/2151c7a7/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 a8f966b..9d41b07 100644
--- a/bin/templates/project/cordova/lib/build.js
+++ b/bin/templates/project/cordova/lib/build.js
@@ -93,7 +93,7 @@ function buildClickPackage(campoDir, ubuntuDir, nobuild, architecture, framework
cmakeCmd += ' -DADDITIONAL_DEPENDECIES="' + deps + '"';
return Utils.execAsync(cmakeCmd);
}).then(function () {
- if (architecture != "i386")
+ if (architecture != "i386" && framework != "ubuntu-sdk-15.04")
Utils.execSync('find . -name AutomocInfo.cmake | xargs sed -i \'s;AM_QT_MOC_EXECUTABLE .*;AM_QT_MOC_EXECUTABLE "/usr/lib/\'$(dpkg-architecture -qDEB_BUILD_MULTIARCH)\'/qt5/bin/moc");\'');
return Utils.execAsync('click chroot -a ' + architecture + ' -f ' + framework + ' run make -j ' + cpuCount());
}).then(function () {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[02/10] cordova-ubuntu git commit: support Orientation preference
from config.xml
Posted by za...@apache.org.
support Orientation preference from 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/8db47ce6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/tree/8db47ce6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/diff/8db47ce6
Branch: refs/heads/master
Commit: 8db47ce687ae9f8bc60992c6fc0fd0344b4678f7
Parents: 1fd49d7
Author: Maxim Ermilov <ma...@canonical.com>
Authored: Thu Jan 15 22:11:30 2015 +0300
Committer: Maxim Ermilov <ma...@canonical.com>
Committed: Thu Jul 23 11:03:04 2015 +0300
----------------------------------------------------------------------
CordovaUbuntu/CordovaViewInternal.qml | 2 +-
qml/CordovaView.qml.in | 10 ++++++++++
src/cordova_config.cpp | 12 ++++++++++++
src/cordova_config.hpp | 10 ++++++++++
4 files changed, 33 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/8db47ce6/CordovaUbuntu/CordovaViewInternal.qml
----------------------------------------------------------------------
diff --git a/CordovaUbuntu/CordovaViewInternal.qml b/CordovaUbuntu/CordovaViewInternal.qml
index 4c7009a..f9ba11c 100644
--- a/CordovaUbuntu/CordovaViewInternal.qml
+++ b/CordovaUbuntu/CordovaViewInternal.qml
@@ -22,7 +22,7 @@ import "cordova_wrapper.js" as CordovaWrapper
import Ubuntu.Components 0.1
import Ubuntu.Components.Popups 0.1
-Item {
+OrientationHelper {
id: root
anchors.fill: parent
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/8db47ce6/qml/CordovaView.qml.in
----------------------------------------------------------------------
diff --git a/qml/CordovaView.qml.in b/qml/CordovaView.qml.in
index 79f2c0c..a9b14fe 100644
--- a/qml/CordovaView.qml.in
+++ b/qml/CordovaView.qml.in
@@ -45,6 +45,16 @@ Item {
cordova.parent = loader.item
loader.item.completed.connect(function() {
+ if (cordova.config().orientation() == 0) {
+ loader.item.automaticOrientation = true
+ } else {
+ loader.item.automaticOrientation = true
+ if (cordova.config().orientation() == 1)
+ loader.item.orientationAngle = 90
+ else
+ loader.item.orientationAngle = 0
+ }
+
loader.item.visible = true
loader.visible = true
splashscreen.visible = false
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/8db47ce6/src/cordova_config.cpp
----------------------------------------------------------------------
diff --git a/src/cordova_config.cpp b/src/cordova_config.cpp
index b736783..da66e7b 100644
--- a/src/cordova_config.cpp
+++ b/src/cordova_config.cpp
@@ -39,6 +39,7 @@ Config::Config(const QString &xmlConfig) {
_fullscreen = false;
_disallowOverscroll = false;
+ _orientation = DEFAULT_ORIENTATION;
nodes = config.documentElement().elementsByTagName("preference");
for (int i = 0; i < nodes.size(); ++i) {
QDomNode node = nodes.at(i);
@@ -50,6 +51,12 @@ Config::Config(const QString &xmlConfig) {
_fullscreen = value == "true";
if (name == "DisallowOverscroll")
_disallowOverscroll = value == "true";
+ if (name == "Orientation") {
+ if (value == "landscape")
+ _orientation = LANDSCAPE;
+ if (value == "portrait")
+ _orientation = PORTRAIT;
+ }
}
_content = "index.html";
@@ -64,6 +71,11 @@ Config::Config(const QString &xmlConfig) {
_appId = config.documentElement().attribute("id");
_appVersion = config.documentElement().attribute("version");
+
+}
+
+int Config::orientation() const {
+ return _orientation;
}
const WhiteList& Config::whitelist() const {
http://git-wip-us.apache.org/repos/asf/cordova-ubuntu/blob/8db47ce6/src/cordova_config.hpp
----------------------------------------------------------------------
diff --git a/src/cordova_config.hpp b/src/cordova_config.hpp
index 619f277..8625d79 100644
--- a/src/cordova_config.hpp
+++ b/src/cordova_config.hpp
@@ -24,6 +24,12 @@ namespace CordovaInternal {
class Config: public QObject {
Q_OBJECT
public:
+ enum Orientation {
+ DEFAULT_ORIENTATION = 0,
+ LANDSCAPE = 1,
+ PORTRAIT = 2
+ };
+
explicit Config(const QString &xmlConfig);
const WhiteList& whitelist() const;
@@ -34,12 +40,16 @@ namespace CordovaInternal {
bool disallowOverscroll() const;
Q_INVOKABLE bool fullscreen() const;
+
+ Q_INVOKABLE int orientation() const;
private:
WhiteList _whitelist;
QString _content;
QString _appId, _appVersion;
bool _fullscreen, _disallowOverscroll;
+ Orientation _orientation;
+
Q_DISABLE_COPY(Config);
};
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org