Chill Cocoa Mac OS

Cocoa-AppleScript applets can be executed on computers running either Mac OS X v10.6 (Snow Leopard) or Mac OS X v10.7 (Lion). However, the applets cannot be edited using the AppleScript Editor in Mac OS X v10.6 (Snow Leopard). Properties in Cocoa-AppleScript applets do not retain changed values between executions of the scripts. While you could prepare mac & cheese and chili separately and then combine them together at the end to make chili mac, this recipe allows you to combine the cooking process so you only have to use one pot. The way this is achieved is by preparing the chili with a little extra liquid that gets used to cook the pasta. Cheese is then added at the. Carbon was an important part of Apple's strategy for bringing Mac OS X to market, offering a path for quick porting of existing software applications, as well as a means of shipping applications that would run on either Mac OS X or the classic Mac OS. As the market has increasingly moved to the Cocoa-based frameworks, especially after the release of iOS, the need for a porting library was diluted. Mac OS X, a unified operating system and graphical operating environment, is the fastest growing Unix variant on the market today. Hard-core Unix programmers, developers who cut their teeth on classic Mac operating systems, and developers who cherished NeXTSTEP, the decade-old system on which today's Cocoa is based - all are flocking to Cocoa.

Press Release: May 30, 2001

O'Reilly Releases Learning Carbon and Learning Cocoa for Mac Os X Developer Community

