replayio / gecko-dev

Record Replay gecko based browser source
https://replay.io
Other
40 stars 15 forks source link

This branch contains modifications to the mozilla:release branch for compiling the Record Replay gecko based browser.

Getting started:

MacOS

If you are using Apple Silicone you should start by making sure you have a Rosetta terminal:

Then you should basically be able to follow the rest of the steps normally (with a couple of caveats called out down below - read carefully).

  1. Make sure that you are using Python v2.7
  2. cp mozconfig.macsample mozconfig
  3. Download MacOSX11.1.sdk.tar.xz from https://github.com/phracker/MacOSX-SDKs/releases
  4. Untar MacOSX11.1.sdk.tar.xz in the repo root to create a MacOSX11.1.sdk directory
  5. Run node build
    • On Apple Silicon, you many need to run RUSTC_BOOTSTRAP=qcms node build to build successfully.
  6. Run ./mach run

MacOS with Apple Silicone

Linux

  1. cp mozconfig.linuxsample mozconfig
  2. run ./mach bootstrap and select (2) Firefox Desktop
  3. run node build
  4. run ./mach run

Troubleshooting Tips

ERROR!!!!!! Could not find artifacts for a toolchain build named macosx64-dump-syms

Try cloning the latest mozilla-central (context: https://discord.com/channels/779097926135054346/801228428115312671/938567563644915713):

You can also find some conversation of these steps at https://github.com/RecordReplay/gecko-dev/issues/745

Merging from upstream

  1. Checkout the release branch, pull from upstream release branch:
git checkout release
git pull https://github.com/mozilla/gecko-dev.git release
  1. Switch to a new branch, merge from the release branch.
git checkout webreplay-release
git checkout -b replay-merge
git merge release
  1. Fix merge conflicts.
  2. Fix build breaks.
  3. Make sure the output binary is replay and not firefox.
  4. Get e2e tests etc. to pass.
  5. At this point it is reasonably safe to merge into the webreplay-release branch.
git checkout webreplay-release
git merge replay-merge
git push
  1. Update User Agent version reported by CurrentFirefoxVersion() in toolkit/recordreplay/ProcessRecordReplay.cpp
  2. Make sure automatic updates work with the new browser. Run the build/test action on the merge branch, delete the noupdate file for the build in S3, then launch the browser, open "About Replay" and see if it updates.

Tips for debugging:

  1. Run live test harness and make sure crash rate is acceptable.

Miscelleneous

Speeding up oh-my-zsh

git config --add oh-my-zsh.hide-status 1
git config --add oh-my-zsh.hide-dirty 1