Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
update for release 1.0.0
  • Loading branch information
pmuellr committed Jan 25, 2011
1 parent 59747bb commit c66549971be312f16681ffcdd94b67a07c4fcdb3
Show file tree
Hide file tree
Showing 15 changed files with 223 additions and 110 deletions.
@@ -0,0 +1,59 @@
building weinre
===============================================================================

weinre is currently built using Eclipse. You will need a fairly recent version of Eclipse with the Java IDE tooling installed to use it.

weinre is made up of five Eclipse projects:

- `weinre.application`
- `weinre.build`
- `weinre.doc`
- `weinre.server`
- `weinre.web`

When initially loaded into Eclipse you will find many errors in the projects. This is due to the fact that libraries that weinre depends on have not yet been loaded into the workspace. To load these libraries, run the Ant script `weinre.build/build.xml` from the weinre.build directory.

Ensure the property `USE_JAVAC` is NOT set in the personal.properties file. If this property is set, then the java files in the projects will be compiled with javac instead of being assumed to be built with Eclipse, which may cause problems since Eclipse is also compiling the java files.

When the Ant script completes successfully, a full build will have taken place. The various red X's another issues from Eclipse should be gone. If not:

- select all projects, right click context menu/Refresh
- use the Eclipse menu item Project/Clean ...

This should make everything right.

You may want to set the Eclipse preference General/Workspace/Refresh automatically to true (checked) so you don't have to Refresh and Clean.

Various transient directories in this project (weinre.build) will be created after the build. They are set to not be stored in the SCM. They include:

- out
- cached
- tmp
- vendor

You can delete them whenever you wish, or use the `"clean"` target of the `weinre.build/build.xml` file to delete them. Deleting them will cause the build to take longer, to rebuild what you deleted.

The `weinre.build/out` directory in particular contains the final build artifacts:

- `weinre.build/out/archives/weinre-doc-{version}.zip`

contains the HTML doc for weinre

- `weinre.build/out/archives/weinre-jar-{version}.zip`

contains the platform-portable weinre.jar file

- `weinre.build/out/archives/weinre-mac-{version}.zip`

contains the Mac OS X weinre.app application

- `weinre.build/out/archives/weinre-src-{version}.zip`