San Jose, CA--O'Reilly & Associates announced at Apple's Worldwide Developers Conference 2001 that the first two in a series of highly anticipated books on Mac OS X application development- Learning Carbon and Learning Cocoa (O'Reilly, each US $34.95)--have been released. Designed to teach Apple developers the key concepts about programming for Mac OS X, Learning Carbon and Learning Cocoa provide the essential tools for porting existing code to the new operating system, and using the examples provided, act as springboards to help developers create their own industrial-strength applications.

'The interest in developing for Mac OS X is incredible here at our Worldwide Developer conference,' said Ron Okamoto, Apple's vice president of Worldwide Developer Relations. 'Written by Mac OS X experts, technically reviewed by Apple engineers, and produced and edited to O'Reilly's trademark high standard of quality, Learning Carbon and Learning Cocoa will be invaluable resources to our developers.'

Carbon is one of the principal application environments Mac OS X programmers can use to write applications. Utilizing Carbon, programmers can tune-up their existing Mac source code to take advantage of the new features in Mac OS X.

Learning Carbon introduces the developer to key concepts like event management, resource handling, and bundle anatomy. In addition, hands-on instructions guide the reader on topics of how to implement essential application tasks, such as managing windows, creating and responding to menu commands, providing user help, and organizing the application for easy localization in multiple countries and languages.

Cocoa is the second principal application environment for Mac OS X. Among Cocoa's many attributes, its advanced object-oriented APIs allow developers to work in both Java and Objective-C.

With Learning Cocoa by their side, readers quickly become familiar with Cocoa application development not merely by reading, but by doing. For those with no previous experience, the book breaks the ice with a discussion of essential object-oriented programming concepts, before a thorough introduction to the Cocoa environment helps them become familiar with the basic elements of Cocoa programming. Tutorials guide the reader through a series of gradually more complex example applications, laying the foundation for more advanced techniques and concepts every time.

The writing team has incorporated a playful spirit into this book, as the reader is encouraged to play, explore, and 'kick the tires' of Cocoa, demystifying Apple's development environment and getting developers eager to program in it.

Recommended by the Apple Developer Connection, Learning Carbon and Learning Cocoa provide information not available anywhere else, and perfectly equip the developer to hit the ground running in the Mac OS X application development market.

Online Resources:

For Learning Carbon:

  • The sample chapter, 'Carbon Event,' is available free online.

  • More information about the book, including Table of Contents, index, author bio, and samples.

  • A cover graphic in jpeg format.

For Learning Cocoa:

Chill cocoa mac os x
  • Chapter 6, 'Essential Cocoa Paradigms,' is available free online at:

  • An in depth series of articles on 'Programming with Cocoa' is available on the O'Reilly Network Mac DevCenter.

  • More information about the book, including Table of Contents, index, author bio, and samples.

  • A cover graphic in jpeg format.

Learning Carbon
By Apple Computer, Inc.
May 2001
ISBN 0-596-00161-4, 352 pages, $34.95 (US)

Learning Cocoa
By Apple Computer, Inc.
May 2001
ISBN 0-596-00160-6, 370 pages, $34.95 (US)

order@oreilly.com
1-800-998-9938

About O’Reilly

For 40 years, O’Reilly has provided technology and business training, knowledge, and insight to help companies succeed. Our unique network of experts and innovators share their knowledge and expertise through the company’s SaaS-based training and learning solution, O’Reilly online learning. O’Reilly delivers highly topical and comprehensive technology and business learning solutions to millions of users across enterprise, consumer, and university channels. For more information, visit www.oreilly.com.

Mac OS X is a UNIX platform and behaves similar to other Unix-like platforms. The main difference is X11 is not used as the primary windowing system. Instead, Mac OS X uses its own native windowing system that is accessible through the Carbon and Cocoa APIs. Application development on Mac OS X is done using Xcode Tools, an optional install included on every Mac with updates available from Apple's developer website. Xcode Tools includes Apple-modified versions of the GCC compiler.

What Versions of Mac OS X are Supported?

As of Qt 4.7, Qt supports Mac OS X versions 10.4 and up. It is usually in the best interest of the developer and user to be running the latest updates to any version. We test internally against Mac OS X 10.4.11 as well as the updated release of Mac OS X 10.5 and Mac OS X 10.6.

Carbon or Cocoa?

Qt supports building in two flavors, using either the Carbon or Cocoa API. Using the Cocoa API, Qt requires 10.5 and provides both 32-bit and 64-bit support. With Carbon, Qt can be developed on and deployed to 10.4, but there is no 64-bit support.

Note: There is no accessibility support in the Cocoa version. This is planned for Qt 4.8.

With Qt 4.7 we recommend using the Cocoa version of Qt for development, unless you want to target the 10.4 platform. Qt uses Cocoa by default, both for the binary package and when configuring Qt from source (using the configure script). To build Qt for Carbon, specify the -carbon flag to configure.

There are two versions of the Qt binary, one with x86 and x86_64 Cocoa and another with x86 and ppc Carbon. If you want a different setup you must build Qt yourself using the source package. To explicitly configure Qt to build for 34-bit or 64-bit architectures (or both), use the -arch flags (see Universal Binaries). For the Cocoa version, 64 bit is chosen by default.

Currently, Apple's default GCC compiler is used by default (GCC 4.0.1 on 10.4 and 10.5, GCC 4.2 on 10.6). You can specify alternate compilers though. For example, on Mac OS X 10.5, Apple's GCC 4.2 is also available and selectable with the configure flag: -platform macx-g++42. LLVM-GCC support is available by passing in the -platform macx-llvm flag. GCC 3.x will not work. Though they may work, We do not support custom-built GCC's.

The following table summarizes the different versions of Mac OS X and what capabilities are used by Qt.

Mac OS X VersionCat NameNative API Used by QtBits available to address memoryCPU Architecture SupportedDevelopment Platform
10.4TigerCarbon32PPC/IntelYes
10.5LeopardCarbon32PPC/IntelYes
10.5LeopardCocoa32/64PPC/IntelYes
10.6Snow LeopardCocoa/Carbon32PPC/IntelYes
10.6Snow LeopardCocoa64IntelYes

Note that building for ppc-64 is not supported on 10.6.

Which One Should I Use?

Carbon and Cocoa both have their advantages and disadvantages. Probably the easiest way to determine is to look at the version of Mac OS X you are targetting. If your application can target 10.5 and up, then we recommend using Cocoa. If you need to target earlier versions of the operating system and do not need access to 64-bit or newer Apple technologies, then Carbon is a good fit. If your needs fall in between, you can go with a 64-bit Cocoa and 32-bit Carbon universal application.

For Mac OS X 10.6, Apple has started recommending developers to build their applications 64-bit. The main reason is that there is a small speed increase due to the extra registers on Intel CPU's, all their machine offerings have been 64-bit since 2007, and there is a cost for reading all the 32-bit libraries into memory if everything else is 64-bit. If you want to follow this advice, there is only one choice, 64-bit Cocoa.

Building Qt statically

We recommend building Qt as shared frameworks. Static builds are only partially supported, meaning that you can build most of Qt statically, but some modules, like web-kit and Designer, will fail. You can specify which modules to build from configure (e.g. -no-webkit -nomake tools). For Cocoa configurations, both static and no-framework builds requires manually copying the 'src/gui/mac/qt_menu.nib/ directory into the ' Resources' directory in the application bundle.

Universal Binaries

In 2006, Apple begin transitioning from PowerPC (PPC) to Intel (x86) systems. Both architectures are supported by Qt. The release of Mac OS X 10.5 in October 2007 added the possibility of writing and deploying 64-bit GUI applications. Qt 4.5 and up supports both the 32-bit (PPC and x86) and 64-bit (PPC64 and x86-64) versions of PowerPC and Intel-based systems.

Universal binaries are used to bundle binaries for more than one architecture into a single package, simplifying deployment and distribution. When running an application the operating system will select the most appropriate architecture. Universal binaries support the following architectures; they can be added to the build at configure time using the -arch arguments:

ArchitectureFlag
Intel, 32-bit-arch x86
Intel, 64-bit-arch x86_64
PPC, 32-bit-arch ppc
PPC, 64-bit-arch ppc64

If there are no -arch flags specified, configure builds Qt for a 32-bit architecture when using Carbon, and a 64-bit architecture when using Cocoa. Universal binaries were initially used to simplify the PPC to Intel migration. You can use -universal to build for both the 32-bit Intel and PPC architectures.

Note: The -arch flags at configure time only affect how Qt is built. Applications are by default built for the 32-bit architecture you are currently on. To build a universal binary, add the architectures to the CONFIG variable in the .pro file:

Working with several versions of Qt

You can only install one version of Qt at a time when using the binary package. The reason for this is that a binary installation will install different parts of Qt (frameworks, documentation, examples, tools, etc) to different predefined locations on the OS, as described by Apple. If you want to work against other versions at the same time, you need to build the other versions explicitly from source. When doing so, you can provide -prefix to configure to set install location. The binary package will install Qt to the following locations:

QtLocation
Designer, Linguist .../Developer/Applications/Qt
Documentation/Developer/Documentation/Qt
Examples/Developer/Examples/Qt
Plugins/Developer/Applications/Qt/Plugins
Frameworks/Library/Frameworks
Libraries/usr/lib
qmake, moc, uic .../Developer/Tools/Qt (symlink to /usr/bin)
uninstall-qt.py, uninstall-qtsdk.py/Developer/Tools

Day-to-Day Application Development on OS X

On the command-line, applications can be built using qmake and make. Optionally, qmake can generate project files for Xcode with -spec macx-xcode. If you are using the binary package, qmake generates Xcode projects by default; use -spec macx-gcc to generate makefiles.

The result of the build process is an application bundle, which is a directory structure that contains the actual application executable. The application can be launched by double-clicking it in Finder, or by referring directly to its executable from the command line, i. e. myApp.app/Contents/MacOS/myApp.

If you wish to have a command-line tool that does not use the GUI (e.g., moc, uic or ls), you can tell qmake not to execute the bundle creating steps by removing it from the CONFIG in your .pro file:

Chill Cocoa Mac Os Download

Deployment - 'Compile once, deploy everywhere'

In general, Qt supports building on one Mac OS X version and deploying on all others, both forward and backwards. You can build on 10.4 Tiger and run the same binary on 10.5 and up.

Some restrictions apply:

  • Some functions and optimization paths that exist in later versions of Mac OS X will not be available if you build on an earlier version of Mac OS X.
  • The CPU architecture should match.
  • Cocoa support is only available for Mac OS X 10.5 and up.

Universal binaries can be used to provide a smorgasbord of configurations catering to all possible architectures.

Mac applications are typically deployed as self-contained application bundles. The application bundle contains the application executable as well as dependencies such as the Qt libraries, plugins, translations and other resources you may need. Third party libraries like Qt are normally not installed system-wide; each application provides its own copy.

The most common way to distribute applications is to provide a compressed disk image (.dmg file) that the user can mount in Finder. The Mac deployment tool (macdeployqt) can be used to create the self-contained bundles, and optionally also create a .dmg archive. See the Mac deployment guide for more information about deployment. It is also possible to use an installer wizard. More information on this option can be found in Apple's documentation.

Chill Cocoa Mac Os X

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.