Return to site

Carbon For Mac Os

broken image


  • REQUIREMENTS
  1. Carbon Black For Mac Os
  2. Carbon Copy Cloner For Mac Os X 10.8.5
  3. Carbon Copy Cloner For Mac Os 10.4
  4. Carbon Mac Os

README - Carbon API for perl on Mac OS X

Download Emacs distribution for Mac OS X (Carbon) for free. This project delivers a binary distribution of GNU Emacs for Mac OS X (Carbon). Florida Shelf Ecosystems Response to Climate Change Project CO2calc: A User-Friendly Seawater Carbon Calculator for Windows, Mac OS X, and iOS (iPhone).

Mac::Carbon is a collection of perl modules for accessing the Carbon API under Mac OS X. It is a port of the Toolbox modules written by Matthias Neeracher for MacPerl.

See the documentation in Mac::Carbon for more implementation details, bugs, etc.

Carbon

Mac::Carbon does not run under 64-bit perl. There are workarounds listed in '64-BIT PERL' in Mac::Carbon. It does build with a 'fat' 64-bit perl, for use with 32-bit mode.

There are probably a lot of bugs, especially in Carbon.h. Bugs are listed in 'Known Bugs' in Mac::Carbon; please feel free to report more. Patches are welcome, too, of course. For large patches, such as stuff for test suites and building, please do coordinate with me before spending much time on it.

Mac OS

These modules all build under Mac OS, but it is recommended you build them as a part of MacPerl itself, or at least under the MacPerl source (version 5.6.1 or greater). See http://dev.macperl.org/ for more information.

Under Mac OS, extra non-Carbon-compatible routines are available.

Mac OS X

To build these modules on Mac OS X, the Developer Tools are required.

Building these modules has been tested on Mac OS X 10.3 through 10.5, with perl 5.8 and 5.10, with gcc 3.1, 3.3, 4.0, and 4.2. Earlier versions have built under earlier versions of Mac OS X, perl, and gcc, but they have not been recently tested. gcc 3.3 and 4 are the most well-tested.

Mac OS X 10.6 has not yet been tested. Both Intel and PPC have been tested.

This tells you what version of gcc is in use, from the command line:

To change it, try one of the following (as root, or with sudo; sudo is used in the examples). '3' will give you 3.1, '3.3' will give you 3.3, '4.0' will give you 4.0.

The Test::More module is required for running tests.

The separate Mac::Errors module is not required, but is highly recommended, for providing more information from Mac system error codes.

Matthias added some extensions to XS for his Toolbox modules; they were never fully embraced by p5p, and as a result, we have a separate xsubpp for these additional XS macros. The Makefile.PLs will choose and use the appropriate xsubpp version for your version of perl.

You might want to run the test suite with make test TEST_VERBOSE=1. It's cool. For extra tests requiring the GUI, set MAC_CARBON_GUI=1 and MAC_CARBON_SOUND=1 in your environment.

Currently, only a subset of the modules are supported. The ported modules are:

Distributed separately on the CPAN and SourceForge.net:

And, coming someday, possibly:

There are currently no plans for the other (GUI) modules, including:

We could do these eventually, if there is enough interest. They don't port as easily as some of the others, for many reasons, not the least of which is that we need a framework to handle events etc., which for MacPerl is mostly implemented in macish.c / macish.h.

The Mac Toolbox modules were written by Matthias Neeracher . They are currently maintained by Chris Nandor .

$Id: README,v 1.15 2009/09/27 01:22:36 pudge Exp $

To install README, copy and paste the appropriate command in to your terminal.

For more information on module installation, please visit the detailed CPAN module installation guide.

  • TOOLBOX MAPPINGS
  • UNSUPPORTED FUNCTIONS

Mac::Carbon - Access to Mac OS Carbon API

This module provides documentation of the Mac::Carbon modules, and acts as a frontend to them.

Mac::Carbon is a collection of perl modules for accessing the Carbon API under Mac OS X. It is a port of the Toolbox modules written by Matthias Neeracher for MacPerl.

This module will load in all the Carbon modules, and export all of the functions, constants, and other variables. An export tag is set up for each module, so they may be selected individually.

This module exists primarily because in Mac OS X, all the Carbon functions are imported into a C program with a single header, Carbon.h, so Mac OS X users may prefer to load in the entire Carbon API with a single module.

