mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-16 16:23:25 +00:00
Updated for freebsd
This commit is contained in:
@@ -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 = '';
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user