How-to: Mounting Additional_Tools_for_Xcode_12.dmg to /DevTools at startup

The Dictionary Development Kit on Additional_Tools_for_Xcode_12.dmg must be installed to /DevTools/Utilities/Dictionary Development Kit/. This is because some of the scripts within the kit have the aforementioned path hardcoded.

A problem arises when we attempt to create /DevTools/Utilities/Dictionary Development Kit/ because the root mount point is read-only as of macOS 10.15.

One solution is to create /DevTools as a mount point, then to automatically mount Additional_Tools_for_Xcode_12.dmg thereto on startup.

To this point, we need to:

  1. create the /DevTools mountpoint,
  2. store Additional_Tools_for_Xcode_12.dmg in a system owned directory, and
  3. have macOS automatically mount the image to /DevTools at startup.

Creating the /DevTools mountpoint

Add a line which reads “DevTools” (without the quotation marks) to the file /etc/synthetic.conf. (If that file does not exist, create it with permission 0644 and change the owners to root:wheel.)

Storing Additional_Tools_for_Xcode_12.dmg in a system owned directory

Move Additional_Tools_for_Xcode_12.dmg to /opt/. Change it’s permission to 0440 and it’s owners to root:wheel.

Having macOS automatically mount the image to /DevTools at startup.

Create a launchd plist under /Library/LaunchDaemons/.

I called mine dk.ingi.petur.devtools.plist.

The permission of that file must be 0644 and the file must be owned by root:wheel.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

Now you need to restart your mac.

Further reading:

man synthetic.conf

man hdiutil

man launchd.plist