-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows support? #3
Comments
Yes, at some point. Have you tried building it on Windows? What breaks? |
C:\Users\user\Desktop\node-usb-master>node-gyp configure C:\Users\user\Desktop\node-usb-master>node-gyp build C:\Users\user\Desktop\node-usb-master> |
I've added support for building on Windows in 570e783. (Not in Tested with MSVC 2010 Express on WinXP, Node 0.10, and libusbx 1.0.14. All tests pass except for one checking error-handling; not sure if that's libusbx or node-usb. In addition to the Python and MSVC required by |
Thanks seams to build now! {
'targets': [
{
'target_name': 'usb_bindings',
'sources': [
'./src/node_usb.cc',
'./src/device.cc',
'./src/transfer.cc',
],
'cflags_cc': [
'-std=c++0x'
],
'defines': [
'_FILE_OFFSET_BITS=64',
'_LARGEFILE_SOURCE',
],
'include_dirs+': [
'src/'
],
'conditions' : [
['OS=="linux"', {
'include_dirs+': [
'<!@(pkg-config libusb-1.0 --cflags-only-I | sed s/-I//g)'
],
'libraries': [
'<!@(pkg-config libusb-1.0 --libs)'
],
'defines': [
'USE_POLL',
]
}],
['OS=="mac"', {
'include_dirs+': [
'<!@(pkg-config libusb-1.0 --cflags-only-I | sed s/-I//g)'
],
'libraries': [
'<!@(pkg-config libusb-1.0 --libs)'
],
'defines': [
'USE_POLL',
]
}],
['OS=="win"', {
'variables': {
# Path to extracted libusbx windows binary package from http://libusbx.org/
'libusb_path': "C:/Program Files/libusb"
},
'defines':[
'WIN32_LEAN_AND_MEAN'
],
'include_dirs+': [
'<(libusb_path)/include/libusbx-1.0'
],
'msvs_settings': {
'VCCLCompilerTool': {
'AdditionalOptions': [ '/EHsc /MD' ],
},
},
"conditions" : [
["target_arch=='ia32'", {
'libraries': [
'<(libusb_path)/MS32/static/libusb-1.0.lib'
]
}],
["target_arch=='x64'", {
'libraries': [
'<(libusb_path)/MS64/static/libusb-1.0.lib'
]
}]
]
}]
]
}
]
} |
Is there a plan to support Windows operating systems, too?
The text was updated successfully, but these errors were encountered: