且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在自定义向导C ++ visual studio 2015中添加道具文件

更新时间:2023-10-20 10:44:52

(配置)\\;
// 选项:配置类型:0 => Makefile,1 =>应用程序(.exe),
// 2 =>动态库(.dll),3 =>静态库(.lib),4 =>实用程序。
config.ConfigurationType = 2;
// 选项:使用MFC:0 =>标准Windows库,1 =>静态链接,2 =>动态链接。
config.UseOfMFC = 0;
// 选项:使用ATL:0 =>不使用ATL,1 =>到ATL的静态链接,2 =>动态链接到ATL。
config.UseOfATL = 0;
// 选项:字符集:0 =>未设置,1 => Unicode,2 =>多字节字符集。
config.CharacterSet = 1;

var CLTool = config.Tools(' VCCLCompilerTool');
CLTool.AdditionalIncludeDirectories = .. \\..\\base-link \ \tool_lib\\include\\wtl\\; .. \\..\\base-link\\mts-framework\\include\\ 跨度>;
// 选项:优化:0 =>禁用(/ Od),1 =>最小化大小(/ O1),
// 2 =>最大化速度(/ O2),3 =>完全优化(/ Ox),4 =>自定义。
CLTool.Optimization = 0;
CLTool.PreprocessorDefinitions = WIN32; _WINDOWS; _DEBUG; _USRDLL;
CLTool.MinimalRebuild = true;
// 选项:基本运行时检查:0 =>默认值,1 =>堆栈帧(/ RTC),
// 2 =>未初始化的变量(/ RTCu),3 =>两者(/ RTC1,相当于/ RTCsu)。
CLTool.BasicRuntimeChecks = 3 跨度>;
// 选项:运行时库:0 =>多线程(/ MT),1 =>多线程调试(/ MTd),
// 2 =>多线程DLL(/ MD),3 =>多线程调试DLL(/ MDd)。
CLTool.RuntimeLibrary = 3;
// 选项:使用预编译的标头:0 =>不使用,1 =>创建预编译头文件(/ Yc),
// 2 =>使用预编译的头文件(/ Yu)。
CLTool.UsePrecompiledHeader = 1跨度>;
// 选项:警告级别:0 =>忽略所有警告,1 =>忽略除最严重警告之外的所有警告(默认),
// 2 =>中级警告消息,3 =>低级警告消息,
// 4 =>显示信息级警告消息;对链接器无效。
CLTool.WarningLevel = 3;

// 选项:调试信息格式:0 =>停用,1 => C7兼容(/ Z7),
// 2 =>程序数据库(/ Zi),3 =>程序数据库支持编辑和继续(/ ZI),
// 4 =>来自上级项目继承或项目标准。
CLTool.DebugInformationFormat = 3;
// 优化 - 整个程序优化:否
CLTool.WholeProgramOptimization =
false;
// 代码生成 - 启用增强指令集:流式SIMD扩展2(/ arch:SSE2)
CLTool.EnableEnhancedInstructionSet = 2;

var LinkTool = config.Tools(' VCLinkerTool');
LinkTool.AdditionalLibraryDirectories = .. \\..\\base-link \ \mts-framework\\bin\\跨度>;
// LinkTool.OutputFile =


(outdir)/ + strProjectName +。dll;
// 选项:链接增量:0 = >默认值,1 =>否(/ INCREMENTAL:NO),2 =>是(/ INCREMENTAL)。
LinkTool.ProgramDatabaseFile =

>

(TARGETDIR)

