Skip to content

Commit

Permalink
Merge pull request #921 from mapbox/visual-studio-fixes
Browse files Browse the repository at this point in the history
Visual studio build fixes
  • Loading branch information
springmeyer authored Jan 10, 2018
2 parents 6fc2f8b + 2d7c082 commit a469960
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
18 changes: 4 additions & 14 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,46 +6,36 @@ environment:
matrix:
- nodejs_version: 0.10
platform: x86
msvs_toolset: 12
- nodejs_version: 0.10
platform: x64
msvs_toolset: 12
- nodejs_version: 0.12
platform: x86
msvs_toolset: 12
- nodejs_version: 0.12
platform: x64
msvs_toolset: 12
- nodejs_version: 4
platform: x64
msvs_toolset: 12
- nodejs_version: 4
platform: x86
msvs_toolset: 12
- nodejs_version: 5
platform: x64
msvs_toolset: 12
- nodejs_version: 5
platform: x86
msvs_toolset: 12
- nodejs_version: 6
platform: x64
msvs_toolset: 12
- nodejs_version: 6
platform: x86
msvs_toolset: 12
- nodejs_version: 7
platform: x64
msvs_toolset: 12
- nodejs_version: 7
platform: x86
msvs_toolset: 12
- nodejs_version: 8
platform: x64
msvs_toolset: 12
- nodejs_version: 8
platform: x86
msvs_toolset: 12
- nodejs_version: 9
platform: x64
- nodejs_version: 9
platform: x86
# custom visual studio 2015 builds
- nodejs_version: 0.10.40
platform: x86
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"url": "git://github.com/mapbox/node-sqlite3.git"
},
"dependencies": {
"nan": "~2.7.0",
"nan": "~2.8.0",
"node-pre-gyp": "~0.6.38"
},
"bundledDependencies": [
Expand Down
13 changes: 10 additions & 3 deletions scripts/build-appveyor.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@ SET EL=0

ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %~f0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

IF /I "%msvs_toolset%"=="" ECHO msvs_toolset unset, defaulting to 12 && SET msvs_toolset=12
SET NODE_MAJOR=%nodejs_version:~0,1%
IF %NODE_MAJOR% GTR 4 ECHO detected node v5, forcing msvs_toolset 14 && SET msvs_toolset=14

SET PATH=%CD%;%PATH%
SET msvs_version=2013
IF "%msvs_toolset%"=="14" SET msvs_version=2015


ECHO APPVEYOR^: %APPVEYOR%
ECHO nodejs_version^: %nodejs_version%
ECHO platform^: %platform%
Expand Down Expand Up @@ -42,7 +47,6 @@ IF /I "%platform%"=="x64" powershell Install-Product node $env:nodejs_version x6
IF /I "%platform%"=="x86" powershell Install-Product node $env:nodejs_version x86
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

SET NODE_MAJOR=%nodejs_version:~0,1%
ECHO node major version^: %NODE_MAJOR%
IF %NODE_MAJOR% GTR 0 ECHO node version greater than zero, not updating npm && GOTO SKIP_APPVEYOR_INSTALL

Expand All @@ -51,6 +55,7 @@ IF %ERRORLEVEL% NEQ 0 GOTO ERROR

:SKIP_APPVEYOR_INSTALL
IF /I "%msvs_toolset%"=="12" GOTO NODE_INSTALLED
IF %NODE_MAJOR% GTR 4 GOTO NODE_INSTALLED


::custom node for VS2015
Expand Down Expand Up @@ -110,9 +115,11 @@ IF /I "%NPM_BIN_DIR%"=="%CD%" ECHO ERROR npm bin -g equals local directory && SE
ECHO ===== where npm puts stuff END ============


IF "%nodejs_version:~0,1%"=="0" npm install https://github.com/springmeyer/node-gyp/tarball/v3.x
IF "%nodejs_version:~0,1%"=="0" CALL npm install https://github.com/springmeyer/node-gyp/tarball/v3.x
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
IF "%nodejs_version:~0,1%"=="4" CALL npm install node-gyp@3.x
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
IF "%nodejs_version:~0,1%"=="4" npm install node-gyp@3.x
IF "%nodejs_version:~0,1%"=="5" CALL npm install node-gyp@3.x
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

CALL npm install --build-from-source --msvs_version=%msvs_version% %TOOLSET_ARGS% --loglevel=http
Expand Down

0 comments on commit a469960

Please sign in to comment.