Update Hacking authored by Dan Ballard's avatar Dan Ballard
...@@ -71,30 +71,32 @@ mv tor-launcher browser/extensions/ ...@@ -71,30 +71,32 @@ mv tor-launcher browser/extensions/
# Clone/checkout the torbutton submodule # Clone/checkout the torbutton submodule
git submodule update --init git submodule update --init
# Generate the configure scripts: # Link relevant mozconfig to supply required config/build variables
./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 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: # And... compile and package:
./mach build make build
./mach build stage-package
# Point the INSTDIR at an existing TBB directory: # Fetch an existing copy of tor browser to install our changes over (only needs to be run once, not every rebuild)
export INSTDIR="$HOME/tbb/test/tor-browser_en-US" # 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: # Deploy new build on top of downloaded tor-browser and assets
cp $INSTDIR/Browser/firefox $INSTDIR/Browser/start-firefox make deploy
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
# If you want a smaller binary to copy into a vm/other machine for tests: #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
strip --strip-all $INSTDIR/Browser/* make run
rm -f $INSTDIR/Browser/start-tor-browser
```
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 ### Modifying Tor Launcher or Torbutton
... ...
......