OS X installer cleanups:

- Remove OS X installer and Mac/Makefile dependencies on /Developer which
  no longer exists with Xcode 4; the referenced tools have been installed
  into the usr/bin tool root since Xcode 3.
- Support adding the SDK usr/bin tool root to the installer's PATH via the
  SDK_TOOLS_BIN environment variable.
This commit is contained in:
Ned Deily 2012-08-06 06:34:00 -07:00
parent 222d473df4
commit dfca8c95c4
2 changed files with 27 additions and 7 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
""" """
This script is used to build "official" universal installers on Mac OS X. This script is used to build "official" universal installers on Mac OS X.
It requires at least Mac OS X 10.4, Xcode 2.2 and the 10.4u SDK for It requires at least Mac OS X 10.5, Xcode 3, and the 10.4u SDK for
32-bit builds. 64-bit or four-way universal builds require at least 32-bit builds. 64-bit or four-way universal builds require at least
OS X 10.5 and the 10.5 SDK. OS X 10.5 and the 10.5 SDK.
@ -10,6 +10,20 @@ bootstrap issues (/usr/bin/python is Python 2.5 on OSX 10.5). Sphinx,
which is used to build the documentation, currently requires at least which is used to build the documentation, currently requires at least
Python 2.4. Python 2.4.
In addition to what is supplied with OS X 10.5+ and Xcode 3+, the script
requires an installed version of hg and a third-party version of
Tcl/Tk 8.4 (for OS X 10.4 and 10.5 deployment targets) or Tcl/TK 8.5
(for 10.6 or later) installed in /Library/Frameworks. When installed,
the Python built by this script will attempt to dynamically link first to
Tcl and Tk frameworks in /Library/Frameworks if available otherwise fall
back to the ones in /System/Library/Framework. For the build, we recommend
installing the most recent ActiveTcl 8.4 or 8.5 version.
32-bit-only installer builds are still possible on OS X 10.4 with Xcode 2.5
and the installation of additional components, such as a newer Python
(2.5 is needed for Python parser updates), hg, and svn (for the documentation
build).
Usage: see USAGE variable in the script. Usage: see USAGE variable in the script.
""" """
import platform, os, sys, getopt, textwrap, shutil, stat, time, pwd, grp import platform, os, sys, getopt, textwrap, shutil, stat, time, pwd, grp
@ -342,9 +356,7 @@ def pkg_recipes():
source="/pydocs", source="/pydocs",
readme="""\ readme="""\
This package installs the python documentation at a location This package installs the python documentation at a location
that is useable for pydoc and IDLE. If you have installed Xcode that is useable for pydoc and IDLE.
it will also install a link to the documentation in
/Developer/Documentation/Python
""", """,
postflight="scripts/postflight.documentation", postflight="scripts/postflight.documentation",
required=False, required=False,
@ -511,7 +523,15 @@ def checkEnvironment():
ev, os.environ[ev])) ev, os.environ[ev]))
del os.environ[ev] del os.environ[ev]
os.environ['PATH'] = '/bin:/sbin:/usr/bin:/usr/sbin' base_path = '/bin:/sbin:/usr/bin:/usr/sbin'
if 'SDK_TOOLS_BIN' in os.environ:
base_path = os.environ['SDK_TOOLS_BIN'] + ':' + base_path
# Xcode 2.5 on OS X 10.4 does not include SetFile in its usr/bin;
# add its fixed location here if it exists
OLD_DEVELOPER_TOOLS = '/Developer/Tools'
if os.path.isdir(OLD_DEVELOPER_TOOLS):
base_path = base_path + ':' + OLD_DEVELOPER_TOOLS
os.environ['PATH'] = base_path
print("Setting default PATH: %s"%(os.environ['PATH'])) print("Setting default PATH: %s"%(os.environ['PATH']))
@ -1204,7 +1224,7 @@ def buildDMG():
# Custom icon for the DMG, shown when the DMG is mounted. # Custom icon for the DMG, shown when the DMG is mounted.
shutil.copy("../Icons/Disk Image.icns", shutil.copy("../Icons/Disk Image.icns",
os.path.join(WORKDIR, "mnt", volname, ".VolumeIcon.icns")) os.path.join(WORKDIR, "mnt", volname, ".VolumeIcon.icns"))
runCommand("/Developer/Tools/SetFile -a C %s/"%( runCommand("SetFile -a C %s/"%(
shellQuote(os.path.join(WORKDIR, "mnt", volname)),)) shellQuote(os.path.join(WORKDIR, "mnt", volname)),))
runCommand("hdiutil detach %s"%(shellQuote(os.path.join(WORKDIR, "mnt", volname)))) runCommand("hdiutil detach %s"%(shellQuote(os.path.join(WORKDIR, "mnt", volname))))

View File

@ -40,7 +40,7 @@ INSTALL_SCRIPT= @INSTALL_SCRIPT@
INSTALL_DATA=@INSTALL_DATA@ INSTALL_DATA=@INSTALL_DATA@
LN=@LN@ LN=@LN@
STRIPFLAG=-s STRIPFLAG=-s
CPMAC=/Developer/Tools/CpMac CPMAC=CpMac
APPTEMPLATE=$(srcdir)/Resources/app APPTEMPLATE=$(srcdir)/Resources/app
APPSUBDIRS=MacOS Resources APPSUBDIRS=MacOS Resources