0

I've added an item to my Tools menu using the XML below that runs custom actions for my project.

<?xml version="1.0" encoding="UTF-8"?>
<toolSet name="My Project Utilities">
    <tool name="test" showInMainMenu="true" showInEditor="true" showInProject="true" showInSearchPopup="true" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="false">
        <exec>
            <option name="COMMAND" value="C:\path\to\ant.bat" />
            <option name="PARAMETERS" value="my_task -Dmodule.dir=$ProjectFileDir$\my.module" />
            <option name="WORKING_DIRECTORY" value="$ProjectFileDir$/my.working.dir/foo" />
        </exec>
    </tool>
</toolSet>

When I try to run this task, I get this error:

Error running test:
Cannot start process, the working directory C:\projects\something\my.working.dir\foo does not exist

The problem is $ProjectFileDir$ points to the wrong directory, C:\projects\something, and I need it to point to C:\projects. Is there a way to change the value of $ProjectFileDir without modifying the value of WORKING_DIRECTORY in my XML?

Bucket
  • 7,415
  • 9
  • 35
  • 45

1 Answers1

0

we did the samething but with a batch file . uploading the batch file and adding the project path at working directory .

Go to File >> Settings >> External Tools >> Add (+) Create Tool , you can follow the image. Hope this helps.

enter image description here

BSrinivas
  • 118
  • 2
  • 8