Commit Graph

4986 Commits

Author SHA1 Message Date
David Greenspan
f0460a39dc Don't suggest updates to core pkg indirect deps
Exclude core packages (whose versions are pinned) from being printed
when we say:
"Newer versions of the following indirect dependencies are available".
2015-08-31 11:47:08 -07:00
Martijn Walraven
f57c671a70 Only list individual platform requirements when in verbose mode
Listing them all by default may confuse people, and make them overlook
the installation instructions URL.
2015-08-31 15:45:21 +02:00
David Greenspan
29f24238a0 Fix typo and add informational message 2015-08-31 06:19:30 -07:00
David Greenspan
6130648c99 Don't use old tool to run meteor update in an RC 2015-08-31 06:19:30 -07:00
Sashko Stubailo
a96e0e1009 Correctly format doc comment about options 2015-08-28 10:52:49 -07:00
Sashko Stubailo
217bad7f10 Reinstate logic where bare option was taken from fileOptions 2015-08-28 10:32:59 -07:00
Martijn Walraven
b0c1464e7c Only attempt to copy built apk when it exists
This is a temporary workaround for an issue that occurs when building
an app that uses Crosswalk.

We usually attempt to copy android-release-unsigned.apk to the root
build dir after a successful release build, but because Crosswalk
depends on native code, the resulting apk is architecture-specific
(android-armv7-release-unsigned.apk and
android-x86-release-unsigned.apk).

For now, I’m just adding a check so we don’t throw ENOENT. Built apks
can be found as usual in android/project/build/outputs/apk, they’re
just not copied to the root build dir.
2015-08-28 08:09:11 +02:00
Martijn Walraven
c2c6a01b16 Change Wiki pages for mobile development installation 2015-08-27 21:06:53 +02:00
David Greenspan
a2a8192c35 Add tools/cordova to list of transpiled dirs 2015-08-27 10:46:22 -07:00
Martijn Walraven
425a7a860e Hide now deprecated Cordova commands 2015-08-27 15:53:47 +02:00
Martijn Walraven
9fbde12ea9 Avoid creating an empty cordova-plugins file when upgrading 2015-08-27 14:35:26 +02:00
Martijn Walraven
845bd881e4 Correct a really stupid error that made building mobile apps on OS X impossible 2015-08-27 14:35:12 +02:00
Sashko Stubailo
45f3133b24 Improve the meteor create experience and fix bugs with existing dir PR 2015-08-26 15:14:21 -07:00
Martijn Walraven
e8d4362535 Disable building mobile apps on Windows for now 2015-08-26 19:26:57 +02:00
Martijn Walraven
0ea336424a Clarify some comments 2015-08-26 19:26:57 +02:00
Martijn Walraven
83c64a4a65 Fix upgrader and print more information about Cordova changes 2015-08-26 19:26:56 +02:00
Martijn Walraven
883000a149 Print instructions for launching SDK Manager in android-launch command 2015-08-26 19:26:56 +02:00
Martijn Walraven
4e786ab85d Rename plugins to pluginVersions in CordovaProject#prepareFromAppBundle 2015-08-26 19:26:56 +02:00
Martijn Walraven
b977943f68 Print installation instructions URL if not all requirements are satisfied 2015-08-26 19:26:56 +02:00
Martijn Walraven
7d2cb49b65 Rename installationInstructionsURLForPlatform to installationInstructionsUrlForPlatform 2015-08-26 19:26:56 +02:00
Martijn Walraven
9cb686e3b6 Some renames in tools/cordova/builder.js 2015-08-26 19:26:56 +02:00
Martijn Walraven
7e5a9942c4 Update references in API docs for App object to latest Cordova version 2015-08-26 19:26:56 +02:00
Martijn Walraven
14d301f8ab Add comments and apply better naming to clarify plugins code
In particular, clearly differentiate between plugins (an array of
plugin IDs) and pluginVersions (an object of with id -> version
properties).
2015-08-26 19:26:56 +02:00
Martijn Walraven
e4bb7726ca Make Cordova self-tests pass again 2015-08-26 19:26:56 +02:00
Martijn Walraven
2109bedb85 Add conversion to new Cordova plugin IDs
Cordova plugin IDs have changed as part of moving to npm. We convert
old plugin IDs to new IDs in the 1.2.0-cordova-changes upgrader, when
adding plugins, and when preparing for build.
2015-08-26 19:26:55 +02:00
Martijn Walraven
b8f853db37 Make Cordova self-tests pass again 2015-08-26 19:26:55 +02:00
Martijn Walraven
ae5c9670ad Add upgrader for the Cordova changes in 1.2 2015-08-26 19:26:55 +02:00
Martijn Walraven
cb1a62924f Add 'Cordova error:' to Cordova error messages 2015-08-26 19:26:55 +02:00
Martijn Walraven
ef78afbca6 Fix CordovaProject#updatePlatforms 2015-08-26 19:26:55 +02:00
Martijn Walraven
a5a5b4c758 Use parsed run targets to detect a run on a device
This fixes a bug where test-packages on a device sets localhost as the
mobile server URL.
2015-08-26 19:26:55 +02:00
Martijn Walraven
0980cd8d04 Add log filtering and formatting for Android 2015-08-26 19:26:55 +02:00
Martijn Walraven
b2c5ff4d5a Allow specifying a destination option for execFileSync/Async
If specified, instead of capturing the output, the child process stdout
will be piped to the destination stream.

