mirror of
https://github.com/overte-org/overte.git
synced 2025-08-05 04:41:15 +02:00
use discovered paths for processes
This commit is contained in:
parent
c2445f9f6e
commit
c01566bc04
1 changed files with 33 additions and 34 deletions
|
@ -16,7 +16,7 @@ const ipcMain = electron.ipcMain;
|
|||
require('crash-reporter').start();
|
||||
|
||||
// Keep a global reference of the window object, if you don't, the window will
|
||||
// be closed automatically when the JavaScript object is garggbage collected.
|
||||
// be closed automatically when the JavaScript object is garbage collected.
|
||||
var mainWindow = null;
|
||||
var appIcon = null;
|
||||
var TRAY_ICON = 'resources/tray-icon.png';
|
||||
|
@ -78,44 +78,43 @@ app.on('ready', function() {
|
|||
mainWindow = null;
|
||||
});
|
||||
|
||||
var pInterface = new Process('interface', 'C:\\Interface\\interface.exe');
|
||||
if (interfacePath && dsPath && acPath) {
|
||||
var pInterface = new Process('interface', interfacePath);
|
||||
|
||||
var domainServerPath = 'C:\\Users\\Ryan\\AppData\\Local\\High Fidelity\\Stack Manager\\domain-server.exe';
|
||||
var acPath = 'C:\\Users\\Ryan\\AppData\\Local\\High Fidelity\\Stack Manager\\assignment-client.exe';
|
||||
var homeServer = new ProcessGroup('home', [
|
||||
new Process('Domain Server', dsPath),
|
||||
new Process('AC - Audio', acPath, ['-t0']),
|
||||
new Process('AC - Avatar', acPath, ['-t1']),
|
||||
new Process('AC - Asset', acPath, ['-t3']),
|
||||
new Process('AC - Messages', acPath, ['-t4']),
|
||||
new Process('AC - Entity', acPath, ['-t6'])
|
||||
]);
|
||||
homeServer.start();
|
||||
|
||||
var homeServer = new ProcessGroup('home', [
|
||||
new Process('Domain Server', domainServerPath),
|
||||
new Process('AC - Audio', acPath, ['-t0']),
|
||||
new Process('AC - Avatar', acPath, ['-t1']),
|
||||
new Process('AC - Asset', acPath, ['-t3']),
|
||||
new Process('AC - Messages', acPath, ['-t4']),
|
||||
new Process('AC - Entity', acPath, ['-t6'])
|
||||
]);
|
||||
homeServer.start();
|
||||
var processes = {
|
||||
interface: pInterface,
|
||||
home: homeServer
|
||||
};
|
||||
|
||||
var processes = {
|
||||
interface: pInterface,
|
||||
home: homeServer
|
||||
};
|
||||
function sendProcessUpdate() {
|
||||
console.log("Sending process update to web view");
|
||||
mainWindow.webContents.send('process-update', processes);
|
||||
};
|
||||
|
||||
function sendProcessUpdate() {
|
||||
console.log("Sending process update to web view");
|
||||
mainWindow.webContents.send('process-update', processes);
|
||||
};
|
||||
pInterface.on('state-update', sendProcessUpdate);
|
||||
|
||||
pInterface.on('state-update', sendProcessUpdate);
|
||||
ipcMain.on('start-process', function(event, arg) {
|
||||
pInterface.start();
|
||||
sendProcessUpdate();
|
||||
});
|
||||
ipcMain.on('stop-process', function(event, arg) {
|
||||
pInterface.stop();
|
||||
sendProcessUpdate();
|
||||
});
|
||||
ipcMain.on('update', function(event, arg) {
|
||||
sendProcessUpdate();
|
||||
});
|
||||
|
||||
ipcMain.on('start-process', function(event, arg) {
|
||||
pInterface.start();
|
||||
sendProcessUpdate();
|
||||
});
|
||||
ipcMain.on('stop-process', function(event, arg) {
|
||||
pInterface.stop();
|
||||
sendProcessUpdate();
|
||||
});
|
||||
ipcMain.on('update', function(event, arg) {
|
||||
sendProcessUpdate();
|
||||
});
|
||||
|
||||
sendProcessUpdate();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue