diff --git a/QGCInstaller.pri b/QGCInstaller.pri new file mode 100644 index 0000000000000000000000000000000000000000..62bf987653613ccb2bed4fd7f06c9c2bb3150f2c --- /dev/null +++ b/QGCInstaller.pri @@ -0,0 +1,28 @@ +# ------------------------------------------------- +# QGroundControl - Micro Air Vehicle Groundstation +# Please see our website at +# Maintainer: +# Lorenz Meier +# (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 . +# ------------------------------------------------- + +installer { + MacBuild { + QMAKE_POST_LINK += && macdeployqt $${DESTDIR}/qgroundcontrol.app -dmg + } + + WindowsBuild { + QMAKE_POST_LINK += $$escape_expand(\\n) $$quote("\"C:\\Program Files \(x86\)\\NSIS\\makensis.exe\"" /NOCD "\"/XOutFile $${DESTDIR_WIN}\\qgroundcontrol-installer-win32.exe\"" "$$BASEDIR_WIN\\deploy\\qgroundcontrol_installer.nsi") + } +} diff --git a/QGCSetup.pri b/QGCSetup.pri index 95f4c012020c1d5743d81885da9b0e4df3bb94f1..626f245f0d0d4e34230ef2a981f83227f2d6dc92 100644 --- a/QGCSetup.pri +++ b/QGCSetup.pri @@ -153,10 +153,11 @@ MacBuild { } WindowsBuild { - # Copy dependencies BASEDIR_WIN = $$replace(BASEDIR,"/","\\") DESTDIR_WIN = $$replace(DESTDIR,"/","\\") + # Copy dependencies + QMAKE_POST_LINK += $$escape_expand(\\n) $$quote($$QMAKE_COPY_DIR "$$(QTDIR)\\plugins" "$$DESTDIR_WIN") COPY_FILE_DESTDIR = $$DESTDIR_WIN @@ -188,9 +189,10 @@ WindowsBuild { # Copy Visual Studio DLLs # Note that this is only done for release because the debugging versions of these DLLs cannot be redistributed. - # I'm not certain of the path for VS2008, so this only works for VS2010. + # This currently only works for VS2010. win32-msvc2010 { - QMAKE_POST_LINK += $$escape_expand(\\n) $$quote(xcopy /D /Y "\"C:\\Program Files \(x86\)\\Microsoft Visual Studio 10.0\\VC\\redist\\x86\\Microsoft.VC100.CRT\\*.dll\"" "$$DESTDIR_WIN\\") + QMAKE_POST_LINK += $$escape_expand(\\n) $$quote($$QMAKE_COPY "C:\\Windows\\System32\\msvcp100.dll" "$$DESTDIR_WIN\\") + QMAKE_POST_LINK += $$escape_expand(\\n) $$quote($$QMAKE_COPY "C:\\Windows\\System32\\msvcr100.dll" "$$DESTDIR_WIN\\") } } } diff --git a/deploy/mac_create_dmg.sh b/deploy/mac_create_dmg.sh deleted file mode 100644 index 47bed93c9a6a18bbacbeb64c4b4757eecb05fa97..0000000000000000000000000000000000000000 --- a/deploy/mac_create_dmg.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -cp -r ../../build-qgroundcontrol-Qt_4_8_1-Release/release/qgroundcontrol.app . - - -cp -r ../files/audio qgroundcontrol.app/Contents/MacOs/. -mkdir -p qgroundcontrol.app/Contents/Frameworks/ -mkdir -p qgroundcontrol.app/Contents/PlugIns/imageformats -mkdir -p qgroundcontrol.app/Contents/PlugIns/codecs -mkdir -p qgroundcontrol.app/Contents/PlugIns/accessible -# SDL is not copied by Qt - for whatever reason -cp -r /Library/Frameworks/SDL.framework qgroundcontrol.app/Contents/Frameworks/. -echo -e '\n\nStarting to create disk image. This may take a while..\n' -$HOME/QtSDK/Desktop/Qt/4.8.1/gcc/bin/macdeployqt qgroundcontrol.app -dmg -rm -rf qgroundcontrol.app -echo -e '\n\n QGroundControl .DMG file is now ready for publishing\n' diff --git a/deploy/qgroundcontrol_installer.nsi b/deploy/qgroundcontrol_installer.nsi index cef7af550a95e394dc1680a94524deb861700afa..245442ca3d60a22979338120d2514f1636435333 100644 --- a/deploy/qgroundcontrol_installer.nsi +++ b/deploy/qgroundcontrol_installer.nsi @@ -1,7 +1,5 @@ Name "QGroundcontrol" -OutFile "qgroundcontrol-installer-win32.exe" - InstallDir $PROGRAMFILES\qgroundcontrol Page license @@ -11,12 +9,12 @@ Page instfiles UninstPage uninstConfirm UninstPage instfiles -LicenseData ..\license.txt +LicenseData license.txt Section "" SetOutPath $INSTDIR - File /r ..\release\*.* + File /r release\*.* WriteUninstaller $INSTDIR\QGroundControl_uninstall.exe SectionEnd diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro index 4e0fec940cf7edd4e8a13c9a09da4117a17150d8..b8f931bb8cb6c484f0aa9168eb20927e6c8dca02 100644 --- a/qgroundcontrol.pro +++ b/qgroundcontrol.pro @@ -36,6 +36,14 @@ linux-g++ | linux-g++-64 { error(Unsupported build type) } +# Installer configuration + +installer { + CONFIG -= debug + CONFIG -= debug_and_release + CONFIG += release +} + # Setup our supported build flavors CONFIG(debug, debug|release) { @@ -194,6 +202,12 @@ include(QGCExternalLibs.pri) include(QGCSetup.pri) +# +# Installer targets +# + +include(QGCInstaller.pri) + # # Main QGroundControl portion of project file #