Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 19B58200C7D for ; Mon, 1 May 2017 23:16:53 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 18726160BBD; Mon, 1 May 2017 21:16:53 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B408E160BC9 for ; Mon, 1 May 2017 23:16:49 +0200 (CEST) Received: (qmail 64303 invoked by uid 500); 1 May 2017 21:16:46 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 62467 invoked by uid 99); 1 May 2017 21:16:44 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 May 2017 21:16:44 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D758EE1103; Mon, 1 May 2017 21:16:44 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: steven@apache.org To: commits@cordova.apache.org Date: Mon, 01 May 2017 21:17:42 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [60/63] [abbrv] cordova-lib git commit: CB-11242: removed support for platforms that don't have a package.json archived-at: Mon, 01 May 2017 21:16:53 -0000 http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/677d2529/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/lib/run.js ---------------------------------------------------------------------- diff --git a/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/lib/run.js b/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/lib/run.js deleted file mode 100644 index 214a1e1..0000000 --- a/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/lib/run.js +++ /dev/null @@ -1,141 +0,0 @@ -#!/usr/bin/env node - -/* - 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. -*/ - -/* jshint loopfunc:true */ - -var path = require('path'), - build = require('./build'), - emulator = require('./emulator'), - device = require('./device'), - Q = require('q'), - events = require('cordova-common').events; - -function getInstallTarget(runOptions) { - var install_target; - if (runOptions.target) { - install_target = runOptions.target; - } else if (runOptions.device) { - install_target = '--device'; - } else if (runOptions.emulator) { - install_target = '--emulator'; - } - - return install_target; -} - -/** - * Runs the application on a device if available. If no device is found, it will - * use a started emulator. If no started emulators are found it will attempt - * to start an avd. If no avds are found it will error out. - * - * @param {Object} runOptions various run/build options. See Api.js build/run - * methods for reference. - * - * @return {Promise} - */ - module.exports.run = function(runOptions) { - - var self = this; - var install_target = getInstallTarget(runOptions); - - return Q() - .then(function() { - if (!install_target) { - // no target given, deploy to device if available, otherwise use the emulator. - return device.list() - .then(function(device_list) { - if (device_list.length > 0) { - events.emit('warn', 'No target specified, deploying to device \'' + device_list[0] + '\'.'); - install_target = device_list[0]; - } else { - events.emit('warn', 'No target specified and no devices found, deploying to emulator'); - install_target = '--emulator'; - } - }); - } - }).then(function() { - if (install_target == '--device') { - return device.resolveTarget(null); - } else if (install_target == '--emulator') { - // Give preference to any already started emulators. Else, start one. - return emulator.list_started() - .then(function(started) { - return started && started.length > 0 ? started[0] : emulator.start(); - }).then(function(emulatorId) { - return emulator.resolveTarget(emulatorId); - }); - } - // They specified a specific device/emulator ID. - return device.list() - .then(function(devices) { - if (devices.indexOf(install_target) > -1) { - return device.resolveTarget(install_target); - } - return emulator.list_started() - .then(function(started_emulators) { - if (started_emulators.indexOf(install_target) > -1) { - return emulator.resolveTarget(install_target); - } - return emulator.list_images() - .then(function(avds) { - // if target emulator isn't started, then start it. - for (var avd in avds) { - if (avds[avd].name == install_target) { - return emulator.start(install_target) - .then(function(emulatorId) { - return emulator.resolveTarget(emulatorId); - }); - } - } - return Q.reject('Target \'' + install_target + '\' not found, unable to run project'); - }); - }); - }); - }).then(function(resolvedTarget) { - // Better just call self.build, but we're doing some processing of - // build results (according to platformApi spec) so they are in different - // format than emulator.install expects. - // TODO: Update emulator/device.install to handle this change - return build.run.call(self, runOptions, resolvedTarget) - .then(function(buildResults) { - if (resolvedTarget.isEmulator) { - return emulator.wait_for_boot(resolvedTarget.target) - .then(function () { - return emulator.install(resolvedTarget, buildResults); - }); - } - return device.install(resolvedTarget, buildResults); - }); - }); -}; - -module.exports.help = function() { - console.log('Usage: ' + path.relative(process.cwd(), process.argv[1]) + ' [options]'); - console.log('Build options :'); - console.log(' --debug : Builds project in debug mode'); - console.log(' --release : Builds project in release mode'); - console.log(' --nobuild : Runs the currently built project without recompiling'); - console.log('Deploy options :'); - console.log(' --device : Will deploy the built project to a device'); - console.log(' --emulator : Will deploy the built project to an emulator if one exists'); - console.log(' --target= : Installs to the target with the specified id.'); - process.exit(0); -}; http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/677d2529/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/lib/start-emulator ---------------------------------------------------------------------- diff --git a/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/lib/start-emulator b/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/lib/start-emulator deleted file mode 100755 index f96bdc3..0000000 --- a/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/lib/start-emulator +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env node - -/* - 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. -*/ - -var emulator = require('./emulator'), - args = process.argv; - -var install_target; -if(args.length > 2) { - if (args[2].substring(0, 9) == '--target=') { - install_target = args[2].substring(9, args[2].length); - } else { - console.error('ERROR : argument \'' + args[2] + '\' not recognized.'); - process.exit(2); - } -} - -emulator.start(install_target).done(null, function(err) { - console.error('ERROR: ' + err); - process.exit(2); -}); - http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/677d2529/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/lib/start-emulator.bat ---------------------------------------------------------------------- diff --git a/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/lib/start-emulator.bat b/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/lib/start-emulator.bat deleted file mode 100644 index 9329d95..0000000 --- a/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/lib/start-emulator.bat +++ /dev/null @@ -1,26 +0,0 @@ -:: 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. - -@ECHO OFF -SET script_path="%~dp0start-emulator" -IF EXIST %script_path% ( - node "%script_path%" %* -) ELSE ( - ECHO. - ECHO ERROR: Could not find 'start-emulator' script in 'cordova\lib' folder, aborting...>&2 - EXIT /B 1 -) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/677d2529/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/log ---------------------------------------------------------------------- diff --git a/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/log b/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/log deleted file mode 100755 index 47f0605..0000000 --- a/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/log +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env node - -/* - 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. -*/ - -var log = require('./lib/log'), - reqs = require('./lib/check_reqs'), - args = process.argv; - -// Usage support for when args are given -if(args.length > 2) { - log.help(); -} else { - reqs.run().done(function() { - return log.run(); - }, function(err) { - console.error('ERROR: ' + err); - process.exit(2); - }); -} http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/677d2529/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/log.bat ---------------------------------------------------------------------- diff --git a/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/log.bat b/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/log.bat deleted file mode 100644 index 4b2b434..0000000 --- a/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/log.bat +++ /dev/null @@ -1,26 +0,0 @@ -:: 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. - -@ECHO OFF -SET script_path="%~dp0log" -IF EXIST %script_path% ( - node %script_path% %* -) ELSE ( - ECHO. - ECHO ERROR: Could not find 'log' script in 'cordova' folder, aborting...>&2 - EXIT /B 1 -) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/677d2529/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/loggingHelper.js ---------------------------------------------------------------------- diff --git a/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/loggingHelper.js b/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/loggingHelper.js deleted file mode 100644 index 32b2ee0..0000000 --- a/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/loggingHelper.js +++ /dev/null @@ -1,18 +0,0 @@ -var CordovaLogger = require('cordova-common').CordovaLogger; - -module.exports = { - adjustLoggerLevel: function (opts) { - if (opts instanceof Array) { - opts.silent = opts.indexOf('--silent') !== -1; - opts.verbose = opts.indexOf('--verbose') !== -1; - } - - if (opts.silent) { - CordovaLogger.get().setLevel('error'); - } - - if (opts.verbose) { - CordovaLogger.get().setLevel('verbose'); - } - } -}; http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/677d2529/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/run ---------------------------------------------------------------------- diff --git a/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/run b/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/run deleted file mode 100755 index 9544c1d..0000000 --- a/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/run +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env node - -/* - 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. -*/ - -var Api = require('./Api'); -var nopt = require('nopt'); -var path = require('path'); - -// Support basic help commands -if(['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) >= 0) - require('./lib/run').help(); - -// Do some basic argument parsing -var runOpts = nopt({ - 'verbose' : Boolean, - 'silent' : Boolean, - 'debug' : Boolean, - 'release' : Boolean, - 'nobuild': Boolean, - 'buildConfig' : path, - 'archs' : String, - 'device' : Boolean, - 'emulator': Boolean, - 'target' : String -}, { 'd' : '--verbose' }); - -// Make runOptions compatible with PlatformApi run method spec -runOpts.argv = runOpts.argv.remain; - -require('./loggingHelper').adjustLoggerLevel(runOpts); - -new Api().run(runOpts) -.catch(function(err) { - console.error(err, err.stack); - process.exit(2); -}); http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/677d2529/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/run.bat ---------------------------------------------------------------------- diff --git a/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/run.bat b/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/run.bat deleted file mode 100644 index b0bc28b..0000000 --- a/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/run.bat +++ /dev/null @@ -1,26 +0,0 @@ -:: 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. - -@ECHO OFF -SET script_path="%~dp0run" -IF EXIST %script_path% ( - node %script_path% %* -) ELSE ( - ECHO. - ECHO ERROR: Could not find 'run' script in 'cordova' folder, aborting...>&2 - EXIT /B 1 -) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/677d2529/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/version ---------------------------------------------------------------------- diff --git a/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/version b/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/version deleted file mode 100755 index 6c65486..0000000 --- a/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/version +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env node - -/* - 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. -*/ - -// Coho updates this line: -var VERSION = "1.0.0"; - -module.exports.version = VERSION; - -if (!module.parent) { - console.log(VERSION); -} http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/677d2529/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/version.bat ---------------------------------------------------------------------- diff --git a/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/version.bat b/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/version.bat deleted file mode 100644 index 3610c17..0000000 --- a/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/cordova/version.bat +++ /dev/null @@ -1,26 +0,0 @@ -:: 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. - -@ECHO OFF -SET script_path="%~dp0version" -IF EXIST %script_path% ( - node %script_path% %* -) ELSE ( - ECHO. - ECHO ERROR: Could not find 'version' script in 'cordova' folder, aborting...>&2 - EXIT /B 1 -) http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/677d2529/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/project/Activity.java ---------------------------------------------------------------------- diff --git a/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/project/Activity.java b/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/project/Activity.java deleted file mode 100644 index 567b6c7..0000000 --- a/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/project/Activity.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - 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. - */ - -package __ID__; - -import android.os.Bundle; -import org.apache.cordova.*; - -public class __ACTIVITY__ extends CordovaActivity -{ - @Override - public void onCreate(Bundle savedInstanceState) - { - super.onCreate(savedInstanceState); - - // enable Cordova apps to be started in the background - Bundle extras = getIntent().getExtras(); - if (extras != null && extras.getBoolean("cdvStartInBackground", false)) { - moveTaskToBack(true); - } - - // Set by in config.xml - loadUrl(launchUrl); - } -} http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/677d2529/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/project/AndroidManifest.xml ---------------------------------------------------------------------- diff --git a/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/project/AndroidManifest.xml b/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/project/AndroidManifest.xml deleted file mode 100644 index bb60a07..0000000 --- a/cordova-lib/spec-cordova/fixtures/platforms/atari/bin/templates/project/AndroidManifest.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org For additional commands, e-mail: commits-help@cordova.apache.org