compliervc60cl.cpp

来自「自动化编译工具代码」· C++ 代码 · 共 56 行

CPP
56
字号
// ComplierVC60CL.cpp: implementation of the CComplierVC60CL class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "ComplierVC60CL.h"

#include "regkey.h"
#include "Common.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CComplierVC60CL::CComplierVC60CL()
{
	CRegKey reg;

	if (ERROR_SUCCESS == reg.Open(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\VisualStudio\\6.0\\Setup"))
	{
		reg.Read("VsCommonDir", m_strMSDEVPath);
		if (!m_strMSDEVPath.IsEmpty())
		{
			m_strMSDEVPath += "\\MSDev98\\Bin\\MSDEV.com";
		}
	}
}

CComplierVC60CL::~CComplierVC60CL()
{

}

BOOL CComplierVC60CL::Build(const CString &strProjectFile, 
							const CString &strConfigName, 
							const CString &strOutputFile)
{
	ASSERT(!strProjectFile.IsEmpty());
	ASSERT(!strConfigName.IsEmpty());

	CString strMakedConfigName;
	strMakedConfigName.Format("%s - win32 %s" 
							,CCommon::GetFileName(strProjectFile) 
							,strConfigName);

	CString strParameters;
	strParameters.Format("%s /MAKE \"%s\" /REBUILD /OUT %s"
							,strProjectFile
							,strMakedConfigName
							,G_strBuildLog);

	CCommon::WinExecAndWait32(m_strMSDEVPath, strParameters, CCommon::GetFilePath(strProjectFile));	

	return CCommon::BuildProjectSuccessed(CCommon::GetFilePath(strProjectFile) + G_strBuildLog);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?