private string GetOptionsString(DotNetProjectConfiguration configuration, NemerleParameters cp)
        {
            string options = " ";

            if (cp.Nostdmacros)
            {
                options += " -no-stdmacros";
            }
            if (cp.Nostdlib)
            {
                options += " -no-stdlib";
            }
            if (cp.Ot)
            {
                options += " -Ot";
            }
            if (cp.Greedy)
            {
                options += " -greedy";
            }
            if (cp.Pedantic)
            {
                options += " -pedantic-lexer";
            }
            if (configuration.CompileTarget == CompileTarget.Library)
            {
                options += " -tdll";
            }

            return(options);
        }
        public ICompilerResult Compile(ProjectFileCollection projectFiles, ProjectReferenceCollection projectReferences, DotNetProjectConfiguration configuration, IProgressMonitor monitor)
        {
            NemerleParameters cp = (NemerleParameters) configuration.CompilationParameters;
            if (cp == null) cp = new NemerleParameters ();

            string references = "";
            string files   = "";

            foreach (ProjectReference lib in projectReferences)
                references += " -r \"" + lib.GetReferencedFileName() + "\"";

            foreach (ProjectFile f in projectFiles)
                if (f.Subtype != Subtype.Directory)
                    switch (f.BuildAction)
                    {
                        case BuildAction.Compile:
                            files += " \"" + f.Name + "\"";
                        break;
                    }

            if (!Directory.Exists (configuration.OutputDirectory))
                Directory.CreateDirectory (configuration.OutputDirectory);

            string args = "-q -no-color " + GetOptionsString (configuration, cp) + references + files  + " -o " + configuration.CompiledOutputName;
            return DoCompilation (args);
        }
            public CodeGenerationPanelWidget(Properties CustomizationObject) : base("Nemerle.glade", "CodeGenerationPanel")
            {
                configuration      = (DotNetProjectConfiguration)((Properties)CustomizationObject).Get("Config");
                compilerParameters = (NemerleParameters)configuration.CompilationParameters;

                target.Active = (int)configuration.CompileTarget;

                nostdmacros.Active    = compilerParameters.Nostdmacros;
                nostdlib.Active       = compilerParameters.Nostdlib;
                ignorewarnings.Active = configuration.RunWithWarnings;
                ot.Active             = compilerParameters.Ot;
                greedy.Active         = compilerParameters.Greedy;
                pedantic.Active       = compilerParameters.Pedantic;
            }
Esempio n. 4
0
 			public  CodeGenerationPanelWidget(Properties CustomizationObject) : base ("Nemerle.glade", "CodeGenerationPanel")
 			{
				configuration = (DotNetProjectConfiguration) ((Properties)CustomizationObject).Get("Config");
				compilerParameters = (NemerleParameters) configuration.CompilationParameters;
				
				target.Active = (int) configuration.CompileTarget;
				
				nostdmacros.Active = compilerParameters.Nostdmacros;
				nostdlib.Active    = compilerParameters.Nostdlib;
				ignorewarnings.Active = configuration.RunWithWarnings;
				ot.Active          = compilerParameters.Ot;
				greedy.Active      = compilerParameters.Greedy;
				pedantic.Active    = compilerParameters.Pedantic;
 			}
        public BuildResult Compile(ProjectFileCollection projectFiles, ProjectReferenceCollection projectReferences, DotNetProjectConfiguration configuration, IProgressMonitor monitor)
        {
            NemerleParameters cp = (NemerleParameters)configuration.CompilationParameters;

            if (cp == null)
            {
                cp = new NemerleParameters();
            }

            string references = "";
            string files      = "";

            foreach (ProjectReference lib in projectReferences)
            {
                foreach (string a in lib.GetReferencedFileNames())
                {
                    references += " -r \"" + a + "\"";
                }
            }

            foreach (ProjectFile f in projectFiles)
            {
                if (f.Subtype != Subtype.Directory)
                {
                    switch (f.BuildAction)
                    {
                    case BuildAction.Compile:
                        files += " \"" + f.Name + "\"";
                        break;
                    }
                }
            }

            if (!Directory.Exists(configuration.OutputDirectory))
            {
                Directory.CreateDirectory(configuration.OutputDirectory);
            }

            string args = "-q -no-color " + GetOptionsString(configuration, cp) + references + files + " -o " + configuration.CompiledOutputName;

            return(DoCompilation(args));
        }
		private string GetOptionsString (DotNetProjectConfiguration configuration, NemerleParameters cp)
		{
			string options = " ";
			if (cp.Nostdmacros)
				options += " -no-stdmacros";
			if (cp.Nostdlib)
				options += " -no-stdlib";
			if (cp.Ot)
				options += " -Ot";
			if (cp.Greedy)
				options += " -greedy";
			if (cp.Pedantic)
				options += " -pedantic-lexer";
			if (configuration.CompileTarget == CompileTarget.Library)
				options += " -tdll";
				
			return options;			
		}
        private string GetOptionsString(DotNetProjectConfiguration configuration, NemerleParameters cp)
        {
            string options = " ";
            if (cp.Nostdmacros)
                options += " -no-stdmacros";
            if (cp.Nostdlib)
                options += " -no-stdlib";
            if (cp.Ot)
                options += " -Ot";
            if (cp.Obcm)
                options += " -Obcm";
            if (cp.Oocm)
                options += " -Oocm";
            if (cp.Oscm)
                options += " -Oscm";
            if (configuration.CompileTarget == CompileTarget.Library)
                options += " -tdll";

            return options;
        }