在m$拖着VisualStudio向迈进.Net时代的今天,VC++6.0仍有很大用途,安装VC++6实在不是一件 愉快的事。这里笔者给出制作VC++6免安装简版的方法。使用X-force版本的VC++创建基于2000/XP/2003系统运行的VC++简版为例 进行介绍。
(1)打开光盘,首先提取common、VC98两个目录。

(2)在common目录下,保留msdev98\bin下全部文件和msdev98下的一个空的Gallery目录,其他目录可以删去。而对于BIN目录下的文件可以按需要,再做如下处理:

如果只要核心编译器的话,只要保留msdev98\Bin下的RC.EXE,MSPDB60.DLL,rcdll.dll就行了。

如果希望实现基本的资源编辑功能,可以保留下列文件:

Bin下
RCDLL.DLL
RC.EXE
MSPDB60.DLL
Msdev.exe
Devshl.DLL
Devprj.pkg
Devedit.pkg

Bin\IDE下
MFCAPWZ.DLL
Devtool.pkg
Devres.pkg
devblg.pkg
devbied.pkg

如果使用VC++开发环境的基本开发功能而不使用网络编程、ATL和MFC,下列文件可删除:

msdev98\Bin下
CRT.NCB
EESQL.DLL
MFCATL.NCB
MSVCMON.EXE
NSODBC.DLL
REGCLADM.EXE
SETUPDBG.EXE
SETUPDBG.INF
SHSQL.DLL
SQLPRXY.EXE
TLN0T.DLL

MSDEV98\BIN\IDE下
ATLOBJ.DLL
CAWUTIL.DLL
CLIPASST.DLL
CTIP.DLL
DEVXPGL.DLL
DLGBAR.DLL
DOCREG.DLL
GUIDGEN.DLL
IDLE.DLL
MFCAPWZ.DLL
MSADOCG.DLL
OCC.DLL
OWNDRAW.DLL
SOCKETS.DLL
SPLASH.DLL
SYSINFO.DLL
TOOLTIPS.DLL

(3)在VC98目录下,crt和redist目录、atl下的src和MFC下的src目录均可以删去,DEBUG下的除了*.dll文件外的其他文件可以删去,不使用MFC和ATL的话,可以删去MFC和ATL两个目录。

(4)为了方便,可以将msdev98移入VC98目录,再创建如下的reg文件导入注册表(假设VC++目录位于D:\VC98下):
使用MFC和ATL库:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Environment]
“include”=hex(2):44,00,3a,00,5c,00,56,00,43,00,39,00,38,00,5c,00,61,00,74,00,\
6c,00,5c,00,69,00,6e,00,63,00,6c,00,75,00,64,00,65,00,3b,00,44,00,3a,00,5c,\
00,56,00,43,00,39,00,38,00,5c,00,6d,00,66,00,63,00,5c,00,69,00,6e,00,63,00,\
6c,00,75,00,64,00,65,00,3b,00,44,00,3a,00,5c,00,56,00,43,00,39,00,38,00,5c,\
00,69,00,6e,00,63,00,6c,00,75,00,64,00,65,00,00,00
“lib”=hex(2):44,00,3a,00,5c,00,56,00,43,00,39,00,38,00,5c,00,6d,00,66,00,63,00,\
5c,00,6c,00,69,00,62,00,3b,00,44,00,3a,00,5c,00,56,00,43,00,39,00,38,00,5c,\
00,6c,00,69,00,62,00,00,00
“MSDevDir”=hex(2):44,00,3a,00,5c,00,56,00,43,00,39,00,38,00,5c,00,4d,00,53,00,\
44,00,65,00,76,00,39,00,38,00,00,00
“path”=hex(2):44,00,3a,00,5c,00,56,00,43,00,39,00,38,00,5c,00,4d,00,53,00,44,\
00,65,00,76,00,39,00,38,00,5c,00,42,00,69,00,6e,00,3b,00,44,00,3a,00,5c,00,\
56,00,43,00,39,00,38,00,5c,00,62,00,69,00,6e,00,00,00

不使用ATL和MFC库:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Environment]
“include”=hex(2):45,00,3a,00,5c,00,56,00,69,00,73,00,75,00,61,00,6c,00,53,00,\
74,00,75,00,64,00,69,00,6f,00,5c,00,56,00,43,00,39,00,38,00,5c,00,69,00,6e,\
00,63,00,6c,00,75,00,64,00,65,00,00,00
“lib”=hex(2):45,00,3a,00,5c,00,56,00,69,00,73,00,75,00,61,00,6c,00,53,00,74,00,\
75,00,64,00,69,00,6f,00,5c,00,56,00,43,00,39,00,38,00,5c,00,6c,00,69,00,62,\
00,00,00
“MSDevDir”=hex(2):45,00,3a,00,5c,00,56,00,69,00,73,00,75,00,61,00,6c,00,53,00,\
74,00,75,00,64,00,69,00,6f,00,5c,00,56,00,43,00,39,00,38,00,5c,00,4d,00,53,\
00,44,00,65,00,76,00,39,00,38,00,00,00
“path”=hex(2):45,00,3a,00,5c,00,56,00,69,00,73,00,75,00,61,00,6c,00,53,00,74,\
00,75,00,64,00,69,00,6f,00,5c,00,56,00,43,00,39,00,38,00,5c,00,4d,00,53,00,\
44,00,65,00,76,00,39,00,38,00,5c,00,42,00,69,00,6e,00,3b,00,45,00,3a,00,5c,\
00,56,00,69,00,73,00,75,00,61,00,6c,00,53,00,74,00,75,00,64,00,69,00,6f,00,\
5c,00,56,00,43,00,39,00,38,00,5c,00,62,00,69,00,6e,00,00,00

(5)如果使用VC的开发环境,则还需在:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment下的path键中添加D:\VC98\DEBUG键值。

以上方法可以将VC++精简至78~160兆(未压缩),大家可以根据需要参考定制。此法定制的VC++可以通过Apache 2.0.48的编译测试,用MSDEV98能够生成并运行Windows和控制台项目,其他功能未经测试。在使用过程中,可以按需要添加文件。

这里须强调的是,这里的简化方法保留的是基本开发功能,如果要使用高级开发功能,慎用。

发表评论

/ 快捷键:Ctrl+Enter
加载中……