function AddConfigs(proj, strProjectName)
{
        //
        // Settings for the Debug|Win32 configuration
        //
        var config = proj.Object.Configurations('Debug|Win32');
        config.OutputDirectory = "..\\..\\..\\out\\bin\\";
        config.IntermediateDirectory="$(Configuration)\\";
        // Option: Configuration type: 0 => Makefile, 1 => Application (.exe),
        //         2 => Dynamic Library (.dll), 3 => Static Library (.lib), 4 => Utility.
        config.ConfigurationType="2";
        // Option: Use of MFC: 0 => Standard Windows Libraries, 1 => Static link, 2 => Dynamic link.	
        config.UseOfMFC="0";
        // Option: Use of ATL: 0 => Not Using ATL, 1 => Static Link to ATL, 2 => Dynamic Link to ATL.		
        config.UseOfATL="0";
        // Option: Character set: 0 => Not set, 1 => Unicode, 2 => Multi-Byte Character Set.
        config.CharacterSet = "1";

        var CLTool = config.Tools('VCCLCompilerTool');
        CLTool.AdditionalIncludeDirectories = "..\\..\\base-link\\tool_lib\\include\\wtl\\;..\\..\\base-link\\mts-framework\\include\\";
        // Option: Optimization: 0 => Disabled (/Od), 1 => Minimize Size (/O1),
        //         2 => Maximize Speed (/O2), 3 => Full Optimization (/Ox), 4 => Custom.
        CLTool.Optimization="0";
        CLTool.PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL";
        CLTool.MinimalRebuild="true";
        // Option: Basic runtime checks: 0 => Default, 1 => Stack Frames (/RTCs),
        //         2 => Uninitialized Variables (/RTCu), 3 => Both (/RTC1, equivalent to /RTCsu).
        CLTool.BasicRuntimeChecks="3";
        // Option: Runtime library: 0 => Multi-threaded (/MT), 1 => Multi-threaded Debug (/MTd),
        //         2 => Multi-threaded DLL (/MD), 3 => Multi-threaded Debug DLL (/MDd).
        CLTool.RuntimeLibrary="3";
        // Option: Use precompiled header: 0 => Not use, 1 => Create Precompiled Header File (/Yc),
        //         2 => Use Precompiled Header File (/Yu).
        CLTool.UsePrecompiledHeader="1";
        // Option: Warning level: 0 => Ignore all warnings, 1 => Ignore all but the most severe warnings (Default),
        //         2 => Medium level warning messages, 3 => Low level warning messages,
        //         4 => Show informational-level warning messages; not valid for linker.
        CLTool.WarningLevel="3";

        // Option: Debug information format: 0 => Deactivated, 1 => C7-Compatible (/Z7),
        //         2 => Program database (/Zi), 3 => Program database to support Edit and Continue (/ZI),
        //         4 => from superordinate project inherit or project standard.
        CLTool.DebugInformationFormat="3";		
        // Optimization – Whole Program Optimization: No
        CLTool.WholeProgramOptimization="false";
        // Code Generation – Enable Enhanced Instruction Set: Streaming SIMD Extensions 2 (/arch:SSE2)
        CLTool.EnableEnhancedInstructionSet="2";

        var LinkTool = config.Tools('VCLinkerTool');
        LinkTool.AdditionalLibraryDirectories = "..\\..\\base-link\\mts-framework\\bin\\";
        //	    LinkTool.OutputFile = "$(outdir)/" + strProjectName + ".dll";
        // Option: Link incremental: 0 => Default, 1 => No (/INCREMENTAL:NO), 2 => Yes (/INCREMENTAL).
        LinkTool.ProgramDatabaseFile = "$(TargetDir)$(TargetName).pdb";
        LinkTool.LinkIncremental="2";
        LinkTool.GenerateDebugInformation="true";
        // Option: Subsystem: 0 => Not set, 1 => Console, 2 => Windows, 3 => Native, 4 => EFI Application,
        //         5 => EFI Boot Service, 6 => EFI ROM, 7 => EFI Runtime, 8 => POSIX, 9 => Windows CE.
        LinkTool.SubSystem="2";
        // Option: Target machine: 0 => Not set, 1 => X86, 2 => AM33, 3 => ARM, 4 => EBC, 5 => IA64, 6 => M32R,
        //         7 => MIPS, 8 => MIPS16, 9 => MIPSFPU, 10 => MIPSFPU16, 11 => MIPSR41XX, 12 => SH3,
        //         13 => SH3DSP, 14 => SH4, 15 => SH5, 16 => THUMB, 17 => X64.
        LinkTool.TargetMachine="1";
        // Optimization – Link Time Code Generation: Default
        LinkTool.LinkTimeCodeGeneration="0";

        var MIDLTool = config.Tools('VCMIDLTool');	
        MIDLTool.PreprocessorDefinitions="_DEBUG";
        MIDLTool.MkTypLibCompatible="false";

        var ResourceTool = config.Tools('VCResourceCompilerTool');
        ResourceTool.PreprocessorDefinitions="_DEBUG";
        ResourceTool.Culture="1031";
        ResourceTool.AdditionalIncludeDirectories=""$(IntDir)"";

        var PostBuildTool = config.Tools('VCPostBuildEventTool');
        PostBuildTool.CommandLine="";
        PostBuildTool.Description="";<pre lang="c++">
}



