# P4V Custom Tools This project contains some example custom tools for P4V plus a simple installer to make it easier for users to install. They are currently written in Powershell to make it easier to use in Corporate systems - there is normally no need to install anything to make things run. The ideas are applicable to tools written in other languages (although deployment of the runtime environment needs to be thought about). # Tools ## Open in Swarm This is a simple script which is on the right click menu for when files or folders are selected. It opens that file or folder in Swarm for the relevant server. ![P4V Right Click](images/open_in_swarm.png) It does this by reading the property P4.Swarm.URL and creating the appropriate URL starting with that prefix. ### Dependencies * Powershell - typically 4.0+ * p4.exe in path * default browser is the right one to use for Swarm # Installation This provides automatic installer to make life easier for users. ## Installer.ps1 This is the main installer and is written to be fairly generic. On Windows you can run it by right-clicking > Run with powershell. It uses the script Install-P4VTools.ps1 to do the actual work. ## Install-P4VTools.ps1 This copies the tool(s) to the appropriate local directory and then customizes the P4V settings file. (This is `c:\users\\.p4qt\customtools.xml`). It will only add the tool once - if run again it will not change anything. It should not break any existing custom tools. Can be customised easily, e.g. editing the following to install in a different directory. $HOME expands to `c:\users\` by default ```powershell $installpath = "$HOME\P4V_TOOLS" ``` Can be customized for other tools too.