Beispiel #1
0
        public bool Compile(string filePath, string outputPrefix, Profile profile)
        {
            try
            {
                PreventSleepBegin();

                DoProgress(0, 0);
                DoStatus("Started compilation ...");

                m_Profile = profile;

                m_Source.Clear();

                if (!ReadInputFile(filePath))
                {
                    return(false);
                }

                if (!FilterComobos())
                {
                    return(false);
                }

                try
                {
                    m_Expression = new SimplePerlExpression(m_PerlSkipCode);
                }
                catch (ApplicationException e)
                {
                    DoError("Error when creating SimplePerlExpression: " + e.ToString());
                    return(false);
                }

                if (!WriteHeaderFile(outputPrefix))
                {
                    return(false);
                }

                if (!CompileCombos())
                {
                    return(false);
                }

                if (!WriteCompileResults(outputPrefix))
                {
                    return(false);
                }

                foreach (var v in m_CompilationResults.Values)
                {
                    v.Dispose();
                }
            }
            finally
            {
                PreventSleepEnd();
            }

            DoStatus("Finished compilation successfully.");
            return(true);
        }
Beispiel #2
0
        public bool Compile(string filePath, string outputPrefix, Profile profile)
        {
            try
            {
            PreventSleepBegin();

            DoProgress(0, 0);
            DoStatus("Started compilation ...");

            m_Profile = profile;

            m_Source.Clear();

            if (!ReadInputFile(filePath))
                return false;

            if (!FilterComobos())
                return false;

            try
            {
                m_Expression = new SimplePerlExpression(m_PerlSkipCode);
            }
            catch (ApplicationException e)
            {
                DoError("Error when creating SimplePerlExpression: " + e.ToString());
                return false;
            }

            if (!WriteHeaderFile(outputPrefix))
                return false;

            if (!CompileCombos())
                return false;

            if (!WriteCompileResults(outputPrefix))
                return false;

            foreach (var v in m_CompilationResults.Values)
            {
                v.Dispose();
            }
            }
            finally
            {
            PreventSleepEnd();
            }

            DoStatus("Finished compilation successfully.");
            return true;
        }