The instructions
- Open XCode and create an empty project
- Add a new target: Cocoa -> Loadable Bundle. You can name it however you like, but I recommend using you plugin's name. This should also create a plist file named <yourpluginname>-Info.plist
- Double click on the newly created plist file. This will open the plist editor. Using this editor add the following entries (but clicking on the + sign at the right of the selected line):
ii. Executable file ${PRODUCT_NAME}
iii. Bundle name ${PRODUCT_NAME}
iv. Icon file
v. Bundle identifier com.yourdomain.youpluginname
vi. InfoDictionary version 6.0
vii. Bundle OS Type code BDNL
viii. Bundle creator OS Type code ????
ix. Bundle version 1.0
x. Bundle versions string, short 1.0
xi. Resources should be file-mapped [checked]
- Create a new group called vst_sdk. Add the VST SDK source files to this group (copy the folders "plugininterfaces/vst2.x/" and "plublic.sdk/source/vst2.x/" into this VST group)
- Create an empty file named <yourpluginname>-Prefix.pch and add these lines:
#import <Cocoa/Cocoa.h>
#endif
- In the target's build settings check the following value:
Architectures 32-bit Universal
Base SDK Current Mac OS
Valid Architectures (Release) i386 ppc ppc64 ppc7400 ppc970
Valid Architectures (Debug) $(NATIVE_ARCH)
Compiler Version:
C/C++ Compiler Version LLVM GCC 4.2
Packaging:
Force Package Info Generation YES
Info.plist File <yourpluginname>-Info.plist
Preprocess Info.plist YES
Product Name Name of your plugin
Wrapper Extension vst
Search Paths:
Header Search Paths <vst_sdk location>
GCC 4.0 Language:
Prefix Header <yourpluginname>-Prefix.pch
- Add the QuickTime and Carbon frameworks
- Add the cpp and h files with your plugin (TODO: generate a template for this)
- Add a New Build Phase -> New Run Script Build Phase to the target. Then:
ii. Add the following script:
rm -rf $HOME/Library/Audio/Plug-Ins/VST/$PRODUCT_NAME.vst
cp -r "$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.vst" "$HOME/Library/Audio/Plug-Ins/VST/$PRODUCT_NAME.vst"
The last step is optional but very convenient. It copies you VST to a System folder where almost any VST host will look for VSTs.
The template
This XCode3 template was created using the previous steps (since XCode 4 templates are not clearly documented, I haven't even tried). Note that the VST SDK is not provided, due to licensing restrictions. You will have to download it from the Steinberg website.
The are a couple of places where you can place the template, but I recommend the following:
/Library/Application Support/Developer/Shared/XCode/Project Templates/VST/<thedownloadedtemplatehere>
Probably you will have to create most of these folders (from Developer on), but placing the templates here will prevent future updates of XCode from deleting them.
Thank you!! This worked flawlessly the first time!
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteAmazing Article, thank you!. I am very glad to read your informative & practical blog. Kindly keep updating your blog.
ReplyDeleteJava Developer is a wonderful career for IT students.To start Dream Career to become a Java developer learn from
Java Training in Chennai. or learn thru Java Online Training from India .
Thanks blogger for sharing the best article. asphalt 9 mod apk plants vs zombies 2 mod apk mortal kombat x mod apk
ReplyDelete