diff --git a/.travis.yml b/.travis.yml index 7a6f1077..5aa9400e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,4 +5,4 @@ cache: apt before_script: - sudo apt-get -y install build-essential chrpath git-core libssl-dev libfontconfig1-dev - chmod +x ./build.sh -script: ./build.sh --confirm +script: ./build.sh --confirm --silent diff --git a/build.sh b/build.sh index 188f4e75..b01e8d16 100755 --- a/build.sh +++ b/build.sh @@ -33,6 +33,8 @@ if [[ "$COMPILE_JOBS" -gt 8 ]]; then COMPILE_JOBS=8 fi +SILENT='' + until [ -z "$1" ]; do case $1 in "--qt-config") @@ -50,12 +52,17 @@ until [ -z "$1" ]; do "--confirm") BUILD_CONFIRM=1 shift;; + "--silent") + SILENT='--silent' + QT_CFG+=" -silent" + shift;; "--help") echo "Usage: $0 [--qt-config CONFIG] [--jobs NUM]" echo echo " --confirm Silently confirm the build." echo " --qt-config CONFIG Specify extra config options to be used when configuring Qt" echo " --jobs NUM How many parallel compile jobs to use. Defaults to 4." + echo " --silent Produce less verbose output." echo exit 0 ;; @@ -89,6 +96,20 @@ EOF echo fi -cd src/qt && ./preconfig.sh --jobs $COMPILE_JOBS --qt-config "$QT_CFG" && cd ../.. +echo +echo "Building PhantomJS. Please wait..." +echo + +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown + +echo "System architecture... ($UNAME_SYSTEM $UNAME_RELEASE $UNAME_MACHINE)" +echo + +cd src/qt && ./preconfig.sh --jobs $COMPILE_JOBS --qt-config "$QT_CFG" $SILENT && cd ../.. + +echo "Building main PhantomJS application. Please wait..." +echo src/qt/bin/qmake $QMAKE_ARGS make -j$COMPILE_JOBS diff --git a/src/qt/preconfig.sh b/src/qt/preconfig.sh index 7cfafa08..e573d7ed 100755 --- a/src/qt/preconfig.sh +++ b/src/qt/preconfig.sh @@ -78,6 +78,8 @@ QT_CFG+=' -D QT_NO_STYLE_CLEANLOOKS' QT_CFG+=' -D QT_NO_STYLE_MOTIF' QT_CFG+=' -D QT_NO_STYLE_PLASTIQUE' +SILENT='' + until [ -z "$1" ]; do case $1 in "--qt-config") @@ -88,11 +90,16 @@ until [ -z "$1" ]; do shift COMPILE_JOBS=$1 shift;; + "--silent") + SILENT='-s' + QT_CFG+=" -silent" + shift;; "--help") echo "Usage: $0 [--qt-config CONFIG] [--jobs NUM]" echo echo " --qt-config CONFIG Specify extra config options to be used when configuring Qt" echo " --jobs NUM How many parallel compile jobs to use. Defaults to 4." + echo " --silent Produce less verbose output." echo exit 0 ;; @@ -106,10 +113,18 @@ done # For parallelizing the bootstrapping process, e.g. qmake and friends. export MAKEFLAGS=-j$COMPILE_JOBS -./configure -prefix $PWD $QT_CFG -make -j$COMPILE_JOBS +if [ -z "$SILENT" ]; then + ./configure -prefix $PWD $QT_CFG +else + echo "Setting up Qt. Please wait..." + ./configure -prefix $PWD $QT_CFG &> /dev/null +fi + +echo +echo "Building Qt and WebKit. Please wait..." +make -j$COMPILE_JOBS $SILENT # Build text codecs pushd src/plugins/codecs/ -make -j$COMPILE_JOBS +make -j$COMPILE_JOBS $SILENT popd