diff --git a/.gitignore b/.gitignore index e9e19297..22578d3d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,11 +3,15 @@ Binaries/ OpenTK.userprefs Source/GlobalAssemblyInfo.cs Version.txt +Build.txt +Timestamp.txt Source/OpenTK/OpenTK.xml Source/GLControl/OpenTK.GLControl.xml Documentation/Source opentk*.exe opentk*.zip +opentk*.nupkg +Installers/Nuget/lib # OpenTK Resource files that seem like they should be ignored: Source/Compatibility/Properties/Resources.resources diff --git a/Installers/Nsis/Build.Installer.Nsis.csproj b/Installers/Nsis/Build.Installer.Nsis.csproj index f58e10eb..756f4692 100644 --- a/Installers/Nsis/Build.Installer.Nsis.csproj +++ b/Installers/Nsis/Build.Installer.Nsis.csproj @@ -49,7 +49,7 @@ - + diff --git a/Installers/Nuget/Build.Installer.Nuget.csproj b/Installers/Nuget/Build.Installer.Nuget.csproj new file mode 100644 index 00000000..657b1ebd --- /dev/null +++ b/Installers/Nuget/Build.Installer.Nuget.csproj @@ -0,0 +1,99 @@ + + + + .\obj\ + + + .\obj\ + + + .\obj\ + + + .\obj\ + + + {ADC34399-7613-44D2-90B2-19250F12FE7B} + v2.0 + .\obj\ + Debug + AnyCPU + 10.0.0 + 2.0 + Exe + Build.Installer.Nuget + + + none + False + obj\ + 4 + + + none + False + obj\ + 4 + + + none + False + obj\ + 4 + + + none + False + obj\ + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Installers/Nuget/OpenTK.GLControl.nuspec b/Installers/Nuget/OpenTK.GLControl.nuspec new file mode 100644 index 00000000..906c9e04 --- /dev/null +++ b/Installers/Nuget/OpenTK.GLControl.nuspec @@ -0,0 +1,49 @@ + + + + OpenTK.GLControl + $version$ + Stefanos Apostolopoulos + Stefanos Apostolopoulos + http://www.opentk.com/project/license + http://www.opentk.com + file:///./logo.png + false + + Add OpenGL graphics to your Windows.Forms or WPF application + + + OpenTK.GLControl is a Windows.Forms Control with OpenGL rendering capabilities. Use it to add + accelerated 3d graphics to your Windows.Forms or Windows Presentation Foundation (WPF) application. + + Features + - Integrate 3d graphics into your Windows.Forms or WPF application + - Use the .Net/Mono language of your choice: C#, F#, VB.Net, Boo, IronPython, IronRuby + - Develop faster with inline documentation and strongly-typed enumerations for all OpenGL and OpenAL functions + + This is the official nuget package from http://www.opentk.com + The source code can be found at https://github.com/opentk/opentk + + + http://www.opentk.com/news + + Copyright 2006-2013 Stefanos Apostolopoulos + OpenTK OpenGL WinForms WPF C# F# VB .Net Mono + + + + + + + + + + + + + + + + + + diff --git a/Installers/Nuget/OpenTK.nuspec b/Installers/Nuget/OpenTK.nuspec new file mode 100644 index 00000000..ebe14f41 --- /dev/null +++ b/Installers/Nuget/OpenTK.nuspec @@ -0,0 +1,48 @@ + + + + OpenTK + $version$ + Stefanos Apostolopoulos + Stefanos Apostolopoulos + http://www.opentk.com/project/license + http://www.opentk.com + file:///./logo.png + false + + The Open Toolkit library (OpenTK) is an advanced, low-level C# wrapper for OpenGL, OpenGL ES and OpenAL. + + + The Open Toolkit library (OpenTK) is an advanced, low-level C# wrapper for OpenGL, OpenGL ES and OpenAL. + It is suitable for games, scientific visualizations and projects that require 3d graphics, audio or compute functionality. + + Features + - Create cutting-edge graphics with OpenGL 4.4 and OpenGL ES 3.0 + - Integrate 3d graphics into your Windows.Forms, WPF or GTK# applications + - Write once run everywhere: Windows, Mac OS X, Linux, Android and iOS + - Use the .Net/Mono language of your choice: C#, F#, VB.Net, Boo, IronPython, IronRuby + - Develop faster with inline documentation and strongly-typed enumerations for all OpenGL and OpenAL functions + + This is the official nuget package from http://www.opentk.com + The source code can be found at https://github.com/opentk/opentk + + + http://www.opentk.com/news + + Copyright 2006-2013 Stefanos Apostolopoulos + OpenTK OpenGL OpenGLES OpenAL C# F# VB .Net Mono + + + + + + + + + + + + + + + diff --git a/Installers/Nuget/logo.png b/Installers/Nuget/logo.png new file mode 100644 index 00000000..43bdc617 Binary files /dev/null and b/Installers/Nuget/logo.png differ diff --git a/Installers/Zip/Build.Installer.Zip.csproj b/Installers/Zip/Build.Installer.Zip.csproj index 79c8a9c4..ad9d2c49 100644 --- a/Installers/Zip/Build.Installer.Zip.csproj +++ b/Installers/Zip/Build.Installer.Zip.csproj @@ -51,7 +51,7 @@ - + diff --git a/OpenTK.sln b/OpenTK.sln index dc1d2a23..e298cfd1 100644 --- a/OpenTK.sln +++ b/OpenTK.sln @@ -1,52 +1,27 @@  Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2012 +# Visual Studio 2010 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTK", "Source\OpenTK\OpenTK.csproj", "{A37A7E14-0000-0000-0000-000000000000}" - ProjectSection(ProjectDependencies) = postProject - {75DC22B1-113F-4A66-96B9-2FF8208C10E8} = {75DC22B1-113F-4A66-96B9-2FF8208C10E8} - EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTK.Compatibility", "Source\Compatibility\OpenTK.Compatibility.csproj", "{62C0DB35-0000-0000-0000-000000000000}" - ProjectSection(ProjectDependencies) = postProject - {75DC22B1-113F-4A66-96B9-2FF8208C10E8} = {75DC22B1-113F-4A66-96B9-2FF8208C10E8} - EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTK.Examples", "Source\Examples\OpenTK.Examples.csproj", "{868E37B3-0000-0000-0000-000000000000}" - ProjectSection(ProjectDependencies) = postProject - {75DC22B1-113F-4A66-96B9-2FF8208C10E8} = {75DC22B1-113F-4A66-96B9-2FF8208C10E8} - EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTK.GLControl", "Source\GLControl\OpenTK.GLControl.csproj", "{A625BE88-0000-0000-0000-000000000000}" - ProjectSection(ProjectDependencies) = postProject - {75DC22B1-113F-4A66-96B9-2FF8208C10E8} = {75DC22B1-113F-4A66-96B9-2FF8208C10E8} - EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Build.Installer.Nsis", "Installers\Nsis\Build.Installer.Nsis.csproj", "{ADC34399-7613-44D2-90B2-19250F06FE7A}" - ProjectSection(ProjectDependencies) = postProject - {75DC22B1-113F-4A66-96B9-2FF8208C10E8} = {75DC22B1-113F-4A66-96B9-2FF8208C10E8} - EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Build.Docs", "Documentation\Build.Docs.csproj", "{650C6F3D-33B5-4216-9536-956AB42C0624}" - ProjectSection(ProjectDependencies) = postProject - {75DC22B1-113F-4A66-96B9-2FF8208C10E8} = {75DC22B1-113F-4A66-96B9-2FF8208C10E8} - EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Generator.Bind", "Source\Bind\Generator.Bind.csproj", "{31D19132-0000-0000-0000-000000000000}" - ProjectSection(ProjectDependencies) = postProject - {75DC22B1-113F-4A66-96B9-2FF8208C10E8} = {75DC22B1-113F-4A66-96B9-2FF8208C10E8} - EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Generator.Convert", "Source\Converter\Generator.Convert.csproj", "{5FDFF4B6-0000-0000-0000-000000000000}" - ProjectSection(ProjectDependencies) = postProject - {75DC22B1-113F-4A66-96B9-2FF8208C10E8} = {75DC22B1-113F-4A66-96B9-2FF8208C10E8} - EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Build.UpdateVersion", "Source\Build.UpdateVersion\Build.UpdateVersion.csproj", "{75DC22B1-113F-4A66-96B9-2FF8208C10E8}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Build.Installer.Zip", "Installers\Zip\Build.Installer.Zip.csproj", "{ADC34399-7613-44D2-90B2-19250F06FE7B}" - ProjectSection(ProjectDependencies) = postProject - {75DC22B1-113F-4A66-96B9-2FF8208C10E8} = {75DC22B1-113F-4A66-96B9-2FF8208C10E8} - EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Build.Installer.Nuget", "Installers\Nuget\Build.Installer.Nuget.csproj", "{ADC34399-7613-44D2-90B2-19250F12FE7B}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -56,6 +31,52 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {31D19132-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {31D19132-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {31D19132-0000-0000-0000-000000000000}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU + {31D19132-0000-0000-0000-000000000000}.Documentation|Any CPU.Build.0 = Documentation|Any CPU + {31D19132-0000-0000-0000-000000000000}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU + {31D19132-0000-0000-0000-000000000000}.Nsis|Any CPU.Build.0 = Nsis|Any CPU + {31D19132-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {31D19132-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {5FDFF4B6-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5FDFF4B6-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5FDFF4B6-0000-0000-0000-000000000000}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU + {5FDFF4B6-0000-0000-0000-000000000000}.Documentation|Any CPU.Build.0 = Documentation|Any CPU + {5FDFF4B6-0000-0000-0000-000000000000}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU + {5FDFF4B6-0000-0000-0000-000000000000}.Nsis|Any CPU.Build.0 = Nsis|Any CPU + {5FDFF4B6-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5FDFF4B6-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU + {62C0DB35-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {62C0DB35-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {62C0DB35-0000-0000-0000-000000000000}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU + {62C0DB35-0000-0000-0000-000000000000}.Documentation|Any CPU.Build.0 = Documentation|Any CPU + {62C0DB35-0000-0000-0000-000000000000}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU + {62C0DB35-0000-0000-0000-000000000000}.Nsis|Any CPU.Build.0 = Nsis|Any CPU + {62C0DB35-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {62C0DB35-0000-0000-0000-000000000000}.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 + {650C6F3D-33B5-4216-9536-956AB42C0624}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU + {650C6F3D-33B5-4216-9536-956AB42C0624}.Nsis|Any CPU.Build.0 = Nsis|Any CPU + {650C6F3D-33B5-4216-9536-956AB42C0624}.Release|Any CPU.ActiveCfg = Release|Any CPU + {75DC22B1-113F-4A66-96B9-2FF8208C10E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {75DC22B1-113F-4A66-96B9-2FF8208C10E8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {75DC22B1-113F-4A66-96B9-2FF8208C10E8}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU + {75DC22B1-113F-4A66-96B9-2FF8208C10E8}.Documentation|Any CPU.Build.0 = Documentation|Any CPU + {75DC22B1-113F-4A66-96B9-2FF8208C10E8}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU + {75DC22B1-113F-4A66-96B9-2FF8208C10E8}.Nsis|Any CPU.Build.0 = Nsis|Any CPU + {75DC22B1-113F-4A66-96B9-2FF8208C10E8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {75DC22B1-113F-4A66-96B9-2FF8208C10E8}.Release|Any CPU.Build.0 = Release|Any CPU + {868E37B3-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {868E37B3-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU + {868E37B3-0000-0000-0000-000000000000}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU + {868E37B3-0000-0000-0000-000000000000}.Documentation|Any CPU.Build.0 = Documentation|Any CPU + {868E37B3-0000-0000-0000-000000000000}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU + {868E37B3-0000-0000-0000-000000000000}.Nsis|Any CPU.Build.0 = Nsis|Any CPU + {868E37B3-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU + {868E37B3-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU {A37A7E14-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A37A7E14-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU {A37A7E14-0000-0000-0000-000000000000}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU @@ -63,20 +84,6 @@ Global {A37A7E14-0000-0000-0000-000000000000}.Nsis|Any CPU.Build.0 = Nsis|Any CPU {A37A7E14-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU {A37A7E14-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {62C0DB35-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {62C0DB35-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {62C0DB35-0000-0000-0000-000000000000}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU - {62C0DB35-0000-0000-0000-000000000000}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU - {62C0DB35-0000-0000-0000-000000000000}.Nsis|Any CPU.Build.0 = Nsis|Any CPU - {62C0DB35-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {62C0DB35-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {868E37B3-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {868E37B3-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {868E37B3-0000-0000-0000-000000000000}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU - {868E37B3-0000-0000-0000-000000000000}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU - {868E37B3-0000-0000-0000-000000000000}.Nsis|Any CPU.Build.0 = Nsis|Any CPU - {868E37B3-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {868E37B3-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU {A625BE88-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A625BE88-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU {A625BE88-0000-0000-0000-000000000000}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU @@ -89,44 +96,21 @@ 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 - {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 - {650C6F3D-33B5-4216-9536-956AB42C0624}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU - {650C6F3D-33B5-4216-9536-956AB42C0624}.Nsis|Any CPU.Build.0 = Nsis|Any CPU - {650C6F3D-33B5-4216-9536-956AB42C0624}.Release|Any CPU.ActiveCfg = Release|Any CPU - {31D19132-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {31D19132-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {31D19132-0000-0000-0000-000000000000}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU - {31D19132-0000-0000-0000-000000000000}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU - {31D19132-0000-0000-0000-000000000000}.Nsis|Any CPU.Build.0 = Nsis|Any CPU - {31D19132-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {31D19132-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {5FDFF4B6-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5FDFF4B6-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5FDFF4B6-0000-0000-0000-000000000000}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU - {5FDFF4B6-0000-0000-0000-000000000000}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU - {5FDFF4B6-0000-0000-0000-000000000000}.Nsis|Any CPU.Build.0 = Nsis|Any CPU - {5FDFF4B6-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5FDFF4B6-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU - {75DC22B1-113F-4A66-96B9-2FF8208C10E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {75DC22B1-113F-4A66-96B9-2FF8208C10E8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {75DC22B1-113F-4A66-96B9-2FF8208C10E8}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU - {75DC22B1-113F-4A66-96B9-2FF8208C10E8}.Documentation|Any CPU.Build.0 = Documentation|Any CPU - {75DC22B1-113F-4A66-96B9-2FF8208C10E8}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU - {75DC22B1-113F-4A66-96B9-2FF8208C10E8}.Nsis|Any CPU.Build.0 = Nsis|Any CPU - {75DC22B1-113F-4A66-96B9-2FF8208C10E8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {75DC22B1-113F-4A66-96B9-2FF8208C10E8}.Release|Any CPU.Build.0 = Release|Any CPU {ADC34399-7613-44D2-90B2-19250F06FE7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {ADC34399-7613-44D2-90B2-19250F06FE7B}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU {ADC34399-7613-44D2-90B2-19250F06FE7B}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU {ADC34399-7613-44D2-90B2-19250F06FE7B}.Nsis|Any CPU.Build.0 = Nsis|Any CPU {ADC34399-7613-44D2-90B2-19250F06FE7B}.Release|Any CPU.ActiveCfg = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE + {ADC34399-7613-44D2-90B2-19250F12FE7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ADC34399-7613-44D2-90B2-19250F12FE7B}.Documentation|Any CPU.ActiveCfg = Documentation|Any CPU + {ADC34399-7613-44D2-90B2-19250F12FE7B}.Nsis|Any CPU.ActiveCfg = Nsis|Any CPU + {ADC34399-7613-44D2-90B2-19250F12FE7B}.Nsis|Any CPU.Build.0 = Nsis|Any CPU + {ADC34399-7613-44D2-90B2-19250F12FE7B}.Release|Any CPU.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution StartupItem = Source\Examples\OpenTK.Examples.csproj EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection EndGlobal diff --git a/Source/Build.UpdateVersion/Build.UpdateVersion.csproj b/Source/Build.UpdateVersion/Build.UpdateVersion.csproj index c4ff8774..88783f24 100644 --- a/Source/Build.UpdateVersion/Build.UpdateVersion.csproj +++ b/Source/Build.UpdateVersion/Build.UpdateVersion.csproj @@ -62,6 +62,7 @@ 4 + diff --git a/Source/Build.UpdateVersion/Program.cs b/Source/Build.UpdateVersion/Program.cs index be3e6ba1..6cdcdcf8 100644 --- a/Source/Build.UpdateVersion/Program.cs +++ b/Source/Build.UpdateVersion/Program.cs @@ -56,44 +56,41 @@ namespace Build.UpdateVersion } DateTime now = DateTime.UtcNow; - GenerateVersionInfo(now, Path.Combine(RootDirectory, "Version.txt")); - GenerateAssemblyInfo(now, Path.Combine(SourceDirectory, "GlobalAssemblyInfo.cs")); - } - - static void GenerateVersionInfo(DateTime now, string file) - { - string version = null; - - if (System.IO.File.Exists(file)) - { - string[] lines = System.IO.File.ReadAllLines(file); - if (lines.Length > 0 && !String.IsNullOrEmpty(lines[0])) - { - version = lines[0]; - } - } - - // If the file does not exist, create it. - if (version == null) - { - version = now.ToString("u").Split(' ')[0]; - System.IO.File.WriteAllLines(file, new string[] { version }); - } - } - - static void GenerateAssemblyInfo(DateTime now, string file) - { + string timestamp = now.ToString("u").Split(' ')[0]; // 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 = now.Subtract(new DateTime(2010, 1, 1)).TotalDays; string build = ((int)timespan).ToString(); + // Revision number is defined as the number of (git/svn/bzr) commits, + // or as the fraction of the current day, expressed in seconds, in case the + // working directory is not under source control. + string revision = RetrieveRevisionNumber(now); - string revision = RetrieveGitRevision() ?? RetrieveSvnRevision() ?? RetrieveBzrRevision() ?? RetrieveSeconds(timespan); - revision = revision.Trim(); - - Console.WriteLine("Build timestamp was: " + build); - Console.WriteLine("Revision detected was: " + revision); + string major = Major; + string minor = Minor; + // Version is defined as {Major}.{Minor}.{Build}.{Revision} + string version = String.Format("{0}.{1}.{2}.{3}", major, minor, build, revision); + + Console.WriteLine("API compatibility key: {0}.{1}", major, minor); + Console.WriteLine("Build date: {0}", timestamp); + + GenerateTimestamp(timestamp, Path.Combine(RootDirectory, "Timestamp.txt")); + GenerateVersion(version, Path.Combine(RootDirectory, "Version.txt")); + GenerateAssemblyInfo(major, minor, version, Path.Combine(SourceDirectory, "GlobalAssemblyInfo.cs")); + } + + static void GenerateTimestamp(string timestamp, string file) + { + System.IO.File.WriteAllLines(file, new string[] { timestamp }); + } + + static void GenerateVersion(string version, string file) + { + File.WriteAllLines(file, new string[] { version }); + } + + static void GenerateAssemblyInfo(string major, string minor, string version, string file) + { File.WriteAllLines(file, new string[] { "// This file is auto-generated through Source/Build.Tasks/GenerateAssemblyInfo.cs.", @@ -109,11 +106,19 @@ namespace Build.UpdateVersion "[assembly: AssemblyProduct(\"The Open Toolkit Library\")]", "[assembly: AssemblyCopyright(\"Copyright © 2006 - 2013 the Open Toolkit Library\")]", "[assembly: AssemblyTrademark(\"OpenTK\")]", - String.Format("[assembly: AssemblyVersion(\"{0}.{1}.0.0\")]", Major, Minor), - String.Format("[assembly: AssemblyFileVersion(\"{0}.{1}.{2}.{3}\")]", Major, Minor, build, revision), + String.Format("[assembly: AssemblyVersion(\"{0}.{1}.0.0\")]", major, minor), + String.Format("[assembly: AssemblyFileVersion(\"{0}\")]", version), }); } + static string RetrieveRevisionNumber(DateTime now) + { + double timespan = now.Subtract(new DateTime(2010, 1, 1)).TotalDays; + string revision = RetrieveGitRevision() ?? RetrieveSvnRevision() ?? RetrieveBzrRevision() ?? RetrieveSeconds(timespan); + revision = revision.Trim(); + return revision; + } + static string RetrieveSeconds(double timespan) { string revision = ((int)((timespan - (int)timespan) * UInt16.MaxValue)).ToString(); diff --git a/Source/GLControl/OpenTK.GLControl.csproj b/Source/GLControl/OpenTK.GLControl.csproj index 46eb3ab5..019beb04 100644 --- a/Source/GLControl/OpenTK.GLControl.csproj +++ b/Source/GLControl/OpenTK.GLControl.csproj @@ -47,7 +47,7 @@ DEBUG;TRACE; - OpenTK.GLControl.xml + ..\..\Binaries\OpenTK\Debug\OpenTK.GLControl.xml True 4096 False @@ -64,7 +64,7 @@ TRACE; - OpenTK.GLControl.xml + ..\..\Binaries\OpenTK\Release\OpenTK.GLControl.xml 4096 True ..\..\Binaries\OpenTK\Release\ @@ -80,6 +80,8 @@ 4 True TRACE; + true + ..\..\Binaries\OpenTK\Release\OpenTK.GLControl.xml True @@ -87,7 +89,7 @@ TRACE; - OpenTK.GLControl.xml + ..\..\Binaries\OpenTK\Release\OpenTK.GLControl.xml 4096 True ..\..\Binaries\OpenTK\Release\ diff --git a/Source/OpenTK/Platform/MacOS/CarbonBindings/CarbonAPI.cs b/Source/OpenTK/Platform/MacOS/CarbonBindings/CarbonAPI.cs index be079f95..83c41a43 100644 --- a/Source/OpenTK/Platform/MacOS/CarbonBindings/CarbonAPI.cs +++ b/Source/OpenTK/Platform/MacOS/CarbonBindings/CarbonAPI.cs @@ -684,9 +684,9 @@ namespace OpenTK.Platform.MacOS.Carbon char* codeAddr = &code; OSStatus result = API.GetEventParameter(inEvent, - EventParamName.KeyMacCharCode, EventParamType.typeChar, IntPtr.Zero, - (uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(char)), IntPtr.Zero, - (IntPtr)codeAddr); + EventParamName.KeyMacCharCode, EventParamType.typeChar, IntPtr.Zero, + (uint)BlittableValueType.Stride, IntPtr.Zero, + (IntPtr)codeAddr); if (result != OSStatus.NoError) { diff --git a/Source/OpenTK/Platform/MacOS/CarbonGLNative.cs b/Source/OpenTK/Platform/MacOS/CarbonGLNative.cs index ea848c9a..b285473b 100644 --- a/Source/OpenTK/Platform/MacOS/CarbonGLNative.cs +++ b/Source/OpenTK/Platform/MacOS/CarbonGLNative.cs @@ -383,7 +383,10 @@ namespace OpenTK.Platform.MacOS case KeyboardEventKind.RawKeyDown: Keymap.TryGetValue(code, out key); InputDriver.Keyboard[0].SetKey(key, (uint)code, true); - OnKeyPress(mKeyPressArgs); + if (!Char.IsControl(mKeyPressArgs.KeyChar)) + { + OnKeyPress(mKeyPressArgs); + } return OSStatus.NoError; case KeyboardEventKind.RawKeyUp: diff --git a/Source/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs b/Source/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs index 204d482f..34f65b65 100644 --- a/Source/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs +++ b/Source/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs @@ -59,6 +59,16 @@ namespace OpenTK.Platform.SDL2 Icon icon; string window_title; + // Used in KeyPress event to decode SDL UTF8 text strings + // to .Net UTF16 strings + char[] DecodeTextBuffer = new char[32]; + + // Argument for KeyPress event (allocated once to avoid runtime allocations) + readonly KeyPressEventArgs keypress_args = new KeyPressEventArgs('\0'); + + // Argument for KeyDown and KeyUp events (allocated once to avoid runtime allocations) + readonly KeyboardKeyEventArgs key_args = new KeyboardKeyEventArgs(); + readonly IInputDriver input_driver = new Sdl2InputDriver(); readonly EventFilter EventFilterDelegate_GCUnsafe = FilterEvents; @@ -226,39 +236,49 @@ namespace OpenTK.Platform.SDL2 { bool key_pressed = ev.Key.State == State.Pressed; var key = ev.Key.Keysym; - var args = new KeyboardKeyEventArgs() - { - Key = TranslateKey(key.Scancode), - ScanCode = (uint)key.Scancode - }; + window.key_args.Key = TranslateKey(key.Scancode); + window.key_args.ScanCode = (uint)key.Scancode; if (key_pressed) - window.KeyDown(window, args); + { + window.KeyDown(window, window.key_args); + } else - window.KeyUp(window, args); + { + window.KeyUp(window, window.key_args); + } //window.keyboard.SetKey(TranslateKey(key.scancode), (uint)key.scancode, key_pressed); } static unsafe void ProcessTextInputEvent(Sdl2NativeWindow window, TextInputEvent ev) { - var keyPress = window.KeyPress; - if (keyPress != null) + // Calculate the length of the typed text string + int length; + for (length = 0; length < TextInputEvent.TextSize && ev.Text[length] != '\0'; length++) + ; + + // Make sure we have enough space to decode this string + int decoded_length = Encoding.UTF8.GetCharCount(ev.Text, length); + if (window.DecodeTextBuffer.Length < decoded_length) { - var length = 0; - byte* pText = ev.Text; - while (*pText != 0) - { - length++; - pText++; - } - using (var stream = new System.IO.UnmanagedMemoryStream(ev.Text, length)) - using (var reader = new System.IO.StreamReader(stream, Encoding.UTF8)) - { - var text = reader.ReadToEnd(); - foreach (var c in text) - { - keyPress(window, new KeyPressEventArgs(c)); - } - } + Array.Resize( + ref window.DecodeTextBuffer, + 2 * Math.Max(decoded_length, window.DecodeTextBuffer.Length)); + } + + // Decode the string from UTF8 to .Net UTF16 + fixed (char* pBuffer = window.DecodeTextBuffer) + { + decoded_length = System.Text.Encoding.UTF8.GetChars( + ev.Text, + length, + pBuffer, + window.DecodeTextBuffer.Length); + } + + for (int i = 0; i < decoded_length; i++) + { + window.keypress_args.KeyChar = window.DecodeTextBuffer[i]; + window.KeyPress(window, window.keypress_args); } }