在不使用 Xcode 的情况下在 Mac OS X 上构建 VST 插件

发布于 2024-07-09 09:10:01 字数 64 浏览 5 评论 0原文

如何在不使用 Xcode 的情况下在 Mac 上构建 VST 插件? (我正在使用 Code::Blocks)。

How do I build a VST plugin on Mac without using Xcode? (I'm using Code::Blocks).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

孤星 2024-07-16 09:10:01

如果您确实坚持要绕过 Xcode,那么您应该继续使用“make”,这可能会被证明与尝试使用 Code::Blocks 一样痛苦。 虽然 Xcode 一开始可能会感觉很奇怪,但它确实会帮你省去很多麻烦,尤其是如果你打算开发商业 VST 插件的话。 例如,如果您不喜欢它的编辑器,那么您可以轻松地将其替换为您选择的另一个编辑器。 但作为一名 Mac VST 开发人员,Xcode 最大的优势实际上是它擅长处理“以 Mac 为中心”的事情; 即,构建适当的捆绑包、通用二进制文件、资源编辑、链接系统框架等。此外,您将在那里找到的所有文档(以及其他在线 VST 开发社区,如 KVR)都是 Xcode 用户。

不管怎样,如果你选择不听我的建议,仍然可以用老式的方式来做。 :)

原则上,VST 基本上只是一个动态库包,所以无论你使用什么 IDE,你只需要确保它被正确打包并包含适当的资源,否则主机将无法能够加载它。 如果您不确切知道其中包含什么,只需查看其他一些 VST,看看它们的捆绑包中包含哪些内容。 要构建,您需要编译源代码和 VST SDK,并将以下框架链接到它:

  • ApplicationService
  • Carbon
  • QuickTime
  • System

...您可能还需要其他一些框架,具体取决于您最终使用 Carbon 的哪些部分。 您还应该构建为 UB,否则您最终会真正激怒许多仍在使用 G4/5 的制作人。 然后,您需要创建一个 PkgInfo 文件,该文件将进入捆绑包的资源目录,其中必须包含文本:“BNDL????” (当然,没有引号)。 您还必须为您的插件创建一个标准的 Info.plist 文件,该文件会将系统指向加载的实际可执行文件名以及 Finder 中显示的一些其他信息。 再次强调,如果您不知道需要什么,可以从可用的 VST 中借用一份副本并进行编辑以适应口味。

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. 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. 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; 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.

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. 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. To build, you compile your sources plus the VST SDK, and link the following frameworks to it:

  • ApplicationService
  • Carbon
  • 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. Then, you need to create a PkgInfo file which will go into the bundle's resource directory, which must contain the text: "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. Again, if you don't know what needs to be there, borrow a copy from a working VST and edit to taste.

数理化全能战士 2024-07-16 09:10:01

今晚,当我发现 VSTGL 的 Xcode 项目太旧以至于 Xcode 4.1 无法使用时,我就这样做了。甚至不提供升级它。 只是说“太老了”,然后在面包篮里打了我一拳。

我整理了一个简单的 Makefile,我只是添加了“缺失”的部分,因为很明显我需要它们。

请注意,VSTGL 附带了 ppc 编译的 VST,我刚刚用新编译的包替换了它,该 makefile 没有解决 Foo.app/Contents/[Resources|Info.plist|etc] 的布局,它只是编译它放入有效的 VST 包中。

对我来说另一个问题是,在测试这个时,我使用的是 Ableton Live,但我没有意识到它是 32 位(即使在 Lion 上),这就是为什么我省略“-arch x86_64”,但如果你有一个 64 位主机,它应该工作?

而且,看起来即使在 VST 3.0 SDK 中,他们仍然使用直接的 Carbon,看不到 Cocoa。 (我猜并不是说我会那么倾向于,但同样,使用 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) 

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. 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.

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.

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?

Also, it looks like even in the VST 3.0 SDK, they're still using straight up Carbon, with no Cocoa in sight. (Not that I'd be so inclined I guess, but again, with Lion you get a lot of deprecated stuff.

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) 
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文