diff --git a/src/AddIns/BackendBindings/FSharp/FSharp.Build.Tasks/Project/Configuration/AssemblyInfo.cs b/src/AddIns/BackendBindings/FSharp/FSharp.Build.Tasks/Project/Configuration/AssemblyInfo.cs deleted file mode 100644 index e87c4ea39e..0000000000 --- a/src/AddIns/BackendBindings/FSharp/FSharp.Build.Tasks/Project/Configuration/AssemblyInfo.cs +++ /dev/null @@ -1,25 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System.Reflection; - -// Information about this assembly is defined by the following -// attributes. -// -// change them to the information which is associated with the assembly -// you compile. - -[assembly: System.Runtime.InteropServices.ComVisible(false)] -[assembly: AssemblyTitle("FSharp.Build.Tasks")] -[assembly: AssemblyDescription("Provides F# build tasks for the F# addin.")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: AssemblyCompany("ic#code")] -[assembly: AssemblyProduct("SharpDevelop")] -[assembly: AssemblyCopyright("2000-2008 AlphaSierraPapa")] -[assembly: AssemblyVersion("1.0")] diff --git a/src/AddIns/BackendBindings/FSharp/FSharp.Build.Tasks/Project/FSharp.Build.Tasks.csproj b/src/AddIns/BackendBindings/FSharp/FSharp.Build.Tasks/Project/FSharp.Build.Tasks.csproj deleted file mode 100644 index 0ed68bd56a..0000000000 --- a/src/AddIns/BackendBindings/FSharp/FSharp.Build.Tasks/Project/FSharp.Build.Tasks.csproj +++ /dev/null @@ -1,67 +0,0 @@ - - - {674D485B-8340-498D-B91F-BE51543386C8} - Debug - AnyCPU - Library - FSharp.Build.Tasks - FSharp.Build.Tasks - v3.5 - False - False - 4 - false - - - ..\..\RequiredLibraries - true - Full - False - True - DEBUG;TRACE - - - ..\..\RequiredLibraries - false - None - True - False - TRACE - - - False - Auto - 4194304 - AnyCPU - 4096 - - - - - False - - - False - - - - False - - - False - - - False - - - - - - - - - - Always - - - \ No newline at end of file diff --git a/src/AddIns/BackendBindings/FSharp/FSharp.Build.Tasks/Project/SharpDevelop.Build.Fsc.targets b/src/AddIns/BackendBindings/FSharp/FSharp.Build.Tasks/Project/SharpDevelop.Build.Fsc.targets deleted file mode 100644 index 7e7a73b989..0000000000 --- a/src/AddIns/BackendBindings/FSharp/FSharp.Build.Tasks/Project/SharpDevelop.Build.Fsc.targets +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - - $(MSBuildAllProjects);$(FSharpBuildTasksPath)\SharpDevelop.Build.Fsc.targets - .fs - F# - False - True - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/AddIns/BackendBindings/FSharp/FSharp.Build.Tasks/Project/Src/CompilerCommandLineBuilder.cs b/src/AddIns/BackendBindings/FSharp/FSharp.Build.Tasks/Project/Src/CompilerCommandLineBuilder.cs deleted file mode 100644 index d269c84d28..0000000000 --- a/src/AddIns/BackendBindings/FSharp/FSharp.Build.Tasks/Project/Src/CompilerCommandLineBuilder.cs +++ /dev/null @@ -1,41 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Globalization; -using System.IO; - -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using Microsoft.Build.Tasks; - -namespace FSharp.Build.Tasks -{ - public class CompilerCommandLineBuilder : CommandLineBuilder - { - public void AppendIntegerSwitch(string switchName, int value) - { - AppendSwitchUnquotedIfNotNull(switchName, value.ToString(NumberFormatInfo.InvariantInfo)); - } - - public void AppendFileNameIfNotNull(string switchName, ITaskItem fileItem) - { - if (fileItem != null) { - AppendFileNameIfNotNull(switchName, fileItem.ItemSpec); - } - } - - public void AppendFileNameIfNotNull(string switchName, string fileName) - { - if (fileName != null) { - AppendSpaceIfNotEmpty(); - AppendTextUnquoted(switchName); - AppendFileNameWithQuoting(fileName); - } - } - } -} diff --git a/src/AddIns/BackendBindings/FSharp/FSharp.Build.Tasks/Project/Src/Fsc.cs b/src/AddIns/BackendBindings/FSharp/FSharp.Build.Tasks/Project/Src/Fsc.cs deleted file mode 100644 index 27ef72064d..0000000000 --- a/src/AddIns/BackendBindings/FSharp/FSharp.Build.Tasks/Project/Src/Fsc.cs +++ /dev/null @@ -1,220 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.IO; -using System.CodeDom.Compiler; -using System.Globalization; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using Microsoft.Build.Tasks; -using System.Collections.Generic; -using System.Text.RegularExpressions; - -namespace FSharp.Build.Tasks -{ - public sealed class Fsc : ToolTask - { - string keyContainer; - string keyFile; - int fileAlignment; - bool standalone; - bool noMLLib; - ITaskItem[] sources; - ITaskItem[] resources; - ITaskItem[] references; - ITaskItem outputAssembly; - string debugType; - bool emitDebugInformation; - string targetType; - bool optimize; - - public int FileAlignment { - get { return fileAlignment; } - set { fileAlignment = value; } - } - - public string KeyContainer { - get { return keyContainer; } - set { keyContainer = value; } - } - - public string KeyFile { - get { return keyFile; } - set { keyFile = value; } - } - - public bool Standalone { - get { return standalone; } - set { standalone = value; } - } - - public bool NoMLLib { - get { return noMLLib; } - set { noMLLib = value; } - } - - public string DebugType { - get { return debugType; } - set { debugType = value; } - } - - public bool EmitDebugInformation { - get { return emitDebugInformation; } - set { emitDebugInformation = value; } - } - - public ITaskItem[] Sources { - get { return sources; } - set { sources = value; } - } - - public ITaskItem[] References { - get { return references; } - set { references = value; } - } - - public ITaskItem[] Resources { - get { return resources; } - set { resources = value; } - } - - public bool Optimize { - get { return optimize; } - set { optimize = value; } - } - - public ITaskItem OutputAssembly { - get { return outputAssembly; } - set { outputAssembly = value; } - } - - public string TargetType { - get { return targetType; } - set { targetType = value; } - } - - protected override string ToolName { - get { return "fsc.exe"; } - } - - protected override string GenerateFullPathToTool() - { - return FscToolLocationHelper.GetPathToTool(); - } - - protected override string GenerateCommandLineCommands() - { - CompilerCommandLineBuilder commandLine = new CompilerCommandLineBuilder(); - if (((OutputAssembly == null) && (Sources != null)) && ((Sources.Length > 0))) { - OutputAssembly = new TaskItem(Path.GetFileNameWithoutExtension(this.Sources[0].ItemSpec)); - if (string.Equals(this.TargetType, "library", StringComparison.InvariantCultureIgnoreCase)) { - OutputAssembly.ItemSpec += ".dll"; - } else if (string.Equals(this.TargetType, "module", StringComparison.InvariantCultureIgnoreCase)) { - OutputAssembly.ItemSpec += ".netmodule"; - } else { - OutputAssembly.ItemSpec += ".exe"; - } - } - - commandLine.AppendSwitch("-g"); - - if (Optimize) { - commandLine.AppendSwitch("-O3"); - } - - commandLine.AppendSwitchIfNotNull("--keyfile ", this.KeyFile); - - if (noMLLib) { - commandLine.AppendSwitch("--no-mllib"); - } - - if (standalone) { - commandLine.AppendSwitch("--standalone"); - } - - if (Resources != null) { - foreach (ITaskItem item in Resources) { - commandLine.AppendSwitchIfNotNull("--resource ", item); - } - } - - if (FileAlignment > 0) { - commandLine.AppendIntegerSwitch("--base-address ", FileAlignment); - } - - commandLine.AppendSwitchIfNotNull("-o ", this.OutputAssembly); - - if (string.Equals(this.TargetType, "library", StringComparison.InvariantCultureIgnoreCase)) { - commandLine.AppendSwitch("--target-dll"); - } else if (string.Equals(this.TargetType, "winexe", StringComparison.InvariantCultureIgnoreCase)) { - commandLine.AppendSwitch("--target-winexe"); - } else if (string.Equals(this.TargetType, "module", StringComparison.InvariantCultureIgnoreCase)) { - commandLine.AppendSwitch("--target-module"); - } - - if (References != null) { - foreach (ITaskItem reference in References) { - commandLine.AppendFileNameIfNotNull("-r ", reference); - } - } - commandLine.AppendFileNamesIfNotNull(this.Sources, " "); - return commandLine.ToString(); - } - - /// - /// Each line of output, from either standard output or standard error - /// is parsed and any compiler errors are logged. If the line cannot - /// be parsed it is logged using the specified message importance. - /// - protected override void LogEventsFromTextOutput(string singleLine, MessageImportance messageImportance) - { - CompilerError error = ParseLine(singleLine); - if (error != null) { - if (error.IsWarning) { - Log.LogWarning("warning", error.ErrorNumber, null, error.FileName, error.Line, error.Column, error.Line, error.Column, error.ErrorText); - } else { - Log.LogError("error", error.ErrorNumber, null, error.FileName, error.Line, error.Column, error.Line, error.Column, error.ErrorText); - } - } else { - Log.LogMessage(messageImportance, singleLine); - } - } - - - const string ErrorPattern = @"(?[^\(]*)\((?[0-9]*),(?[0-9]*)\):\s(?[^:]*):\s(?[^:]*):\s(?.*)"; - static Regex ErrorRegex = new Regex(ErrorPattern, RegexOptions.Compiled); - const string ErrorPatternNoLine = @"(?[^\(]*)\((?[0-9]*),(?[0-9]*)\):\s(?[^:]*):\s(?.*)"; - static Regex ErrorNoLineRegex = new Regex(ErrorPatternNoLine, RegexOptions.Compiled); - - CompilerError ParseLine(string line) - { - Match match = ErrorRegex.Match(line); - Match matchNoLine = ErrorNoLineRegex.Match(line); - if (match.Success) { - CompilerError error = new CompilerError(); - error.Column = Int32.Parse(match.Result("${column}")); - error.Line = Int32.Parse(match.Result("${line}")); - error.FileName = Path.GetFullPath(match.Result("${file}")); - error.IsWarning = match.Result("${error}") == "warning"; - error.ErrorNumber = match.Result("${number}"); - error.ErrorText = match.Result("${message}"); - return error; - } else if (matchNoLine.Success) { - CompilerError error = new CompilerError(); - error.Column = Int32.Parse(matchNoLine.Result("${column}")); - error.Line = Int32.Parse(matchNoLine.Result("${line}")); - error.FileName = Path.GetFullPath(matchNoLine.Result("${file}")); - error.IsWarning = matchNoLine.Result("${error}") == "warning"; - error.ErrorNumber = matchNoLine.Result("${number}"); - error.ErrorText = matchNoLine.Result("${message}"); - return error; - } - return null; - } - } -} diff --git a/src/AddIns/BackendBindings/FSharp/FSharp.Build.Tasks/Project/Src/FscToolLocationHelper.cs b/src/AddIns/BackendBindings/FSharp/FSharp.Build.Tasks/Project/Src/FscToolLocationHelper.cs deleted file mode 100644 index 08042a74d9..0000000000 --- a/src/AddIns/BackendBindings/FSharp/FSharp.Build.Tasks/Project/Src/FscToolLocationHelper.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Collections.Generic; -using System.Configuration; -using System.IO; - -namespace FSharp.Build.Tasks -{ - public sealed class FscToolLocationHelper - { - public static readonly string ToolName = "fsc.exe"; - - FscToolLocationHelper() - { - } - - public static string GetPathToTool() - { - string path = null; - if (Array.Exists(ConfigurationManager.AppSettings.AllKeys, delegate(string k) { return k == "alt_fs_bin_path"; })) { - path = Path.Combine(ConfigurationManager.AppSettings["alt_fs_bin_path"], ToolName); - if (!File.Exists(path)) { - throw new Exception("you are trying to use the app setting alt_fs_bin_path, but fsc.exe is not localed in the given directory"); - } - } else { - string[] paths = Environment.GetEnvironmentVariable("path").Split(';'); - path = Array.Find(paths, delegate(string x) { - bool res = false; - try { - res = File.Exists(Path.Combine(x, "fsc.exe")); - } catch { - res = false; - } - return res; - }); - if (path != null) { - path = Path.Combine(path, ToolName); - } else { - string[] dirs = Directory.GetDirectories(Environment.GetEnvironmentVariable("ProgramFiles"), "FSharp*"); - List files = new List(); - foreach (string dir in dirs) { - FileInfo file = new FileInfo(Path.Combine(Path.Combine(dir, "bin"), ToolName)); - if (file.Exists) { - files.Add(file); - } - } - if (files.Count > 0) { - files.Sort(delegate(FileInfo x, FileInfo y) { return DateTime.Compare(x.CreationTime, y.CreationTime); }); - path = files[0].FullName; - } - } - } - return path; - } - } -} diff --git a/src/AddIns/BackendBindings/FSharp/FSharp.Build.Tasks/Project/Src/IsFscInstalled.cs b/src/AddIns/BackendBindings/FSharp/FSharp.Build.Tasks/Project/Src/IsFscInstalled.cs deleted file mode 100644 index dbd566b6e1..0000000000 --- a/src/AddIns/BackendBindings/FSharp/FSharp.Build.Tasks/Project/Src/IsFscInstalled.cs +++ /dev/null @@ -1,36 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using Microsoft.Build.Tasks; - -namespace FSharp.Build.Tasks -{ - /// - /// Tasks that determines if the F# compiler is installed. - /// - public sealed class IsFscInstalled : Task - { - bool installed; - - [Output] - public bool IsInstalled { - get { return installed; } - set { installed = value; } - } - - public override bool Execute() - { - if (FscToolLocationHelper.GetPathToTool() != null) { - installed = true; - } - return true; - } - } -} diff --git a/src/AddIns/BackendBindings/FSharp/RequiredLibraries/FSharp.Build.Tasks.dll b/src/AddIns/BackendBindings/FSharp/RequiredLibraries/FSharp.Build.Tasks.dll deleted file mode 100755 index 93729dae72..0000000000 Binary files a/src/AddIns/BackendBindings/FSharp/RequiredLibraries/FSharp.Build.Tasks.dll and /dev/null differ diff --git a/src/AddIns/BackendBindings/FSharp/RequiredLibraries/SharpDevelop.Build.Fsc.targets b/src/AddIns/BackendBindings/FSharp/RequiredLibraries/SharpDevelop.Build.Fsc.targets deleted file mode 100644 index ea64c5de0b..0000000000 --- a/src/AddIns/BackendBindings/FSharp/RequiredLibraries/SharpDevelop.Build.Fsc.targets +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - - $(MSBuildAllProjects);$(FSharpBuildTasksPath)\SharpDevelop.Build.Fsc.targets - .fs - F# - False - True - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file