Qt5 on OS X 10.9, - without - Xcode?
-
Hi,
just a simple Question;
Is it possible - and if so, how - to install Qt5 and the Qt Creator without being forced to install more than 3 gigabytes of bloat I'll never ever touch? I understand that Xcode usually supplies the development tools, but Apple does provide a .dmg for that - one that I have installed. In addition, GCC 4.8.2 is also installed.
Qt is the only thing I've run into, that flat-out refuses to work with this configuration. Needless to say that I did some googling on this, but the default response appears to be "just install Xcode". See, if all Qt development was done in Xcode, okay, I could understand. But, as another thread states "you don't even have to open it".
It'd be really nice if someone could help.
-
I always just install Xcode :)
Maybe lookup the git repo, and look for the main contributors of the OSX specific code...
They probably know most about the environmeny requirements
-
Try to install "Command Line Tools for OSX" this package contains build tools without any GUI.
From the developer.apple.com site
"This package enables UNIX-style development via Terminal by installing command line developer tools, as well as Mac OS X SDK frameworks and headers. Many useful tools are included, such as the Apple LLVM compiler, linker, and Make. If you use Xcode, these tools are also embedded within the Xcode IDE, and can be installed on your system using the Downloads preferences pane within Xcode 5.1.1." -
[quote author="andreyc" date="1398096845"]Try to install "Command Line Tools for OSX" this package contains build tools without any GUI.
[/quote]That was the package I was referring to. It is installed.
-
Hi and welcome to devnet,
Just an educated guess but since Qt Creator is now supporting development of iOS software, it might be possible that Xcode is needed for the device related stuff and/or simulator.
The interest mailing list might be more suited for this question, you'll find there Qt's developers/maintainers (this forum is more user oriented)
-
Hi,
I know I'm digging a grave~~~, but I really got the same idea as the author. I tried some hacks and finally found a not so perfect solution.
Just as @SGaist stated, "Qt Creator now supporting development of iOS software", so if you wanted to develop an iOS app, then you can not use my workaround. However, if you just wanted to develop desktop apps, then it should be fine to follow my methods here:(I'm using the brewed qt5 version 5.7.1_1 as an example. And of course, you have to install the 'Command Line Tools' from apple)
step 1. change directory to '/usr/local/Cellar/qt5/5.7.1_1/mkspecs/features/mac'
step 2. edit 'sdk.prf', change following line:QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcodebuild -sdk $$sdk -version $$info 2>/dev/null")
to
equals(info, "Path") { QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcrun --sdk $$sdk --show-sdk-path 2>/dev/null") } equals(info, "PlatformPath") { QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcrun --sdk $$sdk --show-sdk-platform-path 2>/dev/null") } equals(info, "SDKVersion") { QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcrun --sdk $$sdk --show-sdk-version 2>/dev/null") }
step 3. edit 'default.prf', comment out the following 2 lines (add an '#' at the beginning of each line):
isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null"))): \ error("Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.")
and change the following 3 lines from:
xcode_version = $$system("/usr/bin/xcodebuild -version") QMAKE_XCODE_VERSION = $$member(xcode_version, 1) isEmpty(QMAKE_XCODE_VERSION): error("Could not resolve Xcode version.")
to
xcode_version = 8.2.1#$$system("/usr/bin/xcodebuild -version") QMAKE_XCODE_VERSION = 8.2.1#$$member(xcode_version, 1) # isEmpty(QMAKE_XCODE_VERSION): error("Could not resolve Xcode version.")
That's it! You should probably ready to go with qt5 and CLT (command line tools) without the bloated Xcode installation.
-
You can just follow this article: Qt without XCode - how to use Qt Creator for macOS software development without installing XCode