Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #6 from booo/master

Make the install process a little bit easier
  • Loading branch information...
commit 018811b151cd3b861ca2db0faeb879291e01c535 2 parents b4ce97e + 02b1313
@chrisdew authored
Showing with 17 additions and 14 deletions.
  1. +2 −0  .gitignore
  2. +2 −1  package.json
  3. +1 −1  test/unittest.js
  4. +12 −12 wscript
View
2  .gitignore
@@ -0,0 +1,2 @@
+build
+.lock-wscript
View
3  package.json
@@ -11,6 +11,7 @@
"url": "git://github.com/chrisdew/protobuf.git"
},
"scripts": {
- "install": "PROTOBUF=/usr/local/lib node-waf configure clean build"
+ "install": "PROTOBUF=/usr/local/lib node-waf configure clean build",
+ "test": "node test/unittest.js"
}
}
View
2  test/unittest.js
@@ -1,7 +1,7 @@
var assert = require('assert'),
puts = require('util').puts,
read = require('fs').readFileSync,
- Schema = require('protobuf_for_node').Schema;
+ Schema = require('../').Schema;
/* hack to make the tests pass with node v0.3.0's new Buffer model */
/* copied from http://github.com/bnoordhuis/node-iconv/blob/master/test.js */
View
24 wscript
@@ -36,23 +36,23 @@ def configure(conf):
def build(bld):
# protobuf_for_node comes as a library to link against for services
# and an addon to use for plain serialization.
- obj = bld.new_task_gen('cxx', 'shlib')
- obj.target = 'protobuf_for_node_lib'
- obj.source = 'protobuf_for_node.cc'
- obj.uselib = ['NODE', 'PROTOBUF']
+ #obj = bld.new_task_gen('cxx', 'shlib')
+ #obj.target = 'protobuf_for_node_lib'
+ #obj.source = 'protobuf_for_node.cc'
+ #obj.uselib = ['NODE', 'PROTOBUF']
obj = bld.new_task_gen('cxx', 'shlib', 'node_addon')
obj.target = 'protobuf_for_node'
- obj.source = 'addon.cc'
- obj.uselib = ['PROTOBUF']
- obj.uselib_local = 'protobuf_for_node_lib'
+ obj.source = 'protobuf_for_node.cc addon.cc'
+ obj.uselib = ['PROTOBUF', 'NODE']
+ #obj.uselib_local = 'protobuf_for_node_lib'
# Example service. If you build your own add-on that exports a
# protobuf service, you will need to replace uselib_local with
# uselib and point CPPPATH, LIBPATH and LIB to where you've
# installed protobuf_for_node.
- obj = bld.new_task_gen('cxx', 'shlib', 'node_addon')
- obj.target = 'protoservice'
- obj.source = ['example/protoservice.pb.cc', 'example/protoservice.cc']
- obj.uselib = ['PROTOBUF']
- obj.uselib_local = 'protobuf_for_node_lib'
+ #obj = bld.new_task_gen('cxx', 'shlib', 'node_addon')
+ #obj.target = 'protoservice'
+ #obj.source = ['example/protoservice.pb.cc', 'example/protoservice.cc']
+ #obj.uselib = ['PROTOBUF']
+ #obj.uselib_local = 'protobuf_for_node_lib'
Please sign in to comment.
Something went wrong with that request. Please try again.