1 Star 2 Fork 0

Gaubee / uns-ccap

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
make.js 968 Bytes
一键复制 编辑 原始数据 按行查看 历史
Gaubee 提交于 2014-06-02 17:32 . 上传作者(DoubleSpout)源代码
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!")
C
1
https://gitee.com/Gaubee/uns-ccap.git
git@gitee.com:Gaubee/uns-ccap.git
Gaubee
uns-ccap
uns-ccap
non-standard

搜索帮助