Although the standard spawn stdio option lets you pass in streams,
these have to be connected to an open file descriptor. The destination
option allows you to use any Writable, so it can be used with a
Transform for instance.
2015-08-26 19:26:55 +02:00
Martijn Walraven
df708d7309 Add first version of tailing logs on Android 2015-08-26 19:26:55 +02:00
Martijn Walraven
e55c9f46c4 Replace execFile with execFileSync when opening Xcode project 2015-08-26 19:26:54 +02:00
Martijn Walraven
a5b49b8aa4 Exit when running platforms are removed or plugins changed 2015-08-26 19:26:54 +02:00
Martijn Walraven
a5784d54b6 Don't rebuild packages immediately after add/remove platform
This happens automatically before build/run.
2015-08-26 19:26:54 +02:00
Martijn Walraven
1407143e9f Make CordovaProject#run use the new execFileAsync with waitForClose false
This fixes an issue where starting up the Android Emulator with stdio
piped would only exit when the emulator exits, instead of when the app
is successfully installed, thus blocking further startup.

The reason for this was that cordova-lib superspawn listens for the
‘close’ event of its child process, which is emitted when the stdio
streams have all terminated. If those streams are shared with other
processes (such as further child processes spawned by the child
process), that means we won't receive a 'close' until all processes
have exited, so we should listen for 'exit' instead.
2015-08-26 19:26:54 +02:00
Martijn Walraven
63461fcd8f Remove unused RunCommand and add promise-based execFileSync/Async
The execFileSync function is meant to resemble the similarly-named Node
0.12 synchronous process creation API, but instead of being fully
blocking it uses a promise-based implementation. You can also use
execFileAsync directly, which returns a promise.

Some functionality is currently missing but could be added when the
need arises (e.g. support for timeout, maxBuffer, and encoding options).

Eventually, these versions should replace the ones in
tools/utils/utils.js and tools/tool-testing/selftest.js.
2015-08-26 19:26:54 +02:00
Martijn Walraven
0538dc1f28 Some changes to the buildmessage structure and job naming 2015-08-26 19:26:54 +02:00
Martijn Walraven
1a4e940529 Create Cordova project from generated config.xml
We now create a temporary directory with a generated config.xml
to use as a template for creating the Cordova project. This way, we are
not dependent on the contents of cordova-app-hello-world but we base
our initial project state on our own defaults and optionally a
mobile-config.js.

This change was in part motivated by a bug in Cordova where changing
the app name to a version with a different case, on a case insensitive
file system like OS X, means the project will no longer build. Because
our app name on creation was based on the project directory and we
didn’t respect the app name set in mobile-config.js until the first
build, there was always a rename needed, triggering the bug.

This bug affected both the todos and localmarket example apps.
2015-08-26 19:26:54 +02:00
Martijn Walraven
4300e1b4f4 Call platform run script ourselves instead of leaving this to cordova-lib
Using cordova.raw.run() would swallow the error superspawn created from
the underlying error output, so we’re now calling the platform run
script ourselves and potentially receive an error through the promise.

Not relying on cordova-lib also means preparing the platform is no
longer done automatically for us. This means you'll have to make sure
CordovaProject#prepareForPlatform() is called before running. We do
this for all the current run target’s platforms in
CordovaRunner#prepareProject().

(We don’t do it automatically within CordovaProject#run because this
way the prepare is not part of ‘Starting …’, and also because running
multiple targets of the same platform would mean unnecessarily running
prepare multiple times).
2015-08-26 19:26:53 +02:00
Martijn Walraven
a880a8b709 Don't start run targets in parallel until we figure out a good UX for this
This would likely involve some kind of concurrent progress display, but
we might also need to revise logging as we don’t want ongoing logs to
mess up the progress status.
2015-08-26 19:26:53 +02:00
Martijn Walraven
db0d6ca41d Fix tests for parseServerOptionsForRunCommand that stopped working due to recent changes 2015-08-26 19:26:53 +02:00
Martijn Walraven
f96ab94f7c Remove failing check in test that assumes we uninstall all plugins on error
I’ve removed the code that uninstalls all plugins on error because
there is no indication this is still an issue (nothing found on the
Cordova JIRA).
2015-08-26 19:26:53 +02:00
Martijn Walraven
68607c39f9 Add Cordova CLI dependency to dev bundle and use it from tests 2015-08-26 19:26:53 +02:00
Martijn Walraven
e25ccacac7 Fix indentation in tools/cli/commands.js 2015-08-26 19:26:53 +02:00
Martijn Walraven
06e955951a Fix typo in tools/cordova/README.md 2015-08-26 19:26:53 +02:00
Martijn Walraven
5cb18f3559 Whitespace fixes in tools/cli/commands.js 2015-08-26 19:26:53 +02:00
Martijn Walraven
f1bc608d51 Remove unnecessary try/catches for utils.parseUrl() 2015-08-26 19:26:52 +02:00
Martijn Walraven
3c529ef540 Add clarifying comment to cordova.filterPlatforms() 2015-08-26 19:26:52 +02:00