murgatroid99 | 673f65b | 2016-02-01 11:19:07 -0800 | [diff] [blame] | 1 | @rem Copyright 2016, Google Inc. |
| 2 | @rem All rights reserved. |
| 3 | @rem |
| 4 | @rem Redistribution and use in source and binary forms, with or without |
| 5 | @rem modification, are permitted provided that the following conditions are |
| 6 | @rem met: |
| 7 | @rem |
| 8 | @rem * Redistributions of source code must retain the above copyright |
| 9 | @rem notice, this list of conditions and the following disclaimer. |
| 10 | @rem * Redistributions in binary form must reproduce the above |
| 11 | @rem copyright notice, this list of conditions and the following disclaimer |
| 12 | @rem in the documentation and/or other materials provided with the |
| 13 | @rem distribution. |
| 14 | @rem * Neither the name of Google Inc. nor the names of its |
| 15 | @rem contributors may be used to endorse or promote products derived from |
| 16 | @rem this software without specific prior written permission. |
| 17 | @rem |
| 18 | @rem THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 19 | @rem "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 20 | @rem LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 21 | @rem A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 22 | @rem OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 23 | @rem SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 24 | @rem LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 | @rem DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 | @rem THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 | @rem (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 | @rem OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 | |
murgatroid99 | aaef11a | 2017-03-14 11:19:25 -0700 | [diff] [blame] | 30 | set node_versions=4.0.0 5.0.0 6.0.0 7.0.0 |
murgatroid99 | 673f65b | 2016-02-01 11:19:07 -0800 | [diff] [blame] | 31 | |
murgatroid99 | dc23046 | 2016-10-25 14:12:42 -0700 | [diff] [blame] | 32 | set electron_versions=1.0.0 1.1.0 1.2.0 1.3.0 1.4.0 |
| 33 | |
murgatroid99 | 673f65b | 2016-02-01 11:19:07 -0800 | [diff] [blame] | 34 | set PATH=%PATH%;C:\Program Files\nodejs\;%APPDATA%\npm |
| 35 | |
| 36 | del /f /q BUILD || rmdir build /s /q |
| 37 | |
| 38 | call npm update || goto :error |
| 39 | |
| 40 | mkdir artifacts |
| 41 | |
| 42 | for %%v in (%node_versions%) do ( |
murgatroid99 | 019a76e | 2016-05-09 14:57:29 -0700 | [diff] [blame] | 43 | call .\node_modules\.bin\node-pre-gyp.cmd configure build --target=%%v --target_arch=%1 |
murgatroid99 | 673f65b | 2016-02-01 11:19:07 -0800 | [diff] [blame] | 44 | |
| 45 | @rem Try again after removing openssl headers |
| 46 | rmdir "%HOMEDRIVE%%HOMEPATH%\.node-gyp\%%v\include\node\openssl" /S /Q |
| 47 | rmdir "%HOMEDRIVE%%HOMEPATH%\.node-gyp\iojs-%%v\include\node\openssl" /S /Q |
murgatroid99 | 33b3b2a | 2016-05-09 14:59:49 -0700 | [diff] [blame] | 48 | call .\node_modules\.bin\node-pre-gyp.cmd build package testpackage --target=%%v --target_arch=%1 || goto :error |
murgatroid99 | 673f65b | 2016-02-01 11:19:07 -0800 | [diff] [blame] | 49 | |
| 50 | xcopy /Y /I /S build\stage\* artifacts\ || goto :error |
| 51 | ) |
murgatroid99 | dc23046 | 2016-10-25 14:12:42 -0700 | [diff] [blame] | 52 | |
| 53 | for %%v in (%electron_versions%) do ( |
murgatroid99 | b19ac96 | 2017-01-13 10:56:36 -0800 | [diff] [blame] | 54 | cmd /V /C "set "HOME=%HOMEDRIVE%%HOMEPATH%\electron-gyp" && call .\node_modules\.bin\node-pre-gyp.cmd configure rebuild package testpackage --runtime=electron --target=%%v --target_arch=%1 --disturl=https://atom.io/download/electron" || goto :error |
murgatroid99 | dc23046 | 2016-10-25 14:12:42 -0700 | [diff] [blame] | 55 | |
| 56 | xcopy /Y /I /S build\stage\* artifacts\ || goto :error |
| 57 | ) |
murgatroid99 | 673f65b | 2016-02-01 11:19:07 -0800 | [diff] [blame] | 58 | if %errorlevel% neq 0 exit /b %errorlevel% |
| 59 | |
| 60 | goto :EOF |
| 61 | |
| 62 | :error |
murgatroid99 | dc23046 | 2016-10-25 14:12:42 -0700 | [diff] [blame] | 63 | exit /b 1 |