New jucer: Juce Location


#1

Generally I include Juce on the Mac by setting a source tree for Juce in Xcode so that can do:

(I set the source tree to the folder containing the juce folder, normally I use JUCE_SOURCE for the source tree name.)

I then inlcude the source tree in the header search paths too. This makes sending projects to/from others easy once it’s set up the same on others’ machines (quite commonly students in my case).

In the new jucer, I can get the header search path to work via the debug/release but of course the “Juce Location” setting in the “Xcode (MacOSX)” tab needs to be relative or abolute. Any chance for a work around for this setting?


#2

Hmm. Ok, I’ll have a think about that - do you have an idea about what would be the best place to specify this?


#3

Could it not just use a blank (relative) path in this case? i.e. no Jucer config needed at all, since you took the time to set it up in OS X?


#4

Yes but this path is also needed for the inlcusion of the Juce files either using the static libs, the amalgamated version or the source code directly.

One solution would be to use the following format in the “Juce Location” field

would recognise that we’re using a source tree from the use of an environment variable and generate headers e.g.,

or even

… which might make more sense in the way many people use source trees. I like the look of <juce/juce.h> but this involves setting the source tree which CONTAINS juce rather than the being the juce directory itself.

In which case this would be OK for me since I could probably do something like

…etc to achieve the same effect.


#5

The way I’d prefer to see this done would be to let you enter the juce folder in angle-brackets like or <> and have it treat that as a special case, expanding them into <juce/juce.h> or <juce.h> when it creates the include statements.

That’d work fine for an app, but for a plugin, it also needs to add some files from the juce folder into the finished projects, and for that it needs to know their real path, at least relative to the project. I can’t really think of a way around that…


#6

That’s OK, in hindsight the new Jucer will probably make this method almost redundant.

My method was devised to avoid beginners having to change paths all over the place in a project to get it to compile (or having to place projects in a specific directory etc.).

But the new Jucer does mean having only to set the path once in the Xcode tab in the Jucer…

(BTW for plugins I set the juce_AU_Resources.r and juce_AU_Wrapper.mm etc files “Relative to JUCE_SOURCE” if these are the sorts of files you’re talking about including in the finished products.)


#7

Yeah, those are the sorts of thing. Trouble is that you can’t make them relative to the header search path in general, so I don’t really think it’d be possible to make a project that doesn’t contain some kind of reference to the juce folder somewhere.