Getting started with Xcode


#1

New to xcode…xcode v3.1.4 on Mac OX 10.5.8 (i386) and Juce 1.5.0

I can compile all the extras on Windows with VC++9.0. Everything works (except RTAS because I don’t have the RTAS libraries) except I have some MSC library conflicts with some hosts, but I can resolve those.

On Mac first attempt: I added the VST and ASIO files in the same locations in the tree as on the PC. I open the plugin host project, no errors! I can build and run the audio plugin host! It finds the default AU plugins and other AU+VST plugins on the machine! Hurray!

When opening the demo plugin project file, it shows “common debug project settings” and “common release project settings” XML files are pointing to Jules desktop, and are thus missing. There is one other file, a vcproj for building TDMs in the framework folder, which is also missing. I delete all the missing files from the project, and edit the includes in the VST wrapper to point to the VST SDK. The project compiles and links ok! yay! it copies the .component file to the ~user/library/audio/plug-ins/components folder.

Now I rescan the folders from the Juce plugin host. It can see the .component file in the directory list. But the plugin doesn’t show up in the list of available plugins! oh no! And there were no reported errors! What do I do? Are there some setings from “common debug project settings” and “common release project settings” I should add?


#2

I haven’t build on my mac for a while, but I think those files can just be excluded from the build (or removed).
I think if you just rename the file to a .vst (and in a folder where it’ll be seen by the host) you should see it appear as a VST

Also, take a look here
(I searched for .vst .component)


#3

ok, I deleted the files in red and renamed the extension to “vst,” using the terminal as stated in the release notes. Now the plugin host says “JuceDemoPlugin appears to be a VST but failed to load correctly.” It still doesn’t show up as an AU.

I am getting a few warnings on deprecated functions, but otherwise the build is successful. Is there an xcode option that could be hiding some errors from the output console? Do I need to remove things because I don’t have the RTAS sdk?


#4

Did you carefully follow the build instructions? A lot of the things you’re talking about in this post are explained in there, which makes me think that maybe you didn’t read them?


#5

Yes, I tried doing all the things in the build instructions for the plugins. I tried running amalgamator with the Linux options turned off to rebuild amalgamator.cpp, and now I get the following link error:

I understand how Windows Visual C++ works, but I don’t know enough about Mac OS to make sense of it.


#6

Here is my current app_config.h file. It appears at the top of juce_amalgamated.h, so I edit the same settings in juce_amalgamated.h as well. I don’t know it that’s entirely necessary, but logically the settings in juce_amalgamated.h would override those in juce_appconfig.h as it’s loaded second, so just to be sure I changed them in both places. Did I disable something that would be needed to build the plugin?

#ifndef JUCE_FORCE_DEBUG
  //#define JUCE_FORCE_DEBUG 1
#endif
#ifndef JUCE_LOG_ASSERTIONS
//  #define JUCE_LOG_ASSERTIONS 1
#endif
#ifndef JUCE_ASIO
  #define JUCE_ASIO 0
#endif
#ifndef JUCE_ALSA
  #define JUCE_ALSA 0
#endif
#if ! (defined (JUCE_QUICKTIME) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER)))
  #define JUCE_QUICKTIME 0
#endif
#ifndef JUCE_OPENGL
  #define JUCE_OPENGL 0
#endif
#ifndef JUCE_USE_FLAC
  #define JUCE_USE_FLAC 0
#endif
#ifndef JUCE_USE_OGGVORBIS
  #define JUCE_USE_OGGVORBIS 0
#endif
#if (! defined (JUCE_USE_CDBURNER)) && ! (defined (_WIN32) && ! defined (_MSC_VER))
  #define JUCE_USE_CDBURNER 0
#endif
#if JUCE_QUICKTIME && ! defined (JUCE_USE_CAMERA)
  #define JUCE_USE_CAMERA 0
#endif
#ifndef JUCE_ENABLE_REPAINT_DEBUGGING
//  #define JUCE_ENABLE_REPAINT_DEBUGGING 1
#endif
#ifndef JUCE_USE_XINERAMA
  #define JUCE_USE_XINERAMA 0
#endif
#ifndef JUCE_USE_XSHM
  #define JUCE_USE_XSHM 0
#endif
#ifndef JUCE_PLUGINHOST_VST
  #define JUCE_PLUGINHOST_VST 1
