Building with Travis CL

I use Travis CL to test my builds and recently thought why not clone JUCE (Master), build the Projucer, and generate my makefiles before building in order to make sure everything is up to date and works out of the box. Only when I try to run the Projucer with Travis CL I get a failed to connect to X server error, and no makefiles are produced? Anyone know of any ways around this problem?

1 Like

Just linking to a similar issue on macOS:

Yeah … it’s quite annoying.

Also can someone confirm that projucer will run without username/password from the commandline otherwise it’s going to might break some automation here when we move to JUCE 5 :slight_smile:

Balls. Surely the JUCE team must be using some kind of remote deployment system for checking builds too? I guess they’re not using travis…

We currently use Jenkins, in case that’s of any help…

We also use Jenkins. And even though Projucer produces warning messages on macOS as stated in the linked thread above, it does actually do the job correctly. But perhaps the situation is worse on Linux, which we do not use.

It’s not currently possible to use Linux JUCE GUI apps (even via their command line interface) without the X server present. Can you install X on the Travis CI build machines?

You should only need to log into the Projucer once on a build machine to have it remember the last license state. Or you could just compile it in “GPL mode” by setting JUCER_ENABLE_GPL_MODE to 1 in the Projucer’s AppConfig.h.

Good idea. Just checking now.

Actually, I was a little too pessimistic - it is possible to use Linux JUCE GUI apps via a command line without an X server… just not the Projucer.

So it turns out Travis supports xvfb which will do nicely. One just has to add the following lines to their travis.yml before_script: section

- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start

Thanks for asking that Tom, I don’t know why I didn’t think of it!

1 Like

Can we confirm that the projucer doesn’t need to download a license to operate as if it was licensed from the command line?

Some of my build setups don’t really have a UI as an option…

Or maybe a command line parameter that’ll just take a serial number would work

Or is it okay to use the GPL option when one has a license anyway …? :slight_smile:

It’s fine to use the GPL option if you have a JUCE license.

Alternatively, if you’re aware of the legal ramifications, you can set


in the USER_CODE_SECTION of your product’s AppConfig.h. This will effectively disable the code in the following SECTION A:

   In accordance with the terms of the JUCE 5 End-Use License Agreement, the
   JUCE Code in SECTION A cannot be removed, changed or otherwise rendered
   ineffective unless you have a JUCE Indie or Pro license, or are using JUCE
   under the GPL v3 license.

   End User License Agreement:
1 Like

Hello, is it still the case that Projucer can not be used without X Server? I’d like to be able to just run it only to --resave a project.

1 Like

My only experience with this was with Travis, and I was able to sort it using the instructions I posted above. Sorry, I couldn’t say for other environments.

1 Like

In case it may be relevant to this discussion, proposals have been done regarding the possibility to remove the dependency upon X even for Linux audio plug-ins that don’t need it:

Setting the DISPLAY variable with the sleep hack actually isn’t necessary. You can simply do:

xvfb-run <path to executable>

There’s an easier way to do this now in Travis:

        - xvfb

Is this something, that can be fixed?

Are you still finding this a problem with Travis specifically or do you have another environment without an X server?