Skip to content
This repository was archived by the owner on Sep 8, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions dev_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,12 @@ pip install --upgrade virtualenv
# removing the pip2 explicit usage here for consistency with the above use.
pip install -r requirements.txt

if [[ $(free|awk '/^Mem:/{print $2}') -lt 1572864 ]] ; then
CORES=1
else
CORES=$(nproc)
SYSMEM=$(free|awk '/^Mem:/{print $2}')
MAXCORES=$(($SYSMEM / 512000))
CORES=$(nproc)

if [[ ${MAXCORES} -lt ${CORES} ]]; then
CORES=${MAXCORES}
fi
echo "Building with $CORES cores."

Expand All @@ -97,10 +99,10 @@ cd "${TOP}"

if [[ "$build_mimic" == 'y' ]] || [[ "$build_mimic" == 'Y' ]]; then
echo "WARNING: The following can take a long time to run!"
"${TOP}/scripts/install-mimic.sh"
"${TOP}/scripts/install-mimic.sh" " ${CORES}"
else
echo "Skipping mimic build."
fi

# install pygtk for desktop_launcher skill
"${TOP}/scripts/install-pygtk.sh"
"${TOP}/scripts/install-pygtk.sh" " ${CORES}"
6 changes: 3 additions & 3 deletions scripts/install-mimic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -Ee

MIMIC_DIR=mimic
CORES=$(nproc)
CORES=$1
MIMIC_VERSION=1.2.0.2

# for ubuntu precise in travis, that does not provide pkg-config:
Expand All @@ -16,7 +16,7 @@ if [ ! -d ${MIMIC_DIR} ]; then
cd ${MIMIC_DIR}
./autogen.sh
./configure --with-audio=alsa --enable-shared --prefix=$(pwd)
make -j$CORES
make -j${CORES}
make install
else
# ensure mimic is up to date
Expand All @@ -28,6 +28,6 @@ else
./autogen.sh
./configure --with-audio=alsa --enable-shared --prefix=$(pwd)
make clean
make -j$CORES
make -j${CORES}
make install
fi
8 changes: 4 additions & 4 deletions scripts/install-pygtk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fi

# Setup variables.
CACHE="/tmp/install-pygtk-$$"
CORES=$(nproc)
CORES=$1

# Make temp directory.
mkdir -p $CACHE
Expand All @@ -29,7 +29,7 @@ then
( cd py2cairo*
autoreconf -ivf
./configure --prefix=$VIRTUAL_ENV --disable-dependency-tracking
make -j$CORES
make -j${CORES}
make install
)
)
Expand All @@ -50,7 +50,7 @@ then
tar -xvf pygobject.tar.bz2
( cd pygobject*
./configure --prefix=$VIRTUAL_ENV --disable-introspection
make -j$CORES
make -j${CORES}
make install
)
)
Expand All @@ -71,7 +71,7 @@ then
tar -xvf pygtk.tar.bz2
( cd pygtk-*
./configure --prefix=$VIRTUAL_ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$VIRTUAL_ENV/lib/pkgconfig
make -j$CORES
make -j${CORES}
make install
)
)
Expand Down