INNER CODE UNIT · JavaScript
compileOpenPLC
Fortiphyd/GRFICSv2 · plc_vm/OpenPLC_v2-master/server.js:463
function compileOpenPLC()
{
console.log('compiling OpenPLC...');
compilationOutput += 'compiling OpenPLC...\r\n';
var exec = require('child_process').exec;
exec('./build_core.sh', function(error, stdout, stderr)
{
console.log('stdout: ' + stdout);
console.log('stderr: ' + stderr);
compilationOutput += stdout + '\r\n';
compilationOutput += stderr + '\r\n';
if (error !== null)
{
console.log('exec error: ' + error);
console.log('error compiling OpenPLC. Please check your program');
compilationOutput += 'exec error: ' + error + '\r\n';
compilationOutput += 'error compiling OpenPLC. Please check your program\r\n';