This article is for Understand 5.1 and does not apply to Understand 6.0. Understand 6.0 abstracts this feature away and handles it in the background automatically.
Have you ever wanted to share an Understand project with a colleague, or even just access it from a different computer? Understand makes this an easy task without having to create a totally new project, and provides several options to choose from.
By default, Understand projects are created with “Absolute” paths to the source files. This works great as long as you don’t have to move the project or share it.
If you do want your project to be portable, one option is to use “Relative” mode.
A quick and easy way to share a “Relative” (Project->Configure Project->Portability) project is to save the Understand project.udb file in the root directory where the source code is located, Analyze the project, zip up the folder and it’s ready to share. You’ll need to add the directory, point to the root, and give the Named Root a name. Also, make sure the “Enforce Portability” button is checked. Note that with this option the source files are limited to being in the same directory or below the .udb project file. If the source files are outside of the directory, either use the Named Root option shown below, or move the .udb project file to a more root location.
If creating the project through the command line tool und, you can change the project to use relative paths with the command und settings –AddMode Relative myproject.udb
The other portability option is a “NamedRoot“, which is very similar to an Environment Variable that points to the root directory. When this is shared, different users can use different definitions for the “NamedRoot” by clicking “Edit Named Roots”.
There can be multiple names and paths for a single project, making it especially useful for sharing projects with people who reference project files over a network using different paths. Each named root can then be toggled off/on as needed, but don’t forget to re-analyze with any of these changes.
Named roots are a little more complex when using und, the command to switch the project to named roots is und settings –AddMode NamedRoots myproject.udb
however those roots also need to be specified. und help roots
provides detailed information on how to set them.
More information about portability options can be found in the Understand manual.