Decoupling source from SDK project



  • Hello,

    is it possible to "link" the source folder to a different location? I know, symbolic links should do the trick, but is also not recommended.
    An Alternative would be to use git worktrees, but if git is not involved, is it possible? Also moving sources via script is possible, but tedious and error-prone.

    I want to be able to compile for different versions, i.e. different SDKs, with a single codebase. Is this possible with the current system (e.g. via projectdefinition.txt et al.)
    Or will I have to create a custom build toolchain?

    Thanks in advance,
    Robert



  • Easiest solution is to just use git, or Github. Just have all your source for your plugins in one repo and clone that into the plugins directory next to the frameworks for every version of C4D you want to build for. The projectdefinition.txt files and ProjectTool workflows work perfectly for this setup.



  • Easiest solution is to just use git, or Github. Just have all your source for your plugins in one repo and clone that into the plugins directory next to the frameworks for every version of C4D you want to build for. The projectdefinition.txt files and ProjectTool workflows work perfectly for this setup.



  • Thanks Kent, this is exactly how I do it right now. :)



  • hi,

    we don't have any answer. We know it's a real issue.

    Cheers,
    Manuel



  • If you don't mind maintaining your own CMake (or similar) script, the sourceprocessor in the SDK allows to specify a target directory for the generated files from R21 onwards.

    I would not exactly recommend going that way, but for me it beats using the project tool.



  • @fused said in Decoupling source from SDK project:

    If you don't mind maintaining your own CMake (or similar) script, the sourceprocessor in the SDK allows to specify a target directory for the generated files from R21 onwards.

    I would not exactly recommend going that way, but for me it beats using the project tool.

    The project tool is the most important development Maxon has provided to us developers. It allows me to make sweeping drastic changes, renaming, moving files, refactoring to my own frameworks etc.... and then with one click I run the Project Tool and all my solutions are updated for OSX and Windows. I would definitely not use CMake for these... ever. Since Maxon also updates the ProjectTool when a new version of C4D comes out and it may have new flags or optimazations and changes to the project structure for XCode and Visual Studio. Maintaining your own CMake version going forward for R20, R21, S22, RXX etc... would be a massive pain and just slow you down.



  • @kbar said in Decoupling source from SDK project:

    Since Maxon also updates the ProjectTool when a new version of C4D comes out and it may have new flags or optimazations and changes to the project structure for XCode and Visual Studio.

    From what I can tell it's pretty stable, also I don't mind what someone else thinks my compiler optimisation flags should be.

    Maintaining your own CMake version going forward for R20, R21, S22, RXX etc... would be a massive pain and just slow you down.

    Not as painful as you think it might be, also not as slow.
    Whatever floats your boat. :)