nodeguy/scripts/qode.js
Atul R c742712f6f
Qwidget wrap fix (#433)
* skip setting up miniqt if customQt is on

* adds opengl context

* adds NodeWidgetWrap

* changed the mode of qode.js to make it executable

* 0.15.3
2020-03-08 16:47:56 +01:00

34 lines
841 B
JavaScript
Executable File

#!/usr/bin/env node
var path = require('path');
var qodeConfig = require('@nodegui/qode');
var managePath = require('manage-path');
var qtConfig = require('../config/qtConfig');
var proc = require('child_process');
// Add Qt's bin to the path of Qode so that it can find the dll's
var alterPath = managePath(process.env);
alterPath.unshift(path.join(qtConfig.qtHome, 'bin'));
var child = proc.spawn(qodeConfig.qodePath, process.argv.slice(2), {
stdio: 'inherit',
windowsHide: false,
env: process.env,
});
child.on('close', function(code) {
process.exit(code);
});
const handleTerminationSignal = function(signal) {
process.on(signal, function signalHandler() {
if (!child.killed) {
child.kill(signal);
}
});
};
handleTerminationSignal('SIGINT');
handleTerminationSignal('SIGTERM');