You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/12/23 22:21:36 UTC

[1/2] git commit: Remove dead code

Updated Branches:
  refs/heads/master 837e8e367 -> 8bde8edfa


Remove dead code


Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/0a9020c7
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/0a9020c7
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/0a9020c7

Branch: refs/heads/master
Commit: 0a9020c70da8484365896c60ea1f977ce08c9c0b
Parents: 837e8e3
Author: Andrew Grieve <ag...@chromium.org>
Authored: Mon Dec 23 15:11:54 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Mon Dec 23 15:13:31 2013 -0500

----------------------------------------------------------------------
 src/metadata/ios_parser.js | 41 -----------------------------------------
 1 file changed, 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/0a9020c7/src/metadata/ios_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/ios_parser.js b/src/metadata/ios_parser.js
index fcfa243..21d0d5b 100644
--- a/src/metadata/ios_parser.js
+++ b/src/metadata/ios_parser.js
@@ -22,30 +22,11 @@ var fs            = require('fs'),
     util          = require('../util'),
     events        = require('../events'),
     shell         = require('shelljs'),
-    child_process = require('child_process'),
     plist         = require('plist'),
-    semver        = require('semver'),
     Q             = require('q'),
     config_parser = require('../config_parser'),
     config        = require('../config');
 
-var MIN_XCODE_VERSION = '>=4.5.x';
-
-var default_prefs = {
-    "KeyboardDisplayRequiresUserAction":"true",
-    "SuppressesIncrementalRendering":"false",
-    "UIWebViewBounce":"true",
-    "TopActivityIndicator":"gray",
-    "EnableLocation":"false",
-    "EnableViewportScale":"false",
-    "AutoHideSplashScreen":"true",
-    "ShowSplashScreenSpinner":"true",
-    "MediaPlaybackRequiresUserAction":"false",
-    "AllowInlineMediaPlayback":"false",
-    "OpenAllWhitelistURLsInWebView":"false",
-    "BackupWebStorage":"cloud"
-};
-
 module.exports = function ios_parser(project) {
     try {
         var xcodeproj_dir = fs.readdirSync(project).filter(function(e) { return e.match(/\.xcodeproj$/i); })[0];
@@ -66,28 +47,6 @@ module.exports = function ios_parser(project) {
 module.exports.check_requirements = function(project_root) {
     // Rely on platform's bin/create script to check requirements.
     return Q(true);
-    
-    events.emit('log', 'Checking iOS requirements...');
-    // Check xcode + version.
-    var command = 'xcodebuild -version';
-    events.emit('verbose', 'Running "' + command + '" (output to follow)');
-    var d = Q.defer();
-    
-    child_process.exec(command, function(err, output, stderr) {
-        events.emit('verbose', output+stderr);
-        if (err || stderr) {
-            d.reject(new Error('Xcode is (probably) not installed, specifically the command `xcodebuild` is unavailable or erroring out. Output of `'+command+'` is: ' + output + stderr));
-        } else {
-            var xc_version = output.split('\n')[0].split(' ')[1];
-            if(xc_version.split('.').length === 2){
-                xc_version += '.0';
-            }
-            if (!semver.satisfies(xc_version, MIN_XCODE_VERSION)) {
-                d.reject(new Error('Xcode version installed is too old. Minimum: ' + MIN_XCODE_VERSION + ', yours: ' + xc_version));
-            } else d.resolve();
-        }
-    });
-    return d.promise;
 };
 
 module.exports.prototype = {


[2/2] git commit: CB-5397 Make iOS project file's www/ and config.xml point at the non-platforms versions.

Posted by ag...@apache.org.
CB-5397 Make iOS project file's www/ and config.xml point at the non-platforms versions.

This will hopefully make it easier to use Xcode with CLI.


Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/8bde8edf
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/8bde8edf
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/8bde8edf

Branch: refs/heads/master
Commit: 8bde8edfa7976bfe116e22451cb375949a76035c
Parents: 0a9020c
Author: Andrew Grieve <ag...@chromium.org>
Authored: Mon Dec 23 16:19:59 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Mon Dec 23 16:19:59 2013 -0500

----------------------------------------------------------------------
 src/platform.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/8bde8edf/src/platform.js
----------------------------------------------------------------------
diff --git a/src/platform.js b/src/platform.js
index 682cfb7..0ed9b92 100644
--- a/src/platform.js
+++ b/src/platform.js
@@ -244,11 +244,18 @@ function call_into_create(target, projectRoot, cfg, libDir, template_dir) {
 
             // Run platform's create script
             var d = Q.defer();
+            var parser;
             child_process.exec(command, function(err, create_output, stderr) {
                 events.emit('verbose', create_output);
                 if (err) {
                     d.reject(new Error('An error occured during creation of ' + target + ' sub-project. ' + create_output + '\n' + stderr));
                 } else {
+                    parser = new platforms[target].parser(output);
+                    // Fix up www and config.xml project references to point at the top-level ones.
+                    if (target=='ios') {
+                        shell.sed('-i', /(PBXFileReference.*)(path[\s=]*)"?www"?(;)/, '$1name = www; $2"../../www"$3', parser.pbxproj);
+                        shell.sed('-i', /(PBXFileReference.*path[\s=]*)"?[^\/]+\/config.xml"?(;)/, '$1"../../www/config.xml"$2', parser.pbxproj);
+                    }
                     d.resolve(require('../cordova').raw.prepare(target));
                 }
             });
@@ -257,7 +264,6 @@ function call_into_create(target, projectRoot, cfg, libDir, template_dir) {
                 // Install all currently installed plugins into this new platform.
                 var plugins_dir = path.join(projectRoot, 'plugins');
                 var plugins = cordova_util.findPlugins(plugins_dir);
-                var parser = new platforms[target].parser(output);
                 if (!plugins) return Q();
 
                 var plugman = require('plugman');