Last active
July 31, 2020 23:53
-
-
Save heitara/b12f86be96e716edced1e689c92053a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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