Build Windows and Linux binaries. resolves #18

This commit is contained in:
ngosang
2021-01-08 20:02:47 +01:00
parent d038944089
commit 27ad58b2c6
6 changed files with 906 additions and 1 deletions

View File

@@ -76,6 +76,12 @@ export default {
puppeteerOptions.userDataDir = prepareBrowserProfile(id)
}
// if we are running inside executable binary, change chrome 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)
}
log.debug('Launching headless browser...')
// TODO: maybe access env variable?