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/FSharpBinding/Project/FSharpBinding.addin b/src/AddIns/BackendBindings/FSharp/FSharpBinding/Project/FSharpBinding.addin index 7d5e1c1f16..8e9cee4b11 100644 --- a/src/AddIns/BackendBindings/FSharp/FSharpBinding/Project/FSharpBinding.addin +++ b/src/AddIns/BackendBindings/FSharp/FSharpBinding/Project/FSharpBinding.addin @@ -22,7 +22,7 @@ + resource = "FS-Mode.xshd" /> diff --git a/src/AddIns/BackendBindings/FSharp/FSharpBinding/Project/FSharpBinding.fsproj b/src/AddIns/BackendBindings/FSharp/FSharpBinding/Project/FSharpBinding.fsproj index 944907a419..9a21ab53f8 100644 --- a/src/AddIns/BackendBindings/FSharp/FSharpBinding/Project/FSharpBinding.fsproj +++ b/src/AddIns/BackendBindings/FSharp/FSharpBinding/Project/FSharpBinding.fsproj @@ -1,159 +1,109 @@ - + + - {99BAE3A2-C40D-40D2-A7B4-EBB4798F36E4} Debug AnyCPU + 8.0.30703 + 2.0 + {a7e6c2fe-6933-44a2-a420-aa6a38d421e9} Library - FSharpBindings + FSharpBinding FSharpBinding - True - True - True + v3.5 + 512 + FShapBinding - - ..\..\..\..\..\..\AddIns\AddIns\BackendBindings\FSharpBinding\ - True - Full - False + + true + full + false + ..\..\..\..\..\..\AddIns\AddIns\BackendBindings\FSharpBinding + DEBUG;TRACE + prompt + 3 - - ..\..\..\..\..\..\AddIns\AddIns\BackendBindings\FSharpBinding\ - False - None - True + + pdbonly + true + ..\..\..\..\..\..\AddIns\AddIns\BackendBindings\FSharpBinding + TRACE + prompt + 3 - - - ..\..\..\..\..\Libraries\AvalonDock\AvalonDock.dll - False - - - ..\..\RequiredLibraries\FSharp.Build.Tasks.dll - - - ..\..\..\..\..\Libraries\log4net\log4net.dll - False - + + + + + + + - 3.5 - False - - - 3.5 - False - - - - ..\..\..\..\..\Libraries\Mono.Cecil\Mono.Cecil.dll - False - - - - 3.0 - False - - - 3.0 + Microsoft.Build.Engine + Microsoft.Build.Engine.dll - - 3.0 - - - 3.0 - - - False + + + System.Configuration + System.configuration.dll 3.5 - False - - - - - 3.0 - False - - - False - - 3.0 + + System.Drawing + System.Drawing.dll - - 3.0 + + System.Windows.Forms + System.Windows.Forms.dll - - 3.0 + + System.Xml + System.XML.dll - - - - - - - - - - SharpDevelop.Build.Fsc.targets - Always - - - Always - - - Always - - - Always - - - - {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} ICSharpCode.TextEditor - False + {2d18be89-d210-49eb-a9dd-2246fbb3df6d} + True - {3A9AE6AA-BC07-4A2F-972C-581E3AE2F195} NRefactory - False + {3a9ae6aa-bc07-4a2f-972c-581e3ae2f195} + True - {2748AD25-9C63-4E12-877B-4DCE96FBED54} ICSharpCode.SharpDevelop - False + {2748ad25-9c63-4e12-877b-4dce96fbed54} + True - {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} ICSharpCode.Core - False - - - {7E4A7172-7FF5-48D0-B719-7CD959DD1AC9} - ICSharpCode.Core.Presentation - False - - - {857CA1A3-FC88-4BE0-AB6A-D1EE772AB288} - ICSharpCode.Core.WinForms - False + {35cef10f-2d4c-45f2-9dd1-161e0fec583c} + True - {C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F} ICSharpCode.SharpDevelop.BuildWorker - False + {c3cbc8e3-81d8-4c5b-9941-dccd12d50b1f} + True - {924EE450-603D-49C1-A8E5-4AFAA31CE6F3} ICSharpCode.SharpDevelop.Dom - False + {924ee450-603d-49c1-a8e5-4afaa31ce6f3} + True - {8035765F-D51F-4A0C-A746-2FD100E19419} ICSharpCode.SharpDevelop.Widgets - False + {8035765f-d51f-4a0c-a746-2fd100e19419} + True + + \ No newline at end of file diff --git a/src/AddIns/BackendBindings/FSharp/FSharpBinding/Project/Src/project.fs b/src/AddIns/BackendBindings/FSharp/FSharpBinding/Project/Src/project.fs index e4ddc84be6..aeb7242404 100644 --- a/src/AddIns/BackendBindings/FSharp/FSharpBinding/Project/Src/project.fs +++ b/src/AddIns/BackendBindings/FSharp/FSharpBinding/Project/Src/project.fs @@ -31,7 +31,7 @@ open ICSharpCode.SharpDevelop.Gui open ICSharpCode.SharpDevelop.Gui.OptionPanels type FSharpProject = class - inherit CompilableProject as base + inherit CompilableProject new (engineProvider : IMSBuildEngineProvider, fileName : string, projectName : string ) as x = { inherit CompilableProject(engineProvider) } then base.Name <- projectName @@ -41,9 +41,9 @@ type FSharpProject = class x.Create(info) base.AddImport(@"$(FSharpBuildTasksPath)\SharpDevelop.Build.Fsc.Targets", null) override x.GetDefaultItemType(fileName : string) = - if string.Equals(".fs", Path.GetExtension(fileName), StringComparison.InvariantCultureIgnoreCase) then + if String.Equals(".fs", Path.GetExtension(fileName), StringComparison.InvariantCultureIgnoreCase) then ItemType.Compile - else if string.Equals(".fsi", Path.GetExtension(fileName), StringComparison.InvariantCultureIgnoreCase) then + else if String.Equals(".fsi", Path.GetExtension(fileName), StringComparison.InvariantCultureIgnoreCase) then ItemType.Compile else base.GetDefaultItemType(fileName) @@ -61,7 +61,7 @@ type FSharpProjectNode = class { inherit ProjectNode(project) } member x.AddParentFolder((virtualName : string), (relativeDirectoryPath : string), (directoryNodeList :Dictionary)) = if (relativeDirectoryPath.Length = 0 - || string.Compare(virtualName, 0, relativeDirectoryPath, 0, relativeDirectoryPath.Length, StringComparison.InvariantCultureIgnoreCase) = 0) then + || String.Compare(virtualName, 0, relativeDirectoryPath, 0, relativeDirectoryPath.Length, StringComparison.InvariantCultureIgnoreCase) = 0) then let pos = virtualName.IndexOf('/', relativeDirectoryPath.Length + 1) if (pos > 0) then let subFolderName = virtualName.Substring(relativeDirectoryPath.Length, pos - relativeDirectoryPath.Length); @@ -83,7 +83,7 @@ type FSharpProjectNode = class if (x.RelativePath.Length > 0) then (x.RelativePath.Replace('\\', '/')) + "/" else - string.Empty + String.Empty for item in x.Project.Items do match item with @@ -95,7 +95,7 @@ type FSharpProjectNode = class else virtualName let fileName = Path.GetFileName(virtualName) - if (not (string.Equals(virtualName, relativeDirectoryPath + fileName, StringComparison.InvariantCultureIgnoreCase))) then + if (not (String.Equals(virtualName, relativeDirectoryPath + fileName, StringComparison.InvariantCultureIgnoreCase))) then x.AddParentFolder(virtualName, relativeDirectoryPath, directoryNodeList); //continue; 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