commit | f4a798cfb08b28897a7aa75b0dbf874df77e9a0a | [log] [tgz] |
---|---|---|
author | Patrick Mueller <pmuellr@apache.org> | Tue Feb 28 18:38:30 2012 -0500 |
committer | Patrick Mueller <pmuellr@apache.org> | Tue Feb 28 18:38:30 2012 -0500 |
tree | 9591eced57af94a4d37f13ccc248d3ed7fd611fb | |
parent | e455568d9fa924f2833a04330a3c2ea047b5a772 [diff] |
fix a number of error conditions bug: https://issues.apache.org/jira/browse/CB-284 invocation exception on WeinreClientEventsImpl.connectionCreated(): \ TypeError: Cannot read property 'url' of undefined The original problem logged in this issue was just one of the problems fixed. There were a handful of others. Added error checking where I could, and where I couldn't, I changed the logger to not display a warning message (bug in Web Inspector). Drive-by fixes for: - changing the sequence number of channels to start at 1 instead of a random number. Note that the primary reason to use a random number is to because the server can get confused when you start/stop but have clients/targets that try to reconnect with the same channel number. Not a problem at all in deployment, but a hassle at development time - or used to be. I'm going to try turning the 'random' off and see how it goes. - dump the pid at startup when in verbose mode; making it easier to run top/dtrace/etc.
weinre is WEb INspector REmote. Pronounced like the word “winery”. Or maybe like the word “weiner”. Who knows, really.
weinre is a debugger for web pages, like FireBug (for FireFox) and Web Inspector (for WebKit-based browsers), except it's designed to work remotely, and in particular, to allow you debug web pages on a mobile device such as a phone.
For more information on weinre: http://http://incubator.apache.org/callback/
The weinre source is contained in 4 subdirectories:
weinre.build
- contains the tools to build weinre, the 3rd party libraries that weinre uses, and holds the output of the build
weinre.doc
- source for the HTML manual for weinre
weinre.server
- code for the node.js-based weinre server
weinre.web
- code for the client and target pieces of weinre
The weinre build is currently run on a Mac OS X 10.7 laptop. It also runs on Apache continuous integration servers running Linux. The build is not typically run on Windows, so if you have problems with that, please log an issue.
The weinre build pre-req's the following tools:
Before doing a weinre build, you will need to create the file weinre.build/personal.properties
. Use the sample.personal.properties
as a template. The build should fail if this file is not available.
To update the version label of weinre, edit the file weinre.build/build.properties
. If the version has a -pre
suffix, this triggers the build to artifacts with timestamped names. For an ‘official’ build, do not use the -pre
suffix.
There are two ways to build weinre:
The full build creates all the artifacts needed for an ‘official’ build.
The development build just creates enough artifacts to test the code.
Some semi-transient artifacts are created the first time you run a build. These will be stored in the weinre.build/cached
directory.
cd weinre.build
ant
This will run the development build (see below), and then create zip archives of the build in the weinre.build/out/archives
directory.
cd weinre.build
ant build-dev
This will populate a number of resources in the weinre.server
directory, so that you can run weinre directly from that directory for testing. It does not build the archives.
cd weinre.build
ant clean
cd weinre.server
node weinre [your flavorite options]
If you have the wr tool installed, there are two .wr
files available to run the two builds. If you run wr
in the top-level directory, a full build is performed when the source changes. If you run wr
in the weinre.build
directory, a development-time build is performed.
The build is growl-enabled, so you can see a quick message when the build completes.
The command weinre.server/weinre-hot
makes use of node-supervisor to re-launch the weinre server generated by the development build, whenever a weinre build completes.
Putting this altogether, you can open two terminal windows, run wr
in the weinre.build
directory to have a development build run whenever you change the source, and then run weinre-hot
in the weinre.server
directory to have the weinre server restart whenever a build completes, getting a growl notification at that time.
IMPORTANT - All 3rd party libraries are stored in the SCM, so that the build does require 3rd party packages to be downloaded. As such, these files need to be ok to use and store in the SCM, given their licenses.
If you're adding or updating a 3rd party library, make sure the license is acceptable, and add/update the license in the top-levelLICENSE
file.
All of the 3rd party dependencies used with weinre are stored in one of two directories:
weinre.build/vendor
- contains libraries used in the client and/or target, as well as libraries used by the build itself
weinre.server/node_modules
- contains npm packages used by the weinre.server
To update the files in weinre.build/vendor
:
weinre.build/vendor.properties
as appropriatecd weinre.build
ant -f update.vendor.xml
To update the files in weinre.server/node_modules
:
weinre.build/package.json.template
as appropriateweinre.server/package.json
file is created from the template you edited abovecd weinre.server
npm install