()
| 68 | } |
| 69 | |
| 70 | private getDLLPath() |
| 71 | { |
| 72 | const platform = os.platform(); |
| 73 | const arch = os.arch(); |
| 74 | switch (platform) |
| 75 | { |
| 76 | case 'darwin': |
| 77 | return `${this.libPath}/libMLModule.dylib`; |
| 78 | case 'win32': |
| 79 | return arch === 'x64' ? `${this.libPath}/MLModule.dll` : |
| 80 | `${this.libPath}/MLModule32.dll`; |
| 81 | case 'linux': |
| 82 | return `${this.libPath}/libMLModule.so`; |
| 83 | default: |
| 84 | throw new BrainFlowError ( |
| 85 | BrainFlowExitCodes.GENERAL_ERROR, `OS ${platform} is not supported.`); |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | private getLib() |
| 90 | { |