Update Hacking authored by Dan Ballard's avatar Dan Ballard
......@@ -71,30 +71,32 @@ mv tor-launcher browser/extensions/
# Clone/checkout the torbutton submodule
git submodule update --init
# Generate the configure scripts:
./mach configure --with-tor-browser-version=tbb-nightly --with-distribution-id=org.torproject --enable-update-channel=default --enable-bundled-fonts --with-branding=browser/branding/nightly
# Link relevant mozconfig to supply required config/build variables
ln -sf mozconfig-linux-x86_64-dev mozconfig
# Switch to tools/torbrowser dir to access config/build scripts
cd tools/torbrowser
# configure project
make config
# And... compile and package:
./mach build
./mach build stage-package
make build
# Point the INSTDIR at an existing TBB directory:
export INSTDIR="$HOME/tbb/test/tor-browser_en-US"
# Fetch an existing copy of tor browser to install our changes over (only needs to be run once, not every rebuild)
# fetch installs into the root of the project into .binaries/dev
make fetch
# Move the compiled firefox on top of the old TBB browser dir:
cp $INSTDIR/Browser/firefox $INSTDIR/Browser/start-firefox
cp -a obj-*/dist/firefox/* $INSTDIR/Browser/
rm $INSTDIR/Browser/firefox-bin
rm -f $INSTDIR/Browser/*.chk
cp $INSTDIR/Browser/firefox $INSTDIR/Browser/firefox.real
cp $INSTDIR/Browser/start-firefox $INSTDIR/Browser/firefox
# Deploy new build on top of downloaded tor-browser and assets
make deploy
# If you want a smaller binary to copy into a vm/other machine for tests:
strip --strip-all $INSTDIR/Browser/*
rm -f $INSTDIR/Browser/start-tor-browser
```
#If that completes successfully, then your fresh build of Firefox should exist at `.binaries/dev/Browser/start-tor-browser` from the project root. Run it with
make run
If that completes successfully, then your fresh build of Firefox should exist at `$INSTDIR/Browser/firefox`. Free the lizard.
# Some IDEs need a little help parsing firefox codebase, to assist them the following commands are available. They should generate extra settings your IDE will absord and afterwards be able to parse the codebase better
make ide-vscode
make ide-eclipse
make ide-visualstudio
### Modifying Tor Launcher or Torbutton
......
......