1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-16 08:13:30 +00:00

Updated for freebsd

This commit is contained in:
Bryan Roe
2019-06-20 21:05:03 -07:00
parent 604e853354
commit ece7db84dd
2 changed files with 11 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ function find(name)
var res = child.stdout.str.trim().split('\n'); var res = child.stdout.str.trim().split('\n');
for(var i in res) for(var i in res)
{ {
if(!res[i].startsWith(name + '.so')) { continue; }
var v = {name: res[i]}; var v = {name: res[i]};
child = require('child_process').execFile('/bin/sh', ['sh']); child = require('child_process').execFile('/bin/sh', ['sh']);
child.stdout.str = ''; child.stdout.str = '';

View File

@@ -186,6 +186,16 @@ function monitorinfo()
} catch (ex) { } } catch (ex) { }
} }
} }
}
if(process.platform == 'freebsd')
{
Object.defineProperty(this, 'Location_X11LIB', { value: require('lib-finder')('libX11')[0]?require('lib-finder')('libX11')[0].location: undefined });
Object.defineProperty(this, 'Location_X11TST', { value: require('lib-finder')('libXtst')[0]?require('lib-finder')('libXtst')[0].location:undefined });
Object.defineProperty(this, 'Location_X11EXT', { value: require('lib-finder')('libXext')[0]?require('lib-finder')('libXext')[0].location:undefined });
}
if(process.platform == 'linux' || process.platform == 'freebsd')
{
Object.defineProperty(this, 'kvm_x11_support', { value: (this.Location_X11LIB && this.Location_X11TST && this.Location_X11EXT)?true:false }); Object.defineProperty(this, 'kvm_x11_support', { value: (this.Location_X11LIB && this.Location_X11TST && this.Location_X11EXT)?true:false });
if (this.Location_X11LIB) if (this.Location_X11LIB)