Difference between revisions of "Studio:How can I tell which version of a workspace is used when connected to the target at runtime?"

From STRIDE Wiki
Jump to: navigation, search
Line 2: Line 2:
  
 
You can also add a preprocessor define with a version number as part of the workspace build (not the target build). The define is not used for compilation. A script will check which preprocessor define is set and act accordingly.
 
You can also add a preprocessor define with a version number as part of the workspace build (not the target build). The define is not used for compilation. A script will check which preprocessor define is set and act accordingly.
 
 
[[Category:Application Notes]]
 

Revision as of 15:45, 5 February 2008

When working with multiple targets, you may want to determine which version of a workspace is being used at runtime. To determine the target to which you are connected, add a helper function to the Intercept Module which can return something from the target (e.g., a string whose value is a target compile-time setting) that will tell the script the kind of target to which it is connected.

You can also add a preprocessor define with a version number as part of the workspace build (not the target build). The define is not used for compilation. A script will check which preprocessor define is set and act accordingly.