Commit 8eb9c53c authored by DonLakeFlyer's avatar DonLakeFlyer

Get XCode build working again

Remove unused FlightGear stuff
More work
More
More
More
More
Windows build updates
Linux fixes
Fix unit test run directory
parent c5b4a7df
......@@ -45,15 +45,15 @@ install:
build_script:
- mkdir %SHADOW_BUILD_DIR% && cd %SHADOW_BUILD_DIR% && %QT_QMAKE_DIR%\qmake -r CONFIG+=%CONFIG% %APPVEYOR_BUILD_FOLDER%\qgroundcontrol.pro
- cd %SHADOW_BUILD_DIR% && %QT_JOM_DIR%\jom
- if "%CONFIG%" EQU "installer" ( copy %SHADOW_BUILD_DIR%\release\QGroundControl-installer.exe %APPVEYOR_BUILD_FOLDER%\QGroundControl-installer.exe )
- if "%CONFIG%" EQU "installer" ( copy %SHADOW_BUILD_DIR%\staging\QGroundControl-installer.exe %APPVEYOR_BUILD_FOLDER%\QGroundControl-installer.exe )
# Generate the source server information to embed in the PDB
# Temporarily disabled while we try to figure out where this is located on appveyor image
# - '"C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\srcsrv\srctool.exe" -r -u "%SHADOW_BUILD_DIR%\release\qgroundcontrol.pdb" | grep qgroundcontrol | grep -v moc_ | grep -v libs\\mavlink | grep -v build_windows_install | python %APPVEYOR_BUILD_FOLDER%\deploy\genPDBsrcsrv.py > %SHADOW_BUILD_DIR%\release\qgroundcontrol.pdb.srcsrv'
# - '"C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\srcsrv\srctool.exe" -r -u "%SHADOW_BUILD_DIR%\qgc-app\qgroundcontrol.pdb" | grep qgroundcontrol | grep -v moc_ | grep -v libs\\mavlink | grep -v build_windows_install | python %APPVEYOR_BUILD_FOLDER%\deploy\genPDBsrcsrv.py > %SHADOW_BUILD_DIR%\qgc-app\qgroundcontrol.pdb.srcsrv'
# write the source server info
# - '"C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\srcsrv\pdbstr.exe" -w -i:%SHADOW_BUILD_DIR%\release\qgroundcontrol.pdb.srcsrv -p:%SHADOW_BUILD_DIR%\release\qgroundcontrol.pdb -s:srcsrv'
# - '"C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\srcsrv\pdbstr.exe" -w -i:%SHADOW_BUILD_DIR%\qgc-app\qgroundcontrol.pdb.srcsrv -p:%SHADOW_BUILD_DIR%\qgc-app\qgroundcontrol.pdb -s:srcsrv'
# build the symbol / PE store
# - 'cd %APPVEYOR_BUILD_FOLDER% && "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\symstore.exe" add /compress /s symbols /f %SHADOW_BUILD_DIR%\release\qgroundcontrol.pdb /t qgroundcontrol'
# - 'cd %APPVEYOR_BUILD_FOLDER% && "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\symstore.exe" add /compress /s symbols /f %SHADOW_BUILD_DIR%\release\qgroundcontrol.exe /t qgroundcontrol'
# - 'cd %APPVEYOR_BUILD_FOLDER% && "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\symstore.exe" add /compress /s symbols /f %SHADOW_BUILD_DIR%\qgc-app\qgroundcontrol.pdb /t qgroundcontrol'
# - 'cd %APPVEYOR_BUILD_FOLDER% && "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\symstore.exe" add /compress /s symbols /f %SHADOW_BUILD_DIR%\qgc-app\qgroundcontrol.exe /t qgroundcontrol'
# - ps: 'cd $env:appveyor_build_folder; .\deploy\lowercaseify_symbolstore.ps1'
test_script:
......@@ -62,7 +62,7 @@ test_script:
artifacts:
- path: QGroundControl-installer.exe
name: qgcinstaller
- path: build_windows_install\release\qgroundcontrol.pdb
- path: build_windows_install\staging\qgroundcontrol.pdb
name: pdb
deploy:
......
......@@ -212,7 +212,7 @@ script:
mkdir -p ~/.config/QtProject/ &&
cp ${TRAVIS_BUILD_DIR}/test/qtlogging.ini ~/.config/QtProject/ &&
export QT_FATAL_WARNINGS=1 &&
./debug/qgroundcontrol-start.sh --unittest;
./staging/qgroundcontrol-start.sh --unittest;
fi
after_success:
......@@ -238,7 +238,7 @@ before_deploy:
# create linux appimage
- cd ${TRAVIS_BUILD_DIR}
- if [[ "${SPEC}" = "linux-g++-64" && "${CONFIG}" = "installer" ]]; then
./deploy/create_linux_appimage.sh ${TRAVIS_BUILD_DIR} ${SHADOW_BUILD_DIR}/release ${SHADOW_BUILD_DIR}/release/package;
./deploy/create_linux_appimage.sh ${TRAVIS_BUILD_DIR} ${SHADOW_BUILD_DIR}/staging ${SHADOW_BUILD_DIR}/package;
fi
deploy:
......@@ -249,7 +249,7 @@ deploy:
secret_access_key:
secure: BsLXeXUPsCJdX4tawrDnO8OFK5Hk4kzlDTiyH93En6TbjUargVAWDMcHVj7TUhr7+3Tao1W1zb0G4SJe9kHv+jrky0yE72KvoG3YAON0VXWKizxBAKkgHE2RxSTNAwDeKbi2G6YJfNDescBBfX7zEohShdXglQu7CGaUQKRaiI4=
bucket: qgroundcontrol
local_dir: ${SHADOW_BUILD_DIR}/release/package
local_dir: ${SHADOW_BUILD_DIR}/package
upload-dir: builds/${TRAVIS_BRANCH}
acl: public_read
region: us-west-2
......@@ -265,7 +265,7 @@ deploy:
secret_access_key:
secure: BsLXeXUPsCJdX4tawrDnO8OFK5Hk4kzlDTiyH93En6TbjUargVAWDMcHVj7TUhr7+3Tao1W1zb0G4SJe9kHv+jrky0yE72KvoG3YAON0VXWKizxBAKkgHE2RxSTNAwDeKbi2G6YJfNDescBBfX7zEohShdXglQu7CGaUQKRaiI4=
bucket: qgroundcontrol
local_dir: ${SHADOW_BUILD_DIR}/release/package
local_dir: ${SHADOW_BUILD_DIR}/package
upload-dir: latest
acl: public_read
region: us-west-2
......@@ -281,7 +281,7 @@ deploy:
secret_access_key:
secure: BsLXeXUPsCJdX4tawrDnO8OFK5Hk4kzlDTiyH93En6TbjUargVAWDMcHVj7TUhr7+3Tao1W1zb0G4SJe9kHv+jrky0yE72KvoG3YAON0VXWKizxBAKkgHE2RxSTNAwDeKbi2G6YJfNDescBBfX7zEohShdXglQu7CGaUQKRaiI4=
bucket: qgroundcontrol
local_dir: ${SHADOW_BUILD_DIR}/release/package
local_dir: ${SHADOW_BUILD_DIR}/package
upload-dir: ${TRAVIS_BRANCH}
acl: public_read
region: us-west-2
......@@ -297,8 +297,8 @@ deploy:
secure: K/Zqr/FCC7QvzFxYvBtCinPkacQq2ubJ2qm982+38Zf/KjibVOF1dEbVdrGZmII6Tg5DaQzNXGYkg5PvYmJgT9xRsqeQjeYIUYqYZpAt+HYWA38AVfMU8jip/1P1wmwqD469nzJOBBa8yfsMs6Ca7tBaNl/zTxCRGnAgEzqtkdQ=
file_glob: true
file:
- ${SHADOW_BUILD_DIR}/release/package/qgroundcontrol.*
- ${SHADOW_BUILD_DIR}/release/package/QGroundControl.*
- ${SHADOW_BUILD_DIR}/qgc-app/package/qgroundcontrol.*
- ${SHADOW_BUILD_DIR}/qgc-app/package/QGroundControl.*
skip_cleanup: true
on:
tags: true
......
......@@ -9,18 +9,14 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleVersion</key>
<string>###</string>
<string>${QMAKE_FULL_VERSION}</string>
<key>CFBundleShortVersionString</key>
<string>#.#.#</string>
<key>CFBundleSignature</key>
<string>????</string>
<string>${QMAKE_FULL_VERSION}</string>
<key>CFBundleExecutable</key>
<string>@EXECUTABLE@</string>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>org.qgroundcontrol.qgroundcontrol</string>
<key>NOTE</key>
<string>Open source ground control app provided by QGroundControl dev team</string>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>NSCameraUsageDescription</key>
<string>QGC uses UVC camera devices for FPV</string>
<string>Camera devices used for FPV</string>
</dict>
</plist>
......@@ -84,7 +84,6 @@ linux {
DEFINES += QGC_GST_TAISYNC_ENABLED
DEFINES += QGC_GST_MICROHARD_ENABLED
DEFINES += QGC_ENABLE_MAVLINK_INSPECTOR
DEFINES += _CRT_NO_SECURE_WARNINGS
QMAKE_CFLAGS -= -Zc:strictStrings
QMAKE_CFLAGS_RELEASE -= -Zc:strictStrings
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO -= -Zc:strictStrings
......@@ -92,19 +91,11 @@ linux {
QMAKE_CXXFLAGS_RELEASE -= -Zc:strictStrings
QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO -= -Zc:strictStrings
QMAKE_CXXFLAGS += /std:c++17
QMAKE_CXXFLAGS_WARN_ON -= -w34100 # Qt insanity which prevents /wd on 4100 error from working correctly
QMAKE_CXXFLAGS += /W3 \
QMAKE_CXXFLAGS_WARN_ON += /WX /W3 \
/wd4005 \ # silence warnings about macro redefinition, these come from the shapefile code with is external
/wd4290 \ # ignore exception specifications
/wd4267 \ # silence conversion from 'size_t' to 'int', possible loss of data, these come from gps drivers shared with px4
/wd4100 # unreferenced formal parameter - gst-plugins-good
QMAKE_CFLAGS += /W3 \
/wd4005 \ # shape file code
/wd4267 \ # shape file code
/wd4996 # shape file code
!WarningsAsErrorsOff {
QMAKE_CXXFLAGS += /WX
QMAKE_CFLAGS += /WX
}
} else {
error("Unsupported Windows toolchain, only Visual Studio 2017 64 bit is supported")
}
......@@ -123,7 +114,7 @@ linux {
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
}
#-- Not forcing anything. Let qmake find the latest, installed SDK.
#QMAKE_MAC_SDK = macosx10.15
QMAKE_MAC_SDK = macosx10.15
QMAKE_CXXFLAGS += -fvisibility=hidden
QMAKE_CXXFLAGS_WARN_ON += -Werror \
-Wno-unused-parameter # gst-plugins-good
......@@ -163,6 +154,11 @@ linux|macx|ios {
}
}
!MacBuild {
# See QGCPostLinkCommon.pri for details on why MacBuild doesn't use DESTDIR
DESTDIR = staging
}
MobileBuild {
DEFINES += __mobile__
}
......@@ -235,7 +231,7 @@ CONFIG(debug, debug|release) {
# Setup our build directories
BASEDIR = $$IN_PWD
SOURCE_DIR = $$IN_PWD
!iOSBuild {
OBJECTS_DIR = $${OUT_PWD}/obj
......@@ -253,10 +249,8 @@ LOCATION_PLUGIN_NAME = QGeoServiceProviderFactoryQGC
DEFINES += _TTY_NOWARN_
MacBuild {
# Xcode 8.3 has issues on how MAVLink accesses (packed) message structure members.
# Note that this will fail when Xcode version reaches 10.x.x
XCODE_VERSION = $$system($$PWD/tools/get_xcode_version.sh)
greaterThan(XCODE_VERSION, 8.2.0): QMAKE_CXXFLAGS_WARN_ON += -Wno-address-of-packed-member
QMAKE_TARGET_BUNDLE_PREFIX = org.qgroundcontrol
QMAKE_BUNDLE = qgroundcontrol
}
#
......
......@@ -45,7 +45,7 @@ isEmpty(MAVLINKPATH) {
MAVLINKPATH = $$fromfile(user_config.pri, MAVLINKPATH)
message($$sprintf("Using user-supplied mavlink path '%1' specified in user_config.pri", $$MAVLINKPATH))
} else {
MAVLINKPATH = $$BASEDIR/$$MAVLINKPATH_REL
MAVLINKPATH = $$SOURCE_DIR/$$MAVLINKPATH_REL
}
}
......@@ -115,22 +115,22 @@ SOURCES += \
#
MacBuild {
INCLUDEPATH += \
$$BASEDIR/libs/Frameworks/SDL2.framework/Headers
$$SOURCE_DIR/libs/Frameworks/SDL2.framework/Headers
LIBS += \
-F$$BASEDIR/libs/Frameworks \
-F$$SOURCE_DIR/libs/Frameworks \
-framework SDL2
} else:LinuxBuild {
PKGCONFIG = sdl2
} else:WindowsBuild {
INCLUDEPATH += $$BASEDIR/libs/sdl2/msvc/include
INCLUDEPATH += $$BASEDIR/libs/OpenSSL/Windows/x64/include
LIBS += -L$$BASEDIR/libs/sdl2/msvc/lib/x64
INCLUDEPATH += $$SOURCE_DIR/libs/sdl2/msvc/include
INCLUDEPATH += $$SOURCE_DIR/libs/OpenSSL/Windows/x64/include
LIBS += -L$$SOURCE_DIR/libs/sdl2/msvc/lib/x64
LIBS += -lSDL2
}
# Include Android OpenSSL libs
AndroidBuild {
include($$BASEDIR/libs/OpenSSL/android_openssl/openssl.pri)
include($$SOURCE_DIR/libs/OpenSSL/android_openssl/openssl.pri)
message("ANDROID_EXTRA_LIBS")
message($$ANDROID_TARGET_ARCH)
message($$ANDROID_EXTRA_LIBS)
......@@ -157,10 +157,10 @@ contains(DEFINES, QGC_ENABLE_PAIRING) {
AndroidBuild {
contains(QT_ARCH, arm) {
LIBS += $$ANDROID_EXTRA_LIBS
INCLUDEPATH += $$BASEDIR/libs/OpenSSL/Android/arch-armeabi-v7a/include
INCLUDEPATH += $$SOURCE_DIR/libs/OpenSSL/Android/arch-armeabi-v7a/include
} else {
LIBS += $$ANDROID_EXTRA_LIBS
INCLUDEPATH += $$BASEDIR/libs/OpenSSL/Android/arch-x86/include
INCLUDEPATH += $$SOURCE_DIR/libs/OpenSSL/Android/arch-x86/include
}
}
}
......
......@@ -7,88 +7,71 @@
#
################################################################################
QMAKE_POST_LINK += echo "Copying files"
#
# Copy the application resources to the associated place alongside the application
#
LinuxBuild {
DESTDIR_COPY_RESOURCE_LIST = $$DESTDIR
}
MacBuild {
DESTDIR_COPY_RESOURCE_LIST = $$DESTDIR/$${TARGET}.app/Contents/MacOS
}
# Windows version of QMAKE_COPY_DIR of course doesn't work the same as Mac/Linux. It will only
# copy the contents of the source directory. It doesn't create the top level source directory
# in the target.
WindowsBuild {
# Make sure to keep both side of this if using the same set of directories
DESTDIR_COPY_RESOURCE_LIST = $$replace(DESTDIR,"/","\\")
BASEDIR_COPY_RESOURCE_LIST = $$replace(BASEDIR,"/","\\")
QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$BASEDIR_COPY_RESOURCE_LIST\\resources\\flightgear\" \"$$DESTDIR_COPY_RESOURCE_LIST\\flightgear\"
} else {
!MobileBuild {
# Make sure to keep both sides of this if using the same set of directories
QMAKE_POST_LINK += && $$QMAKE_COPY_DIR $$BASEDIR/resources/flightgear $$DESTDIR_COPY_RESOURCE_LIST
}
}
# These are the Post Link steps which are common to all builds
#
# Perform platform specific setup
#
MacBuild {
# Update version info in bundle
PLIST_FILE = $$DESTDIR/$${TARGET}.app/Contents/Info.plist
QMAKE_POST_LINK += && /usr/libexec/PlistBuddy -c \"Set :CFBundleShortVersionString $${MAC_VERSION}\" $$PLIST_FILE
QMAKE_POST_LINK += && /usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $${MAC_BUILD}\" $$PLIST_FILE
QMAKE_POST_LINK += && /usr/libexec/PlistBuddy -c \"Set :CFBundleExecutable 'MacOs/$${TARGET}'\" $$PLIST_FILE
}
MacBuild {
# Copy non-standard frameworks into app package
QMAKE_POST_LINK += && rsync -a --delete $$BASEDIR/libs/Frameworks $$DESTDIR/$${TARGET}.app/Contents/
# SDL2 Framework
QMAKE_POST_LINK += && install_name_tool -change "@rpath/SDL2.framework/Versions/A/SDL2" "@executable_path/../Frameworks/SDL2.framework/Versions/A/SDL2" $$DESTDIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
# AirMap
contains (DEFINES, QGC_AIRMAP_ENABLED) {
QMAKE_POST_LINK += && rsync -a $$BASEDIR/libs/airmapd/macOS/$$AIRMAP_QT_PATH/* $$DESTDIR/$${TARGET}.app/Contents/Frameworks/
QMAKE_POST_LINK += && install_name_tool -change "@rpath/libairmap-qt.0.0.1.dylib" "@executable_path/../Frameworks/libairmap-qt.0.0.1.dylib" $$DESTDIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
QMAKE_POST_LINK += echo "Post Link Common"
# Qt is screwed up if you use qmake to create an XCode Project which has a DESTDIR set on it.
# This is because XCode builds create the .app in BUILT_PRODUCTS_DIR. If you use a DESTDIR then
# Qt adds a Copy Phase to the build which copies the .app from the BUILT_PRODUCTS_DIR to DESTDIR.
# This causes all sort of problem which are too long to list here. In order to work around this
# We have to duplicate the post link commands here to work from two different locations. And to deal
# with the differences between post list command running in a shell script (XCode) versus a makefile (Qt Creator)
macx-xcode {
# SDL2 Framework
QMAKE_POST_LINK += && rsync -a --delete $$SOURCE_DIR/libs/Frameworks/SDL2.Framework $BUILT_PRODUCTS_DIR/$${TARGET}.app/Contents/Frameworks
QMAKE_POST_LINK += && install_name_tool -change "@rpath/SDL2.framework/Versions/A/SDL2" "@executable_path/../Frameworks/SDL2.framework/Versions/A/SDL2" $BUILT_PRODUCTS_DIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
# AirMap
contains (DEFINES, QGC_AIRMAP_ENABLED) {
QMAKE_POST_LINK += && rsync -a $$SOURCE_DIR/libs/airmapd/macOS/$$AIRMAP_QT_PATH/* $BUILT_PRODUCTS_DIR/$${TARGET}.app/Contents/Frameworks/
QMAKE_POST_LINK += && install_name_tool -change "@rpath/libairmap-qt.0.0.1.dylib" "@executable_path/../Frameworks/libairmap-qt.0.0.1.dylib" $BUILT_PRODUCTS_DIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
}
} else {
# SDL2 Framework
QMAKE_POST_LINK += && rsync -a --delete $$SOURCE_DIR/libs/Frameworks/SDL2.Framework $${TARGET}.app/Contents/Frameworks
QMAKE_POST_LINK += && install_name_tool -change "@rpath/SDL2.framework/Versions/A/SDL2" "@executable_path/../Frameworks/SDL2.framework/Versions/A/SDL2" $${TARGET}.app/Contents/MacOS/$${TARGET}
# AirMap
contains (DEFINES, QGC_AIRMAP_ENABLED) {
QMAKE_POST_LINK += && rsync -a $$SOURCE_DIR/libs/airmapd/macOS/$$AIRMAP_QT_PATH/* $${TARGET}.app/Contents/Frameworks/
QMAKE_POST_LINK += && install_name_tool -change "@rpath/libairmap-qt.0.0.1.dylib" "@executable_path/../Frameworks/libairmap-qt.0.0.1.dylib" $${TARGET}.app/Contents/MacOS/$${TARGET}
}
}
}
WindowsBuild {
BASEDIR_WIN = $$replace(BASEDIR, "/", "\\")
DESTDIR_WIN = $$replace(DESTDIR, "/", "\\")
#BASEDIR_WIN = $$replace(SOURCE_DIR, "/", "\\")
QT_BIN_DIR = $$dirname(QMAKE_QMAKE)
# Copy dependencies
DebugBuild: DLL_QT_DEBUGCHAR = "d"
ReleaseBuild: DLL_QT_DEBUGCHAR = ""
COPY_FILE_LIST = \
$$BASEDIR\\libs\\sdl2\\msvc\\lib\\x64\\SDL2.dll \
$$BASEDIR\\deploy\\libcrypto-1_1-x64.dll \
$$BASEDIR_WIN\\deploy\\libssl-1_1-x64.dll
$$SOURCE_DIR\\libs\\sdl2\\msvc\\lib\\x64\\SDL2.dll \
$$SOURCE_DIR\\deploy\\libcrypto-1_1-x64.dll \
$$SOURCE_DIR\\deploy\\libssl-1_1-x64.dll
for(COPY_FILE, COPY_FILE_LIST) {
QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"$$COPY_FILE\" \"$$DESTDIR_WIN\"
QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"$$COPY_FILE\" \"$$DESTDIR\"
}
ReleaseBuild {
# Copy Visual Studio DLLs
# Note that this is only done for release because the debugging versions of these DLLs cannot be redistributed.
QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"$$BASEDIR\\deploy\\msvcp140.dll\" \"$$DESTDIR_WIN\"
QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"$$BASEDIR\\deploy\\vcruntime140.dll\" \"$$DESTDIR_WIN\"
QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"$$SOURCE_DIR\\deploy\\msvcp140.dll\" \"$$DESTDIR\"
QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"$$SOURCE_DIR\\deploy\\vcruntime140.dll\" \"$$DESTDIR\"
}
DEPLOY_TARGET = $$shell_quote($$shell_path($$DESTDIR_WIN\\$${TARGET}.exe))
QMAKE_POST_LINK += $$escape_expand(\\n) $$QT_BIN_DIR\\windeployqt --qmldir=$${BASEDIR_WIN}\\src $${DEPLOY_TARGET}
DEPLOY_TARGET = $$shell_quote($$shell_path($$DESTDIR\\$${TARGET}.exe))
QMAKE_POST_LINK += $$escape_expand(\\n) $$QT_BIN_DIR\\windeployqt --qmldir=$${SOURCE_DIR}\\src $${DEPLOY_TARGET}
}
LinuxBuild {
QMAKE_POST_LINK += echo "Post Link Common"
QMAKE_POST_LINK += && mkdir -p $$DESTDIR/Qt/libs && mkdir -p $$DESTDIR/Qt/plugins
# QT_INSTALL_LIBS
......@@ -163,9 +146,9 @@ LinuxBuild {
# QGroundControl start script
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
QMAKE_POST_LINK += && $$QMAKE_COPY $$SOURCE_DIR/deploy/qgroundcontrol-start.sh $$DESTDIR
QMAKE_POST_LINK += && $$QMAKE_COPY $$SOURCE_DIR/deploy/qgroundcontrol.desktop $$DESTDIR
QMAKE_POST_LINK += && $$QMAKE_COPY $$SOURCE_DIR/resources/icons/qgroundcontrol.png $$DESTDIR
} else {
include($$PWD/custom/custom_deploy.pri)
}
......
......@@ -7,9 +7,12 @@
#
################################################################################
# These are the Post Link steps which are specific to installer builds
installer {
DEFINES += QGC_INSTALL_RELEASE
MacBuild {
#QMAKE_POST_LINK += && rsync -a --delete $BUILT_PRODUCTS_DIR/$${TARGET}.app .
VideoEnabled {
# Install the gstreamer framework
# This will:
......@@ -18,39 +21,38 @@ installer {
# 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")
QMAKE_POST_LINK += && $$BASEDIR/tools/prepare_gstreamer_framework.sh $${OUT_PWD}/gstwork/ $${DESTDIR}/$${TARGET}.app $${TARGET}
} else {
message("Skipping GStreamer Framework")
QMAKE_POST_LINK += && $$SOURCE_DIR/tools/prepare_gstreamer_framework.sh $${OUT_PWD}/gstwork/ $${TARGET}.app $${TARGET}
}
# 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.
QMAKE_POST_LINK += && cd $${DESTDIR} && $$dirname(QMAKE_QMAKE)/macdeployqt $${TARGET}.app -appstore-compliant -verbose=1 -qmldir=$${BASEDIR}/src
QMAKE_POST_LINK += && echo macdeployqt
QMAKE_POST_LINK += && $$dirname(QMAKE_QMAKE)/macdeployqt $${TARGET}.app -appstore-compliant -verbose=1 -qmldir=$${SOURCE_DIR}/src
# macdeployqt is missing some relocations once in a while. "Fix" it:
QMAKE_POST_LINK += && python $$BASEDIR/tools/osxrelocator.py $${TARGET}.app/Contents @rpath @executable_path/../Frameworks -r > /dev/null 2>&1
QMAKE_POST_LINK += && echo osxrelocator
QMAKE_POST_LINK += && python $$SOURCE_DIR/tools/osxrelocator.py $${TARGET}.app/Contents @rpath @executable_path/../Frameworks -r > /dev/null 2>&1
# Create package
QMAKE_POST_LINK += && hdiutil create /tmp/tmp.dmg -ov -volname "$${TARGET}-$${MAC_VERSION}" -fs HFS+ -srcfolder "$${DESTDIR}/"
QMAKE_POST_LINK += && mkdir -p $${DESTDIR}/package
QMAKE_POST_LINK += && hdiutil convert /tmp/tmp.dmg -format UDBZ -o $${DESTDIR}/package/$${TARGET}.dmg
QMAKE_POST_LINK += && echo hdiutil
QMAKE_POST_LINK += && mkdir -p package
QMAKE_POST_LINK += && mkdir -p staging
QMAKE_POST_LINK += && rsync -a --delete $${TARGET}.app staging
QMAKE_POST_LINK += && hdiutil create /tmp/tmp.dmg -ov -volname "$${TARGET}-$${MAC_VERSION}" -fs HFS+ -srcfolder "staging"
QMAKE_POST_LINK += && hdiutil convert /tmp/tmp.dmg -format UDBZ -o package/$${TARGET}.dmg
QMAKE_POST_LINK += && rm /tmp/tmp.dmg
}
WindowsBuild {
QMAKE_POST_LINK += $$escape_expand(\\n) cd $$BASEDIR_WIN && $$quote("\"C:\\Program Files \(x86\)\\NSIS\\makensis.exe\"" $$(QGC_NSIS_INSTALLER_PARAMETERS) /DINSTALLER_ICON="\"$${QGC_INSTALLER_ICON}\"" /DHEADER_BITMAP="\"$${QGC_INSTALLER_HEADER_BITMAP}\"" /DAPPNAME="\"$${QGC_APP_NAME}\"" /DEXENAME="\"$${TARGET}\"" /DORGNAME="\"$${QGC_ORG_NAME}\"" /DDESTDIR=$${DESTDIR} /NOCD "\"/XOutFile $${DESTDIR_WIN}\\$${TARGET}-installer.exe\"" "$$BASEDIR_WIN\\deploy\\qgroundcontrol_installer.nsi")
QMAKE_POST_LINK += $$escape_expand(\\n) $$quote("\"C:\\Program Files \(x86\)\\NSIS\\makensis.exe\"" $$(QGC_NSIS_INSTALLER_PARAMETERS) /DDRIVER_MSI="$$SOURCE_DIR\\deploy\\driver.msi" /DINSTALLER_ICON="\"$${QGC_INSTALLER_ICON}\"" /DHEADER_BITMAP="\"$${QGC_INSTALLER_HEADER_BITMAP}\"" /DAPPNAME="\"$${QGC_APP_NAME}\"" /DEXENAME="\"$${TARGET}\"" /DORGNAME="\"$${QGC_ORG_NAME}\"" /DDESTDIR=$${DESTDIR} /NOCD "\"/XOutFile $${DESTDIR}\\$${TARGET}-installer.exe\"" "$$SOURCE_DIR\\deploy\\qgroundcontrol_installer.nsi")
OTHER_FILES += deploy/qgroundcontrol_installer.nsi
}
LinuxBuild {
#-- TODO: This uses hardcoded paths. It should use $${DESTDIR}
QMAKE_POST_LINK += && mkdir -p release/package
QMAKE_POST_LINK += && tar -cj --exclude='package' -f release/package/QGroundControl.tar.bz2 release --transform 's/release/qgroundcontrol/'
QMAKE_POST_LINK += && mkdir -p package
QMAKE_POST_LINK += && tar -cj --exclude='package' -f package/QGroundControl.tar.bz2 staging --transform 's/$${DESTDIR}/qgroundcontrol/'
}
AndroidBuild {
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 += && mkdir -p package
QMAKE_POST_LINK += && make install INSTALL_ROOT=android-build/
QMAKE_POST_LINK += && androiddeployqt --input android-libQGroundControl.so-deployment-settings.json --output android-build --deployment bundled --gradle --sign $${SOURCE_DIR}/android/android_release.keystore dagar --storepass $$(ANDROID_STOREPASS)
contains(QT_ARCH, arm) {
QGC_APK_BITNESS = "32"
} else:contains(QT_ARCH, arm64) {
......@@ -58,6 +60,6 @@ installer {
} else {
QGC_APK_BITNESS = ""
}
QMAKE_POST_LINK += && cp $${DESTDIR}/android-build/build/outputs/apk/android-build-release-signed.apk $${DESTDIR}/package/QGroundControl$${QGC_APK_BITNESS}.apk
QMAKE_POST_LINK += && cp android-build/build/outputs/apk/android-build-release-signed.apk package/QGroundControl$${QGC_APK_BITNESS}.apk
}
}
......@@ -85,7 +85,7 @@ doInstall:
; Driver location is http://firmware.ardupilot.org/Tools/MissionPlanner/driver.msi
; Whenever this driver is updated in the repo QGCCURRENTDRIVERVERSION must be bumped by 1
File deploy\driver.msi
File ${DRIVER_MSI}
WriteUninstaller $INSTDIR\${EXENAME}-Uninstall.exe
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayName" "${APPNAME}"
......
# -------------------------------------------------
# QGroundControl - Micro Air Vehicle Groundstation
# Please see our website at <http://qgroundcontrol.org>
# Maintainer:
# Lorenz Meier <lm@inf.ethz.ch>
# (c) 2009-2019 QGroundControl Developers
# License terms set in COPYING.md
# -------------------------------------------------
################################################################################
#
# (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
#
# QGroundControl is licensed according to the terms in the file
# COPYING.md in the root of the source code directory.
#
################################################################################
QMAKE_PROJECT_DEPTH = 0 # undocumented qmake flag to force absolute paths in make files
......@@ -29,12 +29,6 @@ TARGET = QGroundControl
TEMPLATE = app
QGCROOT = $$PWD
DebugBuild {
DESTDIR = $${OUT_PWD}/debug
} else {
DESTDIR = $${OUT_PWD}/release
}
QML_IMPORT_PATH += $$PWD/src/QmlControls
#
......@@ -43,7 +37,7 @@ QML_IMPORT_PATH += $$PWD/src/QmlControls
MacBuild {
QMAKE_INFO_PLIST = Custom-Info.plist
ICON = $${BASEDIR}/resources/icons/macx.icns
ICON = $${SOURCE_DIR}/resources/icons/macx.icns
OTHER_FILES += Custom-Info.plist
LIBS += -framework ApplicationServices
}
......@@ -68,8 +62,8 @@ QGC_APP_DESCRIPTION = "Open source ground control app provided by QGroundControl
QGC_APP_COPYRIGHT = "Copyright (C) 2019 QGroundControl Development Team. All rights reserved."
WindowsBuild {
QGC_INSTALLER_ICON = "WindowsQGC.ico"
QGC_INSTALLER_HEADER_BITMAP = "installheader.bmp"
QGC_INSTALLER_ICON = "$$SOURCE_DIR\\WindowsQGC.ico"
QGC_INSTALLER_HEADER_BITMAP = "$$SOURCE_DIR\\installheader.bmp"
}
# Load additional config flags from user_config.pri
......@@ -126,17 +120,17 @@ iOSBuild {
ForAppStore {
message(App Store Build)
#-- Create official, versioned Info.plist
APP_STORE = $$system(cd $${BASEDIR} && $${BASEDIR}/tools/update_ios_version.sh $${BASEDIR}/ios/iOSForAppStore-Info-Source.plist $${BASEDIR}/ios/iOSForAppStore-Info.plist)
APP_STORE = $$system(cd $${SOURCE_DIR} && $${SOURCE_DIR}/tools/update_ios_version.sh $${SOURCE_DIR}/ios/iOSForAppStore-Info-Source.plist $${SOURCE_DIR}/ios/iOSForAppStore-Info.plist)
APP_ERROR = $$find(APP_STORE, "Error")
count(APP_ERROR, 1) {
error("Error building .plist file. 'ForAppStore' builds are only possible through the official build system.")
}
QT += qml-private
QMAKE_INFO_PLIST = $${BASEDIR}/ios/iOSForAppStore-Info.plist
OTHER_FILES += $${BASEDIR}/ios/iOSForAppStore-Info.plist
QMAKE_INFO_PLIST = $${SOURCE_DIR}/ios/iOSForAppStore-Info.plist
OTHER_FILES += $${SOURCE_DIR}/ios/iOSForAppStore-Info.plist
} else {
QMAKE_INFO_PLIST = $${BASEDIR}/ios/iOS-Info.plist
OTHER_FILES += $${BASEDIR}/ios/iOS-Info.plist
QMAKE_INFO_PLIST = $${SOURCE_DIR}/ios/iOS-Info.plist
OTHER_FILES += $${SOURCE_DIR}/ios/iOS-Info.plist
}
QMAKE_ASSET_CATALOGS += ios/Images.xcassets
BUNDLE.files = ios/QGCLaunchScreen.xib $$QMAKE_INFO_PLIST
......@@ -509,7 +503,6 @@ DebugBuild { PX4FirmwarePlugin { PX4FirmwarePluginFactory { APMFirmwarePlugin {
#src/AnalyzeView/LogDownloadTest.h \
#src/qgcunittest/FileDialogTest.h \
#src/qgcunittest/FileManagerTest.h \
#src/qgcunittest/FlightGearTest.h \
#src/qgcunittest/MainWindowTest.h \
#src/qgcunittest/MessageBoxTest.h \
......@@ -553,7 +546,6 @@ DebugBuild { PX4FirmwarePlugin { PX4FirmwarePluginFactory { APMFirmwarePlugin {
#src/AnalyzeView/LogDownloadTest.cc \
#src/qgcunittest/FileDialogTest.cc \
#src/qgcunittest/FileManagerTest.cc \
#src/qgcunittest/FlightGearTest.cc \
#src/qgcunittest/MainWindowTest.cc \
#src/qgcunittest/MessageBoxTest.cc \
......@@ -1381,9 +1373,7 @@ AndroidBuild {
# Localization
#
TRANSLATIONS += \
$$files($$PWD/translations/qgc_source_*.ts) \
$$files($$PWD/translations/qgc_json_*.ts)
TRANSLATIONS += $$files($$PWD/localization/qgc_*.ts)
CONFIG+=lrelease embed_translations
#-------------------------------------------------------------------------------------
......@@ -1394,7 +1384,7 @@ CONFIG+=lrelease embed_translations
contains (CONFIG, QGC_DISABLE_BUILD_SETUP) {
message("Disable standard build setup")
} else {
include(QGCSetup.pri)
include(QGCPostLinkCommon.pri)
}
#
......@@ -1404,7 +1394,7 @@ contains (CONFIG, QGC_DISABLE_BUILD_SETUP) {
contains (CONFIG, QGC_DISABLE_INSTALLER_SETUP) {
message("Disable standard installer setup")
} else {
include(QGCInstaller.pri)
include(QGCPostLinkInstaller.pri)
}
DISTFILES += \
......
<?xml version="1.0"?>
<!--
************************************************************************
Rascal 110 R/C airplane config. This files ties together all the components
used by FGFS to represent the Rascal 110 (by Sig Mfg) including the flight
dynamics model, and external 3D model.
************************************************************************
-->
<PropertyList>
<sim>
<description>Easy Star (R/C)</description>
<author>Ken Northup, 3d model </author>
<author>Ron Jensen, 3d model, FDM</author>
<aircraft-version>0.0</aircraft-version>
<flight-model>jsb</flight-model>
<aero>easystar</aero>
<!--
<systems>
<autopilot>
<path>Aircraft/Malolo1/Systems/110-autopilot.xml</path>
</autopilot>
<electrical>
<path>Aircraft/Malolo1/Systems/electrical.xml</path>
</electrical>
</systems> -->
<sound>
<path>Aircraft/Generic/generic-sound.xml</path>
</sound>
<panel>
<visibility archive="n">false</visibility>
</panel>
<model>
<path archive="y">Aircraft/EasyStar/Models/easystar.xml</path>
</model>
<view>
<internal archive="y">true</internal>
<config>
<x-offset-m archive="y">0.0</x-offset-m>
<y-offset-m archive="y">0.15</y-offset-m>
<z-offset-m archive="y">0.40</z-offset-m>
<pitch-offset-deg>0</pitch-offset-deg>
</config>
</view>
<view n="101">
<name>News Camera</name>
<type>lookat</type>
<internal type="bool">true</internal>
<config>
<eye-lat-deg-path>/position/latitude-deg</eye-lat-deg-path>
<eye-lon-deg-path>/position/longitude-deg</eye-lon-deg-path>
<eye-alt-ft-path>/position/altitude-ft</eye-alt-ft-path>
<eye-heading-deg-path>/orientation/heading-deg</eye-heading-deg-path>
<target-lat-deg-path>/sim/tower/latitude-deg</target-lat-deg-path>
<target-lon-deg-path>/sim/tower/longitude-deg</target-lon-deg-path>
<target-alt-ft-path>/sim/tower/altitude-ft</target-alt-ft-path>
<!--
<target-heading-deg-path></target-heading-deg-path>
<target-pitch-deg-path></target-pitch-deg-path>
<target-roll-deg-path></target-roll-deg-path>
-->
</config>
</view>
<chase-distance-m archive="y" type="double">-7.5</chase-distance-m>
<help>
<title>Easy Star R/C</title>
<line>Cruise speed: mph</line>
<line>Never-exceed (Vne): mph</line>
<line>Best Glide (Vglide): mph</line>
<line>Maneuvering (Va): mph</line>
<line>Approach speed: mph</line>
<line>Stall speed (Vs): mph</line>
</help>
</sim>
<controls>
<flight>
<elevator-trim>0.00</elevator-trim> <!-- controllable -->
</flight>
</controls>