How-to - Upgrading to git version of uBlock Origin Legacy

Add-ons for Pale Moon and other applications
General discussion, compatibility, contributed extensions, themes, plugins, and more.

Moderators: FranklinDM, Lootyhoof

User avatar
Posts: 421
Joined: 2020-05-31, 04:33

How-to - Upgrading to git version of uBlock Origin Legacy

Unread post by andyprough » 2022-04-07, 18:11

I'm just going to put this here as a how-to, mostly for my own future reference. There have been a few git commits to uBlock origin legacy in recent months including fixing a bug preventing access to some annoyance filters, but there had not been a new release since last July. I wanted to try out the git version and see if it works well.

Build instructions are here: ... /
I'll quote them below:
Clone uBlock and uAssets repositories in the same parent directory

Code: Select all

git clone
git clone
Set path to uBlock:

Code: Select all

cd uBlock-for-firefox-legacy
The official version of uBO is in the master branch

Code: Select all

git checkout master
Build the plugin:

Code: Select all

./tools/ all
Load the result of the build into your browser:
Drag-and-drop /uBlock-for-firefox-legacy/dist/build/uBlock0.firefox-legacy.xpi into the browser. [**note - I allowed all add-ons in Preferences-Security momentarily for this step - not sure if that was necessary]
After building and installing, I now have a tab for some keyboard shortcuts in the uBlock dashboard. That's the most noticeable difference from the July 2021 release.

If this post violates any forum rules, feel free to delete it.

User avatar
Moon Magic practitioner
Moon Magic practitioner
Posts: 2131
Joined: 2012-08-19, 20:32

Re: How-to - Upgrading to git version of uBlock Origin Legacy

Unread post by back2themoon » 2022-09-23, 19:39

Newbie-friendly steps for anyone attempting this on Windows - this is how I did it anyway:

Install Git, either installer or portable:
Install Python:
On Windows, open Advanced System Settings (via Start Menu, or right-click/Properties on This PC)
Open Environment Variables
On System variables, double-click on Path (or single-click + Edit)
You need to add two lines here. Press New and insert this first line:
(the 310 number is the currently installed Python version - it could be different, you need to navigate to that folder and verify)
Press New again and similarly add this second line: (again, mind the Python version no. and the correct user name)
Press OK to all Settings windows to close them
Open Git Bash (it's part of Git which you downloaded earlier)
Go to the linked uBlock Origin build instructions, or use the already provided message by andyprough.

You need to copy each code line in turn, paste it in the Git Bash window, press Enter, wait for it to finish and move on to the next code line. First line of code is:

Code: Select all

git clone
All required 5 lines are in andyprough's message above. This process will download files so no firewall should prevent the process.

In the final line of code, you might get an error about zip not being available. If so, it means you won't have a ready-made .xpi file. You can create it yourself, easily. Locate the created \uBlock-for-firefox-legacy\dist\build\uBlock0.firefox-legacy folder, open it, select all files and folders within and add them all to single .zip file, for example Rename .zip to .xpi and this is your final uBO extension file which can now be installed to Pale Moon.

Do not zip the uBlock0.firefox-legacy folder, you need to zip its contents.

If you used the portable version of Git, the uBlock-for-firefox-legacy folder should be within the folder where you extracted the portable Git version.

If you installed Git, well, I don't remember 100% and I've now uninstalled it. It should be somewhere within your C:\Users\YourUserName\ or C:\Users\YourUserName\Documents\ folders.

You will also find the uAssets folder next to it, but it's not required at this point. You can delete everything when you've created your final .xpi file (and verified it works). Backup your Pale Moon profile before doing anything. A Windows restore point wouldn't hurt either.

I'll just add that uBO is certainly one of the most important extensions out there - if not the most important.

Post Reply