mirror of
https://github.com/FlareSolverr/FlareSolverr.git
synced 2026-11-23 14:42:31 +00:00
Build native packages with Firefox
This commit is contained in:
1 parent
2408a75a70
commit
a841d67745
5 files changed
+47
-22
No files matched your search
@@ -111,11 +111,10 @@ export async function create(session: string, options: SessionCreateOptions): Pr
|
||||
log.debug('Creating userDataDir for session.')
|
||||
puppeteerOptions.userDataDir = prepareBrowserProfile(sessionId, options.proxy)
|
||||
|
||||
// todo: fix native package with firefox
|
||||
// if we are running inside executable binary, change browser path
|
||||
if (typeof (process as any).pkg !== 'undefined') {
|
||||
const exe = process.platform === "win32" ? 'chrome.exe' : 'chrome';
|
||||
puppeteerOptions.executablePath = path.join(path.dirname(process.execPath), 'chrome', exe)
|
||||
const exe = process.platform === "win32" ? 'firefox.exe' : 'firefox';
|
||||
puppeteerOptions.executablePath = path.join(path.dirname(process.execPath), 'firefox', exe)
|
||||
}
|
||||
|
||||
log.debug('Launching web browser...')
|
||||
|
||||
Reference in new issue
Block a user