Skip to content

Commit

Permalink
Fixes for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
bigfug committed Dec 7, 2017
1 parent a4dd887 commit 3a23253
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 14 deletions.
15 changes: 14 additions & 1 deletion plugins/ARToolKit/ARToolKit.pro
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@ macx {
INSTALLDEST = $$INSTALLDATA/plugins
INCLUDEDEST = $$INSTALLDATA/include/fugio

isEmpty( CASKBASE ) {
libraries.path = $$DESTDIR/../libs
libraries.files = $$(LIBS)/lua-x64/lib/liblua5.3.4.dylib

INSTALLS += libraries

library_id.path = $$DESTDIR/../libs
library_id.depends = install_libraries
library_id.commands = install_name_tool -id @rpath/liblua5.3.4.dylib $$library_id.path/liblua5.3.4.dylib

INSTALLS += library_id
}

DESTDIR = $$BUNDLEDIR/Contents/MacOS
DESTLIB = $$DESTDIR/"lib"$$TARGET".dylib"

Expand All @@ -65,7 +78,7 @@ macx {
QMAKE_POST_LINK += && defaults write $$absolute_path( "Contents/Info", $$BUNDLEDIR ) CFBundleExecutable "lib"$$TARGET".dylib"

isEmpty( CASKBASE ) {
QMAKE_POST_LINK += && macdeployqt $$BUNDLEDIR -always-overwrite -no-plugins
# QMAKE_POST_LINK += && macdeployqt $$BUNDLEDIR -always-overwrite -no-plugins

QMAKE_POST_LINK += && $$FUGIO_ROOT/Fugio/mac_fix_libs_shared.sh $$BUNDLEDIR/Contents/MacOS
}
Expand Down
14 changes: 6 additions & 8 deletions plugins/NDI/NDI.pro
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,18 @@ macx {

QMAKE_POST_LINK += && defaults write $$absolute_path( "Contents/Info", $$BUNDLEDIR ) CFBundleExecutable "lib"$$TARGET".dylib"

QMAKE_POST_LINK += && install_name_tool -change @rpath/libndi.dylib $$(LIBS)/NDI/bin/x64/libndi.dylib $$DESTLIB
QMAKE_POST_LINK += && install_name_tool -change @rpath/libndi.dylib $$(LIBS)/NDI/lib/x64/libndi.dylib $$DESTLIB

QMAKE_POST_LINK += && macdeployqt $$BUNDLEDIR -always-overwrite -no-plugins

QMAKE_POST_LINK += && $$FUGIO_ROOT/Fugio/mac_fix_libs.sh $$FRAMEWORKDIR
QMAKE_POST_LINK += && $$FUGIO_ROOT/Fugio/mac_fix_libs.sh $$BUNDLEDIR/Contents/MacOS

contains( DEFINES, INTERNAL_BUILD ) {
plugin.path = $$INSTALLDEST
plugin.files = $$BUNDLEDIR
plugin.extra = rm -rf $$INSTALLDEST/$$TARGET".bundle"
plugin.path = $$INSTALLDEST
plugin.files = $$BUNDLEDIR
plugin.extra = rm -rf $$INSTALLDEST/$$TARGET".bundle"

INSTALLS += plugin
}
INSTALLS += plugin
}
}

Expand Down Expand Up @@ -122,7 +120,7 @@ macx:exists( $$(LIBS)/NDI ) {

LIBS += -L$$(LIBS)/NDI/lib/x64 -lndi

# DEFINES += NDI_SUPPORTED
DEFINES += NDI_SUPPORTED
}

windows:exists( "C:/Program Files/NewTek/NewTek NDI SDK" ) {
Expand Down
8 changes: 4 additions & 4 deletions plugins/NDI/ndireceivenode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ NDIReceiveNode::NDIReceiveNode( QSharedPointer<fugio::NodeInterface> pNode )

#if defined( NDI_SUPPORTED )
mNDIFind = 0;
mNDIFindTimeout = 10000;
mNDIFindTimeout = 500;
mNDIInstance = 0;
#endif

Expand Down Expand Up @@ -104,14 +104,14 @@ void NDIReceiveNode::inputsUpdated( qint64 pTimeStamp )
RecvCreate.bandwidth = NDIlib_recv_bandwidth_highest;

#if !defined( Q_OS_WIN )
RecvCreate.prefer_UYVY = false;
// RecvCreate.prefer_UYVY = false;
#endif

uint32_t NDICount = 0;

const NDIlib_source_t *NDISources = NDIlib_find_get_current_sources( mNDIFind, &NDICount );

for( DWORD i=0; i < NDICount ; i++ )
for( uint32_t i = 0 ; i < NDICount ; i++ )
{
if( SourceName != QString( NDISources[ i ].p_ndi_name ) )
{
Expand Down Expand Up @@ -159,7 +159,7 @@ void NDIReceiveNode::updateNDISources()

// while( !no_sources )
{
NDIlib_find_wait_for_sources( mNDIFind, 0 );
NDIlib_find_wait_for_sources( mNDIFind, mNDIFindTimeout );

const NDIlib_source_t* p_sources = NDIlib_find_get_current_sources( mNDIFind, &no_sources );

Expand Down
2 changes: 1 addition & 1 deletion plugins/NDI/ndireceivenode.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ protected slots:

#if defined( NDI_SUPPORTED )
NDIlib_find_instance_t mNDIFind;
DWORD mNDIFindTimeout;
uint32_t mNDIFindTimeout;
NDIlib_recv_instance_t mNDIInstance;

mutable QMutex mAudioMutex;
Expand Down

0 comments on commit 3a23253

Please sign in to comment.