Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Commit

Permalink
fix Firefox build script #55
Browse files Browse the repository at this point in the history
  • Loading branch information
jspenguin2017 committed Dec 22, 2017
1 parent 5279768 commit 787033e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion platform/chromium/other/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,

"name": "Nano Adblocker",
"version": "1.0.0.17",
"version": "1.0.0.19",

"commands": {
"launch-element-zapper": {
Expand Down
5 changes: 5 additions & 0 deletions scripts/build-firefox-core-only.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@ECHO OFF

NODE build.node.js --firefox

PAUSE
9 changes: 9 additions & 0 deletions scripts/build-firefox.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@ECHO OFF

NODE build.node.js --firefox
NODE pack-filters.node.js --firefox
NODE pack-locale.node.js --firefox

NODE build-firefox.node.js --firefox

PAUSE
12 changes: 9 additions & 3 deletions scripts/build-firefox.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,27 @@

let manifest = await fs.readFile(basePath + "/manifest.json", "utf8");
manifest = JSON.parse(manifest);

manifest["incognito"] = "spanning";
delete manifest["options_page"];
delete manifest["storage"];
delete manifest["minimum_chrome_version"];
manifest["applications"] = {
"gecko": {
"strict_min_version": "52.0",
},
};

await fs.writeFile(basePath + "/manifest.json", JSON.stringify(manifest, null, 2), "utf8");

const files = await fs.readdir("platform/webext");
let tasks = [];
for (let file of files) {
if (file.endsWith(".js"));
tasks.push(fs.copyFile("platform/webext/" + file, basePath + "/js/" + file));
if (file.endsWith(".js")) {
tasks.push(fs.copyFile("platform/webext/" + file, basePath + "/js/" + file));
}
}
await Promise.all(tasks);

console.log("[Nano] Apply Firefox Patch :: Started");
console.log("[Nano] Apply Firefox Patch :: Done");
})();

0 comments on commit 787033e

Please sign in to comment.