canmove, Confirmed users
725
edits
No edit summary |
|||
Line 22: | Line 22: | ||
http://hg.mozilla.org/services/fx-sync/index.cgi/archive/tip.zip | http://hg.mozilla.org/services/fx-sync/index.cgi/archive/tip.zip | ||
== Building | == Building Firefox Sync as an Extension == | ||
=== Building Crypto | === Building Crypto === | ||
Sync's source repository contains prebuilt binary components for all supported platforms. You should not need to rebuild these components as '''the code is essentially frozen'''. However, if your OS is not supported, or you are working on the crypto wrapper pieces, you'll need to follow these steps: | |||
1. Set up the Gecko SDK | 1. Set up the Gecko SDK | ||
Line 38: | Line 38: | ||
=== Building the Extension For Install === | === Building the Extension For Install === | ||
To build a | To build a Firefox Sync .xpi to install, just type the following in to your shell: | ||
make xpi | make xpi | ||
This will generate a <tt>.xpi</tt> file located at <tt> | This will generate a <tt>.xpi</tt> file located at <tt>fx-sync/dist/xpi/weave-{version}.xpi</tt>. You can then open that file from Firefox to install the extension. | ||
=== Building the Extension For Development === | === Building the Extension For Development === | ||
Line 57: | Line 57: | ||
Assuming you know where your weave files are and your profile directory, you can do this in a single line on OS X: | Assuming you know where your weave files are and your profile directory, you can do this in a single line on OS X: | ||
echo /Path/To/ | echo /Path/To/fx-sync/dist/stage > ~/Library/Application\ Support/Firefox/Profiles/xr4nd0mx.profile/extensions/{340c2bbc-ce74-4362-90b5-7c26312808ef} | ||
Now you just need to build Weave from the weave directory: | Now you just need to build Weave from the weave directory: | ||
Line 65: | Line 65: | ||
That's all! | That's all! | ||
Any future changes to files under <tt> | Any future changes to files under <tt>fx-sync/</tt> will work after you restart Firefox. You don't even need to run <tt>make</tt> again. The only time you would need to re-run <tt>make</tt> is if you change a <tt>.in</tt> file or the values used in the <tt>.in</tt> file. | ||
=== Setting up to run tests === | === Setting up to run tests === | ||
Line 86: | Line 86: | ||
/c/Program\ Files/Mozilla\ Firefox/firefox.exe | /c/Program\ Files/Mozilla\ Firefox/firefox.exe | ||
2. set TOPSRCDIR to the location of the top-level | 2. set TOPSRCDIR to the location of the top-level <code>fx-sync</code> source code directory. | ||
3. set NATIVE_TOPSRCDIR to the location of the top-level | 3. set NATIVE_TOPSRCDIR to the location of the top-level <code>fx-sync</code> source code directory, but expressed in the platform native format. On Unix or Mac OS X this will be identical to TOPSRCDIR, but on Windows, NATIVE_TOPSRCDIR should be a Windows-style path to the same directory, with backslashes for separators. | ||
On Mac OS X, a sample ~/.profile looks like this, in part: | On Mac OS X, a sample ~/.profile looks like this, in part: | ||
Line 102: | Line 102: | ||
* To run specific tests, you can use the following command: | * To run specific tests, you can use the following command: | ||
make -C | make -C services/sync/unit <test_name> | ||
i.e. to run test_resource.js, you would type | i.e. to run test_resource.js, you would type | ||
make -C tests/unit test_resource | make -C services/sync/tests/unit test_resource | ||
== Building against mozilla-central == | |||
Firefox Sync is distributed both as an extension and as part of Firefox. While development for both the client library and the add-on UI continues in the <code>fx-sync</code> repository, changes to the Sync client library are periodically merged to <code>mozilla-central</code>. It is therefore important to be able to test code against ongoing development on <code>mozilla-central</code>. | |||
=== Using an Updated Client Library with mozilla-central builds === | |||
TODO | |||
=== Running Tests against mozilla-central builds === | |||
TODO | |||
== Interesting make targets == | == Interesting make targets == |