QGCInstaller.pri 4.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
# -------------------------------------------------
# QGroundControl - Micro Air Vehicle Groundstation
# Please see our website at <http://qgroundcontrol.org>
# Maintainer:
# Lorenz Meier <lm@inf.ethz.ch>
# (c) 2009-2014 QGroundControl Developers
# This file is part of the open groundstation project
# QGroundControl is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# QGroundControl is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with QGroundControl. If not, see <http://www.gnu.org/licenses/>.
# -------------------------------------------------

installer {
21
    DEFINES += QGC_INSTALL_RELEASE
22
    MacBuild {
23 24 25
        VideoEnabled {
            # Install the gstreamer framework
            # This will:
dogmaphobic's avatar
dogmaphobic committed
26
            # Copy from the original distibution into DESTDIR/gstwork (if not already there)
27 28 29 30 31
            # Prune the framework, removing stuff we don't need
            # Relocate all dylibs so they can work under @executable_path/...
            # Copy the result into the app bundle
            # Make sure qgroundcontrol can find them
            message("Preparing GStreamer Framework")
dogmaphobic's avatar
dogmaphobic committed
32
            QMAKE_POST_LINK += && $$BASEDIR/tools/prepare_gstreamer_framework.sh $${OUT_PWD}/gstwork/ $${DESTDIR}/$${TARGET}.app $${TARGET}
33 34 35
        } else {
            message("Skipping GStreamer Framework")
        }
36 37 38
        # We cd to release directory so we can run macdeployqt without a path to the
        # qgroundcontrol.app file. If you specify a path to the .app file the symbolic
        # links to plugins will not be created correctly.
Daniel Agar's avatar
Daniel Agar committed
39
        QMAKE_POST_LINK += && mkdir -p $${DESTDIR}/package
dogmaphobic's avatar
dogmaphobic committed
40
        QMAKE_POST_LINK += && cd $${DESTDIR} && $$dirname(QMAKE_QMAKE)/macdeployqt qgroundcontrol.app -verbose=2 -qmldir=$${BASEDIR}/src
dogmaphobic's avatar
dogmaphobic committed
41
        QMAKE_POST_LINK += && cd $${OUT_PWD}
42
        QMAKE_POST_LINK += && hdiutil create -layout SPUD -srcfolder $${DESTDIR}/qgroundcontrol.app -volname QGroundControl $${DESTDIR}/package/qgroundcontrol.dmg
43 44
    }
    WindowsBuild {
dogmaphobic's avatar
dogmaphobic committed
45 46 47 48
        # The pdb moving command are commented out for now since we are including the .pdb in the installer. This makes it much
        # easier to debug user crashes.
        #QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY $${DESTDIR_WIN}\\qgroundcontrol.pdb
        #QMAKE_POST_LINK += $$escape_expand(\\n) del $${DESTDIR_WIN}\\qgroundcontrol.pdb
dogmaphobic's avatar
dogmaphobic committed
49
        QMAKE_POST_LINK += $$escape_expand(\\n) cd $$BASEDIR_WIN && $$quote("\"C:\\Program Files \(x86\)\\NSIS\\makensis.exe\"" /NOCD "\"/XOutFile $${DESTDIR_WIN}\\qgroundcontrol-installer.exe\"" "$$BASEDIR_WIN\\deploy\\qgroundcontrol_installer.nsi")
dogmaphobic's avatar
dogmaphobic committed
50 51
        #QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY qgroundcontrol.pdb $${DESTDIR_WIN}
        #QMAKE_POST_LINK += $$escape_expand(\\n) del qgroundcontrol.pdb
52
        OTHER_FILES += deploy/qgroundcontrol_installer.nsi
53
    }
54
    LinuxBuild {
dogmaphobic's avatar
dogmaphobic committed
55
        #-- TODO: This uses hardcoded paths. It should use $${DESTDIR}
56
        QMAKE_POST_LINK += && mkdir -p release/package
dogmaphobic's avatar
dogmaphobic committed
57
        QMAKE_POST_LINK += && tar -cjf release/package/qgroundcontrol.tar.bz2 release --exclude='package' --transform 's/release/qgroundcontrol/'
58
    }
59
    AndroidBuild {
dogmaphobic's avatar
dogmaphobic committed
60
        #-- TODO: This uses hardcoded paths. It should use $${DESTDIR}
Daniel Agar's avatar
Daniel Agar committed
61 62 63 64
        QMAKE_POST_LINK += && mkdir -p $${DESTDIR}/package
        QMAKE_POST_LINK += && make install INSTALL_ROOT=$${DESTDIR}/android-build/
        QMAKE_POST_LINK += && androiddeployqt --input android-libqgroundcontrol.so-deployment-settings.json --output $${DESTDIR}/android-build --deployment bundled --gradle --sign $${BASEDIR}/android/android_release.keystore dagar --storepass $$(ANDROID_STOREPASS)
        QMAKE_POST_LINK += && cp $${DESTDIR}/android-build/build/outputs/apk/android-build-release-signed.apk $${DESTDIR}/package/qgroundcontrol.apk
65
    }
66
}