diff --git a/OpenTK.sln b/OpenTK.sln index c24f6092..e24d1726 100644 --- a/OpenTK.sln +++ b/OpenTK.sln @@ -23,7 +23,6 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Build.Installer.Nsis", "Installers\Nsis\Build.Installer.Nsis.csproj", "{ADC34399-7613-44D2-90B2-19250F06FE7A}" ProjectSection(ProjectDependencies) = postProject {A37A7E14-0000-0000-0000-000000000000} = {A37A7E14-0000-0000-0000-000000000000} - {CCE26215-7591-4CC3-8E39-9A08F8BF35E2} = {CCE26215-7591-4CC3-8E39-9A08F8BF35E2} {31D19132-0000-0000-0000-000000000000} = {31D19132-0000-0000-0000-000000000000} {62C0DB35-0000-0000-0000-000000000000} = {62C0DB35-0000-0000-0000-000000000000} {650C6F3D-33B5-4216-9536-956AB42C0624} = {650C6F3D-33B5-4216-9536-956AB42C0624} @@ -33,12 +32,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Build.Installer.Nsis", "Ins {5FDFF4B6-0000-0000-0000-000000000000} = {5FDFF4B6-0000-0000-0000-000000000000} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Build.Tasks", "Source\Build.Tasks\Build.Tasks.csproj", "{CCE26215-7591-4CC3-8E39-9A08F8BF35E2}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Build.Docs", "Documentation\Build.Docs.csproj", "{650C6F3D-33B5-4216-9536-956AB42C0624}" - ProjectSection(ProjectDependencies) = postProject - {CCE26215-7591-4CC3-8E39-9A08F8BF35E2} = {CCE26215-7591-4CC3-8E39-9A08F8BF35E2} - EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Generator.Bind", "Source\Bind\Generator.Bind.csproj", "{31D19132-0000-0000-0000-000000000000}" ProjectSection(ProjectDependencies) = postProject @@ -51,14 +45,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Generator.Convert", "Source EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Build.UpdateVersion", "Source\Build.UpdateVersion\Build.UpdateVersion.csproj", "{75DC22B1-113F-4A66-96B9-2FF8208C10E8}" - ProjectSection(ProjectDependencies) = postProject - {CCE26215-7591-4CC3-8E39-9A08F8BF35E2} = {CCE26215-7591-4CC3-8E39-9A08F8BF35E2} - EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Build.Installer.Zip", "Installers\Zip\Build.Installer.Zip.csproj", "{ADC34399-7613-44D2-90B2-19250F06FE7B}" ProjectSection(ProjectDependencies) = postProject {A37A7E14-0000-0000-0000-000000000000} = {A37A7E14-0000-0000-0000-000000000000} - {CCE26215-7591-4CC3-8E39-9A08F8BF35E2} = {CCE26215-7591-4CC3-8E39-9A08F8BF35E2} {31D19132-0000-0000-0000-000000000000} = {31D19132-0000-0000-0000-000000000000} {62C0DB35-0000-0000-0000-000000000000} = {62C0DB35-0000-0000-0000-000000000000} {650C6F3D-33B5-4216-9536-956AB42C0624} = {650C6F3D-33B5-4216-9536-956AB42C0624} @@ -109,14 +99,6 @@ Global {ADC34399-7613-44D2-90B2-19250F06FE7A}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU {ADC34399-7613-44D2-90B2-19250F06FE7A}.Nsis|Any CPU.Build.0 = Nsis|Any CPU {ADC34399-7613-44D2-90B2-19250F06FE7A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CCE26215-7591-4CC3-8E39-9A08F8BF35E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CCE26215-7591-4CC3-8E39-9A08F8BF35E2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CCE26215-7591-4CC3-8E39-9A08F8BF35E2}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU - {CCE26215-7591-4CC3-8E39-9A08F8BF35E2}.Documentation|Any CPU.Build.0 = Documentation|Any CPU - {CCE26215-7591-4CC3-8E39-9A08F8BF35E2}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU - {CCE26215-7591-4CC3-8E39-9A08F8BF35E2}.Nsis|Any CPU.Build.0 = Nsis|Any CPU - {CCE26215-7591-4CC3-8E39-9A08F8BF35E2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CCE26215-7591-4CC3-8E39-9A08F8BF35E2}.Release|Any CPU.Build.0 = Release|Any CPU {650C6F3D-33B5-4216-9536-956AB42C0624}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {650C6F3D-33B5-4216-9536-956AB42C0624}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU {650C6F3D-33B5-4216-9536-956AB42C0624}.Documentation|Any CPU.Build.0 = Documentation|Any CPU diff --git a/Source/Build.Tasks/Build.Tasks.csproj b/Source/Build.Tasks/Build.Tasks.csproj deleted file mode 100644 index 5a80d7b9..00000000 --- a/Source/Build.Tasks/Build.Tasks.csproj +++ /dev/null @@ -1,83 +0,0 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {CCE26215-7591-4CC3-8E39-9A08F8BF35E2} - Library - Properties - Build.Tasks - Build.Tasks - v2.0 - 512 - - - - true - full - false - ..\..\Binaries\OpenTK\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - ..\..\Binaries\OpenTK\Release\ - TRACE - prompt - 4 - - - ..\..\Binaries\OpenTK\Release\ - TRACE - true - - - ..\..\Binaries\OpenTK\Release\ - TRACE - true - pdbonly - AnyCPU - ..\..\Binaries\OpenTK\Release\Build.Tasks.dll.CodeAnalysisLog.xml - true - GlobalSuppressions.cs - prompt - MinimumRecommendedRules.ruleset - ;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets - ;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules - false - - - true - - - ..\..\OpenTK.snk - - - - - - - - - - - - - - - - Designer - - - - - OpenTK.snk - - - - \ No newline at end of file diff --git a/Source/Build.Tasks/Common.xml b/Source/Build.Tasks/Common.xml deleted file mode 100644 index 911dfa32..00000000 --- a/Source/Build.Tasks/Common.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - Release - Debug - ..\..\Binaries\OpenTK\$(TaskConfig) - $(BuildTasksPath)\Build.Tasks.dll - - - - - - - - diff --git a/Source/Build.Tasks/DateStamp.cs b/Source/Build.Tasks/DateStamp.cs deleted file mode 100644 index 38f587d4..00000000 --- a/Source/Build.Tasks/DateStamp.cs +++ /dev/null @@ -1,80 +0,0 @@ -#region License -// -// The Open Toolkit Library License -// -// Copyright (c) 2006 - 2010 the Open Toolkit library. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights to -// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -// the Software, and to permit persons to whom the Software is furnished to do -// so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -// OTHER DEALINGS IN THE SOFTWARE. -// -#endregion - -using System; -using System.Globalization; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; - -namespace Build.Tasks -{ - public class DateStamp : Task - { - string date; - const string file = "../../Version.txt"; - - /// - /// Gets a represting the date stamp. - /// - [Output] - public string Date - { - get { return date; } - private set { date = value; } - } - - public override bool Execute() - { - try - { - // Version.txt contains the datestamp for the current build. - // This is used in order to sync stamps between build tasks. - // If the file does not exist, create it. - if (System.IO.File.Exists(file)) - { - Date = System.IO.File.ReadAllLines(file)[0]; - } - else - { - // Build number is defined as the number of days since 1/1/2010. - // Revision number is defined as the fraction of the current day, expressed in seconds. - double timespan = DateTime.UtcNow.Subtract(new DateTime(2010, 1, 1)).TotalDays; - string build = ((int)timespan).ToString(); - string revision = ((int)((timespan - (int)timespan) * UInt16.MaxValue)).ToString(); - Date = String.Format("{0}.{1}", build, revision); - System.IO.File.WriteAllLines(file, new string[] { Date }); - } - } - catch (Exception e) - { - Log.LogErrorFromException(e); - return false; - } - return true; - } - } -} diff --git a/Source/Build.Tasks/DelTree.cs b/Source/Build.Tasks/DelTree.cs deleted file mode 100644 index 341eca21..00000000 --- a/Source/Build.Tasks/DelTree.cs +++ /dev/null @@ -1,69 +0,0 @@ -#region License -// -// The Open Toolkit Library License -// -// Copyright (c) 2006 - 2010 the Open Toolkit library. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights to -// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -// the Software, and to permit persons to whom the Software is furnished to do -// so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -// OTHER DEALINGS IN THE SOFTWARE. -// -#endregion - -using System; -using System.Globalization; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; - -namespace Build.Tasks -{ - /// - /// Deletes directory and all of its contents. - /// Replaces RemoveDir task which exhibits different behavior - /// on xbuild compared to msbuild: the first requires an empty - /// directory, while the latter does not. - /// - public class DelTree : Task - { - string path; - - /// - /// The filesystem path to delete. - /// - [Required] - public string Path - { - get { return path; } - set { path = value; } - } - - public override bool Execute() - { - try - { - System.IO.Directory.Delete(Path, true); - return true; - } - catch (Exception e) - { - Log.LogErrorFromException(e); - return false; - } - } - } -} diff --git a/Source/Build.Tasks/GenerateAssemblyInfo.cs b/Source/Build.Tasks/GenerateAssemblyInfo.cs deleted file mode 100644 index 5838f5e0..00000000 --- a/Source/Build.Tasks/GenerateAssemblyInfo.cs +++ /dev/null @@ -1,90 +0,0 @@ -#region License -// -// The Open Toolkit Library License -// -// Copyright (c) 2006 - 2010 the Open Toolkit library. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights to -// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -// the Software, and to permit persons to whom the Software is furnished to do -// so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -// OTHER DEALINGS IN THE SOFTWARE. -// -#endregion - -using System; -using System.IO; -using System.Text; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; - -namespace Build.Tasks -{ - public class GenerateAssemblyInfo : Task - { - [Required] - public string OutputFile { get; set; } - public string AssemblyCompany { get; set; } - public string AssemblyProduct { get; set; } - public string AssemblyCopyright { get; set; } - public string AssemblyTrademark { get; set; } - public string Major { get; set; } - public string Minor { get; set; } - - string Date { get; set; } - - public GenerateAssemblyInfo() - { - DateStamp stamp = new DateStamp(); - stamp.Execute(); - Date = stamp.Date; - Major = Major ?? "0"; - Minor = Minor ?? "0"; - } - - public override bool Execute() - { - Encoding utf8 = new UTF8Encoding(true); - - using (StreamWriter sw = new StreamWriter(OutputFile, false, utf8)) - { - sw.WriteLine("// This file is auto-generated through Source/Build.Tasks/GenerateAssemblyInfo.cs."); - sw.WriteLine("// Do not edit by hand!"); - sw.WriteLine(); - - foreach (var import in new string[] { "System", "System.Reflection", "System.Resources", - "System.Runtime.CompilerServices", "System.Runtime.InteropServices" }) - { - sw.WriteLine("using {0};", import); - } - sw.WriteLine(); - - sw.WriteLine("[assembly: AssemblyCompany(\"{0}\")]", AssemblyCompany ?? ""); - sw.WriteLine("[assembly: AssemblyProduct(\"{0}\")]", AssemblyProduct ?? ""); - sw.WriteLine("[assembly: AssemblyCopyright(\"{0}\")]", AssemblyCopyright ?? ""); - sw.WriteLine("[assembly: AssemblyTrademark(\"{0}\")]", AssemblyTrademark ?? ""); - sw.WriteLine("[assembly: AssemblyVersion(\"{0}.{1}.0.0\")]", Major, Minor); - sw.WriteLine("[assembly: AssemblyFileVersion(\"{0}.{1}.{2}\")]", Major, Minor, Date); - - sw.Flush(); - sw.Close(); - Log.LogMessage("Created AssemblyInfo file \"{0}\".", OutputFile); - } - - return true; - } - } -} diff --git a/Source/Build.Tasks/Properties/AssemblyInfo.cs b/Source/Build.Tasks/Properties/AssemblyInfo.cs deleted file mode 100644 index a9f4d287..00000000 --- a/Source/Build.Tasks/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Build.Time")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Build.Time")] -[assembly: AssemblyCopyright("Copyright © 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("f1d4ac4c-e931-44f4-ac34-966f3ec505e3")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Source/Build.Tasks/Run.cs b/Source/Build.Tasks/Run.cs deleted file mode 100644 index 4c1797e9..00000000 --- a/Source/Build.Tasks/Run.cs +++ /dev/null @@ -1,121 +0,0 @@ -#region License -// -// The Open Toolkit Library License -// -// Copyright (c) 2006 - 2010 the Open Toolkit library. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights to -// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -// the Software, and to permit persons to whom the Software is furnished to do -// so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -// OTHER DEALINGS IN THE SOFTWARE. -// -#endregion - -using System; -using System.Diagnostics; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; - -namespace Build.Tasks -{ - /// - /// Executes specified process, capturing its stdout/stderr output. - /// Replaces Exec task which does not capture output. - /// - public class Run : Task - { - string command, wdir; - - /// - /// The command to execute. - /// - [Required] - public string Command - { - get { return command; } - set { command = value; } - } - - /// - /// The working directory for the command. - /// - public string WorkingDirectory - { - get { return wdir; } - set { wdir = value; } - } - - public override bool Execute() - { - try - { - if (String.IsNullOrEmpty(command)) - { - return false; - } - - // Split arguments from command: - int arg_end = command.IndexOf(' '); - ProcessStartInfo psi = null; - if (arg_end > 0) - { - psi = new ProcessStartInfo(command.Substring(0, arg_end), command.Substring(arg_end + 1)); - } - else - { - psi = new ProcessStartInfo(command); - } - - psi.UseShellExecute = false; - if (!String.IsNullOrEmpty(wdir)) - { - psi.WorkingDirectory = wdir; - } - - Process p = new Process(); - p.ErrorDataReceived += LogErrors; - p.OutputDataReceived += LogOutput; - p.StartInfo = psi; - - Log.LogMessage("Running {0} {1} on directory {2}", - psi.FileName, - psi.Arguments, - String.IsNullOrEmpty(psi.WorkingDirectory) ? - Environment.CurrentDirectory : psi.WorkingDirectory); - - if (p.Start()) - p.WaitForExit(); - return p.ExitCode == 0; - } - catch (Exception e) - { - Log.LogErrorFromException(e); - return false; - } - } - - void LogErrors(object sender, DataReceivedEventArgs e) - { - Log.LogError(e.Data); - } - - void LogOutput(object sender, DataReceivedEventArgs e) - { - Log.LogMessage(e.Data); - } - } -}