Skip to content

Instantly share code, notes, and snippets.

@heitara
Last active July 31, 2020 23:53
Show Gist options
  • Save heitara/b12f86be96e716edced1e689c92053a1 to your computer and use it in GitHub Desktop.
Save heitara/b12f86be96e716edced1e689c92053a1 to your computer and use it in GitHub Desktop.
//this is jsut the "meat" of the solution
const PEPPERFLASH_PLUGIN = 'resources/pepperFlash/mac/PepperFlashPlayer.plugin'
let pluginName
let pluginDir = __dirname
switch (process.platform) {
case 'win32':
switch (process.arch) {
case "x64":
pluginName = PEPPERFLASH_PLUGIN_WIN64
break;
default:
pluginName = PEPPERFLASH_PLUGIN_WIN32
break;
}
break
case 'darwin':
pluginName = PEPPERFLASH_PLUGIN
if (pluginDir.indexOf('asar')) {
pluginDir = __dirname.replace('app.asar', 'app.asar.unpacked')
}
break
}
let flashPath = path.join(pluginDir, pluginName);
app.commandLine.appendSwitch('ppapi-flash-path', flashPath);
app.commandLine.appendSwitch('ppapi-flash-version', '28.0.0.126');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment