Skip to content

Commit

Permalink
macos: more adjustments to switch to libusb1
Browse files Browse the repository at this point in the history
  • Loading branch information
mcallegari committed Feb 25, 2022
1 parent 9e59fcd commit cc07268
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
6 changes: 1 addition & 5 deletions platforms/macos/macos.pro
Expand Up @@ -100,7 +100,7 @@ include(libsndfile-nametool.pri)

INSTALLS += $$libraryTargetID(LIBQLCENGINE, libqlcplusengine.1.dylib)
INSTALLS += LIBUSB LIBUSB_ID
INSTALLS += $$systemLibTarget(LIBFTDI, libftdi1.2.5.0.dylib, libftdi1) $$libraryTargetID(LIBFTDI, libftdi1.2.5.0.dylib)
INSTALLS += $$systemLibTarget(LIBFTDI, libftdi1.2.dylib, libftdi1) $$libraryTargetID(LIBFTDI, libftdi1.2.dylib)
INSTALLS += $$systemLibTarget(LIBMAD, libmad.0.dylib, mad) $$libraryTargetID(LIBMAD, libmad.0.dylib)
INSTALLS += LIBSNDFILE LIBSNDFILE_ID
INSTALLS += $$systemLibTarget(LIBFFTW, libfftw3.3.dylib, fftw3) $$libraryTargetID(LIBFFTW, libfftw3.3.dylib)
Expand Down Expand Up @@ -164,10 +164,6 @@ qtnametool.commands += && $$LIBQTCORE_INSTALL_NAME_TOOL \
$$INSTALLROOT/$$LIBSDIR/$$LIBQTSCRIPT_DIR/$$LIBQTSCRIPT_FILE
}

# Libftdi depends on libusb1.0
qtnametool.commands += && $$LIBUSB1_INSTALL_NAME_TOOL \
$$INSTALLROOT/$$LIBSDIR/$$LIBFTDI_FILE

# libqlcplusengine depends on libmad, libsndfile, libportaudio and libfftw3
qtnametool.commands += && $$LIBMAD_INSTALL_NAME_TOOL \
$$INSTALLROOT/$$LIBSDIR/$$LIBQLCENGINE_FILE
Expand Down
8 changes: 4 additions & 4 deletions plugins/peperoni/unix/peperonidevice.cpp
Expand Up @@ -257,7 +257,7 @@ bool PeperoniDevice::open(quint32 line, OperatingMode mode)
if (r < 0)
qWarning() << "PeperoniDevice is unable to claim interface EP0!";

/* Set DMX startcode */
/* Set TX DMX startcode */
r = libusb_control_transfer(m_handle,
LIBUSB_REQUEST_TYPE_VENDOR |
LIBUSB_RECIPIENT_INTERFACE |
Expand All @@ -271,19 +271,19 @@ bool PeperoniDevice::open(quint32 line, OperatingMode mode)
if (r < 0)
qWarning() << "PeperoniDevice is unable to set 0 as the DMX output startcode!";

/* Set DMX startcode */
/* Set RX DMX startcode */
r = libusb_control_transfer(m_handle,
LIBUSB_REQUEST_TYPE_VENDOR |
LIBUSB_RECIPIENT_INTERFACE |
LIBUSB_ENDPOINT_OUT,
LIBUSB_ENDPOINT_IN,
PEPERONI_RX_STARTCODE, // Set DMX startcode
0, // Standard startcode is 0
0, // No index
NULL, // No data
0, // Zero data length
50); // Timeout (ms)
if (r < 0)
qWarning() << "PeperoniDevice is unable to set 0 as the DMX output startcode!";
qWarning() << "PeperoniDevice is unable to set 0 as the DMX input startcode!";

if (m_firmwareVersion >= PEPERONI_FW_OLD_BULK_SUPPORT)
{
Expand Down
5 changes: 4 additions & 1 deletion plugins/peperoni/unix/unix.pro
Expand Up @@ -25,7 +25,10 @@ SOURCES += peperonidevice.cpp \

# This must be after "TARGET = " and before target installation so that
# install_name_tool can be run before target installation
macx:include(../../../platforms/macos/nametool.pri)
macx {
include(../../../platforms/macos/nametool.pri)
nametool.commands += $$pkgConfigNametool(libusb-1.0, libusb-1.0.0.dylib)
}

# Installation
target.path = $$INSTALLROOT/$$PLUGINDIR
Expand Down
5 changes: 4 additions & 1 deletion plugins/udmx/src/src.pro
Expand Up @@ -42,7 +42,10 @@ TRANSLATIONS += uDMX_ja_JP.ts

# This must be after "TARGET = " and before target installation so that
# install_name_tool can be run before target installation
macx:include(../../../platforms/macos/nametool.pri)
macx {
include(../../../platforms/macos/nametool.pri)
nametool.commands += $$pkgConfigNametool(libusb-1.0, libusb-1.0.0.dylib)
}

# Installation
target.path = $$INSTALLROOT/$$PLUGINDIR
Expand Down

0 comments on commit cc07268

Please sign in to comment.