* Makefile.am:
[monodevelop.git] / extras / PythonBinding / PythonCompilerManager.cs
bloba8ae5e076b83c09cc585673ad4bdf8cef9907fa0
1 using System;
2 using System.IO;
3 using System.CodeDom.Compiler;
4 using Gtk;
6 using MonoDevelop.Core.Gui.Components;
7 using MonoDevelop.Core;
8 using MonoDevelop.Core;
9 using MonoDevelop.Projects;
10 using MonoDevelop.Core.Gui;
12 namespace PythonBinding
14 public class PythonCompilerManager
16 public string GetCompiledOutputName (string fileName)
18 return Path.ChangeExtension (fileName, ".exe");
21 public string GetCompiledOutputName (IProject project)
23 PythonProject p = (PythonProject) project;
24 PythonCompilerParameters compilerparameters = (PythonCompilerParameters) p.ActiveConfiguration;
25 string exe = Runtime.FileService.GetDirectoryNameWithSeparator (compilerparameters.OutputDirectory) + compilerparameters.OutputAssembly + ".exe";
26 return exe;
29 public bool CanCompile (string fileName)
31 return Path.GetExtension (fileName).ToLower () == ".py";
34 BuildResult Compile (PythonCompilerParameters compilerparameters, string[] fileNames)
36 // just pretend we compiled
37 // and leave it to the runtime for now
38 return new BuildResult (new CompilerResults (new TempFileCollection ()), "");
41 public BuildResult CompileFile (string fileName, PythonCompilerParameters compilerparameters)
43 // just pretend we compiled
44 // and leave it to the runtime for now
45 return new BuildResult (new CompilerResults (new TempFileCollection ()), "");
48 public BuildResult CompileProject (IProject project)
50 // just pretend we compiled
51 // and leave it to the runtime for now
52 return new BuildResult (new CompilerResults (new TempFileCollection ()), "");
55 string GetCompilerName ()
57 return "IronPythonConsole";
60 BuildResult ParseOutput (TempFileCollection tf, StreamReader sr)
62 // just pretend we compiled
63 // and leave it to the runtime for now
64 return new BuildResult (new CompilerResults (new TempFileCollection ()), "");