It's generally known that Windows is the most difficult platform to debug for node-gyp. I've spent considerable amounts of time trying to configure multiple versions of MSBuild to get a working build for Windows. My desire is to support Windows, Linux, and macOS, but at this point it has been consuming too much of my time to pursue this any further, and I don't have access to an easily-cleaned build machine like I do for macOS, and I use Docker when supporting Ubuntu.
It's possible to build libraw.js for Windows if you build/install LibRaw and are able create a viable native node executable on Windows 10. I've gotten to the point where node-gyp reports a successful build, but opening the output file with Dependency Walker shows a number of Windows libs are missing, and libraw.dll is also absent when it's required. Below is the segment of the node-gyp binding.
['OS=="win"', {
"msvs_settings": {
"VCCLCompilerTool": {
"AdditionalOptions": ["/EHsc"]
}
},
"dll_files" : [
r'{...path}\LibRaw-0.19.5-Win64\LibRaw-0.19.5\bin\libraw.dll'
],
"libraries": [
r"{...path}\LibRaw-0.19.5-Win64\LibRaw-0.19.5\lib\libraw.lib"
],
"defines": ["NAPI_CPP_EXCEPTIONS"],
"include_dirs": [
r"{...path}\LibRaw-0.19.5-Win64\LibRaw-0.19.5",
r"{...path}\LibRaw-0.19.5-Win64\LibRaw-0.19.5\bin"
]
}]
I also had difficulty building LibRaw on Windows. I attempted doing this with the Windows instructions, MingW, and Cygwin; all of them ended up erroring out when running make. This is probably a result of issues in my native environment.
To resolve this issue, I'd love if we could create a GitHub Action similar to the CI process that configures a Windows build pipeline, and can successfully run the tests. If you're experienced with C++ builds and running node-gyp successfully on Windows I'd love your input here.
It's generally known that Windows is the most difficult platform to debug for
node-gyp. I've spent considerable amounts of time trying to configure multiple versions ofMSBuildto get a working build for Windows. My desire is to support Windows, Linux, and macOS, but at this point it has been consuming too much of my time to pursue this any further, and I don't have access to an easily-cleaned build machine like I do for macOS, and I use Docker when supporting Ubuntu.It's possible to build
libraw.jsfor Windows if you build/install LibRaw and are able create a viable native node executable on Windows 10. I've gotten to the point wherenode-gypreports a successful build, but opening the output file with Dependency Walker shows a number of Windows libs are missing, andlibraw.dllis also absent when it's required. Below is the segment of thenode-gypbinding.I also had difficulty building LibRaw on Windows. I attempted doing this with the Windows instructions, MingW, and Cygwin; all of them ended up erroring out when running
make. This is probably a result of issues in my native environment.To resolve this issue, I'd love if we could create a GitHub Action similar to the CI process that configures a Windows build pipeline, and can successfully run the tests. If you're experienced with C++ builds and running node-gyp successfully on Windows I'd love your input here.