diff options
| author | Andrew Lee <andrew@alee14.me> | 2025-04-23 20:23:51 -0400 |
|---|---|---|
| committer | Andrew Lee <andrew@alee14.me> | 2025-04-23 20:23:51 -0400 |
| commit | 983fb3ae3c832b33a7259d56d74a56a6db60e32f (patch) | |
| tree | aec64f428ae06b5d8d8aa2c2d42b6f03b6a9b320 /index.js | |
| parent | 911307d3e0997d711a2e147429d34d3c2f8abf89 (diff) | |
| download | alaska-client-983fb3ae3c832b33a7259d56d74a56a6db60e32f.tar.gz alaska-client-983fb3ae3c832b33a7259d56d74a56a6db60e32f.tar.bz2 alaska-client-983fb3ae3c832b33a7259d56d74a56a6db60e32f.zip | |
Diffstat (limited to 'index.js')
| -rw-r--r-- | index.js | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -11,16 +11,24 @@ autoUpdater.logger = log; autoUpdater.logger.transports.file.level = 'info'; const pluginPaths = { - win32: path.join(__dirname, 'plugin/pepflashplayer.dll'), - darwin: path.join(__dirname, 'plugin/PepperFlashPlayer.plugin'), - linux: path.join(__dirname, 'plugin/libpepflashplayer.so') -} + win32: path.join(app.getAppPath(), 'plugin/pepflashplayer.dll'), + darwin: path.join(app.getAppPath(), 'plugin/PepperFlashPlayer.plugin'), + linux: path.join(app.getAppPath(), 'plugin/libpepflashplayer.so') +}; const pluginName = pluginPaths[process.platform]; if (process.platform === 'linux') app.commandLine.appendSwitch('--no-sandbox'); app.commandLine.appendSwitch('ignore-certificate-errors'); -app.commandLine.appendSwitch('ppapi-flash-path', pluginName); + +if (process.mainModule.filename.includes('app.asar')) { + const unpackedPath = pluginName.replace('app.asar', 'app.asar.unpacked'); + console.log(`Adjusted plugin path for asar: ${unpackedPath}`); + app.commandLine.appendSwitch('ppapi-flash-path', unpackedPath); +} else { + app.commandLine.appendSwitch('ppapi-flash-path', pluginName); +} + app.commandLine.appendSwitch('ppapi-flash-version', '31.0.0.122'); app.on('window-all-closed', () => { |
