Skip to content

Commit a469960

Browse files
authored
Merge pull request TryGhost#921 from mapbox/visual-studio-fixes
Visual studio build fixes
2 parents 6fc2f8b + 2d7c082 commit a469960

3 files changed

Lines changed: 15 additions & 18 deletions

File tree

appveyor.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,46 +6,36 @@ environment:
66
matrix:
77
- nodejs_version: 0.10
88
platform: x86
9-
msvs_toolset: 12
109
- nodejs_version: 0.10
1110
platform: x64
12-
msvs_toolset: 12
1311
- nodejs_version: 0.12
1412
platform: x86
15-
msvs_toolset: 12
1613
- nodejs_version: 0.12
1714
platform: x64
18-
msvs_toolset: 12
1915
- nodejs_version: 4
2016
platform: x64
21-
msvs_toolset: 12
2217
- nodejs_version: 4
2318
platform: x86
24-
msvs_toolset: 12
2519
- nodejs_version: 5
2620
platform: x64
27-
msvs_toolset: 12
2821
- nodejs_version: 5
2922
platform: x86
30-
msvs_toolset: 12
3123
- nodejs_version: 6
3224
platform: x64
33-
msvs_toolset: 12
3425
- nodejs_version: 6
3526
platform: x86
36-
msvs_toolset: 12
3727
- nodejs_version: 7
3828
platform: x64
39-
msvs_toolset: 12
4029
- nodejs_version: 7
4130
platform: x86
42-
msvs_toolset: 12
4331
- nodejs_version: 8
4432
platform: x64
45-
msvs_toolset: 12
4633
- nodejs_version: 8
4734
platform: x86
48-
msvs_toolset: 12
35+
- nodejs_version: 9
36+
platform: x64
37+
- nodejs_version: 9
38+
platform: x86
4939
# custom visual studio 2015 builds
5040
- nodejs_version: 0.10.40
5141
platform: x86

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"url": "git://github.com/mapbox/node-sqlite3.git"
3838
},
3939
"dependencies": {
40-
"nan": "~2.7.0",
40+
"nan": "~2.8.0",
4141
"node-pre-gyp": "~0.6.38"
4242
},
4343
"bundledDependencies": [

scripts/build-appveyor.bat

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@ SET EL=0
44

55
ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %~f0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
66

7+
IF /I "%msvs_toolset%"=="" ECHO msvs_toolset unset, defaulting to 12 && SET msvs_toolset=12
8+
SET NODE_MAJOR=%nodejs_version:~0,1%
9+
IF %NODE_MAJOR% GTR 4 ECHO detected node v5, forcing msvs_toolset 14 && SET msvs_toolset=14
10+
711
SET PATH=%CD%;%PATH%
812
SET msvs_version=2013
913
IF "%msvs_toolset%"=="14" SET msvs_version=2015
1014

15+
1116
ECHO APPVEYOR^: %APPVEYOR%
1217
ECHO nodejs_version^: %nodejs_version%
1318
ECHO platform^: %platform%
@@ -42,7 +47,6 @@ IF /I "%platform%"=="x64" powershell Install-Product node $env:nodejs_version x6
4247
IF /I "%platform%"=="x86" powershell Install-Product node $env:nodejs_version x86
4348
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
4449

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

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

5256
:SKIP_APPVEYOR_INSTALL
5357
IF /I "%msvs_toolset%"=="12" GOTO NODE_INSTALLED
58+
IF %NODE_MAJOR% GTR 4 GOTO NODE_INSTALLED
5459

5560

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

112117

113-
IF "%nodejs_version:~0,1%"=="0" npm install https://github.com/springmeyer/node-gyp/tarball/v3.x
118+
IF "%nodejs_version:~0,1%"=="0" CALL npm install https://github.com/springmeyer/node-gyp/tarball/v3.x
119+
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
120+
IF "%nodejs_version:~0,1%"=="4" CALL npm install node-gyp@3.x
114121
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
115-
IF "%nodejs_version:~0,1%"=="4" npm install node-gyp@3.x
122+
IF "%nodejs_version:~0,1%"=="5" CALL npm install node-gyp@3.x
116123
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
117124

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

0 commit comments

Comments
 (0)