Example #1
0
        public UserConfig(IWizardConfig cfg, IXProject xp)
            : this(cfg)
        {
            if (xp == null)
            {
                return;
            }

            Namespace = GetValue(MSBuildProperties.DXP_NAMESPACE, xp);
            Platform  = GetPlatform(xp);
            UseCecil  = GetValue(MSBuildProperties.DXP_DDNS_CECIL, xp).ToBoolean();

            var rawTimeout = GetValue(MSBuildProperties.DXP_TIMEOUT, xp);

            Compiler = new CompilerCfg()
            {
                genExpLib         = GetValue(MSBuildProperties.DXP_GEN_EXP_LIB, xp).ToBoolean(),
                ordinalsBase      = GetValue(MSBuildProperties.DXP_ORDINALS_BASE, xp).ToInteger(),
                ourILAsm          = GetValue(MSBuildProperties.DXP_OUR_ILASM, xp).ToBoolean(),
                customILAsm       = GetUnevaluatedValue(MSBuildProperties.DXP_CUSTOM_ILASM, xp),
                intermediateFiles = GetValue(MSBuildProperties.DXP_INTERMEDIATE_FILES, xp).ToBoolean(),
                timeout           = String.IsNullOrWhiteSpace(rawTimeout) ? CompilerCfg.TIMEOUT_EXEC : rawTimeout.ToInteger(),
                peCheck           = (PeCheckType)GetValue(MSBuildProperties.DXP_PE_CHECK, xp).ToInteger()
            };
        }
Example #2
0
        public UserConfig(IWizardConfig cfg, IXProject xp)
            : this(cfg)
        {
            if (xp == null)
            {
                return;
            }

            Namespace = GetValue(MSBuildProperties.DXP_NAMESPACE, xp);
            Platform  = GetPlatform(xp);
            UseCecil  = GetValue(MSBuildProperties.DXP_DDNS_CECIL, xp).ToBoolean();

            var rawTimeout = GetValue(MSBuildProperties.DXP_TIMEOUT, xp);

            Compiler = new CompilerCfg()
            {
                genExpLib         = GetValue(MSBuildProperties.DXP_GEN_EXP_LIB, xp).ToBoolean(),
                ordinalsBase      = GetValue(MSBuildProperties.DXP_ORDINALS_BASE, xp).ToInteger(),
                ourILAsm          = GetValue(MSBuildProperties.DXP_OUR_ILASM, xp).ToBoolean(),
                customILAsm       = GetUnevaluatedValue(MSBuildProperties.DXP_CUSTOM_ILASM, xp),
                rSysObj           = GetValue(MSBuildProperties.DXP_SYSOBJ_REBASE, xp).ToBoolean(),
                intermediateFiles = GetValue(MSBuildProperties.DXP_INTERMEDIATE_FILES, xp).ToBoolean(),
                timeout           = String.IsNullOrWhiteSpace(rawTimeout) ? CompilerCfg.TIMEOUT_EXEC : rawTimeout.ToInteger(),
                peCheck           = (PeCheckType)GetValue(MSBuildProperties.DXP_PE_CHECK, xp).ToInteger(),
                patches           = (PatchesType)GetValue(MSBuildProperties.DXP_PATCHES, xp).ToLongInteger()
            };

            var preType = (PreProcType)GetValue(MSBuildProperties.DXP_PRE_PROC_TYPE, xp).ToLongInteger();
            PreProc = new PreProc().Configure(preType, GetPreProcCmd(preType, xp));

            var postType = (PostProcType)GetValue(MSBuildProperties.DXP_POST_PROC_TYPE, xp).ToLongInteger();
            PostProc = new PostProc().Configure
                       (
                postType,
                GetPostProcEnv(postType, xp),
                GetPostProcCmd(postType, xp)
                       );
        }