awtk/tools/dll_def_gen/tkc.js

23 lines
635 B
JavaScript
Raw Permalink Normal View History

2020-10-13 15:35:29 +08:00
const fs = require('fs')
const path = require('path')
const DefGenerator = require('./def_generator')
2020-10-13 17:43:19 +08:00
let inputIDL = path.normalize(path.join(__dirname, '../idl_gen/tkc.json'));
2020-10-13 15:35:29 +08:00
let outputDef = '../../dllexports/tkc.def';
let withIndex = false;
if(process.argv.length >= 4) {
inputIDL = process.argv[2];
outputDef = process.argv[3];
if (process.argv.length >= 5) {
withIndex = process.argv[4].toLowerCase().startsWith('t');
}
} else if(process.argv.length != 2) {
console.log('Usage: node index.js inputIDL outputDef withIndex[false|true]');
process.exit(0);
}
DefGenerator.gen(inputIDL, outputDef, withIndex);