1 Overview
Sometimes in Red Suite projects it is useful to be able to include source and header files that are stored outside of the project or workspace itself. This is particularly useful if you want to share these source or header files between multiple projects.
2 Adding a folder of external resources to your project
You can simply add a folder as follows:
FILE->NEW->FOLDER
- Click on the ‘ADVANCED’ button
- Check the box ‘Link to Folder in the File System’
- Click ‘Browse…’ and find your folder in the file system.
The downside of this approach is that you have now made your project defendant on absolute paths that exist in your file system. So, your project is no longer portable through the import and export commands unless you have the same file structure in your target system.
3 Using Path Variables
You can make your project more portable by using external resource folders that point at ‘Path Variables’ rather than directly at an absolute directory in your file system. When you export and import a project, you just then need to make sure that the Path Variables exist and correctly point to the absolute location of the external resources in your file system.
3.1 Creating Path Variables
Path Variables can be created as follows:
Window->Preferences…->Workspace->Linked Resources
- Click ‘New’, select a name for your Variable.
- The click on Folder or File depending on if your linked resource is a folder or a file
- Browse and select your external resource then click OK.
You have now created the path variable
3.2 Adding a folder to your project that uses the Path Variable
This is now very similar to the steps in section 2 above.
FILE->NEW->FOLDER
- Click on the ‘ADVANCED’ button
- Check the box ‘Link to Folder in the File System’
- Click ‘Variables…’ and select the variable you have created in 3.1
