代码拉取完成,页面将自动刷新
var path = require('path');
var os = require('os');
var fs = require('fs');
console.log("I'm glad you to select ccap, enjoy it!")
console.log("")
console.log("ccap is a cross plat form and portable nodejs simple captcha module, simple api and lightweight.")
if(os.platform() == 'win32'){
var lib_name = 'libjpeg.dll';
var bind_path = __dirname+path.sep+'binding.gyp';
try{
fs.chmodSync(bind_path, '0777');
var binding = fs.readFileSync(bind_path).toString();
}
catch(e){
throw('fail to read binding.gyp file, '+e)
}
binding = binding.replace(/\{\$__dirname\}/g,__dirname + '\\\\addon\\\\'+lib_name);
try{
fs.writeFileSync(bind_path, binding)
}
catch(e){
throw('update binding.gyp file error, '+e)
}
var cap_img_path = __dirname+path.sep+'cap_img';
try{
fs.chmodSync(cap_img_path, '0777');
}
catch(e){
throw('fail to set cap_img path to 0777, '+e)
}
}
console.log("")
console.log("starting compile ccap! good luck!")
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。