mac-can / PCBUSB-Library

macOS® User-Space Driver for PCAN-USB Interfaces (Binaries only)
https://mac-can.com
Other
29 stars 0 forks source link

Cannot install #10

Closed PhilRWA closed 2 years ago

PhilRWA commented 2 years ago

Hi All,

I'm almost certainly being stupid here (and have no coding skill at all) but on my apple silicon mac I can't get the install shell file to run at all to install the library. Anyone able to explain to me how the process should work?

Cheers,

Phil

mac-can commented 2 years ago

How to install the PCBUSB-Library on Mac

The PCBUSB-Library realizes an USB to CAN user-space driver under macOS for PCAN-USB interfaces from PEAK-System Technik, Darmstadt.

This Gist describes how to install the library.

Download the Library

First download the library either from the MacCAN homepage or from the GitHub repo.

Install the Library

Now open a terminal to extract the artifacts and to install the library.

Note: In the following example I´ve downloaded version 0.11.1 from the MacCAN homepage. makemake is my username, uv-pc014mac the name of my Mac.

Extract the artifacts

If you have downloaded the library as a tarball, type this:

makemake@uv-pc014mac ~ % tar -xvf ~/Downloads/macOS_Library_for_PCANUSB_v0.11.1.tar
x PCBUSB/
x PCBUSB/libPCBUSB.0.11.1.dylib
x PCBUSB/PCBUSB.h
x PCBUSB/LICENSE
x PCBUSB/install.sh
x PCBUSB/README
x PCBUSB/Examples/
x PCBUSB/PCBUSB.c
x PCBUSB/COPYRIGHT
x PCBUSB/Examples/C++/
x PCBUSB/Examples/Python/
x PCBUSB/Examples/Makefile
x PCBUSB/Examples/Python/PCANBasic.py
x PCBUSB/Examples/Python/Makefile
x PCBUSB/Examples/Python/pcbusb_recv.py
x PCBUSB/Examples/C++/Makefile
x PCBUSB/Examples/C++/src/
x PCBUSB/Examples/C++/src/pcbusb_recv.cpp
x PCBUSB/Examples/C++/src/pcbusb_send.cpp
makemake@uv-pc014mac ~ %

If you have downloaded a compressed archive, then run this:

makemake@uv-pc014mac ~ % tar -xzvf ~/Downloads/macOS_Library_for_PCANUSB_v0.11.1.tar.gz
x PCBUSB/
x PCBUSB/libPCBUSB.0.11.1.dylib
x PCBUSB/PCBUSB.h
x PCBUSB/LICENSE
x PCBUSB/install.sh
x PCBUSB/README
x PCBUSB/Examples/
x PCBUSB/PCBUSB.c
x PCBUSB/COPYRIGHT
x PCBUSB/Examples/C++/
x PCBUSB/Examples/Python/
x PCBUSB/Examples/Makefile
x PCBUSB/Examples/Python/PCANBasic.py
x PCBUSB/Examples/Python/Makefile
x PCBUSB/Examples/Python/pcbusb_recv.py
x PCBUSB/Examples/C++/Makefile
x PCBUSB/Examples/C++/src/
x PCBUSB/Examples/C++/src/pcbusb_recv.cpp
x PCBUSB/Examples/C++/src/pcbusb_send.cpp
makemake@uv-pc014mac ~ %

Installation

To install the library you need superuser privileges. Type this:

makemake@uv-pc014mac ~ % cd PCBUSB
makemake@uv-pc014mac PCBUSB % sudo /Users/<your-username>/PCBUSB/install.sh
Password: <your-password>
makemake@uv-pc014mac PCBUSB %

Using the library

That's up to you.