This repository has been archived by the owner on Apr 4, 2019. It is now read-only.
forked from tilemill-project/tilemill
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
windows fixes for latest node-mapnik
- Loading branch information
Dane Springmeyer
committed
Feb 7, 2014
1 parent
6f22f3a
commit 1021d69
Showing
4 changed files
with
21 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
@rem for some reason this causes script to exit | ||
@rem npm cache clean | ||
rd /q /s node_modules | ||
npm install --force --no-rollback | ||
call rd /q /s node_modules | ||
call npm cache clean | ||
call npm install --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
\ipch\ | ||
\include\ | ||
\obj\ | ||
\build\ | ||
.exp | ||
.lib | ||
.pdb | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,37 @@ | ||
set DEVROOT=c:\dev2 | ||
@rem place c++ addons outside of node_modules for now | ||
@rem to make it easier to remove/recreate node_modules | ||
set DEST=node_modules | ||
set MAPNIK_INSTALL=c:\mapnik-v2.3.0 | ||
set NODEEXE="C:\Program Files (x86)\nodejs\node.exe" | ||
set MAPNIK_DEST=%DEST%\mapnik\lib\mapnik | ||
set MAPNIK_DATA_DEST=%DEST%\mapnik\lib\mapnik\share | ||
mkdir %MAPNIK_DATA_DEST% | ||
|
||
@rem make sure Python is on the PATH | ||
set NODEEXE="c:\dev2\nodist\v\0.10.25\node.exe" | ||
set PATH=%PATH%;c:\Python27 | ||
|
||
@rem change into current directory | ||
cd /d %~dp0 | ||
@rem then move to main tilemill folder | ||
cd ..\..\ | ||
set TILEMILL_DIR=%CD% | ||
|
||
@rem mkdir %DEST% | ||
|
||
@rem nuke any failed c++ module installs | ||
@rem rd /q /s node_modules\bones\node_modules\jquery\node_modules\jsdom\node_modules\contextify | ||
@rem rd /q /s node_modules\sqlite3 | ||
rd /q /s node_modules\mapnik | ||
rd /q /s node_modules\tilelive-mapnik\node_modules\mapnik | ||
@rem rd /q /s node_modules\millstone\node_modules\srs | ||
@rem rd /q /s node_modules\millstone\node_modules\zipfile | ||
@rem rd /q /s node_modules\tilelive-mapnik\node_modules\eio | ||
set DEST=%TILEMILL_DIR%\node_modules | ||
|
||
@rem remove then re-copy node-mapnik | ||
xcopy /i /s /exclude:platforms\windows\excludes.txt %DEVROOT%\node-mapnik %DEST%\mapnik | ||
|
||
rd /q /s %TILEMILL_DIR%\node_modules\mapnik | ||
rd /q /s %TILEMILL_DIR%\node_modules\tilelive-mapnik\node_modules\mapnik | ||
xcopy /i /s /exclude:%TILEMILL_DIR%\platforms\windows\excludes.txt %DEVROOT%\node-mapnik %DEST%\mapnik | ||
@rem fixup paths to plugins making them relative | ||
@rem to future location of mapnik itself | ||
cd %DEST%\mapnik | ||
@rem - note, intentially not quoting the below | ||
set MAPNIK_INPUT_PLUGINS=path.join(__dirname, 'mapnik/lib/mapnik/input') | ||
set MAPNIK_FONTS=path.join(__dirname, 'mapnik/lib/mapnik/fonts') | ||
set MAPNIK_INPUT_PLUGINS=path.join(__dirname, 'mapnik/input') | ||
set MAPNIK_FONTS=path.join(__dirname, 'mapnik/fonts') | ||
python gen_settings.py | ||
@rem augment the settings | ||
echo var path = require('path'); module.exports.env = {'ICU_DATA': path.join(__dirname, 'mapnik/share/icu'), 'GDAL_DATA': path.join(__dirname, 'mapnik/share/gdal'),'PROJ_LIB': path.join(__dirname, 'mapnik/share/proj') }; >> lib/mapnik_settings.js | ||
|
||
echo var path = require('path'); module.exports.env = {'GDAL_DATA': path.join(__dirname, 'mapnik/share/gdal'),'PROJ_LIB': path.join(__dirname, 'mapnik/share/proj') }; >> lib/binding/mapnik_settings.js | ||
|
||
chdir /d %TILEMILL_DIR% | ||
@rem symlink mapnik into main directory so npm is happy | ||
@rem mklink /d /j node_modules/mapnik %DEST%/mapnik | ||
set MAPNIK_DEST=%DEST%\mapnik\lib\binding\ | ||
mkdir %MAPNIK_DEST%\share | ||
mkdir %MAPNIK_DEST%\fonts | ||
mkdir %MAPNIK_DEST%\input | ||
|
||
@rem - handle mapnik itself | ||
rd /q /s %MAPNIK_DEST% | ||
xcopy /i /s /exclude:platforms\windows\excludes.txt %MAPNIK_INSTALL% %MAPNIK_DEST% | ||
|
||
@rem - move all other C++ addons into place | ||
@rem rd /q /s %DEST%\zipfile | ||
@rem xcopy /i /s /exclude:platforms\windows\excludes.txt %DEVROOT%\node-zipfile %DEST%\zipfile | ||
@rem rd /q /s %DEST%\srs | ||
@rem xcopy /i /s /exclude:platforms\windows\excludes.txt %DEVROOT%\node-srs %DEST%\srs | ||
@rem rd /q /s %DEST%\sqlite3 | ||
@rem xcopy /i /s /exclude:platforms\windows\excludes.txt %DEVROOT%\node-sqlite3 %DEST%\sqlite3 | ||
@rem rd /q /s %DEST%\contextify | ||
@rem xcopy /i /s /exclude:platforms\windows\excludes.txt %DEVROOT%\contextify %DEST%\contextify | ||
|
||
@rem - move icu, proj, and gdal data into node-mapnik folder | ||
rd /q /s %MAPNIK_DATA_DEST%\proj | ||
xcopy /i /s %DEVROOT%\proj\nad %MAPNIK_DATA_DEST%\proj | ||
rd /q /s %MAPNIK_DATA_DEST%\gdal | ||
xcopy /i /s %DEVROOT%\gdal\data %MAPNIK_DATA_DEST%\gdal | ||
xcopy /i /s /exclude:%TILEMILL_DIR%\platforms\windows\excludes.txt %MAPNIK_INSTALL%\lib %MAPNIK_DEST% | ||
xcopy /i /s /exclude:%TILEMILL_DIR%\platforms\windows\excludes.txt %MAPNIK_INSTALL%\share %MAPNIK_DEST%\mapnik\share | ||
|
||
del /q node.exe | ||
del /q %TILEMILL_DIR%\node.exe | ||
xcopy %NODEEXE% %TILEMILL_DIR%\node.exe | ||
chdir %TILEMILL_DIR% |