From a9555b4e2d1514f8ffa19ba9ec658b768724b83b Mon Sep 17 00:00:00 2001 From: Mithgol Date: Thu, 6 Feb 2014 02:52:07 -0800 Subject: [PATCH 01/29] =?UTF-8?q?Travis=C2=A0CI:=20non-empty=20NODE=5FWEBK?= =?UTF-8?q?IT=3D"0.8.3"=20is=C2=A0set=20for=C2=A0Node=C2=A0v0.10?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There's currently no API to determine the most recent version of node-webkit over the Web. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 92ac5dd3c..997e511f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ language: cpp env: matrix: - export NODE_VERSION="0.8" - - export NODE_VERSION="0.10" + - export NODE_VERSION="0.10" NODE_WEBKIT="0.8.3" global: - secure: QhuP5E/kYL1j1KDkHGJtk6DSJr1RH4DR/JrC62Viuf5Du8jE+i0kPWfF2MxtuEmKo35orhpu8t8mzKygWfuO63WPuuIE9qd/+V/y99Lqcj0tEN6wJ5RnywktbTJWg23zphjhmYq3Xj8DLVEikCZBwHtlbygkO9Q60cn1PK+bnPg= - secure: HxCS2dQAWI0KmCFnFNNZoucG4FeAW+itG7+Hp0dNtwmxZzGOZYFO2bZcGvTAMNfVN++oqLxTebYQI1oB5yUl5mPJjrjthaGS6Zq3S6rfJcXiv+icYgEXlR6ejQ97dsHw1Jeg8nedCQlI4kHfvG6pgBLhq9hnugxH1Cjhdt14E9U= From 31a11de41194619abaa080d850af350332166d0f Mon Sep 17 00:00:00 2001 From: Mithgol Date: Thu, 6 Feb 2014 03:04:16 -0800 Subject: [PATCH 02/29] install nw-gyp in 32 bit environment if NODE_WEBKIT is not empty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Note: `make clean` happens after `npm install nw-gyp -g` because we intend to use `nw-gyp` later to rebuild the existing build of node-sqlite3. --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 997e511f5..82606dfe5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -62,6 +62,8 @@ script: - npm test # publish 32 bit build - if [[ $PUBLISH == true ]]; then node-pre-gyp package publish; fi; +# install nw-gyp in 32 bit environment if NODE_WEBKIT is not empty +- if [ "$NODE_WEBKIT" != "" ]; then npm install nw-gyp -g; fi; - make clean # test source compile in 32 bit mode against external libsqlite3 - if [[ "$platform" == 'linux' ]]; then sudo apt-get -y install libsqlite3-dev:i386; CC=gcc-4.6 CXX=g++-4.6 npm install --build-from-source --sqlite=/usr; npm test; fi From 6903cde54455cc972fa127d3835b40d61583c6e9 Mon Sep 17 00:00:00 2001 From: Mithgol Date: Thu, 6 Feb 2014 03:21:37 -0800 Subject: [PATCH 03/29] =?UTF-8?q?Travis=C2=A0CI:=20rebuild=20for=C2=A0the?= =?UTF-8?q?=C2=A0node-webkit=20(version=20`$NODE=5FWEBKIT`)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 82606dfe5..3d8120594 100644 --- a/.travis.yml +++ b/.travis.yml @@ -64,6 +64,8 @@ script: - if [[ $PUBLISH == true ]]; then node-pre-gyp package publish; fi; # install nw-gyp in 32 bit environment if NODE_WEBKIT is not empty - if [ "$NODE_WEBKIT" != "" ]; then npm install nw-gyp -g; fi; +# rebuild node-sqlite3 for 32 bit node-webkit target (if NODE_WEBKIT is not empty) +- if [ "$NODE_WEBKIT" != "" ]; then nw-gyp rebuild --target=$NODE_WEBKIT --build-from-source; fi; - make clean # test source compile in 32 bit mode against external libsqlite3 - if [[ "$platform" == 'linux' ]]; then sudo apt-get -y install libsqlite3-dev:i386; CC=gcc-4.6 CXX=g++-4.6 npm install --build-from-source --sqlite=/usr; npm test; fi From 20ed66628f4f7b0c0700b464d068a8aae9e68458 Mon Sep 17 00:00:00 2001 From: Mithgol Date: Thu, 6 Feb 2014 04:24:59 -0800 Subject: [PATCH 04/29] =?UTF-8?q?build=20for=20node-webkit=2064bit=20on?= =?UTF-8?q?=C2=A0Linux=20(uninstall=20nw-gyp=20later)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.travis.yml b/.travis.yml index 3d8120594..e09c6b71f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,6 +47,12 @@ script: - make clean - npm install --build-from-source --sqlite=/usr - npm test +# on Linux install nw-gyp for 64 bit if NODE_WEBKIT is not empty +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then npm install nw-gyp -g; fi; fi +# on Linux rebuild node-sqlite3 for 64 bit node-webkit target (if NODE_WEBKIT is not empty) +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then nw-gyp rebuild --target=$NODE_WEBKIT --build-from-source; fi; fi +# on Linux uninstall nw-gyp for 64 bit if NODE_WEBKIT is not empty +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then npm uninstall nw-gyp -g; fi; fi - make clean # node v0.8 and above provide pre-built 32 bit and 64 bit binaries # so here we use the 32 bit ones to also test 32 bit builds From c894e47639b3e569830a8874a9f90e747dc039df Mon Sep 17 00:00:00 2001 From: Mithgol Date: Thu, 6 Feb 2014 04:33:15 -0800 Subject: [PATCH 05/29] =?UTF-8?q?attempt=20a=C2=A0build=20for=20node-webki?= =?UTF-8?q?t=200.8.4=20(instead=C2=A0of=200.8.3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Release notes https://groups.google.com/d/msg/node-webkit/bPjur7aFaQc/4TP6o3SM-8sJ say that 0.8.4 fix improves the behaviour on OS X. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e09c6b71f..136fad01e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ language: cpp env: matrix: - export NODE_VERSION="0.8" - - export NODE_VERSION="0.10" NODE_WEBKIT="0.8.3" + - export NODE_VERSION="0.10" NODE_WEBKIT="0.8.4" global: - secure: QhuP5E/kYL1j1KDkHGJtk6DSJr1RH4DR/JrC62Viuf5Du8jE+i0kPWfF2MxtuEmKo35orhpu8t8mzKygWfuO63WPuuIE9qd/+V/y99Lqcj0tEN6wJ5RnywktbTJWg23zphjhmYq3Xj8DLVEikCZBwHtlbygkO9Q60cn1PK+bnPg= - secure: HxCS2dQAWI0KmCFnFNNZoucG4FeAW+itG7+Hp0dNtwmxZzGOZYFO2bZcGvTAMNfVN++oqLxTebYQI1oB5yUl5mPJjrjthaGS6Zq3S6rfJcXiv+icYgEXlR6ejQ97dsHw1Jeg8nedCQlI4kHfvG6pgBLhq9hnugxH1Cjhdt14E9U= From 4f6db191ecd48fb0799a45053321ed9e06ad6585 Mon Sep 17 00:00:00 2001 From: Mithgol Date: Thu, 6 Feb 2014 04:42:41 -0800 Subject: [PATCH 06/29] =?UTF-8?q?do=C2=A0not=20uninstall=20nw-gyp=20on?= =?UTF-8?q?=C2=A064=C2=A0bit=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It seems (in installation logs) that nw-gyp does not contain any binary (i.e. compiled) addons. Thus it's fine if nw-gyp survives 64bit→32bit switch of our Node.js environment on Linux. --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 136fad01e..11e1d335f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,8 +51,6 @@ script: - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then npm install nw-gyp -g; fi; fi # on Linux rebuild node-sqlite3 for 64 bit node-webkit target (if NODE_WEBKIT is not empty) - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then nw-gyp rebuild --target=$NODE_WEBKIT --build-from-source; fi; fi -# on Linux uninstall nw-gyp for 64 bit if NODE_WEBKIT is not empty -- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then npm uninstall nw-gyp -g; fi; fi - make clean # node v0.8 and above provide pre-built 32 bit and 64 bit binaries # so here we use the 32 bit ones to also test 32 bit builds From 5992e972956291f6750558779e0c06afda61fc2d Mon Sep 17 00:00:00 2001 From: Mithgol Date: Thu, 6 Feb 2014 04:57:36 -0800 Subject: [PATCH 07/29] node-pre-gyp package testpackage (if NODE_WEBKIT is not empty) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit does also prepend `on Linux 64 bit:` to some comments (making it easier to understand what subplatform is targeted). On Linux nw-gyp is installed earlier (in 64 bit mode) and thus we can refrain from its reinstallation for 32 bit, speeding things up. --- .travis.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 11e1d335f..867f6a50f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,10 +47,12 @@ script: - make clean - npm install --build-from-source --sqlite=/usr - npm test -# on Linux install nw-gyp for 64 bit if NODE_WEBKIT is not empty +# on Linux 64 bit: install nw-gyp if NODE_WEBKIT is not empty - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then npm install nw-gyp -g; fi; fi -# on Linux rebuild node-sqlite3 for 64 bit node-webkit target (if NODE_WEBKIT is not empty) +# on Linux 64 bit: rebuild node-sqlite3 for 64 bit node-webkit target (if NODE_WEBKIT is not empty) - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then nw-gyp rebuild --target=$NODE_WEBKIT --build-from-source; fi; fi +# on Linux 64 bit: attempt node-pre-gyp package testpackage (if NODE_WEBKIT is not empty) +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then node-pre-gyp package testpackage; fi; fi - make clean # node v0.8 and above provide pre-built 32 bit and 64 bit binaries # so here we use the 32 bit ones to also test 32 bit builds @@ -66,10 +68,12 @@ script: - npm test # publish 32 bit build - if [[ $PUBLISH == true ]]; then node-pre-gyp package publish; fi; -# install nw-gyp in 32 bit environment if NODE_WEBKIT is not empty -- if [ "$NODE_WEBKIT" != "" ]; then npm install nw-gyp -g; fi; +# install nw-gyp in 32 bit environment if NODE_WEBKIT is not empty (but on Linux it's installed earlier on 64 bit) +- if [ "$platform" != 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then npm install nw-gyp -g; fi; fi # rebuild node-sqlite3 for 32 bit node-webkit target (if NODE_WEBKIT is not empty) - if [ "$NODE_WEBKIT" != "" ]; then nw-gyp rebuild --target=$NODE_WEBKIT --build-from-source; fi; +# attempt node-pre-gyp package testpackage (if NODE_WEBKIT is not empty) +- if [ "$NODE_WEBKIT" != "" ]; then node-pre-gyp package testpackage; fi; - make clean # test source compile in 32 bit mode against external libsqlite3 - if [[ "$platform" == 'linux' ]]; then sudo apt-get -y install libsqlite3-dev:i386; CC=gcc-4.6 CXX=g++-4.6 npm install --build-from-source --sqlite=/usr; npm test; fi From e3324ce595caf5b3074d412091f3f1d3c9ce64f8 Mon Sep 17 00:00:00 2001 From: Mithgol Date: Wed, 12 Feb 2014 21:44:41 -0800 Subject: [PATCH 08/29] added `--runtime=node-webkit --overwrite` twice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Try a feature originally introduced in node-pre-gyp v0.4.2 commit springmeyer/node-pre-gyp@370024a1a3a81c9faa35bfc2f030685c305bedca for springmeyer/node-pre-gyp#14. --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 867f6a50f..708eaa224 100644 --- a/.travis.yml +++ b/.travis.yml @@ -52,7 +52,7 @@ script: # on Linux 64 bit: rebuild node-sqlite3 for 64 bit node-webkit target (if NODE_WEBKIT is not empty) - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then nw-gyp rebuild --target=$NODE_WEBKIT --build-from-source; fi; fi # on Linux 64 bit: attempt node-pre-gyp package testpackage (if NODE_WEBKIT is not empty) -- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then node-pre-gyp package testpackage; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then node-pre-gyp package testpackage --runtime=node-webkit --overwrite; fi; fi - make clean # node v0.8 and above provide pre-built 32 bit and 64 bit binaries # so here we use the 32 bit ones to also test 32 bit builds @@ -73,7 +73,7 @@ script: # rebuild node-sqlite3 for 32 bit node-webkit target (if NODE_WEBKIT is not empty) - if [ "$NODE_WEBKIT" != "" ]; then nw-gyp rebuild --target=$NODE_WEBKIT --build-from-source; fi; # attempt node-pre-gyp package testpackage (if NODE_WEBKIT is not empty) -- if [ "$NODE_WEBKIT" != "" ]; then node-pre-gyp package testpackage; fi; +- if [ "$NODE_WEBKIT" != "" ]; then node-pre-gyp package testpackage --runtime=node-webkit --overwrite; fi; - make clean # test source compile in 32 bit mode against external libsqlite3 - if [[ "$platform" == 'linux' ]]; then sudo apt-get -y install libsqlite3-dev:i386; CC=gcc-4.6 CXX=g++-4.6 npm install --build-from-source --sqlite=/usr; npm test; fi From ff08389d5c4c9036b8da881f266390b0ea7c3bb1 Mon Sep 17 00:00:00 2001 From: Mithgol Date: Wed, 12 Feb 2014 21:53:54 -0800 Subject: [PATCH 09/29] =?UTF-8?q?oops,=20the=C2=A0previous=20commit=20requ?= =?UTF-8?q?ires=20node-pre-gyp=20v0.4.2=20or=20newer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 79043eb44..38294ba40 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "url": "git://github.com/mapbox/node-sqlite3.git" }, "dependencies": { - "node-pre-gyp": "~0.3.0" + "node-pre-gyp": "~0.4.2" }, "bundledDependencies": [ "node-pre-gyp" @@ -54,4 +54,4 @@ } ], "main": "./lib/sqlite3" -} \ No newline at end of file +} From 7dc529b5f95a6660466341df25750fb0cac58c44 Mon Sep 17 00:00:00 2001 From: Mithgol Date: Wed, 12 Feb 2014 23:47:43 -0800 Subject: [PATCH 10/29] =?UTF-8?q?use=20the=C2=A0tarball=C2=A0version=20of?= =?UTF-8?q?=20node-pre-gyp=20v0.4.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Working around a temporal inavailability of node-pre-gyp v0.4.2. See springmeyer/node-pre-gyp#35 for details. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 38294ba40..a65834453 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "url": "git://github.com/mapbox/node-sqlite3.git" }, "dependencies": { - "node-pre-gyp": "~0.4.2" + "node-pre-gyp": "https://github.com/springmeyer/node-pre-gyp/tarball/310c220e8f511cb9da76ae150710b45541f9cae2" }, "bundledDependencies": [ "node-pre-gyp" From b580a1d4eefcc2c96db1abeb67dbea360c8a3445 Mon Sep 17 00:00:00 2001 From: Mithgol Date: Thu, 13 Feb 2014 00:05:55 -0800 Subject: [PATCH 11/29] =?UTF-8?q?use=20`https`=20(instead=C2=A0of=20`http`?= =?UTF-8?q?)=20in=C2=A0the=C2=A0value=C2=A0of=20`remote=5Furi`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise the following check fails: https://github.com/springmeyer/node-pre-gyp/blob/3d4632a7333d420d6423299b143f5391b626e904/lib/util/versioning.js#L75-79 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a65834453..c760bbce8 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "binary": { "module_name": "node_sqlite3", "module_path": "./lib/binding/", - "remote_uri": "http://node-sqlite3.s3.amazonaws.com", + "remote_uri": "https://node-sqlite3.s3.amazonaws.com", "template": "{configuration}/{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz" }, "contributors": [ From 738aaf6bc50915ed8d3c57bf983edab766e37d87 Mon Sep 17 00:00:00 2001 From: Mithgol Date: Thu, 13 Feb 2014 02:59:13 -0800 Subject: [PATCH 12/29] try node-webkit's filename fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A pull request (springmeyer/node-pre-gyp#36) is opened to land a partial fix for node-pre-gyp's validation process. This commit uses a source branch of that pull request. After this commit, node-pre-gyp's validator is expected to launch `nw` instead of `node-webkit` on Travis CI's Linux. A former ENOENT error is expected to be replaced by a node-webkit's error when the engine realises it's given a node-sqlite3 module's JavaScript instead of some HTML5 application. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c760bbce8..1193dc893 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "url": "git://github.com/mapbox/node-sqlite3.git" }, "dependencies": { - "node-pre-gyp": "https://github.com/springmeyer/node-pre-gyp/tarball/310c220e8f511cb9da76ae150710b45541f9cae2" + "node-pre-gyp": "https://github.com/Mithgol/node-pre-gyp/tarball/14637b9caee2abb285b33dbf8a501d2b4514f6d1" }, "bundledDependencies": [ "node-pre-gyp" From 6655d7c8819ca4ce54ea5af25d8f2f7fc40bda80 Mon Sep 17 00:00:00 2001 From: Mithgol Date: Thu, 13 Feb 2014 03:19:51 -0800 Subject: [PATCH 13/29] update node-pre-gyp's source branch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit Mithgol/node-pre-gyp@eaea6e159c9a052609cf93f0438cae17900f583b is now included in the node-pre-gyp's source used here. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1193dc893..7b1b0f43f 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "url": "git://github.com/mapbox/node-sqlite3.git" }, "dependencies": { - "node-pre-gyp": "https://github.com/Mithgol/node-pre-gyp/tarball/14637b9caee2abb285b33dbf8a501d2b4514f6d1" + "node-pre-gyp": "https://github.com/Mithgol/node-pre-gyp/tarball/eaea6e159c9a052609cf93f0438cae17900f583b" }, "bundledDependencies": [ "node-pre-gyp" From a86e300756e8d3e29e79e3ae9a725f93a019988b Mon Sep 17 00:00:00 2001 From: Mithgol Date: Thu, 13 Feb 2014 04:08:14 -0800 Subject: [PATCH 14/29] =?UTF-8?q?on=C2=A0Linux=2064=C2=A0bit:=20download,?= =?UTF-8?q?=20unpack,=20use=20and=C2=A0erase=20node-webkit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.travis.yml b/.travis.yml index 708eaa224..1d5640321 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,8 +51,14 @@ script: - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then npm install nw-gyp -g; fi; fi # on Linux 64 bit: rebuild node-sqlite3 for 64 bit node-webkit target (if NODE_WEBKIT is not empty) - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then nw-gyp rebuild --target=$NODE_WEBKIT --build-from-source; fi; fi +# on Linux 64 bit: download and unpack node-webkit, add it to PATH +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then wget https://s3.amazonaws.com/node-webkit/v${NODE_WEBKIT}/node-webkit-v${NODE_WEBKIT}-linux-x64.tar.gz; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then tar xf node-webkit-v${NODE_WEBKIT}-linux-x64.tar.gz; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then export PATH=$(pwd)/node-webkit-v${NODE_WEBKIT}-linux-x64:$PATH; fi; fi # on Linux 64 bit: attempt node-pre-gyp package testpackage (if NODE_WEBKIT is not empty) - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then node-pre-gyp package testpackage --runtime=node-webkit --overwrite; fi; fi +# on Linux 64 bit: erase used node-webkit +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then rm -rf node-webkit-v${NODE_WEBKIT}-linux-x64; fi; fi - make clean # node v0.8 and above provide pre-built 32 bit and 64 bit binaries # so here we use the 32 bit ones to also test 32 bit builds From 6fc91661a70f460d9fbbc5986e12a9aba224820c Mon Sep 17 00:00:00 2001 From: Mithgol Date: Thu, 13 Feb 2014 05:03:23 -0800 Subject: [PATCH 15/29] =?UTF-8?q?for=20testing=20node-webkit,=20launch=20a?= =?UTF-8?q?=C2=A0virtual=C2=A0display?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit xvfb recipe: http://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-GUI-(e.g.-a-Web-browser) sleep 3 recipe: http://docs.travis-ci.com/user/gui-and-headless-browsers/#Starting-a-Web-Server --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 1d5640321..d15dcd24c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,6 +35,9 @@ before_script: - if [ "[publish]" = `git show -s --format=%B $TRAVIS_COMMIT | tr -d '\n'` ]; then echo yes;PUBLISH=true; fi; - if [[ `git describe --contains $( git rev-parse HEAD )` ]]; then echo yes;PUBLISH=true; fi; - if [[ $PUBLISH == true ]]; then node-pre-gyp package publish; fi +# for testing node-webkit, launch a virtual display +- if [ "$NODE_WEBKIT" != "" ]; then export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start; sleep 3; fi +# note: `sleep 3` gives xvfb some time to start script: # test install from published binary From 65280f0449d2b799560ca752488777fad7dbee07 Mon Sep 17 00:00:00 2001 From: Mithgol Date: Thu, 13 Feb 2014 06:43:21 -0800 Subject: [PATCH 16/29] =?UTF-8?q?on=C2=A0Linux=2032=C2=A0bit:=20download,?= =?UTF-8?q?=20unpack,=20use=C2=A0and=C2=A0erase=20node-webkit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.travis.yml b/.travis.yml index d15dcd24c..d32218c26 100644 --- a/.travis.yml +++ b/.travis.yml @@ -81,8 +81,14 @@ script: - if [ "$platform" != 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then npm install nw-gyp -g; fi; fi # rebuild node-sqlite3 for 32 bit node-webkit target (if NODE_WEBKIT is not empty) - if [ "$NODE_WEBKIT" != "" ]; then nw-gyp rebuild --target=$NODE_WEBKIT --build-from-source; fi; +# on Linux 32 bit: download and unpack node-webkit, add it to PATH +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then wget https://s3.amazonaws.com/node-webkit/v${NODE_WEBKIT}/node-webkit-v${NODE_WEBKIT}-linux-ia32.tar.gz; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then tar xf node-webkit-v${NODE_WEBKIT}-linux-ia32.tar.gz; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then export PATH=$(pwd)/node-webkit-v${NODE_WEBKIT}-linux-ia32:$PATH; fi; fi # attempt node-pre-gyp package testpackage (if NODE_WEBKIT is not empty) - if [ "$NODE_WEBKIT" != "" ]; then node-pre-gyp package testpackage --runtime=node-webkit --overwrite; fi; +# on Linux 32 bit: erase used node-webkit +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then rm -rf node-webkit-v${NODE_WEBKIT}-linux-ia32; fi; fi - make clean # test source compile in 32 bit mode against external libsqlite3 - if [[ "$platform" == 'linux' ]]; then sudo apt-get -y install libsqlite3-dev:i386; CC=gcc-4.6 CXX=g++-4.6 npm install --build-from-source --sqlite=/usr; npm test; fi From 65be174c1f5e29ee9751511df882ff4e5f0130c0 Mon Sep 17 00:00:00 2001 From: Mithgol Date: Thu, 13 Feb 2014 07:10:13 -0800 Subject: [PATCH 17/29] also install libx11-6 --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index d32218c26..6cae21d94 100644 --- a/.travis.yml +++ b/.travis.yml @@ -70,8 +70,8 @@ script: - tar xf node-${NVER}-${platform}-x86.tar.gz # enable 32 bit node - export PATH=$(pwd)/node-${NVER}-${platform}-x86/bin:$PATH -# install 32 bit compiler toolchain -- if [[ "$platform" == 'linux' ]]; then sudo apt-get -y install gcc-multilib g++-multilib; fi +# install 32 bit compiler toolchain and X11 +- if [[ "$platform" == 'linux' ]]; then sudo apt-get -y install gcc-multilib g++-multilib libx11-6; fi # test source compile in 32 bit mode with internal libsqlite3 - if [[ "$platform" == 'linux' ]]; then CC=gcc-4.6 CXX=g++-4.6 npm install --build-from-source; else npm install --build-from-source; fi - npm test From ccf56f4e26a20f9d12c3002926add10a6839061d Mon Sep 17 00:00:00 2001 From: Mithgol Date: Thu, 13 Feb 2014 07:47:20 -0800 Subject: [PATCH 18/29] try installing libx11-dev --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6cae21d94..a8a717571 100644 --- a/.travis.yml +++ b/.travis.yml @@ -71,7 +71,7 @@ script: # enable 32 bit node - export PATH=$(pwd)/node-${NVER}-${platform}-x86/bin:$PATH # install 32 bit compiler toolchain and X11 -- if [[ "$platform" == 'linux' ]]; then sudo apt-get -y install gcc-multilib g++-multilib libx11-6; fi +- if [[ "$platform" == 'linux' ]]; then sudo apt-get -y install gcc-multilib g++-multilib libx11-dev; fi # test source compile in 32 bit mode with internal libsqlite3 - if [[ "$platform" == 'linux' ]]; then CC=gcc-4.6 CXX=g++-4.6 npm install --build-from-source; else npm install --build-from-source; fi - npm test From 05d7f8cbaaa7b639617494b04bfe66dc0f5793a4 Mon Sep 17 00:00:00 2001 From: Mithgol Date: Thu, 13 Feb 2014 07:59:42 -0800 Subject: [PATCH 19/29] sudo apt-get update --fix-missing More magic. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a8a717571..090d0cccc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -71,7 +71,7 @@ script: # enable 32 bit node - export PATH=$(pwd)/node-${NVER}-${platform}-x86/bin:$PATH # install 32 bit compiler toolchain and X11 -- if [[ "$platform" == 'linux' ]]; then sudo apt-get -y install gcc-multilib g++-multilib libx11-dev; fi +- if [[ "$platform" == 'linux' ]]; then sudo apt-get -y install gcc-multilib g++-multilib; sudo apt-get update --fix-missing; fi # test source compile in 32 bit mode with internal libsqlite3 - if [[ "$platform" == 'linux' ]]; then CC=gcc-4.6 CXX=g++-4.6 npm install --build-from-source; else npm install --build-from-source; fi - npm test From fcdc43a16b1c936f7c24609a7a08b432bcbfe7ca Mon Sep 17 00:00:00 2001 From: Mithgol Date: Thu, 13 Feb 2014 08:17:04 -0800 Subject: [PATCH 20/29] save and restore PATH --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 090d0cccc..2ecfb1c34 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,11 +57,11 @@ script: # on Linux 64 bit: download and unpack node-webkit, add it to PATH - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then wget https://s3.amazonaws.com/node-webkit/v${NODE_WEBKIT}/node-webkit-v${NODE_WEBKIT}-linux-x64.tar.gz; fi; fi - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then tar xf node-webkit-v${NODE_WEBKIT}-linux-x64.tar.gz; fi; fi -- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then export PATH=$(pwd)/node-webkit-v${NODE_WEBKIT}-linux-x64:$PATH; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then prenwpath="$PATH"; export PATH=$(pwd)/node-webkit-v${NODE_WEBKIT}-linux-x64:$PATH; fi; fi # on Linux 64 bit: attempt node-pre-gyp package testpackage (if NODE_WEBKIT is not empty) - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then node-pre-gyp package testpackage --runtime=node-webkit --overwrite; fi; fi -# on Linux 64 bit: erase used node-webkit -- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then rm -rf node-webkit-v${NODE_WEBKIT}-linux-x64; fi; fi +# on Linux 64 bit: erase used node-webkit, restore PATH +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then export PATH="$prenwpath"; rm -rf node-webkit-v${NODE_WEBKIT}-linux-x64; fi; fi - make clean # node v0.8 and above provide pre-built 32 bit and 64 bit binaries # so here we use the 32 bit ones to also test 32 bit builds @@ -84,11 +84,11 @@ script: # on Linux 32 bit: download and unpack node-webkit, add it to PATH - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then wget https://s3.amazonaws.com/node-webkit/v${NODE_WEBKIT}/node-webkit-v${NODE_WEBKIT}-linux-ia32.tar.gz; fi; fi - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then tar xf node-webkit-v${NODE_WEBKIT}-linux-ia32.tar.gz; fi; fi -- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then export PATH=$(pwd)/node-webkit-v${NODE_WEBKIT}-linux-ia32:$PATH; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then prenwpath="$PATH"; export PATH=$(pwd)/node-webkit-v${NODE_WEBKIT}-linux-ia32:$PATH; fi; fi # attempt node-pre-gyp package testpackage (if NODE_WEBKIT is not empty) - if [ "$NODE_WEBKIT" != "" ]; then node-pre-gyp package testpackage --runtime=node-webkit --overwrite; fi; -# on Linux 32 bit: erase used node-webkit -- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then rm -rf node-webkit-v${NODE_WEBKIT}-linux-ia32; fi; fi +# on Linux 32 bit: erase used node-webkit, restore PATH +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then export PATH="$prenwpath"; rm -rf node-webkit-v${NODE_WEBKIT}-linux-ia32; fi; fi - make clean # test source compile in 32 bit mode against external libsqlite3 - if [[ "$platform" == 'linux' ]]; then sudo apt-get -y install libsqlite3-dev:i386; CC=gcc-4.6 CXX=g++-4.6 npm install --build-from-source --sqlite=/usr; npm test; fi From e370b9c60f4f9a05fd900bdd0df78e6f32ca9588 Mon Sep 17 00:00:00 2001 From: Mithgol Date: Thu, 13 Feb 2014 08:32:03 -0800 Subject: [PATCH 21/29] attempt ldd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit also erases `sudo apt-get update --fix-missing` introduced in one of the previous commits, because it didn't help. --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2ecfb1c34..795f084ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -71,7 +71,7 @@ script: # enable 32 bit node - export PATH=$(pwd)/node-${NVER}-${platform}-x86/bin:$PATH # install 32 bit compiler toolchain and X11 -- if [[ "$platform" == 'linux' ]]; then sudo apt-get -y install gcc-multilib g++-multilib; sudo apt-get update --fix-missing; fi +- if [[ "$platform" == 'linux' ]]; then sudo apt-get -y install gcc-multilib g++-multilib; fi # test source compile in 32 bit mode with internal libsqlite3 - if [[ "$platform" == 'linux' ]]; then CC=gcc-4.6 CXX=g++-4.6 npm install --build-from-source; else npm install --build-from-source; fi - npm test @@ -85,6 +85,8 @@ script: - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then wget https://s3.amazonaws.com/node-webkit/v${NODE_WEBKIT}/node-webkit-v${NODE_WEBKIT}-linux-ia32.tar.gz; fi; fi - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then tar xf node-webkit-v${NODE_WEBKIT}-linux-ia32.tar.gz; fi; fi - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then prenwpath="$PATH"; export PATH=$(pwd)/node-webkit-v${NODE_WEBKIT}-linux-ia32:$PATH; fi; fi +# attempt ldd +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then ldd $(pwd)/node-webkit-v${NODE_WEBKIT}-linux-ia32/nw; fi; fi # attempt node-pre-gyp package testpackage (if NODE_WEBKIT is not empty) - if [ "$NODE_WEBKIT" != "" ]; then node-pre-gyp package testpackage --runtime=node-webkit --overwrite; fi; # on Linux 32 bit: erase used node-webkit, restore PATH From 54f460b3431d1f7948e7693be7244702e22d350d Mon Sep 17 00:00:00 2001 From: Mithgol Date: Thu, 13 Feb 2014 08:58:56 -0800 Subject: [PATCH 22/29] use the primary node-pre-gyp's repository --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7b1b0f43f..0b90208bd 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "url": "git://github.com/mapbox/node-sqlite3.git" }, "dependencies": { - "node-pre-gyp": "https://github.com/Mithgol/node-pre-gyp/tarball/eaea6e159c9a052609cf93f0438cae17900f583b" + "node-pre-gyp": "https://github.com/springmeyer/node-pre-gyp/tarball/015208540bb0febe92c3cac03ece6621fd532b9b" }, "bundledDependencies": [ "node-pre-gyp" From 8b83d45ac3abe127e9cf8cd2e1c51782583cb192 Mon Sep 17 00:00:00 2001 From: Mithgol Date: Thu, 13 Feb 2014 09:12:10 -0800 Subject: [PATCH 23/29] =?UTF-8?q?on=C2=A0Linux=C2=A064=C2=A0bit:=20also=20?= =?UTF-8?q?`ldd=20nw`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 795f084ca..788ce4956 100644 --- a/.travis.yml +++ b/.travis.yml @@ -58,6 +58,8 @@ script: - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then wget https://s3.amazonaws.com/node-webkit/v${NODE_WEBKIT}/node-webkit-v${NODE_WEBKIT}-linux-x64.tar.gz; fi; fi - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then tar xf node-webkit-v${NODE_WEBKIT}-linux-x64.tar.gz; fi; fi - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then prenwpath="$PATH"; export PATH=$(pwd)/node-webkit-v${NODE_WEBKIT}-linux-x64:$PATH; fi; fi +# on Linux 64 bit: ldd nw +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then ldd $(pwd)/node-webkit-v${NODE_WEBKIT}-linux-x64/nw; fi; fi # on Linux 64 bit: attempt node-pre-gyp package testpackage (if NODE_WEBKIT is not empty) - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then node-pre-gyp package testpackage --runtime=node-webkit --overwrite; fi; fi # on Linux 64 bit: erase used node-webkit, restore PATH @@ -85,7 +87,7 @@ script: - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then wget https://s3.amazonaws.com/node-webkit/v${NODE_WEBKIT}/node-webkit-v${NODE_WEBKIT}-linux-ia32.tar.gz; fi; fi - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then tar xf node-webkit-v${NODE_WEBKIT}-linux-ia32.tar.gz; fi; fi - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then prenwpath="$PATH"; export PATH=$(pwd)/node-webkit-v${NODE_WEBKIT}-linux-ia32:$PATH; fi; fi -# attempt ldd +# on Linux 32 bit: ldd nw - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then ldd $(pwd)/node-webkit-v${NODE_WEBKIT}-linux-ia32/nw; fi; fi # attempt node-pre-gyp package testpackage (if NODE_WEBKIT is not empty) - if [ "$NODE_WEBKIT" != "" ]; then node-pre-gyp package testpackage --runtime=node-webkit --overwrite; fi; From 6dbb9d962cebee2ca83ac2b0c9f4cb94b1156521 Mon Sep 17 00:00:00 2001 From: Mithgol Date: Thu, 13 Feb 2014 09:30:44 -0800 Subject: [PATCH 24/29] install libx11-6:i386 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow the following suggestion: http://askubuntu.com/questions/363878/how-to-install-32-bit-matlab-in-ubuntu-64-bit/363879#363879 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 788ce4956..959915c16 100644 --- a/.travis.yml +++ b/.travis.yml @@ -73,7 +73,7 @@ script: # enable 32 bit node - export PATH=$(pwd)/node-${NVER}-${platform}-x86/bin:$PATH # install 32 bit compiler toolchain and X11 -- if [[ "$platform" == 'linux' ]]; then sudo apt-get -y install gcc-multilib g++-multilib; fi +- if [[ "$platform" == 'linux' ]]; then sudo apt-get -y install gcc-multilib g++-multilib libx11-6:i386; fi # test source compile in 32 bit mode with internal libsqlite3 - if [[ "$platform" == 'linux' ]]; then CC=gcc-4.6 CXX=g++-4.6 npm install --build-from-source; else npm install --build-from-source; fi - npm test From 0713dced3484cf2e62266e2574390af1f9cc6bad Mon Sep 17 00:00:00 2001 From: Mithgol Date: Thu, 13 Feb 2014 09:45:21 -0800 Subject: [PATCH 25/29] install ia32-libs As seen in http://www.maketecheasier.com/run-32-bit-apps-in-64-bit-linux/ --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 959915c16..9fa124ffa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -73,7 +73,7 @@ script: # enable 32 bit node - export PATH=$(pwd)/node-${NVER}-${platform}-x86/bin:$PATH # install 32 bit compiler toolchain and X11 -- if [[ "$platform" == 'linux' ]]; then sudo apt-get -y install gcc-multilib g++-multilib libx11-6:i386; fi +- if [[ "$platform" == 'linux' ]]; then sudo apt-get -y install gcc-multilib g++-multilib libx11-6:i386 ia32-libs; fi # test source compile in 32 bit mode with internal libsqlite3 - if [[ "$platform" == 'linux' ]]; then CC=gcc-4.6 CXX=g++-4.6 npm install --build-from-source; else npm install --build-from-source; fi - npm test From 354766a56331ea422c536acf7959096d8ffc0bfe Mon Sep 17 00:00:00 2001 From: Mithgol Date: Thu, 13 Feb 2014 10:09:46 -0800 Subject: [PATCH 26/29] =?UTF-8?q?install=2032=20bit=20stuff=20necessary=20?= =?UTF-8?q?for=C2=A0node-webkit=2032=C2=A0bit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Used “Search the contents of packages” at http://packages.ubuntu.com/ --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9fa124ffa..c75e5d1a1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -73,7 +73,7 @@ script: # enable 32 bit node - export PATH=$(pwd)/node-${NVER}-${platform}-x86/bin:$PATH # install 32 bit compiler toolchain and X11 -- if [[ "$platform" == 'linux' ]]; then sudo apt-get -y install gcc-multilib g++-multilib libx11-6:i386 ia32-libs; fi +- if [[ "$platform" == 'linux' ]]; then sudo apt-get -y install gcc-multilib g++-multilib; fi # test source compile in 32 bit mode with internal libsqlite3 - if [[ "$platform" == 'linux' ]]; then CC=gcc-4.6 CXX=g++-4.6 npm install --build-from-source; else npm install --build-from-source; fi - npm test @@ -83,6 +83,8 @@ script: - if [ "$platform" != 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then npm install nw-gyp -g; fi; fi # rebuild node-sqlite3 for 32 bit node-webkit target (if NODE_WEBKIT is not empty) - if [ "$NODE_WEBKIT" != "" ]; then nw-gyp rebuild --target=$NODE_WEBKIT --build-from-source; fi; +# on Linux 32 bit: install 32 bit stuff necessary for node-webkit 32 bit +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libx11-6:i386 libglib2.0-0:i386 libgtk2.0-0:i386 libatk1.0-0:i386 libpangocairo-1.0-0:i386 libgdk-pixbuf2.0-0:i386 libcairo2:i386 libpango-1.0-0: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; fi; fi # on Linux 32 bit: download and unpack node-webkit, add it to PATH - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then wget https://s3.amazonaws.com/node-webkit/v${NODE_WEBKIT}/node-webkit-v${NODE_WEBKIT}-linux-ia32.tar.gz; fi; fi - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then tar xf node-webkit-v${NODE_WEBKIT}-linux-ia32.tar.gz; fi; fi From 469d879cb6760f726147c7dc4295e10a87f87d7e Mon Sep 17 00:00:00 2001 From: Mithgol Date: Thu, 13 Feb 2014 10:26:22 -0800 Subject: [PATCH 27/29] also install `libudev0:i386` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Found in “Search the contents of packages” at http://packages.ubuntu.com/ using “lucid” distribution (instead of default “saucy”). This commit runs one `sudo apt-get -y install` for every package; otherwise each failure stops the whole installation process, but that makes the debugging painful (a test takes 13 minutes to run). --- .travis.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c75e5d1a1..75ac9bba9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -84,7 +84,27 @@ script: # rebuild node-sqlite3 for 32 bit node-webkit target (if NODE_WEBKIT is not empty) - if [ "$NODE_WEBKIT" != "" ]; then nw-gyp rebuild --target=$NODE_WEBKIT --build-from-source; fi; # on Linux 32 bit: install 32 bit stuff necessary for node-webkit 32 bit -- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libx11-6:i386 libglib2.0-0:i386 libgtk2.0-0:i386 libatk1.0-0:i386 libpangocairo-1.0-0:i386 libgdk-pixbuf2.0-0:i386 libcairo2:i386 libpango-1.0-0: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; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libx11-6:i386; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libglib2.0-0:i386; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libgtk2.0-0:i386; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libatk1.0-0:i386; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libpangocairo-1.0-0:i386; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libgdk-pixbuf2.0-0:i386; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libcairo2:i386; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libpango-1.0-0:i386; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libfreetype6:i386; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libfontconfig1:i386; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libxcomposite1:i386; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libasound2:i386; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libxdamage1:i386; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libxext6:i386; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libxfixes3:i386; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libnss3:i386; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libnspr4:i386; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libgconf-2-4:i386; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libexpat1:i386; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libdbus-1-3:i386; fi; fi +- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libudev0:i386; fi; fi # on Linux 32 bit: download and unpack node-webkit, add it to PATH - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then wget https://s3.amazonaws.com/node-webkit/v${NODE_WEBKIT}/node-webkit-v${NODE_WEBKIT}-linux-ia32.tar.gz; fi; fi - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then tar xf node-webkit-v${NODE_WEBKIT}-linux-ia32.tar.gz; fi; fi From 9c555c35298302505053aec29f2bf8a86a2ce6ef Mon Sep 17 00:00:00 2001 From: Mithgol Date: Thu, 13 Feb 2014 10:40:04 -0800 Subject: [PATCH 28/29] =?UTF-8?q?do=C2=A0not=20install=20`libpangocairo:i3?= =?UTF-8?q?86`=20and=20`libpango:i386`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two packages not found → removing. --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 75ac9bba9..0d76010b6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -88,10 +88,8 @@ script: - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libglib2.0-0:i386; fi; fi - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libgtk2.0-0:i386; fi; fi - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libatk1.0-0:i386; fi; fi -- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libpangocairo-1.0-0:i386; fi; fi - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libgdk-pixbuf2.0-0:i386; fi; fi - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libcairo2:i386; fi; fi -- if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libpango-1.0-0:i386; fi; fi - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libfreetype6:i386; fi; fi - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libfontconfig1:i386; fi; fi - if [ "$platform" = 'linux' ]; then if [ "$NODE_WEBKIT" != "" ]; then sudo apt-get -y install libxcomposite1:i386; fi; fi From e367dac20dbc40a22d7e8eb339ef1a4dfec14071 Mon Sep 17 00:00:00 2001 From: Mithgol Date: Thu, 13 Feb 2014 10:53:28 -0800 Subject: [PATCH 29/29] remove `sleep 3` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The following `npm install` takes more than 3 seconds anyway; `xvfb` would already start before it becomes necessary for node-webkit. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0d76010b6..58dd0188e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,7 +36,7 @@ before_script: - if [[ `git describe --contains $( git rev-parse HEAD )` ]]; then echo yes;PUBLISH=true; fi; - if [[ $PUBLISH == true ]]; then node-pre-gyp package publish; fi # for testing node-webkit, launch a virtual display -- if [ "$NODE_WEBKIT" != "" ]; then export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start; sleep 3; fi +- if [ "$NODE_WEBKIT" != "" ]; then export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start; fi # note: `sleep 3` gives xvfb some time to start script: