Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Decoupling source from SDK project

    Cinema 4D SDK
    4
    7
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mp5gosu
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • kbarK
        kbar
        last edited by kbar

        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.

        https://www.gamelogicdesign.com
        https://www.plugins4d.com

        1 Reply Last reply Reply Quote 0
        • M
          mp5gosu
          last edited by

          Thanks Kent, this is exactly how I do it right now. 🙂

          1 Reply Last reply Reply Quote 0
          • ManuelM
            Manuel
            last edited by

            hi,

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

            Cheers,
            Manuel

            MAXON SDK Specialist

            MAXON Registered Developer

            1 Reply Last reply Reply Quote 0
            • F
              fused
              last edited by

              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.

              kbarK F 2 Replies Last reply Reply Quote 1
              • kbarK
                kbar @fused
                last edited by

                @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.

                https://www.gamelogicdesign.com
                https://www.plugins4d.com

                1 Reply Last reply Reply Quote 0
                • F
                  fused @fused
                  last edited by

                  @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. 🙂

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post