#endif
#ifndef JUCE_PLUGINHOST_AU
  #define JUCE_PLUGINHOST_AU 1
#endif
#ifndef JUCE_ONLY_BUILD_CORE_LIBRARY
  //#define JUCE_ONLY_BUILD_CORE_LIBRARY  1
#endif
#ifndef JUCE_WEB_BROWSER
  #define JUCE_WEB_BROWSER 0
#endif
#ifndef JUCE_SUPPORT_CARBON
  #define JUCE_SUPPORT_CARBON 0
#endif
#ifndef JUCE_INCLUDE_ZLIB_CODE
  #define JUCE_INCLUDE_ZLIB_CODE        1
#endif
#ifndef JUCE_INCLUDE_FLAC_CODE
  #define JUCE_INCLUDE_FLAC_CODE        0
#endif
#ifndef JUCE_INCLUDE_OGGVORBIS_CODE
  #define JUCE_INCLUDE_OGGVORBIS_CODE   0
#endif
#ifndef JUCE_INCLUDE_PNGLIB_CODE
  #define JUCE_INCLUDE_PNGLIB_CODE      1
#endif
#ifndef JUCE_INCLUDE_JPEGLIB_CODE
  #define JUCE_INCLUDE_JPEGLIB_CODE     1
#endif
#ifndef JUCE_CHECK_MEMORY_LEAKS
  #define JUCE_CHECK_MEMORY_LEAKS 0
#endif
#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS
  #define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1
#endif
#ifndef JUCE_STRINGS_ARE_UNICODE
  #define JUCE_STRINGS_ARE_UNICODE 1
#endif

#7

Don’t ever touch the amalgamated files, it won’t help. Revert them now before you waste even more time and make a bigger mess.

And where did you copy all that config stuff from? Look at the way the demo plugin uses its AppConfig.h file and do it like that!


#8

Those are the pieces from app_config.h in 1.5 without the comments. I was trying to remove the unncecessary pieces with amalgamator.

I can build amalgamator fine, and I ran it from the terminal to reduce the size of juce_amalgamated.cpp, because it takes 20 minutes on my machine to compile juce_ amalgamated.cpp, and I can’t stop the compile in xcode once started.

Please can you provide the minimal app defines in Mac OS to build the jucedemoplugin?


#9

Like I said, look in the demo app, at the file juce_AppConfig.h - that’s all it needs! Don’t touch or use the config file from the library unless you need to customise the actual library build.

There’s nothing you can do to reduce the size of the amalgamated file - it’s not the number of bytes in it that makes it slow, it’s just the compiler behaving in a non-linear way. But I do find it builds a bit quicker if you include the amalgamated template rather than the actual amalgamated file itself - see the comments in the demo’s LibrarySource.cpp file.


#10

ok, I started with a squeaky clean installation. Hre is what I did:

[list]1. Install Xcode 3.14. [/list]
[list]2. Download Juce 150 and uncompress it to desktop.[/list]
[list]3. Copy the VST sdk files into ~/Desktop/juce/pluginterfaces/. [/list]
[list]4. Edit ~/Desktop/juce/extras/audio plugins/wrapper/VST/juse_VST_wrapper.cpp to point to the VST SDK header files.[/list]
[list]5. Open ~/Desktop/juce/extras/audio plugin host/build/mac/PluginHost.xcodeProj. The audio plugin host builds fine and opens the same as on a PC. I can load VSTs and play them. I can open AUs in the graph, but being AUs they have no terminals, but they still show up fine. [/list]
[list]6. Open ~/Desktop/juce/extras/audio plugins/demo/build/mac/JuceDemoPlugin.xcodeproj[/list]
[list]7. Delete the three files in red, two ‘common config files’ and a TDM framework project. [/list]
[list]8. Just to be sure it isn’t a dependency on some debug file, change to Release configuration and press BUILD. It builds OK, taking a little long on my slow Mac but it works fine with just a few warnings about deprecated functions.[/list]
[list]9. Copy JuceDemo.component from AU to VST folder. Open terminal, navigate to ~/Library/Audio/Plug-ins/VST and rename JuceDemo.component to JuceDemo.vst from terminal and not in Finder. [/list]
[list]10. Open Juce PluginHost and rescan for AU and VST plugins. [/list]

