Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac OS X VST support #2393

Closed
wants to merge 9 commits into from
Closed

Mac OS X VST support #2393

wants to merge 9 commits into from

Conversation

rhunter
Copy link

@rhunter rhunter commented Sep 30, 2015

(do not merge)

I've been investigating issue #698 "VST Plugins on OS X (Apple)" and have had some (limited) success.

This is definitely a work in progress -- it's quite incomplete, and several of the changes are solving problems in entirely inappropriate ways -- but I want to share what I've been doing so far.

Eventually, I suspect that this will spawn into a few smaller pull requests, such as:

  • Portability fixes to existing code
  • Allow Mac OS X builds of VST support
  • Make Wine VST support actually work on Mac OS X

At this time, the code builds on only on Mac OS X -- one commit in particular, 149b4fa, almost certainly breaks Linux support. (That's clearly not OK for a real solution, but as a temporary change it helped me progress a little).

Compilation and linking succeed (woot) but there are some semaphore issues that hang the plugin. This is helped somewhat by the changes in pull request #2390.

Rob Hunter added 9 commits September 30, 2015 17:37
On Mac OS X dynamic libraries (dylib) and shared objects (so) are two separate
concepts.

HACK: The definition of the BUILD_LIKE_A_PLUGIN macro is almost completely
duplicated from BUILD_PLUGIN.
CMake changed its behaviour somewhere along the way, and specifying commands by
SOURCE is no longer the way to do it.
GNU "find" defaults to the current directory, but most other "find"
implementations don't. (The POSIX spec treats the path as mandatory.)

We could also use "mv" or CMake's RENAME macro.
Although LMMS has been built primarily on Linux for a long time (it's even in
the name!), there are other platforms that can benefit from LMMS's Wine-based
VST support.

Mac OS X is the obvious one (and the one relevant to me right now).
@@ -63,3 +63,63 @@ MACRO(BUILD_PLUGIN PLUGIN_NAME)
SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${ER_H} ${plugin_MOC_out}")
ENDMACRO(BUILD_PLUGIN)

MACRO(BUILD_LIKE_A_PLUGIN PLUGIN_NAME)
CMAKE_PARSE_ARGUMENTS(PLUGIN "" "" "MOCFILES;EMBEDDED_RESOURCES;UICFILES;JUSTALIBRARY" ${ARGN})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is JUSTALIBRARY? I'm having a hard time finding documentation on this...

Edit: If this is in fact needed, we may want to keep our existing plugin macro and shim this in with an IF statement.

@tresf
Copy link
Member

tresf commented Sep 30, 2015

@rhunter Thanks for the work on this. I've made a few in-line comments.

@@ -39,17 +39,17 @@ IF(LMMS_HOST_X86_64)
ENDIF(LMMS_HOST_X86_64)

ADD_CUSTOM_COMMAND(
SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/RemoteVstPlugin.cpp"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This entire section may be worth breaking out into its own block under IF(LMMS_BUILD_APPLE) (or perhaps IF-clang). Also, a description as to why these changes are needed would go a long way to understanding why these are needed.

@tresf
Copy link
Member

tresf commented Oct 20, 2015

@rhunter not sure if you've seen this branch (commit), but might be worth looking at too... be7a82b

@tresf
Copy link
Member

tresf commented Nov 11, 2015

@rhunter I know this is far from complete, but if you can address the requested changes, we can get closer to getting these changes integrated. There's very little disadvantage in implementing this as-is (we can always remove the library at bundling time until we get the feature actually working).

@tresf
Copy link
Member

tresf commented Feb 29, 2016

@rhunter any progress on this? I'm cleaning up branches and noticed @tobydox's VstBase branch, didn't know if there was anything in his commit you could use.

Again, if we can cleanup the code, there's no risk in merging and keeping the plugin disabled on Apple until the bugs are worked out.

@tresf
Copy link
Member

tresf commented Apr 23, 2016

@rhunter I'm closing this from a task perspective, but please feel free to reference it or reopen it when its ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants