From fdd27cc0ad21809e0d3203b4e821ee395cccef37 Mon Sep 17 00:00:00 2001 From: j-p Date: Sun, 5 May 2019 06:21:01 +0200 Subject: [PATCH] Travis (#46) * travis help * travis help * try with mscorlib ref * travis mono + dotnet * travis mono + dotnet * travis mono + dotnet * travis mono + dotnet * travis mono + dotnet * travis mono + dotnet * travis mono + dotnet --- .travis.yml | 20 +++--- Crow.NetStd.sln | 38 ----------- Crow.sln | 20 ------ Crow/Crow.csproj | 11 +++- Properties/AssemblyInfo.cs | 53 ---------------- {Crow/src => Samples/common}/CrowVkWin.cs | 77 ++++++++++------------- 6 files changed, 52 insertions(+), 167 deletions(-) delete mode 100644 Crow.NetStd.sln delete mode 100755 Properties/AssemblyInfo.cs rename {Crow/src => Samples/common}/CrowVkWin.cs (77%) diff --git a/.travis.yml b/.travis.yml index 9963d318..06116d87 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,12 @@ -sudo: required -dist: trusty language: csharp -solution: Crow.sln -before_install: - - sudo apt-get -qq update - - sudo apt-get install -y libcairo1.10-cil libgio3.0-cil libgdk3.0-cil libglib3.0-cil -install: - - nuget restore Crow.sln -script: - - xbuild /p:Configuration=Release Crow.sln +dist: xenial + +dotnet: 2.1.502 +mono: latest +script: + - nuget restore Crow.sln + - msbuild Crow.sln + - dotnet restore + - dotnet build Crow.sln + \ No newline at end of file diff --git a/Crow.NetStd.sln b/Crow.NetStd.sln deleted file mode 100644 index a62e1600..00000000 --- a/Crow.NetStd.sln +++ /dev/null @@ -1,38 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26124.0 -MinimumVisualStudioVersion = 15.0.26124.0 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Crow.NetStd", "Crow\Crow.NetStd.csproj", "{75BDE4C7-4BAF-4A03-B697-5D1370775E20}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.NetStd", "Tests\Tests.NetStd.csproj", "{28BAF8B8-6A6E-40D5-8E9C-E7C1165C59DD}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CrowIDE.NetStd", "CrowIDE\CrowIDE.NetStd.csproj", "{A01B3151-BC81-437C-B526-CC8DBB808638}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {75BDE4C7-4BAF-4A03-B697-5D1370775E20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {75BDE4C7-4BAF-4A03-B697-5D1370775E20}.Debug|Any CPU.Build.0 = Debug|Any CPU - {75BDE4C7-4BAF-4A03-B697-5D1370775E20}.Release|Any CPU.ActiveCfg = Release|Any CPU - {75BDE4C7-4BAF-4A03-B697-5D1370775E20}.Release|Any CPU.Build.0 = Release|Any CPU - {28BAF8B8-6A6E-40D5-8E9C-E7C1165C59DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {28BAF8B8-6A6E-40D5-8E9C-E7C1165C59DD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {28BAF8B8-6A6E-40D5-8E9C-E7C1165C59DD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {28BAF8B8-6A6E-40D5-8E9C-E7C1165C59DD}.Release|Any CPU.Build.0 = Release|Any CPU - {A01B3151-BC81-437C-B526-CC8DBB808638}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A01B3151-BC81-437C-B526-CC8DBB808638}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A01B3151-BC81-437C-B526-CC8DBB808638}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A01B3151-BC81-437C-B526-CC8DBB808638}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection -EndGlobal diff --git a/Crow.sln b/Crow.sln index 5250cb4a..958b9ff9 100644 --- a/Crow.sln +++ b/Crow.sln @@ -3,36 +3,18 @@ Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Crow", "Crow\Crow.csproj", "{C2980F9B-4798-4C05-99E2-E174810F7C7B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CrowIDE", "CrowIDE\CrowIDE.csproj", "{B6D911CD-1D09-42FC-B300-9187190F2AE1}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{B2C7855A-2878-47FD-AD32-9A83DB4AB8C6}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloWorld", "Samples\HelloWorld\HelloWorld.csproj", "{1F18E74F-BCC9-481C-8888-89D81CBB30BE}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShowCase", "Samples\ShowCase\ShowCase.csproj", "{56329D48-D382-4850-93DE-59C453894E8A}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B6D911CD-1D09-42FC-B300-9187190F2AE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B6D911CD-1D09-42FC-B300-9187190F2AE1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B6D911CD-1D09-42FC-B300-9187190F2AE1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B6D911CD-1D09-42FC-B300-9187190F2AE1}.Release|Any CPU.Build.0 = Release|Any CPU {C2980F9B-4798-4C05-99E2-E174810F7C7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C2980F9B-4798-4C05-99E2-E174810F7C7B}.Debug|Any CPU.Build.0 = Debug|Any CPU {C2980F9B-4798-4C05-99E2-E174810F7C7B}.Release|Any CPU.ActiveCfg = Release|Any CPU {C2980F9B-4798-4C05-99E2-E174810F7C7B}.Release|Any CPU.Build.0 = Release|Any CPU - {1F18E74F-BCC9-481C-8888-89D81CBB30BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1F18E74F-BCC9-481C-8888-89D81CBB30BE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1F18E74F-BCC9-481C-8888-89D81CBB30BE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1F18E74F-BCC9-481C-8888-89D81CBB30BE}.Release|Any CPU.Build.0 = Release|Any CPU - {56329D48-D382-4850-93DE-59C453894E8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {56329D48-D382-4850-93DE-59C453894E8A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {56329D48-D382-4850-93DE-59C453894E8A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {56329D48-D382-4850-93DE-59C453894E8A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution Policies = $0 @@ -74,7 +56,5 @@ Global version = 0.8.0 EndGlobalSection GlobalSection(NestedProjects) = preSolution - {1F18E74F-BCC9-481C-8888-89D81CBB30BE} = {B2C7855A-2878-47FD-AD32-9A83DB4AB8C6} - {56329D48-D382-4850-93DE-59C453894E8A} = {B2C7855A-2878-47FD-AD32-9A83DB4AB8C6} EndGlobalSection EndGlobal diff --git a/Crow/Crow.csproj b/Crow/Crow.csproj index 16438f4c..1658e824 100644 --- a/Crow/Crow.csproj +++ b/Crow/Crow.csproj @@ -36,11 +36,17 @@ + + + + + + @@ -55,7 +61,6 @@ - - - + + diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs deleted file mode 100755 index 8b7d2a28..00000000 --- a/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,53 +0,0 @@ -// -// AssemblyInfo.cs -// -// Author: -// Jean-Philippe Bruyère -// -// Copyright (c) 2013-2017 Jean-Philippe Bruyère -// -// 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. - -using System.Reflection; -using System.Runtime.CompilerServices; - -// Information about this assembly is defined by the following attributes. -// Change them to the values specific to your project. - -[assembly: AssemblyTitle ("Crow")] -[assembly: AssemblyDescription ("C# Rapid Open Widgets")] -[assembly: AssemblyConfiguration ("")] -[assembly: AssemblyCompany ("Grand Tetra Software")] -[assembly: AssemblyProduct ("Crow")] -[assembly: AssemblyCopyright ("Copyright (c) 2018 - Jean-Philippe Bruyère ")] -[assembly: AssemblyTrademark ("")] -[assembly: AssemblyCulture ("")] - -// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". -// The form "{Major}.{Minor}.*" will automatically update the build and revision, -// and "{Major}.{Minor}.{Build}.*" will update just the revision. - -[assembly: AssemblyVersion ("0.7.1")] - -// The following attributes are used to specify the signing key for the assembly, -// if desired. See the Mono documentation for more information about signing. - -//[assembly: AssemblyDelaySign(false)] -//[assembly: AssemblyKeyFile("crow.key")] - diff --git a/Crow/src/CrowVkWin.cs b/Samples/common/CrowVkWin.cs similarity index 77% rename from Crow/src/CrowVkWin.cs rename to Samples/common/CrowVkWin.cs index 890b461d..dd83a37a 100644 --- a/Crow/src/CrowVkWin.cs +++ b/Samples/common/CrowVkWin.cs @@ -7,9 +7,33 @@ using VK; namespace Crow { public class CrowVkWin : VkWindow, IValueChange { - bool isRunning; - - protected override void render () { + #region IValueChange implementation + public event EventHandler ValueChanged; + public virtual void NotifyValueChanged(string MemberName, object _value) + { + if (ValueChanged != null) + ValueChanged.Invoke(this, new Crow.ValueChangeEventArgs(MemberName, _value)); + } + #endregion + + protected Crow.Interface crow; + protected CVKL.Image uiImage; + protected vkvg.Device vkvgDev; + bool isRunning; + + protected CrowVkWin() : base() + { + Thread crowThread = new Thread(crow_thread_func); + crowThread.IsBackground = true; + crowThread.Start(); + + while (crow == null) + Thread.Sleep(2); + + initUISurface(); + } + + protected override void render () { int idx = swapChain.GetNextImage (); if (idx < 0) { @@ -25,18 +49,6 @@ namespace Crow Thread.Sleep (1); } - #region crow - #region IValueChange implementation - public event EventHandler ValueChanged; - public virtual void NotifyValueChanged (string MemberName, object _value) - { - if (ValueChanged != null) - ValueChanged.Invoke (this, new Crow.ValueChangeEventArgs (MemberName, _value)); - } - #endregion - - protected Crow.Interface crow; - void crow_thread_func () { vkvgDev = new vkvg.Device (instance.Handle, phy.Handle, dev.VkDev.Handle, presentQueue.qFamIndex, vkvg.SampleCount.Sample_8, presentQueue.index); @@ -51,42 +63,21 @@ namespace Crow crow.Dispose (); vkvgDev.Dispose (); - crow = null; } - #endregion - - - protected CVKL.Image uiImage; - protected vkvg.Device vkvgDev; void initUISurface () { lock (crow.UpdateMutex) { - try { - uiImage?.Dispose (); - uiImage = new CVKL.Image (dev, new VkImage ((ulong)crow.surf.VkImage.ToInt64 ()), VkFormat.B8g8r8a8Unorm, - VkImageUsageFlags.Sampled, swapChain.Width, swapChain.Height); - uiImage.SetName ("uiImage"); - uiImage.CreateView (VkImageViewType.ImageView2D, VkImageAspectFlags.Color); - uiImage.CreateSampler (VkFilter.Nearest, VkFilter.Nearest, VkSamplerMipmapMode.Nearest, VkSamplerAddressMode.ClampToBorder); - uiImage.Descriptor.imageLayout = VkImageLayout.ShaderReadOnlyOptimal; - } catch (Exception ex) { - Console.WriteLine (ex); - } + uiImage?.Dispose (); + uiImage = new CVKL.Image (dev, new VkImage ((ulong)crow.surf.VkImage.ToInt64 ()), VkFormat.B8g8r8a8Unorm, + VkImageUsageFlags.Sampled, swapChain.Width, swapChain.Height); + uiImage.SetName ("uiImage"); + uiImage.CreateView (VkImageViewType.ImageView2D, VkImageAspectFlags.Color); + uiImage.CreateSampler (VkFilter.Nearest, VkFilter.Nearest, VkSamplerMipmapMode.Nearest, VkSamplerAddressMode.ClampToBorder); + uiImage.Descriptor.imageLayout = VkImageLayout.ShaderReadOnlyOptimal; } } - protected CrowVkWin () : base() { - Thread crowThread = new Thread (crow_thread_func); - crowThread.IsBackground = true; - crowThread.Start (); - - while (crow == null) - Thread.Sleep (2); - - initUISurface (); - } - protected virtual void recordDraw (CommandBuffer cmd, int imageIndex) { } void buildCommandBuffers () { -- 2.47.3