diff --git a/browser/components/loop/README.txt b/browser/components/loop/README.txt index af205db04c9..2ac0262d621 100644 --- a/browser/components/loop/README.txt +++ b/browser/components/loop/README.txt @@ -1,31 +1,12 @@ -In order for the loop component to build, do the following: +In order for the loop component to build, run the make-links.sh script to +setup symlinks from the Gecko tree into your loop-client-repo for shared code, +noting that you'll need to put the correct path inside the [[ ]] placeholder +(and remove the [[ ]] characters). -* if you have an existing content/shared directory, move it out of the way: +$ export LOOP_CLIENT_REPO=[[/absolute-path/to/my/loop-client-repo/clone]] +$ ./make-links.sh -mv content/shared content/shared.old - -* create a symlink to the authoritative version of the shared directory in your -loop-client repo. If you first set the env vars referenced below, -you should be able to copy-paste these lines: - -ln -s ${LOOP_CLIENT_REPO_DIR}/static/shared \ - ${GECKO_SRC_DIR}/browser/components/loop/content/shared - -Once you're done, the browser/components/loop/content should look something -like this: - -$ ls -l !$ -ls -l browser/components/loop/content -total 32 --rw-r--r-- 1 dmose staff 900 Mar 27 16:17 conversation.html -drwxr-xr-x 6 dmose staff 204 Mar 27 16:17 js -drwxr-xr-x 3 dmose staff 102 Mar 26 15:36 libs --rw-r--r-- 1 dmose staff 2159 Mar 26 15:36 panel.html -lrwxr-xr-x 1 dmose staff 40 Mar 26 15:41 shared -> /Users/dmose/r/loop-client/static/shared - - -Note that changes to the shared directory affect both the standalone loop-client -and the desktop client. This means that sometimes, in order to +Note that changes to the shared directories affect both the standalone +loop-client and the desktop client. This means that sometimes, in order to make a desktop client patch, you'll need to get reviews on patches to both -mozilla-central/gecko-dev as well as loop-client. - +mozilla-central/gecko-dev as well as loop-client. diff --git a/browser/components/loop/make-links.sh b/browser/components/loop/make-links.sh new file mode 100755 index 00000000000..6127b66bf8f --- /dev/null +++ b/browser/components/loop/make-links.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +if [ `basename $PWD` != "loop" ]; then + echo "this script must be executed in the loop directory" + exit -1 +fi + +if [ ! -d "$LOOP_CLIENT_REPO" ]; then + echo "LOOP_CLIENT_REPO in the environment must be set to a valid directory" + exit -1 +fi + +SHARED_CONTENT_TARGET=./content/shared +rm -f ${SHARED_CONTENT_TARGET} + +SHARED_CONTENT=${LOOP_CLIENT_REPO}/content/shared +ln -s ${SHARED_CONTENT} ${SHARED_CONTENT_TARGET} + +SHARED_TEST_TARGET=./test/shared +rm -f ${SHARED_TEST_TARGET} + +SHARED_TEST=${LOOP_CLIENT_REPO}/test/shared +ln -s ${SHARED_TEST} ${SHARED_TEST_TARGET} + + diff --git a/browser/components/loop/test/.gitignore b/browser/components/loop/test/.gitignore new file mode 100644 index 00000000000..8a205e8dc3e --- /dev/null +++ b/browser/components/loop/test/.gitignore @@ -0,0 +1 @@ +shared diff --git a/browser/components/loop/test/mocha-test/README.md b/browser/components/loop/test/desktop-local/README.md similarity index 100% rename from browser/components/loop/test/mocha-test/README.md rename to browser/components/loop/test/desktop-local/README.md diff --git a/browser/components/loop/test/mocha-test/client_test.js b/browser/components/loop/test/desktop-local/client_test.js similarity index 100% rename from browser/components/loop/test/mocha-test/client_test.js rename to browser/components/loop/test/desktop-local/client_test.js diff --git a/browser/components/loop/test/mocha-test/index.html b/browser/components/loop/test/desktop-local/index.html similarity index 73% rename from browser/components/loop/test/mocha-test/index.html rename to browser/components/loop/test/desktop-local/index.html index f7c280249b8..3db49a20a2b 100644 --- a/browser/components/loop/test/mocha-test/index.html +++ b/browser/components/loop/test/desktop-local/index.html @@ -6,7 +6,7 @@ Loop mocha tests - +
@@ -34,13 +34,13 @@ }; - - - + + + - - - + + +