コード例 #1
0
        public static ModuleData fAddRequiredModule(string _sName, bool _bIsCompiler = false)
        {
            ModuleData _oModule = ModuleData.fGetModule(_sName, _bIsCompiler);

            string _sLastVersion = _oModule.fGetLastVersions();

            //	string _sFolder = _oModuleLibRT.sOutFolder + _oModuleLibRT.sPrefixFolder + _sLastVersion;

            //Debug.fTrace("Last: " + _sFolder);

            //	if( !Directory.Exists(_oModuleLibRT.sFolder) ) {//Double verification?
            if (aCompilerData.ContainsKey(_sName))             //Bug if already exist
            {
                aCompilerData.Remove(_sName);
            }
            aCompilerData.Add(_sName, _oModule);


            if (_oModule.sCurrFolder == "")                //Not exist, we required downlaod

            //Is exist?
            ////////////

            {
                bModuleIsRequired = true;
                bStartWithMessage = true;
                //bDontExecute = true;

                foreach (string _sModule in aRequiredModule)
                {
                    if (_sName == _sModule)
                    {
                        return(_oModule);
                    }
                }

                if (_bIsCompiler)
                {
                    Output.Trace("\f4CRequired compiler: " + _sName);
                }
                else
                {
                    Output.Trace("\f4CRequired lib: " + _sName);
                }
                //		 Output.Trace("\f1B --- End --- \f13 " +   _nSeconde + "." + _nDotSeconde + " sec" );
                aRequiredModule.Add(_sName);
            }
            return(_oModule);
        }
コード例 #2
0
        private static void fAssistCwLib(string _sMessage)
        {
            string[] _aMessage      = _sMessage.Split('|');
            int      _nIndex        = 0;
            string   _sParentModule = "";
            string   _sPath         = "";
            string   _sName         = "";

            foreach (string _sMsg in _aMessage)
            {
                _nIndex++;
                if (_sMsg.Length > 3)
                {
                    if (_sMsg[0] == '(')
                    {
                        _sParentModule = _sMsg.Substring(1, _sMsg.LastIndexOf(')') - 1);
                        _sName         = _sMsg.Substring(_sParentModule.Length + 2);
                    }
                    if (_nIndex != 1 && _sMsg[0] == '[')
                    {
                        _sPath = _sMsg.Substring(1, _sMsg.Length - 1 - 1);
                    }
                }
            }

            //FOUND a SUBLIB
            if (_sName != "" && _sParentModule != "" && _sPath != "")
            {
                ModuleData _oMyModule = ModuleData.fGetModule(_sParentModule, false);
                if (_oMyModule != null)
                {
                    ModuleData _oLib = new ModuleData(_oMyModule, _sPath, _sName);
                    _oMyModule.fAddSubLib(_oLib);
                    _oMyModule.fGetSubLibCompilerData(Data.oArg);  //Data.oArg  not sure

                    Output.TraceAction("Add SubLib: " + _sName);
                }
            }
        }