Skip to content

Commit

Permalink
Syntax fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAssassin committed Oct 13, 2018
1 parent bb0b2d5 commit 0843709
Showing 1 changed file with 20 additions and 26 deletions.
46 changes: 20 additions & 26 deletions travis/test.sh
Expand Up @@ -8,7 +8,7 @@ if [ "$ARCH" == "" ]; then
exit 1
fi

TARGET=$1
TARGET="$1"
if [ "$TARGET" == "" ]; then
echo 'Error: $TARGET is not set'
exit 1
Expand All @@ -33,68 +33,62 @@ cleanup () {
trap cleanup EXIT

wget -N https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-"$ARCH".AppImage
export LINUXDEPLOY_BIN=${PWD}/linuxdeploy-"$ARCH".AppImage
chmod +x ${LINUXDEPLOY_BIN}
export LINUXDEPLOY_BIN="$PWD"/linuxdeploy-"$ARCH".AppImage
chmod +x "$LINUXDEPLOY_BIN"

pushd "$BUILD_DIR"

git clone --depth=1 https://github.com/linuxdeploy/linuxdeploy-plugin-qt-examples.git

source /opt/qt510/bin/qt510-env.sh || echo "" # hack required, otherwise the script will end whit 1
mkdir -p $HOME/.config/qtchooser
echo "${QTDIR}/bin" > $HOME/.config/qtchooser/qt5.10.conf
echo "${QTDIR}/lib" >> $HOME/.config/qtchooser/qt5.10.conf
mkdir -p "$HOME"/.config/qtchooser
echo "${QTDIR}/bin" > "$HOME"/.config/qtchooser/qt5.10.conf
echo "${QTDIR}/lib" >> "$HOME"/.config/qtchooser/qt5.10.conf

export CMAKE_PREFIX_PATH=$QTDIR/lib/cmake
export CMAKE_PREFIX_PATH="$QTDIR"/lib/cmake
export QT_SELECT=qt5.10


## Build projects
pushd linuxdeploy-plugin-qt-examples/QtQuickControls2Application
# This env variable is used by the qt plugin to search the qml sources in other paths than the AppDir
# it's mandatory to use when your qml files are embed as Qt resources into the main binary.
export QML_SOURCES_PATHS="${PWD}/src"

# This env variable is used by the qt plugin to search the qml modules in other paths than the default
# Qt qml dir.
export QML_MODULES_PATHS="${QML_MODULES_PATHS}"
export QML_SOURCES_PATHS="$PWD"/src

mkdir build
pushd build
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr || exit 1
DESTDIR=${PWD}/AppDir make install || exit 1

DESTDIR="$PWD"/AppDir make install || exit 1

${LINUXDEPLOY_BIN} --appdir ${PWD}/AppDir --plugin qt --output appimage || return 1
mv -v *AppImage ${BUILD_DIR} || return 1
"$LINUXDEPLOY_BIN" --appdir "$PWD"/AppDir --plugin qt --output appimage || return 1
mv -v *AppImage "$BUILD_DIR" || return 1
popd
popd

pushd linuxdeploy-plugin-qt-examples/QtWebEngineApplication
export QML_SOURCES_PATHS="${PWD}"
export QML_SOURCES_PATHS="$PWD"

mkdir build
pushd build
qmake CONFIG+=release PREFIX=/usr ../QtWebEngineApplication.pro || exit 1
INSTALL_ROOT=${PWD}/AppDir make install || exit 1
INSTALL_ROOT="$PWD"/AppDir make install || exit 1

# Include libnss related files
mkdir -p ${PWD}/AppDir/usr/lib/
cp -r /usr/lib/x86_64-linux-gnu/nss ${PWD}/AppDir/usr/lib/
mkdir -p "$PWD"/AppDir/usr/lib/
cp -r /usr/lib/x86_64-linux-gnu/nss "$PWD"/AppDir/usr/lib/

${LINUXDEPLOY_BIN} --appdir ${PWD}/AppDir --plugin qt --output appimage || return 1
mv -v *AppImage ${BUILD_DIR} || return 1
"$LINUXDEPLOY_BIN" --appdir "$PWD"/AppDir --plugin qt --output appimage || return 1
mv -v *AppImage "$BUILD_DIR" || return 1
popd
popd

pushd linuxdeploy-plugin-qt-examples/QtWidgetsApplication
mkdir build
pushd build
qmake CONFIG+=release PREFIX=/usr ../QtWidgetsApplication.pro || exit 1
INSTALL_ROOT=${PWD}/AppDir make install || exit 1

INSTALL_ROOT="$PWD"/AppDir make install || exit 1

${LINUXDEPLOY_BIN} --appdir ${PWD}/AppDir --plugin qt --output appimage || return 1
mv -v *AppImage ${BUILD_DIR} || return 1
"$LINUXDEPLOY_BIN" --appdir "$PWD"/AppDir --plugin qt --output appimage || return 1
mv -v *AppImage "$BUILD_DIR" || return 1
popd
popd

0 comments on commit 0843709

Please sign in to comment.