示例#1
0
            /// <summary>
            /// To create a hard copy of this object
            /// </summary>
            public ProEnvironmentObject(ProEnvironmentObject toCopy)
            {
                Name             = toCopy.Name;
                Suffix           = toCopy.Suffix;
                Label            = toCopy.Label;
                DbConnectionInfo = toCopy.DbConnectionInfo;
                ExtraPf          = toCopy.ExtraPf;
                IniPath          = toCopy.IniPath;
                ExtraProPath     = toCopy.ExtraProPath;

                BaseLocalPath       = toCopy.BaseLocalPath;
                BaseCompilationPath = toCopy.BaseCompilationPath;

                ProwinPath        = toCopy.ProwinPath;
                CmdLineParameters = toCopy.CmdLineParameters;
                LogFilePath       = toCopy.LogFilePath;

                CompileLocally     = toCopy.CompileLocally;
                CompileWithListing = toCopy.CompileWithListing;

                _currentProPathDirList = toCopy._currentProPathDirList;

                // deployer copy
                _deployer = new Deployer(this, toCopy.Deployer);
            }
示例#2
0
            /// <summary>
            /// To create a hard copy of this object
            /// </summary>
            public ProEnvironmentObject(ProEnvironmentObject toCopy)
            {
                Name             = toCopy.Name;
                Suffix           = toCopy.Suffix;
                Label            = toCopy.Label;
                DbConnectionInfo = toCopy.DbConnectionInfo;
                CurrentDb        = toCopy.CurrentDb;
                ExtraPf          = toCopy.ExtraPf;
                IniPath          = toCopy.IniPath;
                ExtraProPath     = toCopy.ExtraProPath;

                BaseLocalPath       = toCopy.BaseLocalPath;
                BaseCompilationPath = toCopy.BaseCompilationPath;

                ProwinPath        = toCopy.ProwinPath;
                CmdLineParameters = toCopy.CmdLineParameters;
                LogFilePath       = toCopy.LogFilePath;

                CompileLocally = toCopy.CompileLocally;

                PostExecutionProgram = toCopy.PostExecutionProgram;
                PreExecutionProgram  = toCopy.PreExecutionProgram;

                _currentProPathDirList = toCopy._currentProPathDirList;

                // deployer copy
                _deployer = toCopy.Deployer;
            }
示例#3
0
文件: ProMisc.cs 项目: devjerome/3P
        /// <summary>
        /// Deploy the current file, if it's a progress file then compile it, otherwise follow the transer rules of step 1
        /// </summary>
        public static void DeployCurrentFile()
        {
            if (Abl.IsCurrentFileCompilable)
            {
                // then that's just a link to compilation
                StartProgressExec(ExecutionType.Compile);

                UserCommunication.Notify("Deploying a compilable file is strictly equal as compiling it<br>The deployment rules for step 0 are applied in both case!", MessageImg.MsgInfo, "Deploy a file", "Bypass to compilation", 2);
            }
            else
            {
                if (ProEnvironment.Current.Deployer.IsFilePassingFilters(
                        Plug.CurrentFilePath,
                        ProEnvironment.Current.Deployer.DeployFilterRules.Where(rule => rule.Step == 1 && rule.Include).ToList(),
                        ProEnvironment.Current.Deployer.DeployFilterRules.Where(rule => rule.Step == 1 && !rule.Include).ToList()))
                {
                    // deploy the file for STEP 1
                    var deployedFiles = ProEnvironment.Current.Deployer.DeployFiles(ProEnvironment.Current.Deployer.GetTransfersNeededForFile(Plug.CurrentFilePath, 1));
                    if (deployedFiles == null || deployedFiles.Count == 0)
                    {
                        UserCommunication.Notify("The current file doesn't match any transfer rules for the current environment and <b>step 1</b><br>You can modify the rules " + "here".ToHtmlLink(), MessageImg.MsgInfo, "Deploy a file", "No transfer rules", args => {
                            Deployer.EditRules();
                            args.Handled = true;
                        }, 5);
                    }
                    else
                    {
                        var hasError = deployedFiles.Exists(deploy => !deploy.IsOk);
                        UserCommunication.NotifyUnique(Plug.CurrentFilePath, "Rules applied for <b>step 1</b>, was deploying :<br>" + ProCompilation.FormatCompilationResult(Plug.CurrentFilePath, null, deployedFiles), hasError ? MessageImg.MsgError : MessageImg.MsgOk, "Deploy a file", "Transfer results", null, hasError ? 0 : 5);
                    }
                }
                else
                {
                    UserCommunication.Notify("The current file didn't pass the deployment filters for the current environment and <b>step 1</b><br>You can modify the rules " + "here".ToHtmlLink(), MessageImg.MsgInfo, "Deploy a file", "Filtered by deployment rules", args => {
                        Deployer.EditRules();
                        args.Handled = true;
                    }, 5);
                }
            }
        }
示例#4
0
文件: Deployer.cs 项目: jcaillon/3P
 /// <summary>
 /// Hard copy
 /// </summary>
 public Deployer(ProEnvironment.ProEnvironmentObject proEnv, Deployer deployer)
 {
     ProEnv = proEnv;
     _deployRulesList = deployer.DeployRules;
 }
示例#5
0
文件: Deployer.cs 项目: devjerome/3P
 /// <summary>
 /// Hard copy
 /// </summary>
 public Deployer(ProEnvironment.ProEnvironmentObject proEnv, Deployer deployer)
 {
     ProEnv           = proEnv;
     _deployRulesList = deployer.DeployRules;
 }