Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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
    • Recent
    • Tags
    • Users
    • Register
    • Login

    Copy res folder without shortcut

    Scheduled Pinned Locked Moved Cinema 4D SDK
    c++windows
    4 Posts 2 Posters 32 Views 1 Watching
    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.
    • A Offline
      atg
      last edited by atg

      Is there any way to set Visual Studio to copy the whole res folder to the /bin/release/plugins/xxx folder instead of using a shortcut? When copying the plugin to the cinema plugin folder the res folder is empty...you have to go back to the res folder (which seems to be a shortcut to itself?) and manually copy the contents into the res folder in the cinema plugin folder.

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF Offline
        ferdinand @atg
        last edited by ferdinand

        Hey @atg,

        It is not Visual Studio which is doing this, but our CMake meta build system. And it is intentionally done like this, as the build folders should only contain build output. To change this, you would have to modify cmake\sdk_targets.cmake:817ff and/or MaxonTargets_CreateDirectoryLink in the same file. But that is rather impractical, as you would have to patch these files with each version of the SDK you use.

        You have two options:

        1. Use the builtin install feature of CMake. The SDK does not have a pre-made install configuration, as I personally dislike the feature and it would also be difficult to generically setup for SDK projects due to the freedom we give projects in where to place dependencies such as dynamic libraries. But you can easily add an install configuration to your own project, which will copy the plugin to a folder of your choice when you run cmake --install. You can even set up a post-build event in Visual Studio to automatically run this command after each build.
        2. I personally would just go for a Python script which you can run from a my_build_system/plugins folder and which will copy all folders in it to some target folder of yours and also resolves symbolic links (and possibly filters out some files if you want).

        Option two would cost me 30 minutes to set up or so, option one would be much more work for at least me (which is why I dislike the install feature), but it would be more integrated into CMake. I would personally just go for option two, as it is more flexible and easier to set up.

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

        1 Reply Last reply Reply Quote 0
        • A Offline
          atg
          last edited by

          Thanks Ferdinand. I actually made a powershell script that did essentially the same thing as #2. Deletes the current version in the c4d plugins folder, copies the newest Build and copies in the res folder.

          1 Reply Last reply Reply Quote 0
          • ferdinandF Offline
            ferdinand
            last edited by

            That is of course also a valid option, just pick the scripting language you are most comfortable with.

            MAXON SDK Specialist
            developers.maxon.net

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