wishlist icon indicating copy to clipboard operation
wishlist copied to clipboard

JUCE/4.3.1

Open spotlesscoder opened this issue 8 years ago • 17 comments

Hello,

I'd like to have JUCE available via conan.io

"JUCE is an open-source cross-platform C++ application framework, used for the development of desktop and mobile applications. JUCE is used in particular for its GUI and plug-ins libraries." (see https://en.wikipedia.org/wiki/JUCE)

For open source projects, it is available under the GPL license.

It enables programmers to develop audio software like VST plugins, etc and can be used to develop extensions and plugins for the Reaper digital audio workstation software.

Platforms relevant for that purposes would be Windows (vc14, maybe others) and MacOS X. Linux is supported by JUCE, too, so gcc and other popular compilers for Linux OSs would be great, too.

I plan to use this package for a extension to Reaper. The purpose of this extension is to enable musicians to share the program's configuration and their music projectss (very useful when working both in home studio and mobile on a laptop).

If you agree to make this available via conan.io, I can start making a conanfile.py

spotlesscoder avatar Mar 02 '17 12:03 spotlesscoder

Hi @CodingSpiderFox,

We don't have to agree :), conan.io is free for OSS and free packages, so you can just create your account and start uploading and sharing your recipes and package binaries from minute 0, it is not moderated.

Agree on Juce, it is an amazing framework, would be very cool to have it on conan.io

memsharded avatar Mar 02 '17 12:03 memsharded

Is there a template project I can copy for creating a new package, containing the basic directory structure and files like license, conanfile, etc?

spotlesscoder avatar Mar 02 '17 13:03 spotlesscoder

Sure:

$ conan new Pkg/0.1@user/channel -t
$ conan test_package

This will create a template, working recipe, cloning real sources from github and creating and consuming the package in a test project (inside the test_package folder).

memsharded avatar Mar 02 '17 13:03 memsharded

Thanks a lot. Unfortunately I can't get it building with CMake. I only knew very little about CMake. It seems like it doesn't build against the header files.

I would be very happy if you could give me a tip why it doesn't work. The package is here: https://github.com/CodingSpiderFox/juce-conan

spotlesscoder avatar Mar 02 '17 17:03 spotlesscoder

Sure. So far the repo seems empty :) Did you forget to push your changes?

memsharded avatar Mar 02 '17 18:03 memsharded

Now it should be there. Don't know what went wrong

spotlesscoder avatar Mar 02 '17 22:03 spotlesscoder

Who knows https://xkcd.com/1597/ LOL

memsharded avatar Mar 02 '17 22:03 memsharded

I am checking it, but I am a bit confused, I thought it was a framework but could be managed as a library. It turns out that it has its very custom build system, app generator and everything. Not cmake based. So it is like you have to use it at the consumer end of the chain, it is not something that can be packaged and reused. In something, it could make sense that conan could be used as package manager for C/C++ for JUCE projects.

