Skip to content

Commit

Permalink
Update run-addon and README for WSL. (mozilla-services#4289)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenba committed Nov 9, 2018
1 parent 4ded235 commit 21ae8b0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ The server will automatically setup the tables in your database, and keep them u

If you have growl and growlnotify installed on Mac OS X, you will get growl notifications when the server build has started and completed.

We apologize but we have no story for development on Windows (though the add-on runs on Windows). [We welcome feedback](https://github.com/mozilla-services/screenshots/issues/4289).
#### Development on Windows

It is possible to develop on Windows 10 with Windows Subsystem for Linux (WSL). Windows 10 build 17046 or newer is required. Do the following once you've installed WSL and a Linux distro:

- Create a symlink to Nightly on Windows; ensure this is on your $PATH. (E.g. `/home/moz/bin/firefox -> '/mnt/c/Program Files/Nightly/firefox.exe'`)
- Clone the project to the Windows filesystem. (E.g. `/mnt/c/projects/screenshots`, _not_ `/home/moz/projects/screenshots`)

### Linting and Testing

Expand Down
3 changes: 3 additions & 0 deletions bin/run-addon
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ fi

if [[ -n "$setup_profile" ]] ; then
profile_dir="$(pwd)/Profile"
if [[ "$(uname -r)" =~ "Microsoft" ]] ; then
profile_dir="$(wslpath -w $profile_dir)"
fi
if [[ -d "$profile_dir" ]] ; then
echo "Using existing profile in $profile_dir running:"
echo " " "${open[@]}" -n --args -new-instance -no-remote -profile "$profile_dir"
Expand Down

0 comments on commit 21ae8b0

Please sign in to comment.