Copy res folder without shortcut
-
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.
-
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:817ffand/orMaxonTargets_CreateDirectoryLinkin 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:
- Use the builtin
installfeature of CMake. The SDK does not have a pre-madeinstallconfiguration, 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 aninstallconfiguration to your own project, which will copy the plugin to a folder of your choice when you runcmake --install. You can even set up a post-build event in Visual Studio to automatically run this command after each build. - I personally would just go for a Python script which you can run from a
my_build_system/pluginsfolder 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
installfeature), 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 - Use the builtin
-
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.
-
That is of course also a valid option, just pick the scripting language you are most comfortable with.