run batch file on project startup to get environment variables

Hi All

I need to run a batch file on project startup which will setup some environment variables that are needed in order to run the projects various ant build scripts. I need these enviroment variables to be available to my ant scripts which I run inside of IDEA.

Currently I have a batch file that runs the scripts and then runs IDEA but this only works for one project and I can't have another script in another project which does the same thing because only 1 instance of IDEA can run at once.

This is my current script located in "D:\P4Dev\myproject\dir\setup.bat"

call p4env
call ixmk env
call p4env
call "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 7.0\bin\idea.exe"


What I would like is on project startup I would like it to run just

call p4env
call ixmk env
call p4env

which would be in a file "D:\P4Dev\myproject\dir\setup.bat"

Or if I could just run them each separately would be fine as long as I can run them from the directory "D:\P4Dev\myproject\dir"

I know that I could add the environment variable to the ant properties within IDEA, but there are alot of properties and a lot of build files.

Any help is appreciated.

Thanks
Mike

3 comments

what if I was to write a project plugin that would set the project variables, just like if they were set in the ant properties panel.

How could I set ant build file properties for all ant projects like when you select build file properties and add a property to a single build file, I would want to set them once in my project plugin and then propogate them to all ant build file properties?

TIA
Mike

0

Mike,

I'm sorry for delay with the answer, but I afraid you're asking wrong forum. Here we discuss mainly the process of TeamCity product configuration and usage, and not IDEA. Please consult IDEA forums at http://www.intellij.net/forums/category.jspa?categoryID=8.

Kind regards,
KIR

0

Please sign in to leave a comment.