Require modules.
This commit is contained in:
parent
b9a6da957d
commit
9db61a7190
32
app/main.js
32
app/main.js
|
@ -13,13 +13,14 @@ const uuid = require('uuid')
|
||||||
const events = require('events')
|
const events = require('events')
|
||||||
const async = require('async')
|
const async = require('async')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
//const digital = require('./lib/digital')
|
|
||||||
const ee = new events.EventEmitter()
|
|
||||||
//const capture = require('./lib/capture')(ee)
|
|
||||||
const settings = require('./lib/settings')
|
|
||||||
|
|
||||||
const Server = require('./lib/server')
|
const ee = new events.EventEmitter()
|
||||||
const Intval = require('./lib/intval')
|
//const digital = require('./lib/digital')
|
||||||
|
//const capture = require('./lib/capture')(ee)
|
||||||
|
const settings = require('settings')
|
||||||
|
|
||||||
|
const Server = require('server')
|
||||||
|
const Intval = require('intval')
|
||||||
|
|
||||||
const mcopy = {}
|
const mcopy = {}
|
||||||
const log = {}
|
const log = {}
|
||||||
|
@ -37,6 +38,12 @@ let camera
|
||||||
let server
|
let server
|
||||||
let menu
|
let menu
|
||||||
|
|
||||||
|
let SYSTEM
|
||||||
|
let capture
|
||||||
|
let display
|
||||||
|
let ffmpeg
|
||||||
|
let ffprobe
|
||||||
|
|
||||||
async function delay (ms) {
|
async function delay (ms) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
return setTimeout(resolve, ms)
|
return setTimeout(resolve, ms)
|
||||||
|
@ -654,8 +661,15 @@ transfer.listen = function () {
|
||||||
*/
|
*/
|
||||||
var init = async function () {
|
var init = async function () {
|
||||||
|
|
||||||
|
try {
|
||||||
|
SYSTEM = await system();
|
||||||
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
}
|
||||||
|
|
||||||
createWindow()
|
createWindow()
|
||||||
createMenu()
|
createMenu()
|
||||||
|
|
||||||
log.init()
|
log.init()
|
||||||
light.init()
|
light.init()
|
||||||
proj.init()
|
proj.init()
|
||||||
|
@ -663,6 +677,12 @@ var init = async function () {
|
||||||
dev.init()
|
dev.init()
|
||||||
|
|
||||||
|
|
||||||
|
//capture = require('capture')(SYSTEM); //redundant
|
||||||
|
display = require('display')(SYSTEM);
|
||||||
|
ffmpeg = require('ffmpeg')(SYSTEM);
|
||||||
|
ffprobe = require('ffprobe')(SYSTEM);
|
||||||
|
|
||||||
|
|
||||||
//transfer.init()
|
//transfer.init()
|
||||||
//capture.init()
|
//capture.init()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue