@@ -0,0 +1,3098 @@
+package org.codehaus.mojo.natives.msvc;%0A%0A/*%0A * The MIT License%0A *%0A * Copyright (c) 2004, The Codehaus%0A *%0A * Permission is hereby granted, free of charge, to any person obtaining a copy of%0A * this software and associated documentation files (the %22Software%22), to deal in%0A * the Software without restriction, including without limitation the rights to%0A * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies%0A * of the Software, and to permit persons to whom the Software is furnished to do%0A * so, subject to the following conditions:%0A * %0A * The above copyright notice and this permission notice shall be included in all%0A * copies or substantial portions of the Software.%0A * %0A * THE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR%0A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,%0A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE%0A * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER%0A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,%0A * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE%0A * SOFTWARE.%0A */%0A%0Aimport java.io.File;%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0Aimport org.codehaus.mojo.natives.NativeBuildException;%0Aimport org.codehaus.mojo.natives.util.EnvUtil;%0A%0A/**%0A * Equivalent of Microsoft Visual C++ Toolkit 2003's vcvars32.bat%0A * @author dtran%0A *%0A */%0A%0Apublic class MSVC2003ToolkitEnvFactory%0A    extends  AbstractMSVCEnvFactory%0A%7B%0A    private static final String MSVC2003_TOOLKIT_INSTALL_ENV_KEY = %22MSVC2003_TOOLKIT_INSTALL_DIR%22;%0A%0A    private static final String DEFAULT_MSVC2003_TOOLKT_INSTALL_DIR = %22C:/Program Files/Microsoft Visual C++ Toolkit 2003%22;%0A%0A    private static Map envs;%0A    %0A    public synchronized Map getEnvironmentVariables() %0A        throws NativeBuildException%0A    %7B%0A        if ( envs == null )%0A        %7B%0A            envs = createEnvs();%0A        %7D%0A        %0A        return envs;%0A    %7D%0A    %0A    private  Map createEnvs()%0A        throws NativeBuildException%0A    %7B%0A        File vcInstallDir = new File( EnvUtil.getEnv( MSVC2003_TOOLKIT_INSTALL_ENV_KEY, DEFAULT_MSVC2003_TOOLKT_INSTALL_DIR ) );%0A%0A        if ( !vcInstallDir.isDirectory() )%0A        %7B%0A            throw new NativeBuildException( vcInstallDir.getPath() + %22 is not a directory.%22 );%0A        %7D%0A%0A        Map envs = new HashMap();%0A%0A        //setup new PATH%0A        String currentPath = EnvUtil.getEnv( %22PATH%22 );%0A%0A        String newPath = vcInstallDir.getPath() + %22%5C%5CBIN;%22 + currentPath;%0A%0A        envs.put( %22PATH%22, newPath );%0A%0A        //setup new INCLUDE PATH%0A        String currentIncludePath = EnvUtil.getEnv( %22INCLUDE%22 );%0A%0A        String newIncludePath = vcInstallDir.getPath() + %22%5C%5CINCLUDE;%22 + currentIncludePath;%0A%0A        envs.put( %22INCLUDE%22, newIncludePath );%0A%0A        //%0A        //setup new LIB PATH%0A        //%0A        String currentLibPath = EnvUtil.getEnv( %22LIB%22 );%0A%0A        String newLibPath = vcInstallDir.getPath() + %22%5C%5CLIB;%22 + currentLibPath;%0A%0A        envs.put( %22LIB%22, newLibPath );%0A%0A        return envs;%0A%0A    %7D%0A%0A%7D%0A

add Microsoft Visual C++ Toolkit 2003env support