diff --git a/lib/core.js b/lib/core.js index 51361ba..6a63d85 100644 --- a/lib/core.js +++ b/lib/core.js @@ -1,43 +1,7 @@ - -var fs = require('fs'); var os = require('os'); var path = require('path'); var binary = require('node-pre-gyp'); var binding_path = binary.find(path.resolve(path.join(__dirname, '..', 'package.json'))); var binding = require(binding_path); -var BrigCore = binding; -/* -try { - BrigCore = require(__dirname + '/../build/Release/brig.node'); -} catch(err) { -// console.log(err); -} - -if (!BrigCore) { - - var apiVer = process.versions.modules; - var arch = process.arch; - - // Support ARM architecture - if (arch == 'arm') { - arch += 'v' + process.config.variables.arm_version; - if (os.endianness() == 'LE') { - arch += 'l'; - } else { - arch += 'b'; - } - } - - if (!BrigCore) { - try { - // Try to use the last version - BrigCore = require('../native/' + process.platform + '-' + arch + '-' + apiVer + '/brig.node'); - } catch(err) { - throw new Error('Please use \'node-gyp rebuild\' to compile binary by yourself.'); - } - } -} -*/ - -module.exports = BrigCore; +module.exports = binding;