A script to install the LEGO Mindstorms Fantom drivers on semi-modern macOS versions (through macOS 10.14 Mojave).
Since macOS 10.15 Catalina dropped support for 32-bit, installing on newer versions of macOS is pointless.
The trouble with the native installer package, is that the installer tries to install a legacy codeless kernel extension named Fantom.kext
. There are several problems with this.
Fantom.kext
depends on the legacy 32-bitcom.apple.kernel.iokit
which has not shipped with macOS for some time.Fantom.kext
has no code signature, so it cannot be loaded on 10.10+ without disabling security features.- The installer attempts to install to
/System/Library/Extensions/Fantom.kext
, which is a directory protected by System Integrity Protection, or SIP, so it fails to even install on 10.11+ without SIP being disabled. - It also installs an unnecessary
StartupItems
to try to load the kernel extension, which is useless since it cannot be loaded anyway.
Ultimately, this kernel extension appears to be completely unnecessary, as nothing actually appears to fail without it. The other parts of the driver are however needed to communicate with the Mindstorms brick.
/Library/Application Support/National Instruments
/Library/Frameworks/Fantom.framework
/Library/Frameworks/VISA.framework
/Library/Preferences/NIvisa
This script will manually install only the necessary files from the official PKG installer, preserving the correct permissions, and ignoring the useless files.
- Download the
legodriverinstaller.sh
script. - Obtain the official PKG installer file.
- Open a terminal to the directory of the
legodriverinstaller.sh
script. - Give the script executable permissions so it can be run.
chmod +x ./legodriverinstaller.sh
- Run the script, passing the path to the PKG installer.
sudo ./legodriverinstaller.sh 'MAC legodriver.pkg'
- Profit.
Copyright (c) 2017 JrMasterModelBuilder
Licensed under the Mozilla Public License, v. 2.0.