MacApp and ACS define several dozen compile-time switches that control the compilation of code that is dependent on a particular configuration or feature. A gross example of this is the qDebug switch. When this switch is turned on (set to 1) lots of debugging code is included in the application or library being built. qDebug also acts as a master switch in that it causes other switches to be turned on by default, such as qDebugMsg and qRangeCheck.
Below are several lists of switches and their descriptions. Default settings are given in parentheses after the switch name.
qModelCFM |
require that CFM68K be installed before the application will run |
qMSWindows (0) |
require that the code be built using Windows. Note that Windows support is not finished yet. |
qNeedsColorQD (1) |
require that Color Quickdraw be installed before the application will run |
qNeedsFPU |
require that the application be built to run on a 68020 with FPU (it will not run on a PowerPC) |
qNeedsMC68020 |
require that the minimum platform for the application to run is a 68020 processor |
qNeedsMC68030 |
require that the minimum platform for the application to run is a 68030 processor |
qNeedsMC68040 |
require that the minimum platform for the application to run is a 68030 processor |
qNeedsSystem7_5 (0) |
require that System 7.5 be installed before the application will run |
qNeedsSystem7_6 (0) |
require that System 7.6 be installed before the application will run |
qNeedsSystem8 (0) |
require that Mac OS 8 be installed before the application will run |
qPowerPC |
generate PowerPC code |
q68K |
generate 68K code |
qUniversal2Headers (1) |
require Universal Headers version 2.0 for compiling |
SystemSevenOrLater (1) |
System 7 is required for ACS and MacApp R13 |
SystemSixOrLater (1) |
System 6 is required for ACS and MacApp R13 |
qAttachable (1) |
allows scripts to be attached to objects descending from MScriptableObject. |
qAutoSwitches (1) |
the Mother of All Switches |
qBackwardCompatible (0) |
turn on to enable code that provides greater compatibility with older versions of MacApp. Note that this code will probably be removed in a future release. |
qDrag (1) |
enables support for drag and drop. |
qGrayscaleAppearance (1) |
include support for platinum appearance of controls |
qGXPrinting (0) |
enables printing support via Quickdraw GX. The application can still run if QD GX support is not installed although printing will revert to non-GX printing behavior. |
qOldConfigurationFlags (0) |
conditions the gConfiguration variable and related code, all of which are obsolete |
qOptimizeSelfSendAevt (1) |
enables the optimization of self-send AppleEvents by TCommands. Normally set but can be disabled in order to validate that TCommands are properly constructing AppleEvents. |
qTemplateViews (1) |
allow views to be created from view descriptions contained in resource files |
qUseODUndoStyle (0) |
when set turns on the OpenDoc style of multiple undo/redo which uses a global, single undo/redo stack. MacApp uses a per-context undo/redo stack which allows documents to be managed independently. |
qWriteTemplateViews (0) |
enables code within the framework which supports the writing of view resources to a file. Not normally set except when writing a view editor. |
qExportSymbols |
used when building ACS as a shared library (see qSharedLibrary) |
qSharedLibrary (0) |
turn on in Platform_AC.h to build ACS as a shared library |
qWantsAppearance (0) |
use the Appearance Manager for drawing controls |
qWantsMacTCP_AC |
controls whether TCP support code is compiled |
qWantsOpenTransport_AC |
controls whether Open Transport support code is compiled |
qALOE (0) |
enables OpenDoc container support so that OpenDoc parts can be embedded into MacApp views and documents. NOTE: this feature is not currently supported; use at your own risk. |
qWantsMP (0) |
controls whether MP support code is compiled (PowerPC only) |
qWantsThreadManager (1) |
controls whether ThreadMgr support code is compiled |
qYieldToOtherProcesses (0) |
controls whether calls to yield to another thread should also provide other processes opportunities to run, using SystemTask |
qAssertions |
includes failure handling and functions for assertions |
qCoreDebug |
is set in debug builds of ACS. It causes these switches to be turned on by default: qDebug, qAssertions, qTidyHeap (PowerPC only), qDebugMsg, qRangeCheck |
qDebug |
is set in debug builds of MacApp. It causes these switches to be turned on by default: qDebugMsg, qSym, qInspector, qRangeCheck, qNames |
qDebugExceptions |
controls the level of code compiled for debugging exceptions. Default setting is qDebugLevelFour_AC (see CoreSwitches_AC.h for definitions) |
qDebugMsg |
generates more extensive debugging messages in the resulting library or application. Normally set for debug builds. |
qInspector (1) |
includes nub inspector support |
qNeedsVU (0) |
enables special Virtual User support for debugging within certain TView classes such as grid views. When set will require that VU be available for the application to run. Normally not set. |
qPerform (0) |
includes performance monitoring code in the resulting library or application. Normally not set. |
qRangeCheck |
includes range and overflow checking code in the resulting library or application. Normally set for debug builds. |
qSym |
includes symbol information in the resulting library or application. Normally set for debug builds. |
qTheDebugger |
includes special support for The Debugger from Jasik Designs in the resulting library or application. Normally not set for debug builds. |
qTidyHeap |
enables the Tidy Heap feature which monitors 'new' and 'delete' operations so that memory leaks and double-deletes can be detected. Normally set for PowerPC debug builds only. |
Two empty files have been provided for you to define your switch settings if you want to change them from the default values. For switches that affect ACS, modify the file AutoSwitches_AC.h (in the folder ACS:Suites:core:includes) to contain your settings. When you rebuild ACS this file will be included by CoreSwitches_AC.h. Note that these settings will also be used when you subsequently build MacApp.
To change switches that affect the MacApp library and applications but not ACS, modify the file MacAppAutoSwitches.h (in the folder MacApp:Libraries). When you rebuild MacApp this file will be included by MacAppSwitches.h, which contains the default settings for MacApp.
See the release note "Changing Default Compiler Switches" for more details on changing switches.