annotate src/vamp-plugin-sdk-2.4/build/README.osx @ 169:223a55898ab9 tip default

Add null config files
author Chris Cannam <cannam@all-day-breakfast.com>
date Mon, 02 Mar 2020 14:03:47 +0000
parents efb4b8187266
children
rev   line source
cannam@97 1
cannam@97 2 The Vamp Plugin SDK -- Platform Notes for OS/X
cannam@97 3 ==============================================
cannam@97 4
cannam@97 5 Prerequisites
cannam@97 6 -------------
cannam@97 7
cannam@97 8 You must have Xcode installed, with the command-line build tools.
cannam@97 9
cannam@97 10 (If you are using Xcode 4, you may have to go to Preferences ->
cannam@97 11 Downloads -> Components and install the Command Line Tools component.)
cannam@97 12
cannam@97 13 You must have libsndfile (http://www.mega-nerd.com/libsndfile/)
cannam@97 14 installed in order to build the command-line host successfully. But
cannam@97 15 you do not need libsndfile if you only want to build plugins.
cannam@97 16
cannam@97 17
cannam@97 18 Building at the command line
cannam@97 19 ----------------------------
cannam@97 20
cannam@97 21 To build the SDK, example plugins, and command-line host:
cannam@97 22
cannam@97 23 $ make -f build/Makefile.osx
cannam@97 24
cannam@97 25 To build only the SDK and example plugins (for example if you do not
cannam@97 26 have libsndfile installed):
cannam@97 27
cannam@97 28 $ make -f build/Makefile.osx sdk examples
cannam@97 29
cannam@97 30 See the comments at the top of Makefile.osx for more information about
cannam@97 31 the libraries and other targets that are built in this way.
cannam@97 32
cannam@97 33 If you are using an IDE such as Xcode, you may prefer to simply add
cannam@97 34 the vamp-sdk and src/vamp-sdk (for plugins) or vamp-hostsdk and
cannam@97 35 src/vamp-hostsdk (for hosts) directories to your existing project.
cannam@97 36
cannam@97 37 If you are using OS/X 10.6 or older, use Makefile.osx.106 instead of
cannam@97 38 Makefile.osx.
cannam@97 39
cannam@97 40
cannam@97 41 Installing the Example Plugins
cannam@97 42 ------------------------------
cannam@97 43
cannam@97 44 To install the example plugins so you can load them in Vamp hosts,
cannam@97 45 copy the files
cannam@97 46
cannam@97 47 examples/vamp-example-plugins.dylib
cannam@97 48 and
cannam@97 49 examples/vamp-example-plugins.cat
cannam@97 50
cannam@97 51 to
cannam@97 52 /Library/Audio/Plug-Ins/Vamp/
cannam@97 53 or
cannam@97 54 $HOME/Library/Audio/Plug-Ins/Vamp/
cannam@97 55
cannam@97 56
cannam@97 57 Plugin Linkage
cannam@97 58 --------------
cannam@97 59
cannam@97 60 Vamp plugins are distributed as dynamic libraries (.dylib). An OS/X
cannam@97 61 dynamic library has a formal installed name, which is recorded in the
cannam@97 62 library's header: you will need to ensure that this matches the
cannam@97 63 plugin's filename (e.g. vamp-example-plugins.dylib) by using the
cannam@97 64 -install_name <name> option at link time. The Makefile.osx provided
cannam@97 65 with the SDK contains an example of this.
cannam@97 66
cannam@97 67 A well-packaged Vamp plugin library should export exactly one public
cannam@97 68 symbol, namely the Vamp API entry point vampGetPluginDescriptor.
cannam@97 69
cannam@97 70 The default for the OS/X linker is to export all of the symbols in the
cannam@97 71 library. This will work (the host will be able to load the plugin),
cannam@97 72 but it unnecessarily pollutes the host's symbol namespace, it may
cannam@97 73 cause symbol collisions in some esoteric circumstances, and it
cannam@97 74 increases the amount of time the plugin takes to load.
cannam@97 75
cannam@97 76 To improve this behaviour, you can instruct the linker to export only
cannam@97 77 the one required symbol using a symbols list file. To do this, place
cannam@97 78 the single line
cannam@97 79
cannam@97 80 _vampGetPluginDescriptor
cannam@97 81
cannam@97 82 (with leading underscore) into a text file, and then use the
cannam@97 83 -exported_symbols_list option to the linker to tell it to refer to
cannam@97 84 this file. All other symbols will then be properly hidden.
cannam@97 85
cannam@97 86 The Makefile.osx included in this SDK uses this method to manage
cannam@97 87 symbol visibility for the included example plugins, using the file
cannam@97 88 build/vamp-plugin.list. There are other methods that will work too,
cannam@97 89 but this one is simple and has the advantage of requiring no changes
cannam@97 90 to the code.
cannam@97 91
cannam@97 92
cannam@97 93 Test Your Plugins
cannam@97 94 -----------------
cannam@97 95
cannam@97 96 The Vamp Plugin Tester is a vital utility which you can use to test
cannam@97 97 your plugins for common problems. It can help you if you're having
cannam@97 98 problems getting your plugin to work at all, and you're strongly
cannam@97 99 advised to use it before you release anything. Download it from the
cannam@97 100 Vamp plugins site now!
cannam@97 101