You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
893 B
38 lines
893 B
const process = require("process")
|
|
const app = require("./renderer")
|
|
|
|
//const Modules = global.opts.Modules
|
|
|
|
const env = process.env
|
|
|
|
let DiscordNative = {
|
|
app,
|
|
remoteApp: app,
|
|
isRenderer: true,
|
|
nativeModules: {
|
|
ensureModule: (name) => {return !!Modules[name]},
|
|
requireModule: (name) => {if (Modules[name]) return Modules[name]; else throw `Error: Cannot find module '${name}'`;}
|
|
},
|
|
'process': {
|
|
platform: process.platform,
|
|
arch: process.arch,
|
|
env: {
|
|
LOCALAPPDATA: env['LOCALAPPDATA'],
|
|
'PROGRAMFILES(X86)': env['PROGRAMFILES(X86)'],
|
|
PROGRAMFILES: env['PROGRAMFILES'],
|
|
PROGRAMW6432: env['PROGRAMW6432'],
|
|
PROGRAMDATA: env['PROGRAMDATA']
|
|
}
|
|
},
|
|
'os': {
|
|
arch: process.arch,
|
|
release: '5.17.4-artix1-1'
|
|
},
|
|
'crashReporter': {
|
|
updateCrashReporter: async () => {return new Promise()},
|
|
getMetadata: () => ({})
|
|
}
|
|
}
|
|
|
|
module.exports = DiscordNative
|