⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 prjconverter.cpp

📁 将VC7.0和VC.NET的工程转换到VC6.0的工程,内有详细的介绍做法(自己试验后写的)
💻 CPP
字号:
// prjconverter.cpp : Defines the entry point for the console application.
//

#include <stdio.h>
#include <windows.h>
#include "slnprocess.h"



int main(int argc, char* argv[])
{
	if (argc!=2)
	{
		printf ("prjconverter : Converts a VC++7 project to a VC++6 project\n" \
			    ".sln/.vcproj pairs are converted to .dsw/.dsp pairs\n\n" \
				"Usage: prjconverter.exe <solutionname (full filepath)>[.sln]\n" \
				"Example: prjconverter c:\\tmp\\betterxml.sln\n\n\n" \
				"Codeproject, Stephane Rodriguez, Sept 22 2002.\n");
		return 0;
	}


	// make sure the .sln (or .vcproj) file actually exists
	//

	CString szSolutionName = argv[1];
	if (!szSolutionName.Right(strlen(".vcproj")).CompareNoCase(".vcproj") &&
		!szSolutionName.Right(strlen(".sln")).CompareNoCase(".sln"))
		szSolutionName += ".sln";

	HANDLE hFind;
	WIN32_FIND_DATA fd;

	if ((hFind=::FindFirstFile(szSolutionName,&fd))==INVALID_HANDLE_VALUE)
	{
		printf ("%s does not exist.\n",szSolutionName);
		return 0;
	}

	if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
	{
		printf ("%s is a directory!\n",szSolutionName);
		return 0;
	}

	::FindClose(hFind);


	slnprocess p;

	// *.sln passed in the cmdline
	if ( szSolutionName.Right(strlen(".sln")).CompareNoCase(".sln") )
	{
		p.process(szSolutionName);
	}
	else if ( szSolutionName.Right(strlen(".vcproj")).CompareNoCase(".vcproj") ) // *.vcproj passed in the cmdline
	{
		p.processProjectOnly(szSolutionName); // szSolutionName is not a *.sln name
	}
	else
	{
		printf ("Only .sln and .vcproj filenames are processed.\n",szSolutionName);
		return 0;
	}

	return 0;
}


⌨️ 快捷键说明

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