For detailed information on the Carbon API (highly recommended, as a familiarity with Carbon is assumed in the POD), see apple.com.

The documentation is also located on your system, if you have the Developer Tools installed, at /Developer/Documentation/Carbon/.

Also of significant use are the related header files on your system. Use the `locate` command to find them. They contain current documentation and notes for the API.

Carbon Black For Mac Os

The modules were written for Mac OS originally, and are in part being ported to Carbon. You may also be interested in the original documentation.

Swiped from Mac/Toolbox.pod in the MacPerl distribution.

Approve or reject PDFs. Send and Track. Intuitive user interface.

The Macintosh Operating System provides a rich API with thousands of toolbox calls. The MacPerl toolbox modules aim to make as much as possible of this functionality available to MacPerl programmers. The mapping of the toolbox interfaces into MacPerl is intended to be

  1. Convenient to use for Perl programmers.

  2. As close as possible to the C interfaces.

This translates into a mapping strategy which is discussed in the following sections.

Function mappings

MacPerl toolbox calls take their input arguments in the same order as the corresponding toolbox functions. Output arguments are never passed by reference, but returned from the calls. If there are several output arguments, a list is returned. If an error occurs, the function returns undef or () and the error code is available in the $^E variable.

Data structure mappings

Complex data structures are mapped into blessed references. Data fields are available through member functions which return the value of a field if called without an argument and change the value if called with an argument.

The modules follow the same API under Mac OS X as Mac OS, except that the non-Carbon API is not supported (for example, NewHandle is supported, but NewHandleSys is not). Calling a function not supported by Carbon will generate an exception.

In each module's documentation, functions that work only under Mac OS (non-Carbon) are marked with Mac OS only. Those that work only under Mac OS X (Carbon) are marked with Mac OS X only. A complete list is at the end of this document.

The MacPerl package is automatically bootstrapped in MacPerl; it is included here, though the app-specific functions (Reply, Quit) are not supported, and the MacPerl package must be loaded explicitly (e.g., use MacPerl;). Also, Ask/Answer/Pick are provided via AppleScript, talking to the SystemUIServer process.

The Mac-specific error codes are put in $^E as in MacPerl, but $^E does not automatically convert the numeric error into a string in string context. See brian d foy's Mac::Errors module on the CPAN for this:

Mac::Errors is not included with or required by Mac::Carbon, but it is highly recommended.

$! is set at the same time $^E is set. This is different behavior from MacPerl, but similar to other platforms. On MacPerl, $^E is signed, and on Unix it is unsigned, so to get the numeric value from $^E, just add 0, as above. Could be worse.

Files are passed back and forth using Unix/POSIX filespecs (if you care about the gory details, a portion of the GUSI API has been reimplemented here, and it handles the conversions). Similarly, times are converted back and forth from the Mac OS epoch to the Unix epoch.

The support functions are in Carbon.h. See that file for descriptions of the issues, including bugs and possibilities for bugs, involved.

