mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-22 10:22:51 +01:00
Provide instructions on how to build uBO Lite
Required by AMO when submitting an extension to be hosted on AMO.
This commit is contained in:
parent
f20f2bbc77
commit
f049aea65e
31
platform/mv3/README.md
Normal file
31
platform/mv3/README.md
Normal file
@ -0,0 +1,31 @@
|
||||
# How to build MV3 uBO Lite
|
||||
|
||||
Instructions for reviewers.
|
||||
|
||||
The following assumes a linux environment.
|
||||
|
||||
1. Open Bash console
|
||||
2. `git clone https://github.com/gorhill/uBlock.git`
|
||||
3. `cd uBlock`
|
||||
4. `make mv3-[platform]`, where `[platform]` is either `chromium` or `firefox`
|
||||
5. This will fully build uBO Lite, and during the process filter lists will be downloaded from their respective remote servers
|
||||
|
||||
Upon completion of the script, the resulting extension package will become present in:
|
||||
|
||||
- Chromium: `dist/build/uBOLite.chromium`
|
||||
- Firefox: `dist/build/uBOLite.firefox`
|
||||
|
||||
The folder `dist/build/mv3-data` will cache data fetched from remote server, so as to avoid fetching repeatedly from remote server with repeated build commands. Remove `dist/build/mv3-data` if you want to build with latest versions of filter lists.
|
||||
|
||||
The file `dist/build/mv3-data/log.txt` will contain information about what happened during the build process.
|
||||
|
||||
The entry in the `Makefile` which implement the build process is `tools/make-mv3.sh [platform]`.[1] This Bash script copy various files from uBlock Origin branch and MV3-specific branch into a single folder which will be the final extension package.
|
||||
|
||||
Notably, `tools/make-mv3.sh [platform]` calls a Nodejs script which purpose is to convert the filter lists into various rulesets to be used in a declarative way.[2] The Nodejs version required is 17.5.0 or above.
|
||||
|
||||
All the final rulesets are present in the `dist/build/uBOLite.[platform]/rulesets` in the final extension package.
|
||||
|
||||
---
|
||||
|
||||
[1] https://github.com/gorhill/uBlock/blob/c4d324362fdb95ff8ef20f0b18f42f0eec955433/tools/make-mv3.sh
|
||||
[2] https://github.com/gorhill/uBlock/blob/c4d324362fdb95ff8ef20f0b18f42f0eec955433/tools/make-mv3.sh#L103
|
@ -1327,7 +1327,6 @@ async function main() {
|
||||
|
||||
// Log results
|
||||
const logContent = stdOutput.join('\n') + '\n';
|
||||
await fs.writeFile(`${outputDir}/log.txt`, logContent);
|
||||
await fs.writeFile(`${cacheDir}/log.txt`, logContent);
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
1.51.0
|
||||
1.51.1b14
|
||||
|
@ -80,6 +80,7 @@ cp platform/mv3/extension/css/* $DES/css/
|
||||
cp -R platform/mv3/extension/js/* $DES/js/
|
||||
cp platform/mv3/extension/img/* $DES/img/
|
||||
cp -R platform/mv3/extension/_locales $DES/
|
||||
cp platform/mv3/README.md $DES/
|
||||
|
||||
if [ "$QUICK" != "yes" ]; then
|
||||
echo "*** uBOLite.mv3: Generating rulesets"
|
||||
@ -119,7 +120,6 @@ if [ "$FULL" = "yes" ]; then
|
||||
mkdir -p $TMPDIR
|
||||
cp -R $DES/* $TMPDIR/
|
||||
cd $TMPDIR > /dev/null
|
||||
rm log.txt
|
||||
zip $PACKAGENAME -qr ./*
|
||||
cd - > /dev/null
|
||||
cp $TMPDIR/$PACKAGENAME dist/build/
|
||||
|
Loading…
Reference in New Issue
Block a user