| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * This file is part of Adblock Plus <https://adblockplus.org/>, | 2  * This file is part of Adblock Plus <https://adblockplus.org/>, | 
| 3  * Copyright (C) 2006-present eyeo GmbH | 3  * Copyright (C) 2006-present eyeo GmbH | 
| 4  * | 4  * | 
| 5  * Adblock Plus is free software: you can redistribute it and/or modify | 5  * Adblock Plus is free software: you can redistribute it and/or modify | 
| 6  * it under the terms of the GNU General Public License version 3 as | 6  * it under the terms of the GNU General Public License version 3 as | 
| 7  * published by the Free Software Foundation. | 7  * published by the Free Software Foundation. | 
| 8  * | 8  * | 
| 9  * Adblock Plus is distributed in the hope that it will be useful, | 9  * Adblock Plus is distributed in the hope that it will be useful, | 
| 10  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 111     default: | 111     default: | 
| 112       throw new Error("Unexpected platform"); | 112       throw new Error("Unexpected platform"); | 
| 113   } | 113   } | 
| 114 } | 114 } | 
| 115 | 115 | 
| 116 function getFirefoxExecutable(browserDir) | 116 function getFirefoxExecutable(browserDir) | 
| 117 { | 117 { | 
| 118   switch (platform) | 118   switch (platform) | 
| 119   { | 119   { | 
| 120     case "win32": | 120     case "win32": | 
| 121       return path.join(browserDir, "firefox.exe"); | 121       return path.join(browserDir, "core", "firefox.exe"); | 
| 122     case "linux": | 122     case "linux": | 
| 123       return path.join(browserDir, "firefox", "firefox"); | 123       return path.join(browserDir, "firefox", "firefox"); | 
| 124     case "darwin": | 124     case "darwin": | 
| 125       return path.join(browserDir, "Firefox.app", "Contents", | 125       return path.join(browserDir, "Firefox.app", "Contents", | 
| 126                        "MacOS", "firefox"); | 126                        "MacOS", "firefox"); | 
| 127     default: | 127     default: | 
| 128       throw new Error("Unexpected platform"); | 128       throw new Error("Unexpected platform"); | 
| 129   } | 129   } | 
| 130 } | 130 } | 
| 131 | 131 | 
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 171           return download(url, archive); | 171           return download(url, archive); | 
| 172         } | 172         } | 
| 173         console.info(`Reusing cached archive ${archive}`); | 173         console.info(`Reusing cached archive ${archive}`); | 
| 174       }) | 174       }) | 
| 175       .then(() => extractArchive(archive, browserDir)) | 175       .then(() => extractArchive(archive, browserDir)) | 
| 176       .then(() => browserDir); | 176       .then(() => browserDir); | 
| 177   }).then(dir => getFirefoxExecutable(dir)); | 177   }).then(dir => getFirefoxExecutable(dir)); | 
| 178 } | 178 } | 
| 179 | 179 | 
| 180 module.exports.ensureFirefox = ensureFirefox; | 180 module.exports.ensureFirefox = ensureFirefox; | 
| OLD | NEW | 
|---|