﻿module.exports = Register;

function Register(pluginPath) {

    
    electron = require('electron')
    const app = electron.app

    const isWindows = process.platform === 'win32';
    const isMac = process.platform === 'darwin';

    var ppapiPath = '';
    if (isWindows) {
        if (process.arch = 'x64')
            ppapiPath = __dirname + '\\..\\bin\\x64\\PepperPlugin.dll';
        else
            ppapiPath = __dirname + '\\..\\bin\\Win32\\PepperPlugin.dll';
    }
    if (isMac) {
        if (process.arch = 'x64')
            ppapiPath = __dirname + '\\..\\bin\\mac\\PepperPlugin.dll';
        else
            ppapiPath = __dirname + '\\..\\bin\\mac\\PepperPlugin.dll';
    }
    if (pluginPath)
        ppapiPath = pluginPath + '\\PepperPlugin.dll';
    //console.log('PPAPI path ' + ppapiPath + ';application/electron-dotnet');
    app.commandLine.appendSwitch('register-pepper-plugins', ppapiPath + ';application/electron-dotnet');

}
@@ -559,32 +559,31 @@
 name + '
-%5C%5C..%5C%5Cbin%5C%5Cmac%5C%5C
+/../bin/mac/lib
 PepperPl
@@ -579,35 +579,34 @@
 libPepperPlugin.
-dll
+so
 ';%0A        else%0A
@@ -646,24 +646,23 @@
  + '
-%5C%5C..%5C%5Cbin%5C%5Cmac%5C%5C
+/../bin/mac/lib
 Pepp
@@ -662,35 +662,34 @@
 libPepperPlugin.
-dll
+so
 ';%0A    %7D%0A    if 
@@ -701,16 +701,51 @@
 inPath)%0A
+    %7B%0A        if (isWindows) %7B%0A    
         
@@ -787,24 +787,132 @@
 lugin.dll';%0A
+        %7D%0A        if (isMac) %7B%0A            ppapiPath = pluginPath + '%5C%5ClibPepperPlugin.so';%0A        %7D%0A    %7D%0A
     //consol

Modify Mac support to Node module 'electron-dotnet' register to load from correct directory and correct module name - libPepperPlugin.so