Skip to content

Commit 0c20f03

Browse files
committed
revert to build from 0.3.0
1 parent a24054b commit 0c20f03

File tree

4 files changed

+120
-137
lines changed

4 files changed

+120
-137
lines changed

build.sh

Lines changed: 0 additions & 87 deletions
This file was deleted.

package-lock.json

Lines changed: 36 additions & 44 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"progress": "~2.0.3"
1414
},
1515
"devDependencies": {
16-
"aws-sdk": "2.x",
16+
"aws-sdk": "^2.562.0",
1717
"electron-rebuild": "^1.8.6",
1818
"eslint": "^6.6.0",
1919
"eslint-config-standard": "^14.1.0",
@@ -46,7 +46,6 @@
4646
"url": "https://github.com/openwebcad/node-occ.git"
4747
},
4848
"scripts": {
49-
"preinstall": "node build.js",
5049
"install": "node-pre-gyp install --fallback-to-build",
5150
"test": "mocha -R spec",
5251
"lint": "eslint lib test bin",

prepare_node.sh

Lines changed: 83 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,85 @@
11
#!/bin/bash
2+
##########################################################################################
3+
#
4+
#
5+
##########################################################################################
6+
export OCCT_VERSION=7.2.0
7+
export OCCT_PACKAGE=occt-${OCCT_VERSION}
8+
if [ `uname` == "Darwin" ];then
9+
export OCCT_TARFILE=${OCCT_PACKAGE}-osx.tgz
10+
else
11+
export OCCT_TARFILE=${OCCT_PACKAGE}-linux.tgz
12+
fi
13+
export OCCT_TARFILE_URL="https://github.com/OpenWebCAD/occt_builder/releases/download/${OCCT_VERSION}/${OCCT_TARFILE}"
214

3-
# This is a temporary file for Travis builds.
4-
# Once Travis is correctly set up for this project, this file
5-
# will be removed.
6-
./build.sh
15+
echo " OCCT_TARFILE = " ${OCCT_TARFILE}
16+
echo " OCCT_TARFILE_URL = " ${OCCT_TARFILE_URL}
17+
18+
echo "-------------------------- OCCT TAR FILE ${OCCT_TARFILE}"
19+
ls ${OCCT_TARFILE}
20+
if [ ! -f "${OCCT_TARFILE}" ]; then
21+
wget -q ${OCCT_TARFILE_URL}
22+
fi
23+
if [ ! -d "${OCCT_PACKAGE}" ]; then
24+
echo "extracting package ${OCCT_TARFILE}"
25+
tar -xf ${OCCT_TARFILE}
26+
fi
27+
28+
export LD_LIBRARY_PATH=`pwd`/${OCCT_PACKAGE}/lib:$LD_LIBRARY_PATH
29+
30+
export VERSION_FILE=`pwd`/${OCCT_PACKAGE}/include/opencascade/Standard_Version.hxx
31+
grep -i "#define OCC_VERSION_COMPLETE" ${VERSION_FILE} ;
32+
lscpu ;
33+
cmake --version ;
34+
35+
#set NPROC=`nproc`
36+
# on linux:
37+
# NPROC=$(grep "^core id" /proc/cpuinfo | sort -u | wc -l)
38+
# on MacOS
39+
# NPROC=$(sysctl -n hw.ncpu)
40+
# on both
41+
NPROC=$(node -p "os.cpus().length")
42+
43+
echo "Number of processors =" ${NPROC}
44+
45+
46+
PATH=$PATH:`pwd`/node_modules/.bin
47+
uname -a
48+
echo "NODE PATH = `which node`"
49+
echo "NODE VERSION = `node --version`"
50+
echo "NODE = `node -p 'process.platform + "@" + process.arch'`"
51+
echo "NPM VERSION = `npm --version`"
52+
53+
54+
# figure out if we should publish
55+
PUBLISH_BINARY=false
56+
57+
# if we are building a tag then publish
58+
echo $TRAVIS_BRANCH
59+
export CURRENT BRANCH=`git describe --tags --always HEAD`
60+
echo "CURRENT BRANCH = $CURRENT_BRANCH"
61+
if [[ "$TRAVIS_BRANCH" == "$CURRENT_BRANCH" ]]; then PUBLISH_BINARY=true; fi;
62+
63+
64+
echo "Publishing native platform Binary Package? ->" $PUBLISH_BINARY
65+
66+
# Cleanup the output of npm
67+
npm config set progress false
68+
npm config set spin false
69+
70+
if [[ ! -z $TRAVIS_ELECTRON_VERSION ]]; then
71+
if [[ $TRAVIS_OS_NAME == "linux" ]]; then
72+
export DISPLAY=:99.0
73+
sh -e /etc/init.d/xvfb start
74+
fi
75+
export npm_config_target=$TRAVIS_ELECTRON_VERSION
76+
export npm_config_arch=$ARCH
77+
export npm_config_disturl=https://atom.io/download/atom-shell
78+
export npm_config_runtime=electron
79+
npm install --arch=$ARCH electron@$TRAVIS_ELECTRON_VERSION
80+
npm install electron-mocha
81+
echo "installed Electron $TRAVIS_ELECTRON_VERSION"
82+
fi
83+
84+
# git submodule update --depth 50 --init --recursive
85+
npm install --build-from-source

0 commit comments

Comments
 (0)