Unverified Commit 47c1713c authored by Gus Grubba's avatar Gus Grubba Committed by GitHub

Merge pull request #6782 from mavlink/iosBuild

iOS build and mobile sizing
parents e09e6694 80547955
......@@ -14,6 +14,7 @@ mkdir -p ${SHADOW_BUILD_DIR} &&
cd ${SHADOW_BUILD_DIR} &&
#-- Create project only (build using Xcode)
${QMAKE} -r ${TRAVIS_BUILD_DIR}/qgroundcontrol.pro CONFIG+=WarningsAsErrorsOn CONFIG-=debug_and_release CONFIG+=release CONFIG+=ForAppStore
sed -i .bak 's/com.yourcompany.${PRODUCT_NAME:rfc1034identifier}/org.QGroundControl.qgc/' ${SHADOW_BUILD_DIR}/QGroundControl.xcodeproj/project.pbxproj
#-- Create and build
#${QMAKE} -r ${TRAVIS_BUILD_DIR}/qgroundcontrol.pro CONFIG+=WarningsAsErrorsOn CONFIG-=debug_and_release CONFIG+=release CONFIG+=ForAppStore &&
#xcodebuild -configuration Release -xcconfig ${TRAVIS_BUILD_DIR}/ios/qgroundcontrol_appstore.xcconfig
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-41.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-60.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "AppIcon29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-87.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "AppIcon40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-120.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "AppIcon60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-180.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-20.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-40.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "AppIcon29x29.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "AppIcon29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "AppIcon40x40~ipad.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "AppIcon40x40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "AppIcon76x76~ipad.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "AppIcon76x76@2x~ipad.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-167.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-1024.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
......@@ -26,8 +26,6 @@
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>QGCLaunchScreen</string>
<key>UIRequiresFullScreen</key>
<true/>
<key>CFBundleInfoDictionaryVersion</key>
......@@ -38,6 +36,8 @@
<string>Ground Station Location</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Ground Station Location</string>
<key>UILaunchStoryboardName</key>
<string>QGCLaunchScreen</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationLandscapeLeft</string>
......
......@@ -16,51 +16,12 @@
<string>QGC uses UVC devices for video streaming.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>We do not access it. Apple thinks we do.</string>
<key>UILaunchStoryboardName</key>
<string>QGCLaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>AppIcon29x29.png</string>
<string>AppIcon29x29@2x.png</string>
<string>AppIcon40x40@2x.png</string>
<string>AppIcon57x57.png</string>
<string>AppIcon57x57@2x.png</string>
<string>AppIcon60x60@2x.png</string>
</array>
</dict>
</dict>
<key>CFBundleIcons~ipad</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>AppIcon29x29.png</string>
<string>AppIcon29x29@2x.png</string>
<string>AppIcon40x40@2x.png</string>
<string>AppIcon57x57.png</string>
<string>AppIcon57x57@2x.png</string>
<string>AppIcon60x60@2x.png</string>
<string>AppIcon29x29~ipad.png</string>
<string>AppIcon29x29@2x~ipad.png</string>
<string>AppIcon40x40~ipad.png</string>
<string>AppIcon40x40@2x~ipad.png</string>
<string>AppIcon50x50~ipad.png</string>
<string>AppIcon50x50@2x~ipad.png</string>
<string>AppIcon72x72~ipad.png</string>
<string>AppIcon72x72@2x~ipad.png</string>
<string>AppIcon76x76~ipad.png</string>
<string>AppIcon76x76@2x~ipad.png</string>
<string>AppIcon83.5x83.5@2x~ipad.png</string>
</array>
</dict>
</dict>
<key>CFBundleIdentifier</key>
<string>org.QGroundControl.qgc</string>
<key>CFBundleInfoDictionaryVersion</key>
......@@ -83,8 +44,8 @@
<string>Ground Station Location</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Ground Station Location</string>
<key>UILaunchStoryboardName</key>
<string>QGCLaunchScreen</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Ground Station Location</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>QGroundControl would like to use bluetooth.</string>
<key>UIRequiresFullScreen</key>
......
......@@ -62,9 +62,9 @@ iOSBuild {
QMAKE_INFO_PLIST = $${BASEDIR}/ios/iOS-Info.plist
OTHER_FILES += $${BASEDIR}/ios/iOS-Info.plist
}
BUNDLE.files = $$files($$PWD/ios/AppIcon*.png) $$PWD/ios/QGCLaunchScreen.xib $$QMAKE_INFO_PLIST
QMAKE_BUNDLE_DATA += BUNDLE
#-- TODO: Add iTunesArtwork
QMAKE_ASSET_CATALOGS += ios/Images.xcassets
BUNDLE.files = ios/QGCLaunchScreen.xib $$QMAKE_INFO_PLIST
QMAKE_BUNDLE_DATA += BUNDLE
}
LinuxBuild {
......
......@@ -54,7 +54,20 @@ Item {
readonly property real largeFontPointRatio: 1.5
property real realPixelDensity: QGroundControl.corePlugin.options.devicePixelDensity != 0 ? QGroundControl.corePlugin.options.devicePixelDensity : Screen.pixelDensity
property real realPixelRatio: QGroundControl.corePlugin.options.devicePixelRatio != 0 ? QGroundControl.corePlugin.options.devicePixelRatio : Screen.devicePixelRatio
property real realPixelRatio: {
//-- If a plugin defines it, just use what it tells us
if (QGroundControl.corePlugin.options.devicePixelRatio != 0)
return QGroundControl.corePlugin.options.devicePixelRatio
//-- Mobile is rather unreliable. They all return 1 for Screen.devicePixelRatio.
if(isMobile) {
// Lets assume it's unlikely you have a tablet over 300mm wide
if((Screen.width / Screen.pixelDensity * Screen.devicePixelRatio) > 300)
return 2
}
//-- Use whatever the system tells us
return Screen.devicePixelRatio
}
property bool isAndroid: ScreenToolsController.isAndroid
property bool isiOS: ScreenToolsController.isiOS
......
......@@ -120,8 +120,8 @@ void initializeVideoStreaming(int &argc, char* argv[], char* logpath, char* debu
qgcputenv("GST_PLUGIN_PATH", currentDir, "/gstreamer-plugins");
#endif
// Initialize GStreamer
#if !defined(__ios__)
if (logpath) {
if (debuglevel) {
qputenv("GST_DEBUG", debuglevel);
......@@ -130,9 +130,8 @@ void initializeVideoStreaming(int &argc, char* argv[], char* logpath, char* debu
qputenv("GST_DEBUG_FILE", QString("%1/%2").arg(logpath).arg("gstreamer-log.txt").toUtf8());
qputenv("GST_DEBUG_DUMP_DOT_DIR", logpath);
}
GError* error = NULL;
#endif
GError* error = nullptr;
if (!gst_init_check(&argc, &argv, &error)) {
qCritical() << "gst_init_check() failed: " << error->message;
g_error_free(error);
......
......@@ -160,13 +160,13 @@ QGCView {
font.family: ScreenTools.normalFontFamily
}
Text {
text: Screen.pixelDensity.toFixed(4)
color: qgcPal.text
text: Screen.pixelDensity.toFixed(4)
color: qgcPal.text
font.family: ScreenTools.normalFontFamily
}
Text {
text: qsTr("Font Point Size 13.5")
color: qgcPal.text
text: qsTr("Font Point Size 13.5")
color: qgcPal.text
font.pointSize: 13.5
font.family: ScreenTools.normalFontFamily
}
......@@ -218,6 +218,38 @@ QGCView {
font.pointSize: 15
font.family: ScreenTools.normalFontFamily
}
Text {
text: qsTr("Computed Screen Height:")
color: qgcPal.text
font.family: ScreenTools.normalFontFamily
}
Text {
text: (Screen.height / Screen.pixelDensity * Screen.devicePixelRatio).toFixed(0)
color: qgcPal.text
font.family: ScreenTools.normalFontFamily
}
Text {
text: qsTr("Font Point Size 15.5")
color: qgcPal.text
font.pointSize: 15.5
font.family: ScreenTools.normalFontFamily
}
Text {
text: qsTr("Computed Screen Width:")
color: qgcPal.text
font.family: ScreenTools.normalFontFamily
}
Text {
text: (Screen.width / Screen.pixelDensity * Screen.devicePixelRatio).toFixed(0)
color: qgcPal.text
font.family: ScreenTools.normalFontFamily
}
Text {
text: qsTr("Font Point Size 16")
color: qgcPal.text
font.pointSize: 16
font.family: ScreenTools.normalFontFamily
}
}
Rectangle {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment