Although Windows is not currently an officially supported platform for Node Mapserv, the module has been successfully built on Windows. The related GitHub issues (#7 and #14) provide further details on building with Windows.
It would be nice to simplify the Windows build process to enable a simple npm install mapserv
(in a similar manner to the Linux build) but for now it is a
manual process along the following lines:
-
Ensure you have an appropriate version of Node and
node-gyp
installed. -
Download and unpack Node Mapserv. Take note of where the
binding.gyp
file is. -
Download the appropriate Mapserver SDK from the GDAL and MapServer build SDK packages section (e.g. selecting
release-1600-dev
). Take note of where theMakefile
is. -
Unpack the SDK and edit
binding.gyp
to change thems_buildkit%
variable to point to SDK root path. -
Download the MapServer source from the GDAL and MapServer latest release versions section (e.g. selecting
release-1600-gdal-1-10-0-mapserver-6-2-1
and thenrelease-1600-gdal-1-10-0-mapserver-6-2-1-src.zip
). -
Unpack the Mapserver source in the root of the SDK. Edit
binding.gyp
to change thems_root%
variable to point to the Mapserver source root path. -
Adapt the SDK
Makefile
to also point to your Mapserver source root directory (Search forMS_DIR
). -
Build Mapserver: in a MSVS console go in the SDK directory and type
nmake ms
. Ensure the libraries listed inbinding.gyp
correspond to those just built and editbinding.gyp
if this isn't the case. -
Build Node Mapserv: from a console in the Node Mapserv root directory type
npm install .
Note again that Windows is not supported so you will have to work through issues yourself but feel free to discuss suggestions and improvements on GitHub.