I would need clear instructions about how to programmatically build the framework (interactive windows and the like is not an option, that can't be automated), and then how such framework is consumed from applications that could be built with a different build system, let it be CMake, Visual Studio or any other one. That for every OS support is needed. If this is not possible, then I think it doesn't make much sense to consider JUCE as a package, but as a tool, you install Visual Studio, you install CMake, you install Juce, use them to create and build your project. Conan is meant to retrieve components to reuse in projects, not full projects.

memsharded avatar Mar 02 '17 22:03 memsharded

You can have a look at my project: https://github.com/CodingSpiderFox/ReaperDAWHub/commit/c319ee81519d36b80653afe01e2f7272cbc8c5d2

Maybe this helps. There is a folder "JuceLibraryCode" which is needed by the application. This folder is created by Projucer which does something similar like CMake if I got it right (it creates projects like the CMake project generators for XCode, Visual Studio, etc.). However, the files in that folder were not enough to build it. I also put the full "modules" folder in it to have all the code I need.

Of course, this file (https://github.com/CodingSpiderFox/ReaperDAWHub/commit/8f4a57db651e69c2e9d05e9abc9e855b90c58fb5#diff-63e3520efec7dafda1a9c9ef3b8bdd5d) has to be changed (project name and version) to match the project a consumer of the JUCE package would implement.

spotlesscoder avatar Mar 02 '17 23:03 spotlesscoder

So basically all the code of JUCE is in the JUCELibraryCode folder. Maybe it's enough to create a sufficient CMakeLists.txt

spotlesscoder avatar Mar 02 '17 23:03 spotlesscoder

That is exactly the issue. The thing is that it is not just "creating" a package for it, the thing is that it has its own custom flows, build system and tools. So the first step is to understand and create helpers for it. The same way there are cmake, or visual_studio generators, that generate some files that can be after used by those build systems, it could make sense to build a "juce" generator for conan that would generate some files for juce system.

As you said, those files are generated by Projucer, it seems a workflow that can't be easily changed.

Another option could be create a source-code package, that would help to integrate with new projects, but projects would still build it from sources, pre-compiled binaries wouldn't be generated, and you would still use the Juce tools to create and build projects.

As a rule of thumb, creating packages for conan is very easy if you know the build-system and flows of the thing being packaged. So this issue is mostly not a conan issue: I think we would need some expert in Juce to move this forward.

memsharded avatar Mar 03 '17 08:03 memsharded

Not relevant for me anymore

spotlesscoder avatar Nov 23 '17 11:11 spotlesscoder

Hello guys! I arrived here after learning a bit about conan at work and also wanting a JUCE package. The issues you are mentioning in your comments are simple to work around in theory. As you correctly state: Juce has to be build from source be the customer alongside their project, but It doesn't have its own build system as far as I can see. There is the IntroJucer and all those project files, but it is possible to create a simple CMakeLists.txt file that would compile all of the JUCE source code as static object files and link them to client code. I am having a bit of trouble building on Linux but I think it should be possible as well. Basically, the conan package would build all of Juce as a single very big static library, and provide the headers. Then the client would put the requirement in their conan file and would be able to Link against that static library. The Problem is that Juce has several transitive dependencies that are not conan packages yet as far as I can see. For example for linux see https://forum.juce.com/t/list-of-juce-dependencies-under-linux/15121

I want to learn a bit more about conan and how to make packages so I would be greatful if someone else wants to join into building Juce as a package.

Cheers!

agustinbonelli avatar Feb 06 '19 16:02 agustinbonelli

The Problem is that Juce has several transitive dependencies that are not conan packages yet as far as I can see

So we have two options, install by system_requirements or provide one package for each JUCE dependencies. The second options is better, but it could take weeks. I would to use the first option now, and create Github project for "JUCE", with all its dependencies listed, like a debit to be implemented.

uilianries avatar Feb 06 '19 17:02 uilianries

I was not aware of that system_requirements in conan. I will try to take a look into it. I have a fork of Juce so perhaps a first step would be to Create CMakeLists.txt for all modules and a basic conan file that will pull those sources and create the package with a big juce.so file.

agustinbonelli avatar Feb 07 '19 00:02 agustinbonelli

Sorry, I forgot to point you the documentation:

https://docs.conan.io/en/latest/reference/conanfile/methods.html#system-requirements

The idea using system_requirements is calling your distro package manager to install the dependencies. Those dependencies won't be packaged. But of course, it's limited, for example, the same package could have different name in different distros (Arch, Fedora, Debian)

If you create a CMake recipe to build JUCE, it would be great. Let me know if you need some help. Regards!

uilianries avatar Feb 07 '19 11:02 uilianries

I would be up to help with building JUCE with a recipe (although I'm not sure how to do it yet), let me know.

lkotsonis avatar Aug 16 '19 14:08 lkotsonis