Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
executable file
·
91 lines (81 loc) · 3.78 KB

File metadata and controls

executable file
·
91 lines (81 loc) · 3.78 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/usr/bin/env bash
if [[ ! -d ../.nvm ]]; then
git clone https://github.com/creationix/nvm.git ../.nvm
fi
source ../.nvm/nvm.sh
nvm install 0.10
set -u -e
npm install nw-gyp -g
OLD_PATH="$PATH"
GYP_ARGS="--runtime=node-webkit --target=${NODE_WEBKIT} --target_arch=${TARGET_ARCH}"
if [[ $(uname -s) == 'Darwin' ]]; then
if [[ '${TARGET_ARCH}' == 'x64' ]]; then
# do not build on Mac OS X x64 until node-webkit 0.10.1 is released
false
fi
fi
if [[ $(uname -s) == 'Darwin' ]]; then
export NW_DOWNLOAD=node-webkit-v${NODE_WEBKIT}-osx-${TARGET_ARCH}
wget https://dl.node-webkit.org/v${NODE_WEBKIT}/${NW_DOWNLOAD}.zip
unzip -q ${NW_DOWNLOAD}.zip
export PATH=$(pwd)/node-webkit.app/Contents/MacOS/:${PATH}
# v0.10.0-rc1 unzips with extra folder
export PATH=$(pwd)/${NW_DOWNLOAD}/node-webkit.app/Contents/MacOS/:${PATH}
npm install --build-from-source ${GYP_ARGS}
else
sudo apt-get install build-essential
# Linux
export NW_DOWNLOAD=node-webkit-v${NODE_WEBKIT}-linux-${TARGET_ARCH}
# for testing node-webkit, launch a virtual display
export DISPLAY=:99.0
# NOTE: travis already has xvfb installed
# https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-GUI-%28e.g.-a-Web-browser%29
sh -e /etc/init.d/xvfb start +extension RANDR
wget https://dl.node-webkit.org/v${NODE_WEBKIT}/${NW_DOWNLOAD}.tar.gz
tar xf ${NW_DOWNLOAD}.tar.gz
export PATH=$(pwd)/${NW_DOWNLOAD}:${PATH}
if [[ "${TARGET_ARCH}" == 'ia32' ]]; then
# for nw >= 0.11.0 on ia32 we need gcc/g++ 4.8
IFS='.' read -a NODE_WEBKIT_VERSION <<< "${NODE_WEBKIT}"
if test ${NODE_WEBKIT_VERSION[0]} -ge 0 -a ${NODE_WEBKIT_VERSION[1]} -ge 11; then
# travis-ci runs ubuntu 12.04, so we need this ppa for gcc/g++ 4.8
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
export CC=gcc-4.8
export CXX=g++-4.8
export CXXFLAGS="-fpermissive"
COMPILER_PACKAGES="gcc-4.8-multilib g++-4.8-multilib"
else
export CC=gcc-4.6
export CXX=g++-4.6
export CXXFLAGS="-fpermissive"
COMPILER_PACKAGES="gcc-multilib g++-multilib"
fi
# need to update to avoid 404 for linux-libc-dev_3.2.0-64.97_amd64.deb
sudo apt-get update
# prepare packages for 32-bit builds on Linux
sudo apt-get -y install $COMPILER_PACKAGES libx11-6:i386 libnotify4:i386 libxtst6:i386 libcap2:i386 libglib2.0-0:i386 libgtk2.0-0:i386 libatk1.0-0:i386 libgdk-pixbuf2.0-0:i386 libcairo2:i386 libfreetype6:i386 libfontconfig1:i386 libxcomposite1:i386 libasound2:i386 libxdamage1:i386 libxext6:i386 libxfixes3:i386 libnss3:i386 libnspr4:i386 libgconf-2-4:i386 libexpat1:i386 libdbus-1-3:i386 libudev0:i386
# also use ldd to find out if some necessary apt-get is missing
ldd $(pwd)/${NW_DOWNLOAD}/nw
npm install --build-from-source ${GYP_ARGS}
else
npm install --build-from-source ${GYP_ARGS}
fi
fi
# test the package
node-pre-gyp package testpackage ${GYP_ARGS}
PUBLISH_BINARY=false
if test "${COMMIT_MESSAGE#*'[publish binary]'}" != "$COMMIT_MESSAGE"; then
node-pre-gyp publish ${GYP_ARGS}
node-pre-gyp info ${GYP_ARGS}
node-pre-gyp clean ${GYP_ARGS}
make clean
# now install from binary
INSTALL_RESULT=$(npm install ${GYP_ARGS} --fallback-to-build=false > /dev/null)$? || true
# if install returned non zero (errored) then we first unpublish and then call false so travis will bail at this line
if [[ $INSTALL_RESULT != 0 ]]; then echo "returned $INSTALL_RESULT";node-pre-gyp unpublish ${GYP_ARGS};false; fi
# If success then we arrive here so lets clean up
node-pre-gyp clean ${GYP_ARGS}
fi
# restore PATH
export PATH="$OLD_PATH"
rm -rf ${NW_DOWNLOAD}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.