Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sqlite3
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
node-sqlite3
Commits
197b53f2
Commit
197b53f2
authored
Jun 28, 2014
by
Dane Springmeyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
publishing fixes [publish binary]
parent
ffc9eab6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
14 deletions
+20
-14
build_against_node.sh
scripts/build_against_node.sh
+1
-0
build_against_node_webkit.sh
scripts/build_against_node_webkit.sh
+19
-14
No files found.
scripts/build_against_node.sh
View file @
197b53f2
...
...
@@ -60,6 +60,7 @@ if [[ $(uname -s) == 'Linux' ]]; then
# install 32 bit compiler toolchain and X11
# test source compile in 32 bit mode with internal libsqlite3
CC
=
gcc-4.6
CXX
=
g++-4.6 npm install
--build-from-source
node-pre-gyp package testpackage
npm
test
publish
make clean
...
...
scripts/build_against_node_webkit.sh
View file @
197b53f2
...
...
@@ -17,38 +17,42 @@ npm install nw-gyp
OLD_PATH
=
"
$PATH
"
GYP_ARGS
=
"--runtime=node-webkit --target=
$NODE_WEBKIT
"
if
[[
$(
uname
-s
)
==
'Darwin'
]]
;
then
GYP_ARGS
=
"
${
GYP_ARGS
}
--target_arch=ia32"
fi
if
[[
$(
uname
-s
)
==
'Darwin'
]]
;
then
npm install
--build-from-source
--target_arch
=
ia32
--runtime
=
node-webkit
--target
=
$NODE_WEBKIT
export
NW_DOWNLOAD
=
node-webkit-v
${
NODE_WEBKIT
}
-osx-ia32
wget http://dl.node-webkit.org/v
${
NODE_WEBKIT
}
/
${
NW_DOWNLOAD
}
.zip
unzip
${
NW_DOWNLOAD
}
.zip
export
PATH
=
$(
pwd
)
/
${
NW_DOWNLOAD
}
:
$PATH
else
export
NW_DOWNLOAD
=
node-webkit-v
${
NODE_WEBKIT
}
-linux-x64
# for testing node-webkit, launch a virtual display
export
DISPLAY
=
:99.0
sh
-e
/etc/init.d/xvfb start +extension RANDR
npm install
--build-from-source
--runtime
=
node-webkit
--target
=
$NODE_WEBKIT
export
NW_DOWNLOAD
=
node-webkit-v
${
NODE_WEBKIT
}
-linux-x64
wget http://dl.node-webkit.org/v
${
NODE_WEBKIT
}
/
${
NW_DOWNLOAD
}
.tar.gz
tar
xf
${
NW_DOWNLOAD
}
.tar.gz
export
PATH
=
$(
pwd
)
/
${
NW_DOWNLOAD
}
:
$PATH
fi
npm install
--build-from-source
${
GYP_ARGS
}
export
PATH
=
$(
pwd
)
/
${
NW_DOWNLOAD
}
:
$PATH
# test the package
node-pre-gyp package testpackage
--runtime
=
node-webkit
--target
=
$NODE_WEBKIT
node-pre-gyp package testpackage
${
GYP_ARGS
}
PUBLISH_BINARY
=
false
if
test
"
${
COMMIT_MESSAGE
#*
'[publish binary]'
}
"
!=
"
$COMMIT_MESSAGE
"
;
then
node-pre-gyp publish
--runtime
=
node-webkit
--target
=
$NODE_WEBKIT
node-pre-gyp info
--runtime
=
node-webkit
--target
=
$NODE_WEBKIT
node-pre-gyp clean
--runtime
=
node-webkit
--target
=
$NODE_WEBKIT
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
--runtime
=
node-webkit
--target
=
$NODE_WEBKIT
--fallback-to-build
=
false
>
/dev/null
)
$?
||
true
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
--runtime
=
node-webkit
--target
=
$NODE_WEBKIT
;
false
;
fi
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
--runtime
=
node-webkit
--target
=
$NODE_WEBKIT
node-pre-gyp clean
${
GYP_ARGS
}
fi
# restore PATH
...
...
@@ -58,7 +62,7 @@ rm -rf ${NW_DOWNLOAD}
# TODO linux 32 bit
:
'
# rebuild node-sqlite3 for 32 bit node-webkit target (if NODE_WEBKIT is not empty)
node-pre-gyp rebuild
--runtime=node-webkit --target=$NODE_WEBKIT
node-pre-gyp rebuild
${GYP_ARGS}
# on Linux 32 bit: install 32 bit stuff necessary for node-webkit 32 bit
sudo apt-get -y install libx11-6:i386
sudo apt-get -y install libxtst6:i386
...
...
@@ -89,7 +93,7 @@ export PATH=$(pwd)/node-webkit-v${NODE_WEBKIT}-linux-ia32:$PATH
# on Linux 32 bit: ldd nw
ldd $(pwd)/node-webkit-v${NODE_WEBKIT}-linux-ia32/nw
# attempt node-pre-gyp package testpackage (if NODE_WEBKIT is not empty)
node-pre-gyp package testpackage publish
--runtime=node-webkit --target=$NODE_WEBKIT
node-pre-gyp package testpackage publish
${GYP_ARGS}
# on Linux 32 bit: erase used node-webkit, restore PATH
export PATH="$OLD_PATH"; rm -rf node-webkit-v${NODE_WEBKIT}-linux-ia32
'
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment