Skip to content

Commit

Permalink
Deploy custom start script for custom build
Browse files Browse the repository at this point in the history
  • Loading branch information
akontsevich committed May 28, 2020
1 parent 774154e commit 771e60a
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 5 deletions.
12 changes: 8 additions & 4 deletions QGCSetup.pri
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ LinuxBuild {
QMAKE_POST_LINK += && mkdir -p $$DESTDIR/Qt/libs && mkdir -p $$DESTDIR/Qt/plugins

# QT_INSTALL_LIBS
QT_LIB_LIST = \
QT_LIB_LIST += \
libQt5Charts.so.5 \
libQt5Core.so.5 \
libQt5DBus.so.5 \
Expand Down Expand Up @@ -160,7 +160,11 @@ LinuxBuild {
}

# QGroundControl start script
QMAKE_POST_LINK += && $$QMAKE_COPY $$BASEDIR/deploy/qgroundcontrol-start.sh $$DESTDIR
QMAKE_POST_LINK += && $$QMAKE_COPY $$BASEDIR/deploy/qgroundcontrol.desktop $$DESTDIR
QMAKE_POST_LINK += && $$QMAKE_COPY $$BASEDIR/resources/icons/qgroundcontrol.png $$DESTDIR
contains (CONFIG, QGC_DISABLE_CUSTOM_BUILD) | !exists($$PWD/custom/custom.pri) {
QMAKE_POST_LINK += && $$QMAKE_COPY $$BASEDIR/deploy/qgroundcontrol-start.sh $$DESTDIR
QMAKE_POST_LINK += && $$QMAKE_COPY $$BASEDIR/deploy/qgroundcontrol.desktop $$DESTDIR
QMAKE_POST_LINK += && $$QMAKE_COPY $$BASEDIR/resources/icons/qgroundcontrol.png $$DESTDIR
} else {
include($$PWD/custom/custom_deploy.pri)
}
}
8 changes: 8 additions & 0 deletions custom-example/custom.pri
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ RESOURCES += \
QML_IMPORT_PATH += \
$$PWD/res

LinuxBuild {

# Our QT_INSTALL_LIBS
QT_LIB_LIST += \
libQt5VirtualKeyboard.so.5 \

}

# Our own, custom sources
SOURCES += \
$$PWD/src/CustomPlugin.cc \
Expand Down
3 changes: 3 additions & 0 deletions custom-example/custom_deploy.pri
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
QMAKE_POST_LINK += && $$QMAKE_COPY $$PWD/deploy/qgroundcontrol-start.sh $$DESTDIR
QMAKE_POST_LINK += && $$QMAKE_COPY $$PWD/deploy/qgroundcontrol.desktop $$DESTDIR
QMAKE_POST_LINK += && $$QMAKE_COPY $$PWD/res/Images/CustomAppIcon.png $$DESTDIR
3 changes: 2 additions & 1 deletion custom-example/deploy/qgroundcontrol-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ HERE="$(dirname "$(readlink -f "${0}")")"
export LD_LIBRARY_PATH="${HERE}/usr/lib/x86_64-linux-gnu":"${HERE}/Qt/libs":$LD_LIBRARY_PATH
export QML2_IMPORT_PATH="${HERE}/Qt/qml"
export QT_PLUGIN_PATH="${HERE}/Qt/plugins"
export QT_IM_MODULE=qtvirtualkeyboard

# hack until icon issue with AppImage is resolved
mkdir -p ~/.icons && \cp -f ${HERE}/qgroundcontrol.png ~/.icons

"${HERE}/CustomQGC" "$@"
"${HERE}/CustomQGroundControl" "$@"
9 changes: 9 additions & 0 deletions custom-example/deploy/qgroundcontrol.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Desktop Entry]
Type=Application
Name=CustomQGroundControl
GenericName=Ground Control Station
Comment=UAS ground control station
Icon=CustomAppIcon
Exec=qgroundcontrol-start.sh
Terminal=false
Categories=Utility;

0 comments on commit 771e60a

Please sign in to comment.