Re: CC task, VisualStudio Env Vars
Eric Minick <[email protected]> Mon, 10 Apr 2006 15:21:30 -0500
| Newsgroups | gmane.comp.java.anthill |
|---|---|
| Message-ID | <[email protected]> |
Listing them somewhere shouldn't be too terrible and if running the
batch file out of the Ant script doesn't work, it's probably your best bet.
In Anthill Pro, I'd tell you to list them as environment variables on
your ant or nant config. Since 1.8 (I believe) the command execution
library OS uses makes setting environment variables pretty easy.
Extending OS to take a list of environment variables that is
customizable per build - or perhaps global - would be quite doable for
someone who wanted to do it.
-- Eric
Marcio Marchini wrote:
>
> The BAT is attached.
>
> marcio
>
> Eric Minick wrote:
>
>> I'm worried about the same issue - my hope is that you can set the
>> spawn attribute to false and it will work. Out of curiousity, how
>> many environment variables are we talking about and do they change?
>>
>> Marcio Marchini wrote:
>>
>>>
>>> As far as I know setting properties in a spawned process does
>>> not change the env vars for the current process, so it would not work.
>>>
>>> I will give it a try just for kicks, but I think it won't work.
>>> I'll get back to the list with my findings.
>>>
>>> Any other suggestions? Thanks,
>>>
>>> marcio
>>>
>>>
>>> Eric Minick wrote:
>>>
>>>> Have you tried using the ant exec task to run the batch file
>>>> (http://ant.apache.org/manual/CoreTasks/exec.html)? You could have
>>>> that be the first part of your Ant build if a certain property is
>>>> present. You could then have Anthill pass in that property to
>>>> trigger the environment script - if your developers can keep
>>>> running as they have been oblivious to the change.
>>>>
>>>> Marcio Marchini wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I am trying to do a build of a C++ piece of code ("cc" ant
>>>>> task). I have the Ant build working from the command-line, but it
>>>>> needs that I run the VisualStudio BAT to cfg the env vars first:
>>>>>
>>>>> C:\marcio\>"C:\Program Files\Microsoft Visual Studio .NET
>>>>> 2003\Common7\Tools\vsvars32.bat"
>>>>>
>>>>>
>>>>> Now, the question is... how can I do a similar thing for the
>>>>> build that will run from Anthill? NOTE: Anthill is running under
>>>>> Tomcat as a Service.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> marcio
>>>>> _______________________________________________
>>>>> Anthill mailing list
>>>>> Anthill-IWHQxnLZ/[email protected]
>>>>> http://lists.urbancode.com/mailman/listinfo/anthill
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Anthill mailing list
>>>> Anthill-IWHQxnLZ/[email protected]
>>>> http://lists.urbancode.com/mailman/listinfo/anthill
>>>
>>>
>>> _______________________________________________
>>> Anthill mailing list
>>> Anthill-IWHQxnLZ/[email protected]
>>> http://lists.urbancode.com/mailman/listinfo/anthill
>>
>>
>>
>> _______________________________________________
>> Anthill mailing list
>> Anthill-IWHQxnLZ/[email protected]
>> http://lists.urbancode.com/mailman/listinfo/anthill
>
>------------------------------------------------------------------------
>
>@SET VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE
>@SET VCINSTALLDIR=C:\Program Files\Microsoft Visual Studio .NET 2003
>@SET FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework
>@SET FrameworkVersion=v1.1.4322
>@SET FrameworkSDKDir=C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1
>@rem Root of Visual Studio common files.
>
>@if "%VSINSTALLDIR%"=="" goto Usage
>@if "%VCINSTALLDIR%"=="" set VCINSTALLDIR=%VSINSTALLDIR%
>
>@rem
>@rem Root of Visual Studio ide installed files.
>@rem
>@set DevEnvDir=%VSINSTALLDIR%
>
>@rem
>@rem Root of Visual C++ installed files.
>@rem
>@set MSVCDir=%VCINSTALLDIR%\VC7
>
>@rem
>@echo Setting environment for using Microsoft Visual Studio .NET 2003 tools.
>@echo (If you have another version of Visual Studio or Visual C++ installed and wish
>@echo to use its tools from the command line, run vcvars32.bat for that version.)
>@rem
>
>@REM %VCINSTALLDIR%\Common7\Tools dir is added only for real setup.
>
>@set PATH=%DevEnvDir%;%MSVCDir%\BIN;%VCINSTALLDIR%\Common7\Tools;%VCINSTALLDIR%\Common7\Tools\bin\prerelease;%VCINSTALLDIR%\Common7\Tools\bin;%FrameworkSDKDir%\bin;%FrameworkDir%\%FrameworkVersion%;%PATH%;
>@set INCLUDE=%MSVCDir%\ATLMFC\INCLUDE;%MSVCDir%\INCLUDE;%MSVCDir%\PlatformSDK\include\prerelease;%MSVCDir%\PlatformSDK\include;%FrameworkSDKDir%\include;%INCLUDE%
>@set LIB=%MSVCDir%\ATLMFC\LIB;%MSVCDir%\LIB;%MSVCDir%\PlatformSDK\lib\prerelease;%MSVCDir%\PlatformSDK\lib;%FrameworkSDKDir%\lib;%LIB%
>
>@goto end
>
>:Usage
>
>@echo. VSINSTALLDIR variable is not set.
>@echo.
>@echo SYNTAX: %0
>
>@goto end
>
>:end
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Anthill mailing list
>Anthill-IWHQxnLZ/[email protected]
>http://lists.urbancode.com/mailman/listinfo/anthill
>
>