Including JSON@CodeTitans Library as source-code into custom project

Sometimes it seems to be very useful to include any of the CodeTitans library directly into your project.

  1. there is no external library dendency
  2. all the code could be signed using owned certificate
  3. maybe the code needs some tweaks (git + svn serves the best for this purpose as code updates could be still pulled from and merged with local git changes)

How to add the code?

It is a simple as adding existing code files into the project and updating the build flags. More about used comilation switches is here.

Let's do it using JSON library as an example.

1) Let's create new library (could be skip, if you already have own project).
Create new project

2) Create a folder structure to map JSON@CodeTitans library internal folders layout.
Create a directory layout

3) Include the sources from the location, which is in sync with source code repository. Use 'Add as Link' option, so the files aren't copied.
Add as Link

4) Finally traverse all the folders created at step (2) and 'Add as Link' all the files from JSON@CodeTitans folder from the trunk into respective subfolders. Skip only the 'AssemblyInfo.cs' file, as it is no more needed.
Include all existing files

Whole library included as link

5) There were only few files missing, that were available inside Core@CodeTitans. They need to be linked as well. These are:
  • diagnostics files (related to debug logging; folder: trunk/Core@CodeTitans/Diagnostics/)
  • few helper classes (folder: trunk/Core@CodeTitans/)
Whole library included as link

6) Depending on your destination platform update the Build flags in Preferences of your project. More about conditional flags used is here.

7) Done! All should compile and work like a charm!

Last edited May 26, 2012 at 6:30 PM by FeydRauth, version 5


No comments yet.