When using Xcode7 (beta 6) "xcrun simctl list devices" will also list iWatch
devices. So we need to filter them out so we don't end up picking one
when building and running auto tests.
This will fix a build failure when building Qt with latest Xcode7.
Change-Id: Ie40489d670298ec75332a6c2b54565d55e9dbbba
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Instead of going to qmake to generate the makefile that we want, we write
the makefile directly and include it from the generated makefile. This
leaves us with a single top level makefile for handling exclusive builds
through xcodebuild, and covers all the various build configurations in
a unified manner. It also allows for improved test device handling.
Change-Id: I66851f181ac4da2c8938645e0aa95ffa0fee33c7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
The logic was lumped together in one big file. Now that things are more
stable and the logic has proven to work over time we can split it out
into the more appropriate sub-prfs.
Change-Id: I9a40ad72ad9d7550b609e7f50fade1049dfa3ac1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Consider a project that does the following:
launch_images.files = $$PWD/LaunchImage.xib
QMAKE_BUNDLE_DATA += launch_images
In that case we end up overwriting launch_images.files in default_post, and
at the same time, add launch_images a second time to QMAKE_BUNDLE_DATA.
The result will be that we copy our own launch image twize into the bundle.
To prevent this, prepend our internal variables with qmake_
Change-Id: I24f870874017b5388248e3bfadecd461422ffe35
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
With iOS 6.0 and above the LC_MAIN load command is available, which allows
dyld to call the application entrypoint directly instead of going through
_start in crt.o. By passing -e to the linker we can change this entrypoint
to our wrapper that sets up the separate stack before entering the native
iOS runloop through UIApplicationMain. As before, we call the user's main()
from applicationDidFinishLaunching.
By using LC_MAIN instead of messing with the object files we open up the
possibility of generating Bitcode instead of object code, which can be
useful for link-time optimizations, either locally or by Apple.
Change-Id: If2153bc919581cd93dfa10fb6ff1c305b3e39a52
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Likely culprit for issues in the CI when building iOS tests.
This reverts commit 9a7564edee.
Change-Id: I02ac77a305b5863c9533c97ba06aaafe8f176a22
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Don't clear QMAKE_EXTRA_TARGETS when creating makefiles.
Clearing it seems unnecessary, since it doesn't cause any
harm to make the functionality available to projects.
Change-Id: I470106b28124baf9df7000a7a70ee7159236c77a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Xcode has a setting for script phases to filter out the environment
variables, so we don't need to use grep.
Change-Id: Ica1c64321385ab3e3b47cf6f8f4d4191bd963540
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Change-Id: I1692cf3eb34726c15eaa969a369bb97a89773bfd
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
The Xcode project generator doesn't support exclusive builds, and always
runs as the default debug/release config, and with iPhoneOS as the target
platform. This means we need to parameterize the QMAKE_MAC_SDK_* build
settings to depend on the currently active SDK in Xcode, so that the
paths, when used in eg. linker flags, are up to date.
Change-Id: I9ca10f794e14ab440d98820657758b3fd8a7cdb0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
The logic failed for cases like QT += core widgets.
Change-Id: Ic49c1a2314a4698b03956acbd6778b658326f3e2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
The latter location resulted in the wrong SDK paths being resolved if
sdk.prf was loaded before default_post.prf through an explicit load(sdk)
call.
Change-Id: Ia443260572fbdf5f9ed1daf558c2962703274e32
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.
Outdated header.LGPL removed (use header.LGPL21 instead)
Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing
combination. New header.LGPL-COMM taken in the use file which were
using old header.LGPL3 (src/plugins/platforms/android/extract.cpp)
Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license
combination
Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe
Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
The current work-flow for adding app icons to an
iOS app during deployment is not good. You basically
need to specify that you want to use asset catalogs
from within Xcode and add your icons there. The
problem is that qmake will regenerate the Xcode project
the next time it runs, and your changes will then be lost.
This patch will check if the project has a valid asset
catalog assigned to QMAKE_BUNDLE_DATA, and configure
the Xcode project to use it for app icons.
Change-Id: I06621ca46aad91de96cb23ba8ca3b1a3f1226670
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
AppStore validation requires deployment target to be
at least 5.1.1 for 64-bit applications.
Change-Id: I4d857ad983e6d4059f541bff523dd63479aca849
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
If using an older version of Xcode, Xcode will sometimes complain
that LaunchScreen.xib uses auto layout while the project at
the same time has deployment target set to 5.0 (where auto layout
is not supported).
This is a bug in Xcode really, since LaunchScreen.xib will only be
used when running on iOS 7 (otherwise a LaunchImage will be used).
This has been fixed in Xcode 6.
This patch adds a check for this early on.
Change-Id: Ie612c25b413add23e15fc3cb4f9e30bb5292369d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
You're likely to only target/develop on one device at a time, so
we only need to build for one architecture at a time. Switching
device in Xcode will switch the active architecture as well, so
the only case where you'll need a universal debug build is if
you are creating a debug package for testers.
Change-Id: I4f37f5c982082c42836749d1e9fbe5ef91138912
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Apple will from February 1, 2015, require all applications uploaded to
the App Store to be built for both 32-bit (armv7/s) and 64-bit (arm64).
https://developer.apple.com/news/?id=10202014a
We enable fat Qt binaries by passing both -arch armv7 and -arch arm64
to clang, which takes care of lipoing together the two slices for each
object file. This unfortunately means twice the build time and twice
the binary size for our libraries.
Since precompiled headers are architecture specific, and the -Xarch
option can't be used with -include-pch, we need to disable precompiled
headers globally. This can be improved in the future by switching to
pretokenized headers (http://clang.llvm.org/docs/PTHInternals.html).
Since we're enabling 64-bit ARM builds, we're also switching the
simulator builds from i386 to fat i386 and x86_64 builds, so that
we are able to test 64-bit builds using the simulator, but we're
keeping i386 as the architecture Qt is aware of when it's building
for simulator, as we need the CPU features to match the lowest
common denominator.
Change-Id: I277e60bddae549d24ca3c6301d842405180aded6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Building all architectures of a multi-arch build during Qt development
is in most cases not needed, so we expose a way to limit the archs we
build by passing ARCHS="subset of archs" to make, similar to how you
can pass ARCHS to xcodebuild. If the subset doesn't match any of the
valid architectures for the target, it will fall back to the default
architectures, so it's safe to pass eg. ARCHS="armv7 i386" to make,
even if building for both simulator and device. The variable may also
be exported to the environment for more persistent limits on which
architectures to build.
Change-Id: I47b10bc9d743f0301efff4181d6881ae140d557f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
We need to tell Xcode which architectures it should set up pre-link
dependencies for, as well as run the rename script in the root object
file directory. We pass it the current architectures so that we only
rename main() for simulator or device, not both.
Change-Id: I095d7c8a22ff0cb2ce872c9a86c93a070c1fcc65
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
iOS8 will check if the app has a LaunchScreen.xib to determine
if it supports iPhone6/6+ (scale factor and resolution). So
we follow the same pattern as we do with the launch image for
iPhone5, and generate a default LaunchScreen.xib.
The xib file in this patch is a copy of a default file
generated by a native Xcode project (with quotes escaped), but
with the text label set to be $$TARGET.
Change-Id: I163ab48b6f4edea4cc1f6840a1f3d8b3cc0326db
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Ensure the sdk is of recent enough version since:
1. we build Qt with the latest sdk version, so the app needs
to do the same to avoid compatibility problems e.g when linking.
2. using a launch screen to support iphone6 depends on sdk 8
3. Apple requires apps that are pushed to appstore to use the
latest version of the sdk.
Ideally we should store the sdk version used to build Qt, and
require that apps use the same version or newer. But this patch
will do until that is in place.
Change-Id: I18b06d09c1eda15122975b7169ca7a3372df6054
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Change-Id: Ib410584ba2c1fe342efb18eb955273090d36db8f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
When the UISupportedInterfaceOrientations key is missing, iOS will start
up the application in the orientation defined by UIInterfaceOrientation,
and if that key is also missing, it will default to portrait orientation.
Unfortunately, when the application has finished launching on an iPad,
there is no way to re-evaluate the current device orientation unless the
user actively rotates the device, so for example if the device is physically
in landscape orientation, and the application is started up in portrait,
the application will not auto-rotate to landscape after starting up.
It would seem that [UIViewController attemptRotationToDeviceOrientation]
would be the right API to do this, but even after telling the device
to beginGeneratingDeviceOrientationNotifications the device orientation
will still match the startup orientation until the device is physically
rotated. For iPod/iPhones this is not an issue, as the OS will update
the device orientation after startup. Presumably the difference in
behavior between the two device classes is due to the iPad supporting
any orientation for the application grid.
Since we would prefer the application to either start up in the right
orientation directly, or at least rotate to it after startup, and the
latter can't be done, we apply UIInterfaceOrientationMaskAll to the
Info.plist file. This also has the benefit that the application will
show any splash screens in the right orientation.
Change-Id: If0421bc7b82b7f14a510fa1f34eac4f6407f570f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Add @FULL_VERSION@ -> Qt version substitution to
unixmake2.
This makes the Qt-generated Info.plist files compliant
with the bundle signing/validation process.
Task-number: QTBUG-32896
Change-Id: I1818f028c2f740d699629dd78cc0fe6ffaf94a1c
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This field specifies whether the app is an iOS app.
Change-Id: I38cfcbec97b32f517a14a9a34f1eb871b9fa1ef7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Now that we rely on simd.prf for all SIMD sources (including NEON and SSE2),
we need to ensure that CONFIG has the right SIMD values to match simulator.
This worked before due to us checking QT_CPU_FEATURES.$$QT_ARCH and adding
directly to SOURCES.
Change-Id: I4ea7f559e83860eabff1948ad5d140bbb65454df
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We don't have a way to rename main() inside a LLVM bit-code file yet, so we
error out if we detect that LTO is enabled (which causes object files to be
written as LLVM bit-code), and inform the user about a workaround.
Task-number: QTBUG-40184
Change-Id: I89c927a3a7f075c65e54442c4f7e6bb25175b6f7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
After bbcdccd, a deprecation warning is written to
the console every time you run qmake on iOS.
This change will make use of the new QTPLUGIN.platforms=-
instead if the deprecated CONFIG -= import_qpa_plugin
Change-Id: I51e4f9d18f6abd87512a39b3236b89d5444fd6c1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Enabling check target to run test apps in iPhone simulator.
Task-number: QTBUG-36639
Change-Id: I700d998fe9f1a6c910431789e98e4789d820f3e4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
The default is still DWARF instead of DWARF with dSYM for static builds
of Qt, so that debug builds of the final application don't take forever
to build due to generating the dSYM file.
Change-Id: I370d800d7c959e05c1a8780c4ebf58fff250daa1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
In case of a SUBDIR qmake project, it tried to cd into a directory
that did not exist yet. I needed to run qmake twice to get it working.
This fixes it.
Change-Id: I6d322e9a7c96a9d82df77b9ba5f19711a8180ed0
Task-number: QTBUG-37429
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Otherwise the compiler may choose libc++ based on the deployment target,
and we'll end up with broken builds due to the mismatch between the two
libraries, eg:
Undefined symbols for architecture x86_64:
"std::ios_base::Init::Init()", referenced from:
__GLOBAL__I_a in libQt5Qml.a(qv4object.o)
...
"std::ios_base::Init::~Init()", referenced from:
__GLOBAL__I_a in libQt5Qml.a(qv4object.o)
...
"std::__throw_length_error(char const*)", referenced from:
...
This problem is not iOS specific, which is why the logic is moved
to the more generic mac/default_post.prf.
Change-Id: I28b94e614f9167fc0db84bbf1c88dd97d5629938
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Instead of sprinkling '!ios' all around the various modules. This is
a bit more fine grained than the CFG_NOBUILD_PARTS += "tests" that we
had in configure.
Change-Id: I6ca2e5df118dfc0bb5d7b8495a3543f51dc0fa30
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Commit 3c375a76a1 enabled SSE2 in Qt,
but we failed to build the files that implemented the SSE2 specific
drawhelpers and image functions. Since we know what the iOS simulator
supports and the platforms it runs on we can safely enable this
ourselves without it being based on a configure test.
Change-Id: I0cfc43de80068b89aa47c34ffa84ee1c1734886c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Static builds of Qt will automatically enable C++11 for all projects,
but this happens in mac/default_post which is after our check.
Change-Id: I22a01e5d876242263fa31f8a404a65905c6c1877
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Processing the object file with ld strips away debug information for
the main() function, resulting in the debugger not being able to
break on specific lines of the function.
It also causes issues when externing sybols in main's object file.
We revert back to the approach of using the strings in-line in the
object file (which is why we keep the name the same length, 'qtmn').
Task-number: QTBUG-35553
Change-Id: I8b0acee36f48ecfefa2e4fd008a842365713d985
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Otherwise Xcode might choose to use libc++, eg when the deployment target
is iOS7, and this doesn't work when Qt itself was built using libstdc++.
Change-Id: I0b0f36666ed318be9aae87ebaeb0d344109566ac
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>