8000 Developer Info · 360Controller/360Controller Wiki · GitHub
[go: up one dir, main page]

Skip to content
Andrew McKinlay edited this page Oct 24, 2017 · 3 revisions

Anything below this probably doesn't affect end users, so you can stop reading now if you just want to use the driver.

Building

You'll need the full xcode installed via the app store. The command line tools are not enough.

From the command line, run: ./build.sh

If you'd like to build the .pkg file, there is an installer project for Packages. Download packages at http://s.sudre.free.fr/Software/Packages/about.html and the resulting dmg file will be copied to the build directory.

The distribution currently consists of 3 projects - one for the driver (implemented in C++, as an I/O Kit C++ class), one for the force feedback support plugin (implemented in C, as an I/O Kit COM plugin) and one for the Preference Pane (implemented in Objective C as a preference pane plugin). Ideally these 3 targets should be in the same project, but I've not worked on this yet.

To build, use the standard Xcode build for Deployment on each of the 3 projects. Build Feedback360 before 360Controller, as the 360Controller project includes a script to copy the Feedback360 bundle to the correct place in the .kext to make it work.

To debug the driver, sudo cp -R 360Controller.kext /tmp/ to assign the correct properties - note that the Force Feedback plugin only seems to be found by OSX if the driver is in /System/Library/Extensions so I could only debug it in place.

To test the Preference Pane, just double-click the resulting file.

Yosemite and signed drivers

Since Yosemite (Mac OS X 10.10) all global kexts are required to be signed. This means if you want to build the drivers and install locally, you need to have a mac developer account.

If you'd like to avoid paying apple for the developer account and want to disable the signature checking, execute the following commands inside a terminal:

sudo nvram boot-args="kext-dev-mode=1"
sudo kextcache -m /System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext /System/Library/Extensions

Note that this is probably a bad idea unless you understand the implications of running unsigned driver code.

Debugging

Most of the debugging I did was via printing out text. In 360Controller, you can use IOLog(), and the output will appear in system.log. In Feedback360 normal fprintf(stderr,...), and the output will appear on the console of whatever application is attempting to use Force Feedback. In Pref360Control, NSLog() works as it's an Objective C program, and will output to the console of the Preferences application.

Clone this wiki locally

0