What I have tried:

I have to add Platform toolset as "Visual Studio 2015 (v140)" in configuration.
Please let me know what variable i have to add.

(Configuration)\\"; // Option: Configuration type: 0 => Makefile, 1 => Application (.exe), // 2 => Dynamic Library (.dll), 3 => Static Library (.lib), 4 => Utility. config.ConfigurationType="2"; // Option: Use of MFC: 0 => Standard Windows Libraries, 1 => Static link, 2 => Dynamic link. config.UseOfMFC="0"; // Option: Use of ATL: 0 => Not Using ATL, 1 => Static Link to ATL, 2 => Dynamic Link to ATL. config.UseOfATL="0"; // Option: Character set: 0 => Not set, 1 => Unicode, 2 => Multi-Byte Character Set. config.CharacterSet = "1"; var CLTool = config.Tools('VCCLCompilerTool'); CLTool.AdditionalIncludeDirectories = "..\\..\\base-link\\tool_lib\\include\\wtl\\;..\\..\\base-link\\mts-framework\\include\\"; // Option: Optimization: 0 => Disabled (/Od), 1 => Minimize Size (/O1), // 2 => Maximize Speed (/O2), 3 => Full Optimization (/Ox), 4 => Custom. CLTool.Optimization="0"; CLTool.PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL"; CLTool.MinimalRebuild="true"; // Option: Basic runtime checks: 0 => Default, 1 => Stack Frames (/RTCs), // 2 => Uninitialized Variables (/RTCu), 3 => Both (/RTC1, equivalent to /RTCsu). CLTool.BasicRuntimeChecks="3"; // Option: Runtime library: 0 => Multi-threaded (/MT), 1 => Multi-threaded Debug (/MTd), // 2 => Multi-threaded DLL (/MD), 3 => Multi-threaded Debug DLL (/MDd). CLTool.RuntimeLibrary="3"; // Option: Use precompiled header: 0 => Not use, 1 => Create Precompiled Header File (/Yc), // 2 => Use Precompiled Header File (/Yu). CLTool.UsePrecompiledHeader="1"; // Option: Warning level: 0 => Ignore all warnings, 1 => Ignore all but the most severe warnings (Default), // 2 => Medium level warning messages, 3 => Low level warning messages, // 4 => Show informational-level warning messages; not valid for linker. CLTool.WarningLevel="3"; // Option: Debug information format: 0 => Deactivated, 1 => C7-Compatible (/Z7), // 2 => Program database (/Zi), 3 => Program database to support Edit and Continue (/ZI), // 4 => from superordinate project inherit or project standard. CLTool.DebugInformationFormat="3"; // Optimization – Whole Program Optimization: No CLTool.WholeProgramOptimization="false"; // Code Generation – Enable Enhanced Instruction Set: Streaming SIMD Extensions 2 (/arch:SSE2) CLTool.EnableEnhancedInstructionSet="2"; var LinkTool = config.Tools('VCLinkerTool'); LinkTool.AdditionalLibraryDirectories = "..\\..\\base-link\\mts-framework\\bin\\"; // LinkTool.OutputFile = "


(outdir)/" + strProjectName + ".dll"; // Option: Link incremental: 0 => Default, 1 => No (/INCREMENTAL:NO), 2 => Yes (/INCREMENTAL). LinkTool.ProgramDatabaseFile = "


(TargetDir)