let pluginName = null
let pluginPath = null
switch (process.platform) {
  case 'win32':
    pluginName = 'pepflashplayer.dll'
    break
  case 'darwin':
    pluginName = 'PepperFlashPlayer.plugin'
    break
  case 'linux':
    pluginName = 'libpepflashplayer.so'
    break
}
// 根据你的路径修改,这里做打包后路径判断
if (__dirname.includes(".asar")) {
  pluginPath = path.join(process.resourcesPath + '/lib/' + pluginName)
} else {
  pluginPath = path.resolve(__dirname + '/lib/' + pluginName)
}

app.commandLine.appendSwitch('ppapi-flash-path', pluginPath)

app.commandLine.appendSwitch('ppapi-flash-version', '32.0.0.363')

三个平台flash下载地址:https://wong-1251253615.cos.ap-shanghai.myqcloud.com/blog/images/2020-05-14/flash.7z