Hello, I am actually working on modifying some parts of Tor Browser for my project and for that I will need to build Tor Browser's source code. I was following this website https://trac.torproject.org/projects/tor/wiki/doc/TorBrowser/Hacking and after cloning tor-browser-build repo, I did a make nightly-linux-x86_64, which took almost half a day to complete on my Ubuntu 18.04 system. But, since I would be making some changes to the browser (mostly Firefox code), I need to alter code and build again and again.
In the above website, there is an option for '*Building Just Firefox*' and I decided to try that. As per the above website/doc, I cloned tor-browser repo and followed the instructions. First, the command
make $CONFIGURE_ARGS -f client.mk configure CONFIGURE_ARGS="--with-tor-browser-version=tbb-nightly --with-distribution-id=org.torproject --enable-update-channel=default --enable-bundled-fonts"
gave me :
client.mk:40: /.mozconfig-client-mk: No such file or directory
client.mk:72: *** client.mk must be used via mach. Try running ./mach configure. Stop.
./mach configure was not working as well, but using this webpage https://hg.mozilla.org/integration/autoland/rev/36f4ba2fb6f5, I patched the *init.configure* file and it worked. But now when I run ./mach build, it finally gives (after doing a lot of compilation):
So could anyone please guide me as to how should I go about doing this. Basically as I had said in the beginning, I just want to modify and rebuild to test the new code that I would be introducing. Kindly help me out.
I actually asked this question on Tor's stack exchange as well, but I didn't get any help, so I really hope I can get some help here.
Warm Regards, Rishabh Raj
Rishabh Raj:
Hello, I am actually working on modifying some parts of Tor Browser for my project and for that I will need to build Tor Browser's source code. I was following this website https://trac.torproject.org/projects/tor/wiki/doc/TorBrowser/Hacking and after cloning tor-browser-build repo, I did a make nightly-linux-x86_64, which took almost half a day to complete on my Ubuntu 18.04 system. But, since I would be making some changes to the browser (mostly Firefox code), I need to alter code and build again and again.
Yes, the first time it takes quite some time as it builds all the compilers and whatnot. But after that's done just the changing parts should get rebuilt which takes significantly less time. Still, depending on your development workflow and the area of your patch this might be less than optimal. If you are interested in testing your patch with the tor-browser-build workflow there is the README.HACKING doc that explains how to patch Firefox (or any other component really).
We have patches up for review for a while now that would allow an incremental dev workflow but have not found the time to look at them yet. :(
In the above website, there is an option for '*Building Just Firefox*' and I decided to try that. As per the above website/doc, I cloned tor-browser repo and followed the instructions. First, the command
make $CONFIGURE_ARGS -f client.mk configure CONFIGURE_ARGS="--with-tor-browser-version=tbb-nightly --with-distribution-id=org.torproject --enable-update-channel=default --enable-bundled-fonts"
gave me :
client.mk:40: /.mozconfig-client-mk: No such file or directory
client.mk:72: *** client.mk must be used via mach. Try running ./mach configure. Stop.
./mach configure was not working as well, but using this webpage https://hg.mozilla.org/integration/autoland/rev/36f4ba2fb6f5, I patched the *init.configure* file and it worked. But now when I run ./mach build, it finally gives (after doing a lot of compilation):
What error do you get (your mail did not tell)?
But, yes, we need to update that website (it's a wiki, you could do it as well!) but have not gotten around that yet. That said, |./mach configure| should work without any patching. I just tested that and updated the wiki accordingly (note: since a couple of days you need to copy over tor-launcher sources as well before starting to configure)
So could anyone please guide me as to how should I go about doing this. Basically as I had said in the beginning, I just want to modify and rebuild to test the new code that I would be introducing. Kindly help me out.
Let me know if any of the above does not work for you and sorry for the inconvenience.
Georg
Note: The tbb-dev mailing list would probably have been a better venue for that question, but I realize that our forest of mailing lists could be hard to navigate. :)
tor-community-team@lists.torproject.org