📄 default.js
字号:
strDefines += "_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;";
if(bDebug)
strDefines += "_DEBUG";
else
strDefines += "NDEBUG";
// PLATFORMDEFINES isn't defined for all platforms
var PlatformDefines = config.Platform.GetMacroValue("PLATFORMDEFINES");
if(PlatformDefines != "")
strDefines += ";$(PLATFORMDEFINES)";
strDefines += ";$(ARCHFAM);$(_ARCHFAM_);_UNICODE"
CLTool.PreprocessorDefinitions = strDefines;
// Linker settings
var LinkTool = config.Tools('VCLinkerTool');
if(bDebug)
{
LinkTool.LinkIncremental = linkIncrementalYes;
LinkTool.GenerateDebugInformation = true;
}
else
{
LinkTool.LinkIncremental = linkIncrementalNo;
}
LinkTool.SubSystem = subSystemNotSet;
LinkTool.IgnoreImportLibrary = true;
if(bDebug)
LinkTool.AdditionalDependencies = "atlsd.lib libcmtd.lib"
else
LinkTool.AdditionalDependencies = "atls.lib libcmt.lib"
LinkTool.AdditionalDependencies += " corelibc.lib coredll.lib commctrl.lib ole32.lib oleaut32.lib uuid.lib atl.lib atlosapis.lib $(NOINHERIT)"
if(config.Platform.Name != "Win32")
{
LinkTool.AdditionalOptions = " /subsystem:windowsce," + ProjWiz.GetNativePlatformMajorVersion(config.Platform.Name) + "." + ProjWiz.GetNativePlatformMinorVersion(config.Platform.Name);
LinkTool.AdditionalOptions = LinkTool.AdditionalOptions + " " + ProjWiz.GetLinkerMachineType(instructionSet);
}
if(config.Platform.Name == "Pocket PC 2003 (ARMV4)" ||
config.Platform.Name == "SmartPhone 2003 (ARMV4)" ||
config.Platform.Name == "Smartphone 2003 (ARMV4)" )
{
LinkTool.AdditionalOptions = LinkTool.AdditionalOptions + " /ARMPADCODE";
}
if(config.Platform.Name == "Pocket PC 2003 (Emulator)" ||
config.Platform.Name == "SmartPhone 2003 (Emulator)" ||
config.Platform.Name == "Smartphone 2003 (Emulator)" )
{
if(bDebug)
{
LinkTool.AdditionalDependencies += " libcmtx86d.lib";
}
else
{
LinkTool.AdditionalDependencies += " libcmtx86.lib";
}
}
if(config.Platform.Name.indexOf("Pocket PC 2003") != -1)
{
LinkTool.AdditionalDependencies += " ccrtrtti.lib";
}
if(config.Platform.Name.indexOf("SmartPhone 2003") != -1 ||
config.Platform.Name.indexOf("Smartphone 2003") != -1 )
{
LinkTool.AdditionalDependencies += " ccrtrtti.lib";
}
LinkTool.AdditionalDependencies += " $(NOINHERIT)";
LinkTool.DelayLoadDLLs = "$(NOINHERIT)";
var DeployTool = config.DeploymentTool;
if(DeployTool)
{
DeployTool.AdditionalFiles += "atl80.dll|$(VCInstallDir)ce\\dll\\$(INSTRUCTIONSET)\\|%CSIDL_WINDOWS%|0;";
}
// Resource settings
var RCTool = config.Tools("VCResourceCompilerTool");
RCTool.Culture = rcEnglishUS;
RCTool.AdditionalIncludeDirectories = "$(IntDir)";
if(bDebug)
strDefines = "_DEBUG";
else
strDefines = "NDEBUG";
strDefines += ";_UNICODE;UNICODE;_WIN32_WCE"
RCTool.PreprocessorDefinitions = strDefines;
// MIDL settings
var MidlTool = config.Tools("VCMidlTool");
MidlTool.MkTypLibCompatible = false;
if(IsPlatformWin32(config))
MidlTool.TargetEnvironment = midlTargetWin32;
if(bDebug)
MidlTool.PreprocessorDefinitions = "_DEBUG";
else
MidlTool.PreprocessorDefinitions = "NDEBUG";
MidlTool.HeaderFileName = strProjectName + ".h";
MidlTool.InterfaceIdentifierFileName = strProjectName + "_i.c";
MidlTool.ProxyFileName = strProjectName + "_p.c";
MidlTool.GenerateStublessProxies = true;
MidlTool.TypeLibraryName = "$(IntDir)/" + strProjectName + ".tlb";
MidlTool.DLLDataFileName = "";
// Post-build settings
if(wizard.FindSymbol('WTL_COM_SERVER'))
{
var PostBuildTool = config.Tools("VCPostBuildEventTool");
PostBuildTool.Description = "Performing registration...";
PostBuildTool.CommandLine = "\"$(TargetPath)\" /RegServer";
}
}
}
catch(e)
{
throw e;
}
}
function DelFile(fso, strWizTempFile)
{
try
{
if(fso.FileExists(strWizTempFile))
{
var tmpFile = fso.GetFile(strWizTempFile);
tmpFile.Delete();
}
}
catch(e)
{
throw e;
}
}
function CreateCustomInfFile()
{
try
{
var fso, TemplatesFolder, TemplateFiles, strTemplate;
fso = new ActiveXObject('Scripting.FileSystemObject');
var TemporaryFolder = 2;
var tfolder = fso.GetSpecialFolder(TemporaryFolder);
var strWizTempFile = tfolder.Path + "\\" + fso.GetTempName();
var strTemplatePath = wizard.FindSymbol('TEMPLATES_PATH');
var strInfFile = strTemplatePath + '\\Templates.inf';
wizard.RenderTemplate(strInfFile, strWizTempFile);
var WizTempFile = fso.GetFile(strWizTempFile);
return WizTempFile;
}
catch(e)
{
throw e;
}
}
function GetTargetName(strName, strProjectName)
{
try
{
var strTarget = strName;
var strResPath = "res\\";
if(strName.substr(0, 4) == "root")
{
var nNameLen = strName.length;
if(strName == "root.ico" || strName == "rootDoc.ico" || strName == "root.exe.manifest")
{
strTarget = strResPath + strProjectName + strName.substr(4, nNameLen - 4);
}
else
{
strTarget = strProjectName + strName.substr(4, nNameLen - 4);
}
}
else if(strName == 'frame.h')
{
strTarget = 'MainFrm.h';
}
else if(strName == 'frame.cpp')
{
strTarget = 'MainFrm.cpp';
}
else if(strName == 'view.h')
{
strTarget = strProjectName + 'View.h';
}
else if(strName == 'view.cpp')
{
strTarget = strProjectName + 'View.cpp';
}
else if(strName == 'toolbar.bmp')
{
strTarget = strResPath + strName;
}
return strTarget;
}
catch(e)
{
throw e;
}
}
function AddFilesToCustomProj(proj, strProjectName, strProjectPath, InfFile)
{
try
{
var projItems = proj.ProjectItems
var strTemplatePath = wizard.FindSymbol('TEMPLATES_PATH');
var strTpl = '';
var strName = '';
var strTextStream = InfFile.OpenAsTextStream(1, -2);
while (!strTextStream.AtEndOfStream)
{
strTpl = strTextStream.ReadLine();
if(strTpl != '')
{
strName = strTpl;
var strTarget = GetTargetName(strName, strProjectName);
var strTemplate = strTemplatePath + '\\' + strTpl;
var strFile = strProjectPath + '\\' + strTarget;
var bCopyOnly = false; //"true" will only copy the file from strTemplate to strTarget without rendering/adding to the project
var strExt = strName.substr(strName.lastIndexOf("."));
if(strExt==".bmp" || strExt==".ico" || strExt==".gif" || strExt==".rtf" || strExt==".css")
bCopyOnly = true;
wizard.RenderTemplate(strTemplate, strFile, bCopyOnly);
// don't add these files to the project
if(strTarget == strProjectName + ".h" ||
strTarget == strProjectName + "ps.mk" ||
strTarget == strProjectName + "ps.def")
continue;
proj.Object.AddFile(strFile);
}
}
strTextStream.Close();
}
catch(e)
{
throw e;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -