From 9db61a7190b35f48257a4d213e5571a75549e164 Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Fri, 8 Feb 2019 13:17:14 -0500 Subject: [PATCH] Require modules. --- app/main.js | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/app/main.js b/app/main.js index fd06780..17e0b5a 100644 --- a/app/main.js +++ b/app/main.js @@ -13,13 +13,14 @@ const uuid = require('uuid') const events = require('events') const async = require('async') 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 Intval = require('./lib/intval') +const ee = new events.EventEmitter() +//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 log = {} @@ -37,6 +38,12 @@ let camera let server let menu +let SYSTEM +let capture +let display +let ffmpeg +let ffprobe + async function delay (ms) { return new Promise(resolve => { return setTimeout(resolve, ms) @@ -654,8 +661,15 @@ transfer.listen = function () { */ var init = async function () { + try { + SYSTEM = await system(); + } catch (err) { + console.error(err); + } + createWindow() createMenu() + log.init() light.init() proj.init() @@ -663,6 +677,12 @@ var init = async function () { dev.init() + //capture = require('capture')(SYSTEM); //redundant + display = require('display')(SYSTEM); + ffmpeg = require('ffmpeg')(SYSTEM); + ffprobe = require('ffprobe')(SYSTEM); + + //transfer.init() //capture.init()