Commit 25a79575 authored by dogmaphobic's avatar dogmaphobic

Done for now

parent 5dbc0d5f

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

...@@ -21,7 +21,12 @@ include(QGCCommon.pri) ...@@ -21,7 +21,12 @@ include(QGCCommon.pri)
TARGET = qgroundcontrol TARGET = qgroundcontrol
TEMPLATE = app TEMPLATE = app
DESTDIR = $${OUT_PWD}/build
DebugBuild {
DESTDIR = $${OUT_PWD}/debug
} else {
DESTDIR = $${OUT_PWD}/release
}
# Load additional config flags from user_config.pri # Load additional config flags from user_config.pri
exists(user_config.pri):infile(user_config.pri, CONFIG) { exists(user_config.pri):infile(user_config.pri, CONFIG) {
...@@ -35,7 +40,7 @@ LinuxBuild { ...@@ -35,7 +40,7 @@ LinuxBuild {
# QGC QtLocation plugin (for ios, it's all compiled in with the rest.) # QGC QtLocation plugin (for ios, it's all compiled in with the rest.)
!ios { !iOSBuild {
LIBS += -L$${LOCATION_PLUGIN_DESTDIR} LIBS += -L$${LOCATION_PLUGIN_DESTDIR}
LIBS += -l$${LOCATION_PLUGIN_NAME} LIBS += -l$${LOCATION_PLUGIN_NAME}
} }
...@@ -78,18 +83,25 @@ QT += testlib ...@@ -78,18 +83,25 @@ QT += testlib
# #
MacBuild { MacBuild {
QMAKE_INFO_PLIST = Custom-Info.plist QMAKE_INFO_PLIST = Custom-Info.plist
ICON = $${BASEDIR}/resources/icons/macx.icns ICON = $${BASEDIR}/resources/icons/macx.icns
OTHER_FILES += Custom-Info.plist OTHER_FILES += Custom-Info.plist
} }
iOSBuild { iOSBuild {
QMAKE_INFO_PLIST = $${BASEDIR}/ios/iOS-Info.plist BUNDLE.files = $$files($$PWD/ios/AppIcon*.png) $$PWD/ios/QGCLaunchScreen.xib
OTHER_FILES += $${BASEDIR}/ios/iOS-Info.plist
BUNDLE.files = $$files($$PWD/ios/AppIcon*.png) $$PWD/ios/LaunchScreen.xib
QMAKE_BUNDLE_DATA += BUNDLE QMAKE_BUNDLE_DATA += BUNDLE
LIBS += -framework AVFoundation LIBS += -framework AVFoundation
OBJECTIVE_SOURCES += src/audio/QGCAudioWorker_iOS.mm OBJECTIVE_SOURCES += src/audio/QGCAudioWorker_iOS.mm
#-- Info.plist (need an "official" one for the App Store)
ForAppStore {
message(App Store Build)
QMAKE_INFO_PLIST = $${BASEDIR}/ios/iOSForAppStore-Info.plist
OTHER_FILES += $${BASEDIR}/ios/iOSForAppStore-Info.plist
} else {
QMAKE_INFO_PLIST = $${BASEDIR}/ios/iOS-Info.plist
OTHER_FILES += $${BASEDIR}/ios/iOS-Info.plist
}
#-- TODO: Add iTunesArtwork #-- TODO: Add iTunesArtwork
} }
...@@ -662,6 +674,14 @@ AndroidBuild { ...@@ -662,6 +674,14 @@ AndroidBuild {
$$PWD/android/src/com/hoho/android/usbserial/driver/UsbSerialRuntimeException.java \ $$PWD/android/src/com/hoho/android/usbserial/driver/UsbSerialRuntimeException.java \
$$PWD/android/src/org/qgroundcontrol/qgchelper/UsbDeviceJNI.java \ $$PWD/android/src/org/qgroundcontrol/qgchelper/UsbDeviceJNI.java \
$$PWD/android/src/org/qgroundcontrol/qgchelper/UsbIoManager.java $$PWD/android/src/org/qgroundcontrol/qgchelper/UsbIoManager.java
DISTFILES += \
android/gradle/wrapper/gradle-wrapper.jar \
android/gradlew \
android/res/values/libs.xml \
android/build.gradle \
android/gradle/wrapper/gradle-wrapper.properties \
android/gradlew.bat
} }
#------------------------------------------------------------------------------------- #-------------------------------------------------------------------------------------
...@@ -676,11 +696,3 @@ include(QGCSetup.pri) ...@@ -676,11 +696,3 @@ include(QGCSetup.pri)
# #
include(QGCInstaller.pri) include(QGCInstaller.pri)
DISTFILES += \
android/gradle/wrapper/gradle-wrapper.jar \
android/gradlew \
android/res/values/libs.xml \
android/build.gradle \
android/gradle/wrapper/gradle-wrapper.properties \
android/gradlew.bat
...@@ -122,7 +122,7 @@ win32:debug_and_release { ...@@ -122,7 +122,7 @@ win32:debug_and_release {
BASEDIR = $$IN_PWD BASEDIR = $$IN_PWD
!ios { !iOSBuild {
OBJECTS_DIR = $${OUT_PWD}/obj OBJECTS_DIR = $${OUT_PWD}/obj
MOC_DIR = $${OUT_PWD}/moc MOC_DIR = $${OUT_PWD}/moc
UI_DIR = $${OUT_PWD}/ui UI_DIR = $${OUT_PWD}/ui
......
...@@ -23,39 +23,41 @@ installer { ...@@ -23,39 +23,41 @@ installer {
VideoEnabled { VideoEnabled {
# Install the gstreamer framework # Install the gstreamer framework
# This will: # This will:
# Copy from the original distibution into libs/lib/Framworks (if not already there) # Copy from the original distibution into DESTDIR/gstwork (if not already there)
# Prune the framework, removing stuff we don't need # Prune the framework, removing stuff we don't need
# Relocate all dylibs so they can work under @executable_path/... # Relocate all dylibs so they can work under @executable_path/...
# Copy the result into the app bundle # Copy the result into the app bundle
# Make sure qgroundcontrol can find them # Make sure qgroundcontrol can find them
message("Preparing GStreamer Framework") message("Preparing GStreamer Framework")
QMAKE_POST_LINK += && $$BASEDIR/tools/prepare_gstreamer_framework.sh $$BASEDIR/libs/lib/Frameworks/ $$DESTDIR/$${TARGET}.app $${TARGET} QMAKE_POST_LINK += && $$BASEDIR/tools/prepare_gstreamer_framework.sh $${OUT_PWD}/gstwork/ $${DESTDIR}/$${TARGET}.app $${TARGET}
} else { } else {
message("Skipping GStreamer Framework") message("Skipping GStreamer Framework")
} }
# We cd to release directory so we can run macdeployqt without a path to the # 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 # qgroundcontrol.app file. If you specify a path to the .app file the symbolic
# links to plugins will not be created correctly. # links to plugins will not be created correctly.
QMAKE_POST_LINK += && cd release && mkdir package QMAKE_POST_LINK += && cd $${DESTDIR} && mkdir package
QMAKE_POST_LINK += && $$dirname(QMAKE_QMAKE)/macdeployqt qgroundcontrol.app -verbose=2 -qmldir=../src QMAKE_POST_LINK += && $$dirname(QMAKE_QMAKE)/macdeployqt qgroundcontrol.app -verbose=2 -qmldir=$${BASEDIR}/src
QMAKE_POST_LINK += && cd .. QMAKE_POST_LINK += && cd $${OUT_PWD}
QMAKE_POST_LINK += && hdiutil create -layout SPUD -srcfolder $${DESTDIR}/qgroundcontrol.app -volname QGroundControl $${DESTDIR}/package/qgroundcontrol.dmg QMAKE_POST_LINK += && hdiutil create -layout SPUD -srcfolder $${DESTDIR}/qgroundcontrol.app -volname QGroundControl $${DESTDIR}/package/qgroundcontrol.dmg
} }
WindowsBuild { WindowsBuild {
# The pdb moving command are commented out for now since we are including the .pdb in the installer. This makes it much # 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. # easier to debug user crashes.
#QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY $${DESTDIR_WIN}\\qgroundcontrol.pdb #QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY $${DESTDIR_WIN}\\qgroundcontrol.pdb
#QMAKE_POST_LINK += $$escape_expand(\\n) del $${DESTDIR_WIN}\\qgroundcontrol.pdb #QMAKE_POST_LINK += $$escape_expand(\\n) del $${DESTDIR_WIN}\\qgroundcontrol.pdb
QMAKE_POST_LINK += $$escape_expand(\\n) $$quote("\"C:\\Program Files \(x86\)\\NSIS\\makensis.exe\"" /NOCD "\"/XOutFile $${DESTDIR_WIN}\\qgroundcontrol-installer.exe\"" "$$BASEDIR_WIN\\deploy\\qgroundcontrol_installer.nsi") QMAKE_POST_LINK += $$escape_expand(\\n) $$quote("\"C:\\Program Files \(x86\)\\NSIS\\makensis.exe\"" /NOCD "\"/XOutFile $${DESTDIR_WIN}\\qgroundcontrol-installer.exe\"" "$$BASEDIR_WIN\\deploy\\qgroundcontrol_installer.nsi")
#QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY qgroundcontrol.pdb $${DESTDIR_WIN} #QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY qgroundcontrol.pdb $${DESTDIR_WIN}
#QMAKE_POST_LINK += $$escape_expand(\\n) del qgroundcontrol.pdb #QMAKE_POST_LINK += $$escape_expand(\\n) del qgroundcontrol.pdb
OTHER_FILES += deploy/qgroundcontrol_installer.nsi OTHER_FILES += deploy/qgroundcontrol_installer.nsi
} }
LinuxBuild { LinuxBuild {
#-- TODO: This uses hardcoded paths. It should use $${DESTDIR}
QMAKE_POST_LINK += && mkdir -p release/package QMAKE_POST_LINK += && mkdir -p release/package
QMAKE_POST_LINK += && tar -cjf release/package/qgroundcontrol.tar.bz2 release --exclude='package' --transform 's/release/qgroundcontrol/' QMAKE_POST_LINK += && tar -cjf release/package/qgroundcontrol.tar.bz2 release --exclude='package' --transform 's/release/qgroundcontrol/'
} }
AndroidBuild { AndroidBuild {
#-- TODO: This uses hardcoded paths. It should use $${DESTDIR}
QMAKE_POST_LINK += && mkdir -p release/package QMAKE_POST_LINK += && mkdir -p release/package
QMAKE_POST_LINK += && make install INSTALL_ROOT=release/android-build/ QMAKE_POST_LINK += && make install INSTALL_ROOT=release/android-build/
QMAKE_POST_LINK += && androiddeployqt --input android-libqgroundcontrol.so-deployment-settings.json --output release/android-build --deployment bundled --gradle --sign android/android_release.keystore dagar --storepass $$(ANDROID_STOREPASS) QMAKE_POST_LINK += && androiddeployqt --input android-libqgroundcontrol.so-deployment-settings.json --output release/android-build --deployment bundled --gradle --sign android/android_release.keystore dagar --storepass $$(ANDROID_STOREPASS)
......
...@@ -51,106 +51,10 @@ WindowsBuild { ...@@ -51,106 +51,10 @@ WindowsBuild {
# #
MacBuild { MacBuild {
# Copy non-standard frameworks into app package
# Copy non-standard libraries and frameworks into app package
QMAKE_POST_LINK += && $$QMAKE_COPY_DIR $$BASEDIR/libs/lib/mac64/lib $$DESTDIR/$${TARGET}.app/Contents/libs
QMAKE_POST_LINK += && rsync -a --delete $$BASEDIR/libs/lib/Frameworks $$DESTDIR/$${TARGET}.app/Contents/ QMAKE_POST_LINK += && rsync -a --delete $$BASEDIR/libs/lib/Frameworks $$DESTDIR/$${TARGET}.app/Contents/
# Fix library paths inside executable
INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
INSTALL_NAME_LIB_LIST = \
libOpenThreads.dylib \
libosg.dylib \
libosgViewer.dylib \
libosgGA.dylib \
libosgDB.dylib \
libosgText.dylib \
libosgWidget.dylib
for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
}
# Fix library paths within libraries (inter-library dependencies)
# OSG GA LIBRARY
INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgGA.dylib
INSTALL_NAME_LIB_LIST = \
libOpenThreads.dylib \
libosg.dylib \
libosgGA.dylib \
libosgDB.dylib \
libosgUtil.dylib
for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
}
# OSG DB LIBRARY
INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgDB.dylib
INSTALL_NAME_LIB_LIST = \
libOpenThreads.dylib \
libosg.dylib \
libosgDB.dylib \
libosgUtil.dylib
for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
}
# OSG TEXT LIBRARY
INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgText.dylib
INSTALL_NAME_LIB_LIST = \
libOpenThreads.dylib \
libosg.dylib \
libosgDB.dylib \
libosgUtil.dylib \
libosgText.dylib
for(INSTALL_NAME_LIB, INSTALL_NAME_LIB_LIST) {
QMAKE_POST_LINK += && install_name_tool -change $$INSTALL_NAME_LIB "@executable_path/../libs/$${INSTALL_NAME_LIB}" $$INSTALL_NAME_TARGET
}
# OSG UTIL LIBRARY
INSTALL_NAME_TARGET = $$DESTDIR/$${TARGET}.app/Contents/libs/libosgUtil.dylib