-
Notifications
You must be signed in to change notification settings - Fork 1
/
QGCPostLinkInstaller.pri
66 lines (61 loc) · 4.3 KB
/
QGCPostLinkInstaller.pri
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
################################################################################
#
# (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.
#
################################################################################
# These are the Post Link steps which are specific to installer builds
installer {
DEFINES += QGC_INSTALL_RELEASE
MacBuild {
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 += && rsync -a --delete /Library/Frameworks/GStreamer.framework $${TARGET}.app/Contents/Frameworks
QMAKE_POST_LINK += && echo libexec
QMAKE_POST_LINK += && ln -sf $${TARGET}.app/Contents/Frameworks $${TARGET}.app/Contents/Frameworks/GStreamer.framework/Versions/1.0/libexec/Frameworks
QMAKE_POST_LINK += && install_name_tool -change /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/GStreamer @executable_path/../Frameworks/GStreamer.framework/Versions/1.0/lib/GStreamer $${TARGET}.app/Contents/MacOS/$${TARGET}
QMAKE_POST_LINK += && rm -rf $${TARGET}.app/Contents/Frameworks/GStreamer.framework/Versions/1.0/{bin,etc,share,Headers,include,Commands}
QMAKE_POST_LINK += && rm -rf $${TARGET}.app/Contents/Frameworks/GStreamer.framework/Versions/1.0/lib/{*.a,*.la,glib-2.0,gst-validate-launcher,pkgconfig}
codesign {
# Disabled for now since it's not working correctly yet
#QMAKE_POST_LINK += && echo codesign
#QMAKE_POST_LINK += && codesign --deep $${TARGET}.app -s WQREC9W69J
}
# Create package
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 += && rm -rf /tmp/tmp.dmg
QMAKE_POST_LINK += && rm -rf package/$${TARGET}.dmg
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) $$quote("\"C:\\Program Files \(x86\)\\NSIS\\makensis.exe\"" $$(QGC_NSIS_INSTALLER_PARAMETERS) /DDRIVER_MSI="\"$${QGC_INSTALLER_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\"" "\"$${QGC_INSTALLER_SCRIPT}\"")
OTHER_FILES += $${QGC_INSTALLER_SCRIPT}
}
LinuxBuild {
#-- TODO: This uses hardcoded paths. It should use $${DESTDIR}
QMAKE_POST_LINK += && mkdir -p package
QMAKE_POST_LINK += && tar -cj --exclude='package' -f package/Peach-GS.bz2 staging --transform 's/$${DESTDIR}/Peach-GS/'
}
AndroidBuild {
_ANDROID_KEYSTORE_PASSWORD = $$(ANDROID_KEYSTORE_PASSWORD)
QMAKE_POST_LINK += && mkdir -p package
isEmpty(_ANDROID_KEYSTORE_PASSWORD) {
message(Keystore password not available - not signing package)
# This is for builds in forks and PR where the Android keystore password is not available
QMAKE_POST_LINK += && make apk
QMAKE_POST_LINK += && cp android-build/build/outputs/apk/debug/android-build-debug.apk package/QGroundControl$${ANDROID_TRUE_BITNESS}.apk
} else {
QMAKE_POST_LINK += && make apk_install_target INSTALL_ROOT=android-build
QMAKE_POST_LINK += && androiddeployqt --verbose --input android-$${TARGET}-deployment-settings.json --output android-build --release --sign $${SOURCE_DIR}/android/android_release.keystore QGCAndroidKeyStore --storepass $$(ANDROID_KEYSTORE_PASSWORD)
QMAKE_POST_LINK += && cp android-build/build/outputs/apk/release/android-build-release-signed.apk package/$${TARGET}-$${ANDROID_TRUE_BITNESS}.apk
}
}
}