Step 1: (Alternate) Manual Installation for OSX/Linux

There is no one-click installer for OSX at this time. These steps have been tested to work on OSX 10.10; if you’re on Linux, I’m sure you can figure out how to adjust these steps accordingly.

  1. Head into System Preferences->Security & Privacy->Unlock and select: ‘Allow apps from: Anywhere’; When you’re done with this process you can set that back to its previous setting.
    Similarly, you need to disable “System Integrity Protection” in order to get past the unsafe use of relative path libftdi1.2.dynlib in /Library/Python/2.7/site-packages/pinproc.so with restricted binary –Instructions to disable System Integrity Protection (which isn’t necessarily a great thing to do: apple SIP instructions except you are doing to use the disable argument instead of  enable.
  2. Install XCode from the Mac App Store (note: you need to launch it once after installing it, in order to complete the installation–it can then be closed)
  3. Download libusb-1.0.20
    Create a new folder in your user folder called proc and unzip this into that new folder.
    FYI: ~ is short for the current user’s home folder, we we call this target folder “~/proc” from here on out.

Open a terminal window and change to the ~/proc/libusb-1.0.20 folder and run:

(Note: on Linux, the preceding requires libudev, which is available for ubuntu in the apt packages libudev1 and libudev-dev)

  1. Download libusb-compat
    Unzip to /proc and change to that folder (~/proc/libusb-compat-0.1.5/)

  1. download cmake 2.8.12.2 universal dmg
    install the cmake package by double clicking the pkg file
    Choose the default /usr/bin location and choose to install the command line tools (On ubuntu 16.04 sudo apt-get install cmake appears to install a usable cmake for our purposes)On OSX, newer installs of CMake include instructions to install the command line tools. This is done from terminal as:
  1. Download libftdi1-1.1

unzip into ~/proc folder
change to the newly created libftdi folder with cd

  1. download yaml-cpp 0.2.6
    unzip and copy to ~/proc
    change to that newly created yaml-cpp folder with cd

  1. download libpinproc via git clone, as described below (linux users can use sudo apt-get install git; OSX users can navigate to the github url and download the ZIP.

(take note that the cmake line ends with ..)

Change the include lines in the file proc/libpinproc/CMakeLists.txt to the following:

include_directories(${PINPROC_SOURCE_DIR}/include ${EXTRA_INC} /usr/local/include ${FTDI_INC} /usr/local/include/libftdi1 /usr/local/include/libusb-1.0)

Add the following line with the others below it:
set(lib_ftdi_usb usb-1.0 ftdi1)

I also comment out the build of pinproctest. It’s finicky to build and not strictly necessary. This changes lines in that file to reflect the following:

#add_executable(pinproctest
# examples/pinproctest/pinproctest.cpp
# examples/pinproctest/drivers.cpp
# examples/pinproctest/dmd.cpp
# examples/pinproctest/switches.cpp
# examples/pinproctest/alphanumeric.cpp
#)
target_link_libraries(#pinproctest

Save the file

  1. download pypinproc (dev branch) via git clone, as described below:

(Linux note: Ubuntu 16.04 has Python 2.7 installed by default; I needed to apt-get install python-dev in order for the following to work)

  1. download pyYAML 3.12
    unzip and copy that folder to ~/proc
    change to that new pyYaml folder (cd ~/proc/PyYAML-3.12)

  1. Download pygame. Pick the “Lion apple supplied python” pygame-1.9.2pre-py2.7-macosx10.7.mpkg.zip
    Install the package(Linux: sudo apt-get install python-pygame)
  2. Download & install xquartz for mac (Linux users:skip)
  3. Install Python Pillow or Python Imaging Library (PIL):
13. For OSX (Pillow):

13. For Linux (PIL 1.1.7 or Pillow, instructions are for PIP):

Download PIL 1.1.7:(PIL) 1.1.7 source kit
unzip and copy to ~/proc
take a note of the folder name so you can cd to it

  1. PyProcGameHD-SkeletonGame (dev branch, for the latest)

This will install PyProcGame and SkeletonGame in ‘develop’ mode, such that when you import pyprocgame from any python script, it will use these files, from the current location (~/proc/skeletongame).

Install the PyProcGameHD SDL2 dependencies.

  1. Download and install SDL + PySDL2 0.9.5 for your platform:
    • PySDL2 0.9.5
      cd ~proc/PySDL2-0.9.5/
      sudo python setup.py install
    • PyOSC PyOSC 0.3.5b
    • Install the appropriate versions of the SDL2 and the SDL2_TTF libraries:
    • sdl2
    • sdl2_ttf
    • for many linux distros, SDL2 is installed via: sudo apt-get install libsdl2-2.0-0 libsdl2-image-2.0-0 libsdl2-ttf-2.0-0
    • Either set the PYSDL2_DLL_PATH (as per the instructions, here or add a PYSDL2_DLL_PATH in the game’s config.yaml.
    • Optional: For MP4 support install OpenCV and libffmpeg
      linux:https://github.com/BVLC/caffe/wiki/OpenCV-3.1-Installation-Guide-on-Ubuntu-16.04

to test, in python run:

The first three lines should return the prompt with no feedback. The last should print 6. This is how you know it worked.

This also updates the “procgame” command line tool, and the updated version works with the color file formats. From the command line running

procgame

Will show a list of available arguments/commands. For example, procgame dmdimage <file.dmd> <file.png> will convert a standard .dmd file into a single or series of png files.


Last but not least, if you want to use the GUI switch tester tool, you can get it from GitHub, here: OscSwitchMatrixGUI, which will require wxPython to be installed. –note, if you are in my class, I have posted a zip which includes the playfield image and the tool to Canvas, but you need to install wxPython before you can run it.


Many thanks to Brian Madden for his original work to record the PyProcGame install steps on OSX from his guide, here.