contains the source of the projects (copy of what's in the SCM)

To build while you are developing the weinre code, you can use the quicker-to-build `"build-dev"` target of `weinre.build/build.xml` . This will not build the jars or archives, just rebuilds the bits neccessary to run the server from the Eclipse workspace. A shell script using a Python utility is provided called `"build-continuous.sh"` which you can run and it will run the `"build-dev"` target whenever a relevant source file has changed in the workspace.

building without eclipse
-------------------------------------------------------------------------------

Ensure the property `USE_JAVAC` is set in the `personal.properties` file. If this property is set, then the java files in the projects will be compiled with javac instead of being assumed to be built with Eclipse.

This file was deleted.

@@ -8,7 +8,7 @@
#-----------------------------------------------------------
# weinre version
#-----------------------------------------------------------
WEINRE_VERSION: 0.9.9
WEINRE_VERSION: 1.0.0

#-----------------------------------------------------------
# some common locations used in the ant scripts
@@ -228,6 +228,7 @@
<build-html name="Running" oDir="${WEB}/doc" iDir="../${PROJECT_DOC}"/>
<build-html name="Security" oDir="${WEB}/doc" iDir="../${PROJECT_DOC}"/>
<build-html name="TestDrive" oDir="${WEB}/doc" iDir="../${PROJECT_DOC}"/>
<build-html name="ChangeLog" oDir="${WEB}/doc" iDir="../${PROJECT_DOC}"/>

<move file="${WEB}/doc/Home.html" tofile="${WEB}/doc/index.html"/>

@@ -0,0 +1,95 @@
steps to create a new release
===============================================================================

- check out project into a new branch, say `release-x.y.z`

- update the `WEINRE_VERSION` variable in `weinre.build/build.properties` as appropriate

- add changelog to `weinre.doc/ChangeLog.body.html`, built with `weinre.build/scripts/changelog.sh`

- fix other doc as necessary

- perform full build with one of:

- cd into `weinre.build` and run ant

- in Eclipse, select `weinre build.xml` from the External Tools menu

- run the smoke test (see below) to ensure delicious smoky flavor

- upload the `weinre-jar-x.y.z.zip` and `weinre-mac-x.y.z.zip` files

- make sure you can download those zip files!

- commit release changes:
- `git add .`
- `git commit -m update for release x.y.z`

- merge branch onto master:

- `git checkout master`
- `git merge --no-ff release-x.y.z`
- `git push`
- `git tag -a x.y.z`
- `git push --tags`

- merge branch onto develop:

- `git checkout develop`
- `git merge --no-ff release-x.y.z`
- `git push`
- `git branch -d release-x.y.z`

- update github pages:

- `git checkout gh_pages`
- `cp -r ~/Projects/weinre/weinre.build/out/web/doc/* .` (or whatever)
- `git add .`
- `git commit -m update for release x.y.z`
- `git push`

- announce to the world!


smoke test
===============================================================================

The smoke test involves testing the three archives:

- `weinre-doc.zip`
- `weinre-mac.zip`
- `weinre-jar.zip`


smoke test - doc
-------------------------------------------------------------------------------

- unzip `weinre-doc.zip`
- browse all pages


smoke test - mac
-------------------------------------------------------------------------------

- unzip `weinre-mac.zip`
- make sure `build-info.txt` looks right
- launch the app
- open a new browser on [http://localhost:8081/demo/weinre-demo.html](http://localhost:8081/demo/weinre-demo.html)
- poke around the demo, make sure it works
- close app
- start server in eclipse
- launch the app
- should get error about port in use

smoke test - jar
-------------------------------------------------------------------------------

- unzip `weinre-jar.zip`
- make sure `build-info.txt` looks right
- run `java -jar weinre.jar --help` make sure help works
- run `java -jar weinre.jar` make sure help works
- poke around the demo, make sure it works
- kill server
- start server in eclipse
- run `java -jar weinre.jar` make sure help works
- should get error about port in use
@@ -0,0 +1,14 @@
#/bin/sh

# ---
# weinre is available under *either* the terms of the modified BSD license *or* the
# MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
#
# Copyright (c) 2011 IBM Corporation
# ---

git log "--pretty=format:- %s" $1.. | \
sed 's/#\([0-9]*\)/\<a href="https:\/\/github.com\/pmuellr\/weinre\/issues\/1"\>issue \1\<\/a\>./' |
sed 's/^-/\<li\>/'

# sed 's/#\([0-9]*\)/[issue \1](https:\/\/github.com\/pmuellr\/weinre\/issues\/1)./'
@@ -5,12 +5,13 @@
* Copyright (c) 2010, 2011 IBM Corporation
-->

<p>The source repository for weinre is maintained at
<a href="https://github.com/pmuellr/weinre">GitHub</a>.

<p>To build the current version of <span class="weinre">weinre</span>, you need to be using Eclipse.

<p>At development time, <span class="weinre">weinre</span> consists of 5 Eclipse
projects. See the file <tt>README.txt</tt> in the
projects. See the file <tt>README.md</tt> in the
<tt>weinre.build</tt> project for more instructions on
how to perform a build.

<p>The source repository for weinre is maintained at
<a href="https://github.com/pmuellr/weinre">GitHub</a>.
@@ -0,0 +1,26 @@
<!--
* weinre is available under *either* the terms of the modified BSD license *or* the
* MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
*
* Copyright (c) 2011 IBM Corporation
-->

<h2>2011/01/25 - version 1.0.0</h2>
<ul>
<li> Don't display "not implemented" messages. Closes <a href="https://github.com/pmuellr/weinre/issues/1">issue 19</a>.
<li> Remove node highlighting cruft. Closes <a href="https://github.com/pmuellr/weinre/issues/1">issue 18</a>.
<li> Add meta element to enable GCF for client. Closes <a href="https://github.com/pmuellr/weinre/issues/1">issue 17</a>.
<li> Make bookmarklet more portable. Closes <a href="https://github.com/pmuellr/weinre/issues/1">issue 16</a>.
<li> Enable node highlighting. Closes <a href="https://github.com/pmuellr/weinre/issues/1">issue 2</a>.
<li> Change copyright statements. Closes <a href="https://github.com/pmuellr/weinre/issues/1">issue 13</a>.
<li> Change Weinre.Console to Console. Closes <a href="https://github.com/pmuellr/weinre/issues/1">issue 11</a>.
<li> Add implementation for settings. Closes <a href="https://github.com/pmuellr/weinre/issues/1">issue 5</a>.
<li> Provide better escape for // comments in minifier. Closes <a href="https://github.com/pmuellr/weinre/issues/1">issue 6</a>.
<li> Get metrics working in Elements panel. Closes <a href="https://github.com/pmuellr/weinre/issues/1">issue 1</a>.
</ul>

<h2>2010/12/16 - version 0.9.9</h2>

<ul>
<li>initial release
</ul>
@@ -245,7 +245,7 @@ <h2>Instrumenting your web page to act as a debug target</h3>
<p>To make your web page debuggable with <span class="weinre">weinre</span>,
add the following line to your web page:
<pre>
&lt;script src="http://a.b.c:8081/target/target-script.js"&gt;&lt;/script&gt;
&lt;script src="http://a.b.c:8081/target/target-script-min.js"&gt;&lt;/script&gt;
</pre>

<p>You can now open a debug client by browsing to
@@ -303,26 +303,23 @@ <h2>Using a bookmarklet</h2>

<p>Some platforms support 'bookmarkets', which allow you to inject
arbitrary JavaScript code into any web page running in your
browser. Mobile Safari is one of these browsers.
See the following "open enhancement request" for the methods
of installing bookmarklets in Mobile Safari -
<a href="http://www.marco.org/1288715399">http://www.marco.org/1288715399</a>.
browser. Mobile Safari is one of these browsers. It appears that
the browser shipped with Android 2.2 and later also supports bookmarklets.

<p>The following recipe can be used for a bookmarket to get the
weinre debug target code injected into an arbitrary web page:
<p>Unfortunately, installing bookmarkets on mobile devices isn't usually trivial. The easiest
course of action is to add a new random bookmark to your bookmarks,
and then edit it by hand to change the label and URL. The URL
you should use is available in both a 'pre' and 'textarea' section
of the server's home page (eg, http://localhost:8081/). You should
be able to select the text from one of these areas easily, to
paste into the previously added bookmark.

<pre>
javascript:;(function%20(){%20var%20e=document.createElement("script");
%20e.setAttribute("language","javascript");
%20e.setAttribute("src","http://[debug server host]:[debug server port]/target/target-script.js");
%20document.body.appendChild(e);})();void(0);
</pre>

<p>Note that this code is split across multiple lines in this document, but
should be all one line in your actual bookmark.
<p>Once the bookmarklet is installed, you can debug any web page
by visiting it, and selecting the bookmarklet from your bookmarks
menu.

<!-- ======================================================== -->
<h2>Using the <tt>target/target-script.js</tt> file statically</h2>
<h2>Using the <tt>target/target-script-min.js</tt> file statically</h2>

<p>If you'd like to use the debug target code statically, instead of
downloading it from the server all the time, then you will need to do
@@ -338,7 +335,7 @@ <h2>Using the <tt>target/target-script.js</tt> file statically</h2>

<p>This URL overrides what's otherwise calculated from the debug target
code itself. You will need to set this value before the
<tt>target/target-script.js</tt> script is loaded.
<tt>target/target-script-min.js</tt> script is loaded.

<!-- ======================================================== -->
<h3>Future Enhancements</h3>
@@ -347,7 +344,7 @@ <h3>Future Enhancements</h3>
ham-fisted. We should look at additional ways to handle this.
For instance, we could prompt the user for the debug server
address, and then always using the debug target in a more static
mode; eg, you'd include the <tt>target-script.js</tt> with all your
mode; eg, you'd include the <tt>target-script-min.js</tt> with all your
other files in your application.

<p>Running the debug server on the target device is another option.
@@ -57,9 +57,10 @@
server's home page, at
<tt><a href="http://localhost:8081/">http://localhost:8081/</a></tt>.

<p class="note">Note: <span class="weinre">weinre</span> is currently only
<p class="note">Note: <span class="weinre">weinre</span> debug client is currently only
supported in WebKit-based browsers, like Google's Chrome and Apple's Safari
browsers.
browsers. You can also use Internet Explorer if you have Google Chrome Frame
installed.

<p>It should look something like this (the red arrows were added to
the image for emphasis):

0 comments on commit c665499

Please sign in to comment.