UNPKG

@tencentcloud/roomkit-electron-vue3

Version:

<h1 align="center"> TUIRoomKit</h1> Conference (TUIRoomKit) is a product suitable for multi-person audio and video conversation scenarios such as business meetings, webinars, and online education. By integrating this product, you can add room management,

68 lines (67 loc) 2.1 kB
"use strict"; Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); let appPath = ""; let pluginDirectory = ""; let resourcePath = ""; let pluginPath = ""; const system = process.platform; const { arch } = process; function getAppPath() { if (appPath === "") { if (process.env.NODE_ENV === "production") { appPath = process.resourcesPath; } else { appPath = process.cwd(); } } return appPath; } function getPluginDirectory() { if (pluginDirectory === "") { const appPath2 = getAppPath(); if (process.env.NODE_ENV === "production") { if (system === "win32") { pluginDirectory = `${appPath2}\\plugin\\XMagic\\win`; } else { pluginDirectory = `${appPath2}/plugin/XMagic/mac`; } } else { if (system === "win32") { pluginDirectory = `${appPath2}\\node_modules\\@tencentcloud\\roomkit-electron-vue3\\node_modules\\trtc-electron-plugin-xmagic\\plugin\\XMagic\\win`; } else { pluginDirectory = `${appPath2}/node_modules/@tencentcloud/roomkit-electron-vue3/node_modules/trtc-electron-plugin-xmagic/plugin/XMagic/mac`; } } } return pluginDirectory; } function getResourcePath() { if (resourcePath === "") { const pluginDirectory2 = getPluginDirectory(); if (system === "win32") { resourcePath = `${pluginDirectory2}\\res\\`; } else { resourcePath = `${pluginDirectory2}/resources/`; } } return resourcePath; } function getPluginPath() { if (pluginPath === "") { const pluginDirectory2 = getPluginDirectory(); if (system === "win32") { if (arch === "x64") { pluginPath = `${pluginDirectory2}\\x64\\TRTCElectronXmagicBeautyPlugin.dll`; } else { pluginPath = `${pluginDirectory2}\\ia32\\TRTCElectronXmagicBeautyPlugin.dll`; } } else { pluginPath = `${pluginDirectory2}/XmagicMac.dylib`; } } return pluginPath; } exports.getAppPath = getAppPath; exports.getPluginDirectory = getPluginDirectory; exports.getPluginPath = getPluginPath; exports.getResourcePath = getResourcePath;