Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: alternative update of node-gyp for electron (v5 & v6), windows #1245

Merged
merged 26 commits into from
Nov 21, 2019
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f5b58bc
deps: alternative update of node-gyp for electron (v5 & v6), windows
kewde Nov 11, 2019
a621fa8
deps: install globally
kewde Nov 11, 2019
4adafad
deps: force installation into the folder that node-pre-gyp uses
kewde Nov 11, 2019
ebd0a28
deps: quotes around file path due to space
kewde Nov 11, 2019
a67b0b1
deps: remove node_modules in path
kewde Nov 11, 2019
678b40d
deps: use %ProgramFiles% to dynamically locate the directory
kewde Nov 11, 2019
cb93e18
deps: detect environment to build for using %platform%
kewde Nov 12, 2019
58bf68f
deps: logging and small typo fix
kewde Nov 12, 2019
520d06a
deps: set variable outside of if statement
kewde Nov 14, 2019
dc52a9b
deps: add debug logging
kewde Nov 14, 2019
dab13be
deps: specify electron runtime better
kewde Nov 14, 2019
5133fa4
deps: fix set variable, no spaces
kewde Nov 15, 2019
06c21aa
deps: try double "
kewde Nov 15, 2019
913a326
try without quotes (i hate batch)
kewde Nov 15, 2019
919de28
deps: move goto outside of if
kewde Nov 16, 2019
8f577f8
add debug logging
kewde Nov 16, 2019
9dc8271
more debug logging
kewde Nov 16, 2019
c6db64d
add back quotes
kewde Nov 16, 2019
092f015
remove /I from if
kewde Nov 17, 2019
cc1b6b5
unnest if and remove debug logging
kewde Nov 18, 2019
46c095a
add debug
kewde Nov 18, 2019
f36f5ec
attempt without IF "%NODE_RUNTIME%"=="electron"
kewde Nov 18, 2019
7ebe69c
add additional IF %ERRORLEVEL% NEQ 0 GOTO ERROR
kewde Nov 18, 2019
6a6dcb0
more logging on NODE_RUNTIME_VERSION
kewde Nov 21, 2019
3adec9f
move logic to add in debugging
kewde Nov 21, 2019
b318e2c
fix %
kewde Nov 21, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions scripts/build-appveyor.bat
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,26 @@ IF %ERRORLEVEL% NEQ 0 GOTO ERROR
IF "%nodejs_version:~0,1%"=="5" CALL npm install node-gyp@3.x
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

::Need to force update node-gyp to v6+ for electron v6 and v5
ECHO ===== conditional node-gyp upgrade START ============
:: Find the folder to install the node-gyp in
SET npm_in_nodejs_dir="%ProgramFiles%\nodejs\node_modules\npm"
ECHO npm_in_nodejs_dir^: %npm_in_nodejs_dir%
IF /I "%platform%"=="x86" SET npm_in_nodejs_dir="%ProgramFiles(x86)%\nodejs\node_modules\npm"
ECHO npm_in_nodejs_dir^: %npm_in_nodejs_dir%
:: Set boolean whether the update has to happen
SET "needs_patch="
IF DEFINED NODE_RUNTIME_VERSION (
ECHO NODE_RUNTIME_VERSION_REDUCED^: %NODE_RUNTIME_VERSION:~0,1%
IF "%NODE_RUNTIME_VERSION:~0,1%"=="5" SET "needs_patch=y"
IF "%NODE_RUNTIME_VERSION:~0,1%"=="6" SET "needs_patch=y"
)
:: Check if electron and install
ECHO NODE_RUNTIME^: %NODE_RUNTIME%
IF DEFINED needs_patch CALL npm install --prefix %npm_in_nodejs_dir% node-gyp@6.x
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO ===== conditional node-gyp upgrade END ============

CALL npm install --build-from-source --msvs_version=%msvs_version% %TOOLSET_ARGS% --loglevel=http
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

Expand Down