gotty/js/spice-web-client/spiceproxy/concatenator.js
Soren L. Hansen c66ae7b2e4 First, primitive stab at SPiCE integration
Launch an Xspice and run:
echo -ne "\033]844;127.0.0.1;9876\007"

This will launch a SPiCE client connecting to 127.0.0.1:9876.

Still need to add all the security stuff and generally be
more defensive in the implementation.
2021-04-16 06:50:05 -07:00

47 lines
1.2 KiB
JavaScript
Executable File

#!/usr/bin/env node
var fs = require('fs');
var path = require('path');
// change to parent directory so all paths are relative to the top dir
process.chdir(path.dirname(__dirname));
var targetFile = path.join(__dirname, 'spiceproxy.js');
var files = [
'lib/utils.js',
'spiceobjects/spiceobjects.js',
'spiceobjects/generated/protocol.js',
'lib/GlobalPool.js',
'lib/GenericObjectPool.js',
'spiceproxy/socket.js',
'spiceproxy/globalpool.js',
'lib/queue.js',
'network/socketqueue.js',
'network/packetextractor.js',
'network/packetcontroller.js',
'network/sizedefiner.js',
'network/packetreassembler.js',
'network/reassemblerfactory.js',
'lib/biginteger.js',
'spiceproxy/spicechannel.js'
];
var exportString = "\nmodule.exports = wdi; \n";
console.log("Will generate %s", targetFile);
if (fs.existsSync(targetFile)) {
fs.unlinkSync(targetFile);
}
files.forEach(function (file) {
var data = fs.readFileSync(file);
console.log('... appending %s', file);
fs.appendFileSync(targetFile, data);
});
console.log("Done! Appending module.exports line...");
fs.appendFileSync(targetFile, exportString);
console.log("Finish... Everything is stored in %s", targetFile);