简体   繁体   English

在没有Xcode的Mac OS X上构建VST插件

[英]Building a VST plugin on Mac OS X without Xcode

How do I build a VST plugin on Mac without using Xcode? 如何在不使用Xcode的情况下在Mac上构建VST插件? (I'm using Code::Blocks). (我正在使用Code :: Blocks)。

If you really insist on bypassing Xcode, you should just go ahead and use 'make', which probably will prove to be just as much of a pain as trying to use Code::Blocks. 如果你真的坚持绕过Xcode,你应该继续使用'make',这可能会像尝试使用Code :: Blocks一样痛苦。 Although Xcode might feel strange at first, it will really save you a lot of headache to drink the kool-aid and deal it, especially if you plan on developing commercial VST plugins. 虽然Xcode最初可能会感觉很奇怪,但是如果你计划开发商业VST插件,它会让你在喝kool-aid时遇到很多麻烦。 If you dislike it's editor, for instance, then you can easily replace it with another one of your choosing. 例如,如果您不喜欢它的编辑器,那么您可以轻松地将其替换为您选择的另一个编辑器。 But speaking as a fellow Mac VST developer here, Xcode's biggest advantage is really that it's good at taking care of "mac-centric" stuff; 但作为Mac VST的开发人员,Xcode的最大优势在于它擅长处理“以mac为中心”的东西; ie, building proper bundles, universal binaries, resource editing, linking against system frameworks, etc. Plus, all of the documentation you'll find out there (plus other online VST dev communities like KVR) are Xcode users. 即,构建适当的捆绑包,通用二进制文件,资源编辑,链接系统框架等。此外,您将在那里找到的所有文档(以及其他在线VST开发社区,如KVR)都是Xcode用户。

Anyways, should you choose not to heed my advice, it should still be possible to do it the old fashioned way. 无论如何,如果你选择不听从我的建议,它应该仍然可以用老式的方式来做。 :) :)

In principle, a VST is basically just a dynamic library bundle, so regardless of the IDE you're using, you just need to make sure that it is packaged correctly and contains the appropriate resources, or else the host won't be able to load it. 原则上,VST基本上只是一个动态库包,因此无论您使用何种IDE,您只需要确保它正确打包并包含适当的资源,否则主机将无法加载它。 If you don't know exactly what that includes, just poke around in some other VST's and see what they've got inside of the bundles. 如果你不确切地知道它包含什么,只需在其他一些VST中查看,看看它们在捆绑包里面有什么。 To build, you compile your sources plus the VST SDK, and link the following frameworks to it: 要构建,您需要编译源代码和VST SDK,并将以下框架链接到它:

  • ApplicationService ApplicationService
  • Carbon
  • QuickTime 的QuickTime
  • System 系统

...and you'll probably need some others, depending on what parts of Carbon you end up using. ......你可能还需要其他一些,这取决于你最终使用的碳的哪些部分。 You should also build as a UB, or else you'll end up really irritating a lot of producers still using G4/5's. 你也应该建立一个UB,否则你最终会让许多仍在使用G4 / 5的制作人感到恼火。 Then, you need to create a PkgInfo file which will go into the bundle's resource directory, which must contain the text: "BNDL????" 然后,您需要创建一个PkgInfo文件,该文件将进入bundle的资源目录,该目录必须包含文本:“BNDL ????” (no quotes, of course). (当然没有引号)。 You also must create a standard Info.plist file for your plugin, which will point the system to the name of the actual executable filename which gets loaded and some other information which shows up in the Finder. 您还必须为插件创建一个标准的Info.plist文件,该文件将系统指向要加载的实际可执行文件名的名称以及在Finder中显示的一些其他信息。 Again, if you don't know what needs to be there, borrow a copy from a working VST and edit to taste. 同样,如果您不知道需要什么,请从工作的VST中借用一份副本并进行编辑。

I did this tonight when I found that VSTGL's Xcode project was so old that Xcode 4.1 wouldn't even offer to upgrade it. 今晚我发现VSTGL的 Xcode项目太旧了,以至于Xcode 4.1甚至无法升级它。 Just said 'too old' and punched me in the bread basket. 刚刚说“太老了”,在面包篮里打了我一拳。

I put together a simple Makefile that I just added 'missing' parts to as it became obvious I needed them. 我把一个简单的Makefile放在一起,我刚刚添加了“缺失”的部分,因为很明显我需要它们。

Note that VSTGL comes with a ppc compiled VST which I just replaced with my newly compiled bundle, there's the layout of the Foo.app/Contents/[Resources|Info.plist|etc] that this makefile does not address, it just compiles it up into a valid VST bundle. 请注意,VSTGL附带了一个ppc编译的VST,我刚刚用我新编译的bundle替换了,这个makefile没有解决的是Foo.app/Contents/[Resources|Info.plist|etc的布局,它只是编译它进入有效的VST包。

One other gotcha for me was, when testing this out I was using Ableton Live which I did't realize was 32bit (even on Lion), which is why I omit '-arch x86_64', but if you have a 64bit host it should work? 对我来说另一个问题是,在测试时,我正在使用Ableton Live,我没有意识到它是32位(甚至在Lion上),这就是为什么我省略'-arch x86_64',但如果你有一个64位主机它应该工作?

Also, it looks like even in the VST 3.0 SDK, they're still using straight up Carbon, with no Cocoa in sight. 而且,即使在VST 3.0 SDK中,它们仍然使用直接碳,没有可可。 (Not that I'd be so inclined I guess, but again, with Lion you get a lot of deprecated stuff. (并不是说我想我会如此倾向,但是再一次,对于Lion,你会得到许多被弃用的东西。

INCLUDES = \
    -IVSTGL \
    -I../vstsdk2.4/ \
    -I../vstsdk2.4/public.sdk/source/vst2.x/

LIBS = \
    -framework OpenGL \
    -framework GLUT \
    -framework AGL \
    -framework Carbon \
    -framework CoreServices

SOURCES = \
    VstPlugin.cpp \
    ExampleEditor.cpp \
    VSTGL/VSTGLEditor.cpp \
    VSTGL/VSTGLTimer.cpp \
    ../vstsdk2.4/public.sdk/source/vst2.x/audioeffect.cpp \
    ../vstsdk2.4/public.sdk/source/vst2.x/audioeffectx.cpp \
    ../vstsdk2.4/public.sdk/source/vst2.x/vstplugmain.cpp

all:
    g++ -arch i386 $(INCLUDES) -bundle -o VSTGL.vst/Contents/MacOS/VSTGL $(SOURCES) 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM