From 9f3f90d9242d4f3c275424607e1b527c83ded109 Mon Sep 17 00:00:00 2001 From: Benjamin Winkler Date: Tue, 25 Nov 2014 06:50:49 +0100 Subject: [PATCH 1/3] fix compiling against node-webkit v0.11.0 + recent atom-shell >= 0.18.0 replaced occurences of v8::Object::Set with 3 arguments with v8::Object::ForceSet --- src/database.cc | 4 ++-- src/macros.h | 4 ++-- src/statement.cc | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/database.cc b/src/database.cc index 27e4252e9..e027854b4 100644 --- a/src/database.cc +++ b/src/database.cc @@ -131,8 +131,8 @@ NAN_METHOD(Database::New) { Database* db = new Database(); db->Wrap(args.This()); - args.This()->Set(NanNew("filename"), args[0]->ToString(), ReadOnly); - args.This()->Set(NanNew("mode"), NanNew(mode), ReadOnly); + args.This()->ForceSet(NanNew("filename"), args[0]->ToString(), ReadOnly); + args.This()->ForceSet(NanNew("mode"), NanNew(mode), ReadOnly); // Start opening the database. OpenBaton* baton = new OpenBaton(db, callback, *filename, mode); diff --git a/src/macros.h b/src/macros.h index c98a86bf2..42e57b275 100644 --- a/src/macros.h +++ b/src/macros.h @@ -56,14 +56,14 @@ const char* sqlite_authorizer_string(int type); #define DEFINE_CONSTANT_INTEGER(target, constant, name) \ - (target)->Set( \ + (target)->ForceSet( \ NanNew(#name), \ NanNew(constant), \ static_cast(ReadOnly | DontDelete) \ ); #define DEFINE_CONSTANT_STRING(target, constant, name) \ - (target)->Set( \ + (target)->ForceSet( \ NanNew(#name), \ NanNew(constant), \ static_cast(ReadOnly | DontDelete) \ diff --git a/src/statement.cc b/src/statement.cc index 4f43048ad..ab14411f5 100644 --- a/src/statement.cc +++ b/src/statement.cc @@ -102,7 +102,7 @@ NAN_METHOD(Statement::New) { Database* db = ObjectWrap::Unwrap(args[0]->ToObject()); Local sql = Local::Cast(args[1]); - args.This()->Set(NanNew("sql"), sql, ReadOnly); + args.This()->ForceSet(NanNew("sql"), sql, ReadOnly); Statement* stmt = new Statement(db); stmt->Wrap(args.This()); From d6a95d5178854d4b2120bbed62db2926735ce2ab Mon Sep 17 00:00:00 2001 From: Benjamin Winkler Date: Tue, 25 Nov 2014 06:58:05 +0100 Subject: [PATCH 2/3] add ci for node-webkit v0.11.0 --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 837530ab9..c1566af18 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,8 @@ env: - NODE_WEBKIT="0.8.6" TARGET_ARCH="x64" - NODE_WEBKIT="0.10.5" TARGET_ARCH="ia32" - NODE_WEBKIT="0.10.5" TARGET_ARCH="x64" + - NODE_WEBKIT="0.11.0" TARGET_ARCH="ia32" + - NODE_WEBKIT="0.11.0" TARGET_ARCH="x64" global: - secure: PifMOSnn+mWR1RUptXse+fLvWiTrzg0R/mazO7RWhXHWBKv0uAJ/qV3dI0GIRBLtjG10Iy+tT5RNh1TIbBzB9Y67wMcGvylUPG1+3EOKoBMEPnOD9AgCEQw4SOXfGPx0cq2N6ueSKieCgu1yKN9Wq7XCbE+zTk/DiRNIdLirVoo= - secure: cc4esJY1vPXL31IeumAJoKWDDO2BTGFiltwfO1jbTbiV7QT911QUjTUasxXIVpOaHNCpxSTyevPwwTWfzt2EtF92Lli+qhQ2bbzMiDSBZstSrHdAe62Ai2M1oYYUwk/0cABB/2nO9uRyYwITCxpTSNzZBrYhn3C29WqBhPeVDmM= From ccdf4f12e19bf19efe15d459589cf11cf0168b09 Mon Sep 17 00:00:00 2001 From: Benjamin Winkler Date: Mon, 8 Dec 2014 22:29:21 +0100 Subject: [PATCH 3/3] fix building for node-webkit v0.11.0 on ia32 --- scripts/build_against_node_webkit.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/scripts/build_against_node_webkit.sh b/scripts/build_against_node_webkit.sh index 7aa96c461..9525db40f 100755 --- a/scripts/build_against_node_webkit.sh +++ b/scripts/build_against_node_webkit.sh @@ -43,13 +43,26 @@ else 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 + CC=gcc-4.8 + CXX=g++-4.8 + COMPILER_PACKAGES="gcc-4.8-multilib g++-4.8-multilib" + else + CC=gcc-4.6 + CXX=g++-4.6 + 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 gcc-multilib g++-multilib 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 + 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 - CC=gcc-4.6 CXX=g++-4.6 npm install --build-from-source ${GYP_ARGS} + npm install --build-from-source ${GYP_ARGS} else npm install --build-from-source ${GYP_ARGS} fi