Burgerlib Python
Loading...
Searching...
No Matches
burger.xcode Namespace Reference

Package that contains xcode helper functions. More...

Functions

 where_is_xcode (xcode_version=None)
 Locate xcodebuild for a specific version of XCode.
 find_rez_headers ()
 Locate where the resource headers are located.
 build_rez (working_directory, input_file, output_file, creator=None, filetype=None, frameworks=None)
 Process the Rez file using the rez tool.

Variables

tuple _CODEWARRIOR_LOCATIONS
 Locations of CodeWarrior 9 or 10.

Detailed Description

Package that contains xcode helper functions.

Functions to locate xcode and issue rez commands

Function Documentation

◆ build_rez()

burger.xcode.build_rez ( working_directory,
input_file,
output_file,
creator = None,
filetype = None,
frameworks = None )

Process the Rez file using the rez tool.

Determine where the rez tool resides, as well as the MacOS rez headers.

Runs the rez tool with the header directory properly preset. Will also set the creator and filetype if they are passed with 4 character strings.

Modern versions of XCode allows the invokation of specific frameworks, pass them in in the frameworks parameter. It accepts a single string or an iterable of strings.

Note
Only runs on a Mac
Parameters
working_directoryDirectory this script resides in.
input_fileName of the .r file to compile with rez
output_fileName of the output file
creator4 character string for the creator code
filetype4 character string for the filetype
frameworksiterable of frameworks that would be invoked on modern xcode
Returns
Zero on success, non zero on error

◆ find_rez_headers()

burger.xcode.find_rez_headers ( )

Locate where the resource headers are located.

Of course Apple would not be consistent where the SDKs and headers are located, so search for them.

If successful, a tuple is returned with the folder to pass to rez as the folder that has the *.r headers as the first entry.

If running on on Xcode 5 or higher, the SDKs is built into the app and the FlatCarbon headers are missing. As a result, the second entry of the tuple will be True to denote that Frameworks should be used instead of classic MacOS 9 flat header folders. If classic headers, the second entry of the tuple is False

Returns
(Path to the rez headers, True/False) or None

◆ where_is_xcode()

burger.xcode.where_is_xcode ( xcode_version = None)

Locate xcodebuild for a specific version of XCode.

Given a specific version by version, scan the locations that the IDE would be found.

Examples

>>> burger.where_is_xcode()
("/Developer/usr/bin/xcodebuild", 3)
>>> burger.where_is_xcode(2093)
None
Note
This function will always return None on non-macOS hosts. Minimum version of XCode is 3.
Parameters
xcode_versionVersion number
Returns
Path to xcodebuild for the XCode version or None.