Thursday, December 19, 2013
Monday, December 16, 2013
node-mapnik on windows
1) Cleaning up mess
npm cache clean if encounter issues despite changes
2) binding.gyp
2a) From the dos command prompt, running npm install
set protobuf_src=
eg set protobuf_src=x:\progra~1\protobuf\src
set cairo_src=
eg set cairo_src=x:\progra~1\cairo\src
2b) Modifying binding.gyp in directory node-mapnik
from
'conditions': [
['OS=="win"', {
'variables': {
'PROTOBUF_INCLUDES%':'C:/dev2/protobuf/vsprojects/include',
'PROTOBUF_LIBS%':'C:/dev2/protobuf/vsprojects/Release',
'PROTOBUF_LIBRARY%':'libprotobuf-lite.lib',
to
'conditions': [
['OS=="win"', {
'variables': {
'CAIRO_INCLUDES%':'$(CAIRO_SRC)',
'PROTOBUF_INCLUDES%':'$(PROTOBUF_SRC)',
'PROTOBUF_LIBS%':'$(PROTOBUF_SRC)/../vsprojects/Release',
['OS=="win"', {
'include_dirs':[
'<!@(mapnik-config --includes)',
'<!@(mapnik-config --dep-includes)',
'<@(PROTOBUF_INCLUDES)',
'<@(CAIRO_INCLUDES)'
],
3) As advised in binding.gyp, make changes to .node-gyp\*\common.gypi under user directory
xp - c:\documents and settings\username\...
win7 - c:\users\username\...
see https://groups.google.com/forum/?fromgroups=#!topic/gyp-developer/p98GJxYJuH4
see https://github.com/TooTallNate/node-gyp/issues/26
4) Testing
npm install -g mocha
npm install sphericalmercator
Grab a copy of GDAL for windows from http://www.gisinternals.com/sdk/
sdkshell.bat to set the environment for
4a) PROJ_LIB
4b) GDAL_DATA
mocha -R spec to list details
npm cache clean if encounter issues despite changes
2) binding.gyp
2a) From the dos command prompt, running npm install
set protobuf_src=
eg set protobuf_src=x:\progra~1\protobuf\src
set cairo_src=
eg set cairo_src=x:\progra~1\cairo\src
2b) Modifying binding.gyp in directory node-mapnik
from
'conditions': [
['OS=="win"', {
'variables': {
'PROTOBUF_INCLUDES%':'C:/dev2/protobuf/vsprojects/include',
'PROTOBUF_LIBS%':'C:/dev2/protobuf/vsprojects/Release',
'PROTOBUF_LIBRARY%':'libprotobuf-lite.lib',
to
'conditions': [
['OS=="win"', {
'variables': {
'CAIRO_INCLUDES%':'$(CAIRO_SRC)',
'PROTOBUF_INCLUDES%':'$(PROTOBUF_SRC)',
'PROTOBUF_LIBS%':'$(PROTOBUF_SRC)/../vsprojects/Release',
'PROTOBUF_LIBRARY%':'libprotobuf-lite.lib',
2c) from
'conditions': [
['OS=="win"', {
'include_dirs':[
'<!@(mapnik-config --includes)',
'<!@(mapnik-config --dep-includes)',
'<@(PROTOBUF_INCLUDES)'
],
to
'conditions': [['OS=="win"', {
'include_dirs':[
'<!@(mapnik-config --includes)',
'<!@(mapnik-config --dep-includes)',
'<@(PROTOBUF_INCLUDES)',
'<@(CAIRO_INCLUDES)'
],
3) As advised in binding.gyp, make changes to .node-gyp\*\common.gypi under user directory
xp - c:\documents and settings\username\...
win7 - c:\users\username\...
see https://groups.google.com/forum/?fromgroups=#!topic/gyp-developer/p98GJxYJuH4
see https://github.com/TooTallNate/node-gyp/issues/26
4) Testing
npm install -g mocha
npm install sphericalmercator
Grab a copy of GDAL for windows from http://www.gisinternals.com/sdk/
sdkshell.bat to set the environment for
4a) PROJ_LIB
4b) GDAL_DATA
mocha -R spec to list details
Thursday, December 12, 2013
node-gyp on windows
For node-gyp command, see *.js in the directory nodejs\node_modules\npm\node_modules\node-gyp\lib
Prerequisite
a) Visual Studio
b) Windows SDK
c) Visual Studio SP1
d) C++ 2010 SP1 compiler update
See https://github.com/TooTallNate/node-gyp/wiki/Visual-Studio-2010-Setup
See http://www.steveworkman.com/node-js/2012/installing-jsdom-on-windows/
Prerequisite
a) Visual Studio
b) Windows SDK
c) Visual Studio SP1
d) C++ 2010 SP1 compiler update
See https://github.com/TooTallNate/node-gyp/wiki/Visual-Studio-2010-Setup
See http://www.steveworkman.com/node-js/2012/installing-jsdom-on-windows/
Subscribe to:
Posts (Atom)