Commit aab353a0 authored by Stefan Dunca's avatar Stefan Dunca

Add support for AppImage customization

Also copy all dependencies of ICU libs to cover all configurations
parent 9c6b1ea7
......@@ -132,13 +132,14 @@ LinuxBuild {
libQt5Widgets.so.5 \
libQt5XcbQpa.so.5 \
libQt5Xml.so.5 \
libicui18n.so \
libicui18n.so* \
libQt5TextToSpeech.so.5
!contains(DEFINES, __rasp_pi2__) {
# Some Qt distributions link with *.so.56
QT_LIB_LIST += \
libicudata.so \
libicuuc.so
libicudata.so* \
libicuuc.so*
}
for(QT_LIB, QT_LIB_LIST) {
......
......@@ -3,30 +3,37 @@
#set +e
if [[ $# -eq 0 ]]; then
echo 'create_linux_appimage.sh QGC_SRC_DIR QGC_RELEASE_DIR'
exit 1
echo 'create_linux_appimage.sh QGC_SRC_DIR QGC_RELEASE_DIR'
exit 1
fi
QGC_CUSTOM_APP_NAME="${QGC_CUSTOM_APP_NAME:-QGroundControl}"
QGC_CUSTOM_GENERIC_NAME="${QGC_CUSTOM_GENERIC_NAME:-Ground Control Station}"
QGC_CUSTOM_BINARY_NAME="${QGC_CUSTOM_BINARY_NAME:-QGroundControl}"
QGC_CUSTOM_LINUX_START_SH="${QGC_CUSTOM_LINUX_START_SH:-${QGC_SRC}/deploy/qgroundcontrol-start.sh}"
QGC_CUSTOM_APP_ICON="${QGC_CUSTOM_APP_ICON:-${QGC_SRC}/resources/icons/qgroundcontrol.png}"
QGC_CUSTOM_APP_ICON_NAME="${QGC_CUSTOM_APP_ICON_NAME:-QGroundControl}"
QGC_SRC=$1
if [ ! -f ${QGC_SRC}/qgroundcontrol.pro ]; then
echo 'please specify path to qgroundcontrol source as the 1st argument'
exit 1
echo "please specify path to $(QGC_CUSTOM_APP_NAME) source as the 1st argument"
exit 1
fi
QGC_RELEASE_DIR=$2
if [ ! -f ${QGC_RELEASE_DIR}/QGroundControl ]; then
echo 'please specify path to QGroundControl release as the 2nd argument'
exit 1
if [ ! -f ${QGC_RELEASE_DIR}/${QGC_CUSTOM_BINARY_NAME} ]; then
echo "please specify path to ${QGC_CUSTOM_BINARY_NAME} release as the 2nd argument"
exit 1
fi
OUTPUT_DIR=${3-`pwd`}
echo "Output directory:" ${OUTPUT_DIR}
# Generate AppImage using the binaries currently provided by the project.
# These require at least GLIBC 2.14, which older distributions might not have.
# These require at least GLIBC 2.14, which older distributions might not have.
# On the other hand, 2.14 is not that recent so maybe we can just live with it.
APP=QGroundControl
APP=${QGC_CUSTOM_BINARY_NAME}
TMPDIR=`mktemp -d`
APPDIR=${TMPDIR}/$APP".AppDir"
......@@ -58,26 +65,26 @@ cp -L libts/usr/lib/x86_64-linux-gnu/libts-0.0.so.0 ${APPDIR}/usr/lib/x86_64-lin
# copy QGroundControl release into appimage
rsync -av --exclude=*.cpp --exclude=*.h --exclude=*.o --exclude="CMake*" --exclude="*.cmake" ${QGC_RELEASE_DIR}/* ${APPDIR}/
rm -rf ${APPDIR}/package
cp ${QGC_SRC}/deploy/qgroundcontrol-start.sh ${APPDIR}/AppRun
cp ${QGC_CUSTOM_LINUX_START_SH} ${APPDIR}/AppRun
# copy icon
cp ${QGC_SRC}/resources/icons/qgroundcontrol.png ${APPDIR}/
cp ${QGC_CUSTOM_APP_ICON} ${APPDIR}/
cat > ./QGroundControl.desktop <<\EOF
[Desktop Entry]
Type=Application
Name=QGroundControl
GenericName=Ground Control Station
Name=${QGC_CUSTOM_APP_NAME}
GenericName=${QGC_CUSTOM_GENERIC_NAME}
Comment=UAS ground control station
Icon=QGroundControl
Icon=${QGC_CUSTOM_APP_ICON_NAME}
Exec=AppRun
Terminal=false
Categories=Utility;
Keywords=computer;
EOF
VERSION=$(strings ${APPDIR}/QGroundControl | grep '^v[0-9*]\.[0-9*].[0-9*]' | head -n 1)
echo QGC Version: ${VERSION}
VERSION=$(strings ${APPDIR}/${QGC_CUSTOM_BINARY_NAME} | grep '^v[0-9*]\.[0-9*].[0-9*]' | head -n 1)
echo ${QGC_CUSTOM_APP_NAME} Version: ${VERSION}
# Go out of AppImage
cd ${TMPDIR}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment