This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to back up common source libraries

Every time I change a common source file within Kiel, the source file is changed for every project because (obviously) is a file common to all example projects.

Is there a way, without manually copying over the libraries and change in the including paths, to use have the examples use their own back up copies of the libraries through the IDE?

I was thinking of using a Python script to copy over all the .c and .h files from the include path into a local project directory, and the changing the include paths to the new local directory paths, but that's a last resort.

Parents
  • Hi Michael

    I always copy the files into the example project folder in this case. I find it is the cleanest approach, even if it requires some fiddling with your project settings.

    If you don't like that approach you could always use Git.
    Commit your SDK to a Git repo, and make a separate branch for each project. Then you can change the SDK files to your hearts content, and the changes will only affect that branch.

    A third approach is to have all the changes enabled by a unique define, so that only projects that set this define get the changes.

    Best regards
    Torbjørn

Reply
  • Hi Michael

    I always copy the files into the example project folder in this case. I find it is the cleanest approach, even if it requires some fiddling with your project settings.

    If you don't like that approach you could always use Git.
    Commit your SDK to a Git repo, and make a separate branch for each project. Then you can change the SDK files to your hearts content, and the changes will only affect that branch.

    A third approach is to have all the changes enabled by a unique define, so that only projects that set this define get the changes.

    Best regards
    Torbjørn

Children
Related