Go BackGo Forward Index Home  

Project
CodeMeter

Command line parameters and IDE integration

When launched, ProjectCodeMeter can optionally accept several command line parameters for automating some tasks, such as a weekly scan of project files.
These commands can be used from any one of these places:
- Typed from the command prompt
- In a the "Target" of a shortcut properties
- A batch file (for example filename.bat)
- The Windows Start menu "Run" box
- The execution command of any software which supports external applications (such as the Tools menu of Microsoft Visual Studio).

Parameters

/S:SettingsName
This command will load a setting called SettingsName. You should save a setting with that name before using this command (by using the Save Settings toolbar button). Note that loading a setting will load all ProjectCodeMeter settings, including the Project Folder, and the When analysis ends Action.
To make ProjectCodeMeter automatically exit, simply select the "When analysis ends" Action of "Exit application".

/A
This command will automatically start the Analysis process when ProjectCodeMeter launchs. Note that it will use the previous Settings unless you also use the /S command described above.

/X
This command will make ProjectCodeMeter automatically exit when the analysis process finishs. Note that this is independent of any "When analysis ends" action loaded by the /S command described above (so you can use a settings that opens a report in Excel, and still exits when finished).

/P:"folder"
This command will set the current Project folder. Use a fully qualified path to the folder of the project you wish to analyze. Can optionally use single quotes /P:'folder' in case of trouble.

/D
This command will enable Differential comparison mode of analysis

/D:"folder"
This command will enable Differential comparison mode of analysis, and set the Old Version folder


Examples
The following examples assume you installed ProjectCodeMeter into C:\Program Files\ProjectCodeMeter , if that's not the case, simply use the path you installed to instead.

A typical execution command can look like this:
"C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe"  /S:MyFirstProjectSetting  /P:"C:\MyProjects\MyApp"  /A
This will load a setting called MyFirstProjectSetting, set the Project folder to C:\MyProjects\MyApp , and then start the analysis.

Another example may be:
"C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe" /P:"C:\MyProjects\MyApp" /D:"C:\MyProjects\MyAppPrevious" /A
This will start a differential analysis between the project version in C:\MyProjects\MyApp and the older version in C:\MyProjects\MyAppPrevious



Integration with Microsoft Visual Studio 6

Under the Tools - Customize... menu:

visual studio 6 tools

Manual analysis of the entire project:
Title: ProjectCodeMeter
Command: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Arguments: /P:"$(WkspDir)"
Initial Directory: C:\Program Files\ProjectCodeMeter
all optional checkboxes should be unchecked.

Automatic cumulative analysis milestone (differential from the last analysis):
Title: ProjectCodeMeter Cumulative Milestone
Command: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Arguments: /P:"$(WkspDir)" /D /A
Initial Directory: C:\Program Files\ProjectCodeMeter
all optional checkboxes should be unchecked.


Integration with Microsoft Visual Studio 2003 - 2010

Under the Tools - External Tools.. menu (you may need to first click Tools - Settings - Expert Settings):

visual studio 2003 - 2010 tools

Manual analysis of the entire project:
Title: ProjectCodeMeter
Command: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Arguments: /P:'$(SolutionDir)'
Initial Directory: C:\Program Files\ProjectCodeMeter
all optional checkboxes should be unchecked.

Automatic cumulative analysis milestone (differential from the last analysis):
Title: ProjectCodeMeter Cumulative Milestone
Command: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Arguments: /P:'$(SolutionDir)' /D /A
Initial Directory: C:\Program Files\ProjectCodeMeter
all optional checkboxes should be unchecked.


Integration with CodeBlocks

Under the Tools - Configure Tools.. - Add menu:

Manual analysis of the entire project:
Name: ProjectCodeMeter
Executable: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Parameters: /P:'${PROJECT_DIR}'
Working Directory: C:\Program Files\ProjectCodeMeter
Select Launch tool visible detached (without output redirection)

Automatic cumulative analysis milestone (differential from the last analysis):
Name: ProjectCodeMeter Cumulative Milestone
Executable: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Parameters: /P:'${PROJECT_DIR}' /D /A
Working Directory: C:\Program Files\ProjectCodeMeter
Select Launch tool visible detached (without output redirection)


Integration with Eclipse

Under the Run - External Tools.. - External Tools... - Program - New - Main menu:

Manual analysis of the entire project:
Name: ProjectCodeMeter
Location: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Arguments: /P:'${workspace_loc}'
Working Directory: C:\Program Files\ProjectCodeMeter
Display in Favorites: Yes

Automatic cumulative analysis milestone (differential from the last analysis):
Name: ProjectCodeMeter Cumulative Milestone
Location: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Arguments: /P:'${workspace_loc}' /D /A
Working Directory: C:\Program Files\ProjectCodeMeter
Display in Favorites: Yes


Integration with Aptana Studio

Under the Run - External Tools - External Tools Configurations... - Program - New - Main menu:

Manual analysis of the entire project:
Name: ProjectCodeMeter
Location: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Arguments: /P:'${workspace_loc}'
Working Directory: C:\Program Files\ProjectCodeMeter
Display in Favorites: Yes

Automatic cumulative analysis milestone (differential from the last analysis):
Name: ProjectCodeMeter Cumulative Milestone
Location: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Arguments: /P:'${workspace_loc}' /D /A
Working Directory: C:\Program Files\ProjectCodeMeter
Display in Favorites: Yes

Integration with Oracle JDeveloper

Under the Tools - External Tools.. - New External Program -  menu:

Manual analysis of the entire project:
Program Executable: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Arguments: /P:'${project.dir}'
Run Directory: "C:\Program Files\ProjectCodeMeter"
Caption: ProjectCodeMeter

Automatic cumulative analysis milestone (differential from the last analysis):
Program Executable: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Arguments: /P:'${project.dir}' /D /A
Run Directory: C:\Program Files\ProjectCodeMeter
Caption: ProjectCodeMeter Cumulative Milestone


Integration with JBuilder

Under the Tools - Configure Tools.. - Add menu:

Manual analysis of the entire project:
Title: ProjectCodeMeter
Program: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Parameters: /P:'($ProjectDir)'
Unselect Service checkbox, select the Save all checkbox

Automatic cumulative analysis milestone (differential from the last analysis):
Title: ProjectCodeMeter Cumulative Milestone
Program: C:\Program Files\ProjectCodeMeter\ProjectCodeMeter.exe
Parameters: /P:'($ProjectDir)' /D /A
Unselect Service checkbox, select the Save all checkbox