On AU scan, no JuceDemo AU plugin is found. On VST scan, it reports “Note that JuceDemoPlugin.vst appears to be a plugin, but failed to load correctly.”

Trying again with debug configuration, the same thing happens.

The only thing that could be different, as far as I can think, between my environment and yours is some setting in the ‘common xcode config properties’ for release and build. that I don’t know about. What else can I try to get it to work?


#11

Please let me know if three’s any other information I can provide to resolve the failure.

I can also build the VST SDK’s demo plugins fine with xcode, and I can inspect their parameters with the SDK’s VSTParamTool. But when I try to open the JuceDemoPlugin VST, it says “failed to open VST parameters.”


#12

i also fought withh xcode (i don’t know how can anyone work in this IDE for longer than an hour it’s horrible).

i managed to create a project (derived from JuceDemo) that contains two targets (VST and Standalone) that deploys, renames, builds, links and all that stuff. You can get it here http://ctrlr.googlecode.com/svn/trunk/Controllers/Alpha/Build/Mac/ (or any of the Controllers), just rename the targets add your plugin source files and it should work (for each target, change the product name in it’s preferences).

That’s all i do for each new plugin.


#13

I agree, the xcode 3.1 IDE is much more clunky than I expected, notwithstanding as a first exposure I did like some of its features, like being able to filter property sheets so they just display overrides at any particular level.

Thanks for the pointer to some other demo files! I’ll try them out and report in a couple of hours.


#14

ok, that ctlrl project 's some pretty impressive work, and I can build and run on Windows.

On a Mac I try the alpha project for example, and by altering the header paths to point to juce and vst sdk, I can compile everything. Then the link fails because the project includes ‘EdoController_Mac_Release.lib,’ but there’s no such lib file, and there’s no Mac xcode project file for the EdoController source, so I can’t make the lib. I tried deleting the lib file and got several thousand errors.

If I can build one AU and VST plugin ok, I think I can work everything else out, but I need one xcode project which I can just load and build, or I’m just faltering around in the dark…


#15

sorry for that, i forgot to add EdoController porject to the repo, it’s there now.

One thing though JUCE is in that library project but it’s a bad idea, due to symbol naming. you should remove JUCE sources from that library and add them to you plugin project and set the OBJ prefix mentioned in the docs, otherwise you’ll get problems.


#16

Thank you. I’ll have to get some sleep before trying again.

I just started to look in the Mac forum, and I’m recognizing some of the issues now, like the errors on building 1.46 which I tried, and saw, and thought were my fault for some misconfiguration. I’ll read through the entire forum now it makes a little more sense to me, and perhaps I’ll be able to understand better what needs to be done from there too.


#17

No success yet. I think I’l try building from command line, building from tip, and building the 1.46 version, which will only take another four hours or so. I did see alot of people reported problems with 1.46 that were the same that I saw, so I can try applying their fixes, and seeing if I can the older version of jucedemoplugin to show up.

for the xcodeproject edocontroller in ~ctrlr project, I couldn’t get the debug build to compile, but I could get the build to start working with only about 80 errors, mostly the same ones:

and a bunch of errors in serializedTypeface.h.


#18

i use the latest JUCE tip from GIT alwyas (i update every couple of days) the errors you are talking about happen because you use 1.46 version witch is different. Either use the latest juce code or you’ll hhave to do a lot of changes to ctrlr.


#19

For ctlr, sSadly those errors were with Juce 1.50. The gradient errors appeared on the PC too, I just commented them out, but the serialized text errors were only on the Mac and it’s beyond my xcode abilities to fix them all.


#20

Yay! With tip I can build the plugins! Now audio terminals appear on the plugins too! Audio passed through both and the VST received MIDI in notes. I will check in Live! whether SongPos is working.

There’s no MIDI terminals on AU plugins, I was told once the AU standard had been extended to support MIDI I/O but no hosts implement the extensions that I know of (Logic 8.0 was the last I checked), so as far as I know there’s not much point in implementing MIDI for AU.

  • It is recommended to build release versions of the plugin host and plugins, to avoid namespace conflicts
  • Additional wrapper files appear in red in the current tip. The following files must be replaced one by one (do not include .r files or other files from the respective folders:

Make sure not to include other files from the folders or you may get link errors.