FMalmberg / 3Delight-for-Cinema-4D

A 3Delight rendering plugin for MAXON Cinema 4D
MIT License
2 stars 1 forks source link

Add build instructions/build files #1

Closed virtualritz closed 5 years ago

virtualritz commented 5 years ago

It seems there are no build files for make/CMake/SCons/whatever. Could these be included?

FMalmberg commented 5 years ago

Hi Moritz, Thanks for your interest in this project, I am familiar with your work on Affogato.

Every Cinema 4D version is shipped with template plugin projects for supported platforms (Visual studio/XCode projects for Win and Mac, respectively). Thus, the "standard" procedure for building C4D plugins is to start from an empty template project for the targeted C4D version and just add the specific plugin code and resources. For this reason, adding a CMake file or similar does not really make sense in this case.

The 3DLfC4D project consists of four different C4D plugins: 3DLfC4D, 3DLfC4D_lights, 3DLfC4D_geometry and 3DLfC4D_shaders. Each of these are built as described above. The only non-standard build steps, from a C4D plugin development perspective, is that you need to:

Hope that helps for now. Adding detailed build instructions is definitely on my roadmap!

virtualritz commented 5 years ago

Well, some people don't use IDEs. I'm one of them. ;)

I'll add the CMake stuff myself and file a pull request when I got it ready.

FMalmberg commented 5 years ago

That would be great, thanks!

Note that MAXON are pretty specific about supported compilers for different versions of C4D, see these pages:

https://developers.maxon.net/docs/Cinema4DCPPSDK/html/page_maxonapi_dev_windows.html https://developers.maxon.net/docs/Cinema4DCPPSDK/html/page_maxonapi_dev_macos.html

I am not sure if this is just a policy thing, or if using other compilers could lead to binary incompatibility.

virtualritz commented 5 years ago

I only looked at the macOS page you linked and what's written there doesn't make much sense to me.

XCode is an IDE, not a compiler. The compiler is Apple clang and that can be called from the command line. AFAIK one could even use gcc and force it to create Apple clang compatible ABI code. As far as linking goes: anything one specifies in an XCode project can be done via command line/make file or the like. :)

In fact, once one has CMake files, CMake can be asked to create XCode projects from them and those then should have the same settings as those XCode projects that MAXON provides as samples (at least if I do my homework). :P

FMalmberg commented 5 years ago

Yes, certainly those "rules" will be possible to bend for those who know what they are doing. :-)

If you do produce CMake files, I'll be glad to include them in the project!