Significant portions of the Carbon API are unavailable to 64-bit programs on Mac OS X. Perhaps a subset of the API could be made available to a 64-bit perl (for more information see Apple's '64-Bit Guide for Carbon Developers'), and might in the future, but it's simpler at this point to just run perl in 32-bit mode.

There's a few ways to do this. Most obviously, you could simply build a 32-bit perl. I always build my own perl, and I just compile it for 32 bits.

There's also two methods mentioned in 'man perl' under Mac OS X 10.6: you can set an environment variable, or set a system preference. For the environment use:

And for the system preference, execute this line in your terminal:

There are very few issues on Intel. They mostly center around the fact that a Mac four-char-code is often treated as a string in Perl-space, but in C-space is an integer. The conversion process results in various errors.

Four-char-code types include typeType, typeEnumerated, typeProperty, typeKeyword, and typeApplSignature.

There are a few Don't Do Thats to keep in mind.

  • Don't change the type of an existing AEDesc; coerce it to a new desc instead, with AECoerceDesc(). This is generally good advice anyway.

  • Don't pass four-char-codes as arguments to AEBuild*; there's no easy way for the called function to know what type the argument is going to be passed as, and to fix the data before it is passed. Four-char-codes can be literals in AEBuild formats; this is a better method to use, when possible. For example:

  • Similarly, when using AEStream, don't pass a four-char-code to WriteData(), if you can avoid it. Use one of the methods that allow type specification (such as WriteDesc and WriteKeyDesc).

  • Don't try to parse binary data when you don't have to; use the API. For example, one of the example files for Mac::Speech parsed the creator ID out of the binary data structure instead of calling the API, and got the string reversed.

See each individual module for more information on use. See README for more information about modules not included here.

Functions supported only in Mac OS

The functions below are supported only in Mac OS, and not in Mac OS X, either because they are not supported by Carbon, or make no sense on Mac OS X.

Mac::AppleEvents
AECountSubDescItems
AEDescToSubDesc
AEGetKeySubDesc
AEGetNthSubDesc
AEGetSubDescBasicType
AEGetSubDescData
AEGetSubDescType
AESubDescIsListOrRecord
AESubDescToDesc
Mac::Files
Eject
Mac::InternetConfig
ICChooseConfig
ICChooseNewConfig
ICGeneralFindConfigFile
ICGetConfigReference
ICGetComponentInstance
ICSetConfigReference
Mac::Memory
CompactMemSys
FreeMemSys
GetApplLimit
MaxBlockSys
MaxBlockSysClear
MaxMemSys
NewEmptyHandleSys
NewHandleSys
NewHandleSysClear
NewPtrSys
NewPtrSysClear
PurgeMemSys
ReserveMemSys
Mac::Processes
LaunchDeskAccessory
Mac::Resources
CreateResFile
OpenResFile
RGetResource
Mac::Sound
Comp3to1
Comp6to1
Exp1to3
Exp1to6
MACEVersion
SndControl
SndPauseFilePlay
SndRecordToFile
SndStartFilePlay
SndStopFilePlay
SPBRecordToFile
MacPerl
Choose
ErrorFormat
FAccess
LoadExternals
Quit
Reply

Functions supported only in Mac OS X

The functions below are supported only in Mac OS X, and not in Mac OS, either because they are newer APIs, or make no sense on Mac OS.

Mac::Processes
GetProcessForPID
GetProcessPID
LSFindApplicationForInfo
Mac::Resources
FSCreateResourceFile
FSOpenResourceFile

See http://rt.cpan.org/NoAuth/Bugs.html?Dist=Mac-Carbon for more information.

Carbon Copy Cloner For Mac Os X 10.8.5

  • Need more tests for:

    Mac::Memory

    Should be more comprehensive for very little-used functions; main functionality is tested OK.

    Mac::Sound

    Same.

    Mac::Resources

    Tested really only in other test suites, like Mac::Sound. Should be more comprehensive.

    Mac::Components

    Same.

    Mac::Files

    Very good, but could do more exhausative FindFolder() tests.

    Mac::Processes

    Tests not very good, but tested pretty extensively by Mac::Glue and friends.

    Mac::MoreFiles

    Same.

    Mac::OSA

    Same.

    Mac::InternetConfig

    No real testing done.

  • In a few places, we need to know a text encoding, and assume it (such as in LSFindApplicationForInfo(), where Latin-1 is assumed). This is likely incorrect.

  • FSSpecs are limited to 31 characters. Ugh. Provide access to newer FSRef-based APIs.

  • Not specific to the Carbon versions: the Mac:: modules define classes such as Handle which probably should be something else, like Mac::Handle or Mac::Carbon::Handle or Mac::Memory::Handle (other examples include AEDesc, Point, Rect). No one has really complained before except on principle, but still ..

  • Can we support XCMDs etc. via XL? Do we want to?

The Mac Toolbox modules were written by Matthias Neeracher . They were ported to Mac OS X and are currently maintained by Chris Nandor .

Michael Blakeley, Emmanuel. M. Decarie, Matthew Drayton, brian d foy, David Hand, Gero Herrmann, Peter N Lewis, Paul McCann, Sherm Pendley, Randal Schwartz, Michael Schwern, John Siracusa, Dan Sugalksi, Ken Williams, Steve Zellers.

perl(1).

Carbon Copy Cloner For Mac Os 10.4

To install Mac::Carbon, copy and paste the appropriate command in to your terminal.

Carbon Mac Os

For more information on module installation, please visit the detailed CPAN module installation guide.





broken image