]> O.S.I.I.S - jp/crow.git/commitdiff
save commit
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Thu, 19 Nov 2020 08:12:12 +0000 (09:12 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Thu, 19 Nov 2020 08:12:12 +0000 (09:12 +0100)
12 files changed:
.gitignore
.nuget/NuGet.config [deleted file]
Crow/Crow.csproj
Directory.Build.props
Samples/BasicTests/BasicTests.cs
Samples/DebugLogAnalyzer/Program.cs
Samples/Directory.Build.props
Samples/HelloWorld/HelloWorld.csproj
Samples/HelloWorld/main.cs
Samples/ShowCase/ShowCase.cs
Samples/ShowCase/packages.config [deleted file]
Samples/common/SampleBase.cs

index bff27cf19239c5b38b8fc3a1172f0c10f38f3ab0..31d6ffa8ecbf505ace7a07ab1df94fa385ea19ee 100644 (file)
@@ -16,3 +16,6 @@ src/GraphicObjects/Panel.cs
 src/GraphicObjects/VerticalWrappingWidget.cs
 src/GraphicObjects/HorizontalWrappingWidget.cs
 TestResult.xml
+*.swp
+*.perf
+.vscode
diff --git a/.nuget/NuGet.config b/.nuget/NuGet.config
deleted file mode 100644 (file)
index 9724103..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<configuration>
-       <config>
-               <add key="repositoryPath" value="../packages" />
-       </config>
-</configuration>
index 481cb7b062729b19bec42a968520aab816c6f4f2..9f7349bd871bef2417d23b2eeb3ec1fadfa0e108 100644 (file)
        <ItemGroup Condition="$(TargetFramework.StartsWith('netstandard'))">
                <PackageReference Include="System.Reflection.Emit.ILGeneration" Version="4.6.0" />
                <PackageReference Include="System.Reflection.Emit.Lightweight" Version="4.6.0" />
-               <PackageReference Include="glfw-sharp" Version="0.2.9-beta" />
+       </ItemGroup>
+       <ItemGroup>
                <PackageReference Include="FastEnum" Version="1.5.3" />
+               <PackageReference Include="glfw-sharp" Version="0.2.10-beta" />
        </ItemGroup>
+
        <PropertyGroup Condition=" '$(CrowStbSharp)' == 'true'">
                <DefineConstants>$(DefineConstants);STB_SHARP</DefineConstants>
        </PropertyGroup>
        <ItemGroup Condition=" '$(CrowStbSharp)' == 'true'">
                <PackageReference Include="StbImageSharp" Version="2.22.4" />
        </ItemGroup>
+
        <ItemGroup>
-               <Content Include="$(SolutionDir)Images/crow.png" Pack="true" PackagePath="" />
+               <Content Include="$(SolutionDir)Images\crow.png" Pack="true" PackagePath="" />
                <Compile Include="src\**\*.cs" Exclude="src\Mono.Cairo\NativeMethods-internal.cs" />
                <EmbeddedResource Include="Templates\*.*">
                        <LogicalName>Crow.%(Filename).template</LogicalName>
@@ -59,8 +63,6 @@
                        <LogicalName>Crow.Cursors.%(Filename)</LogicalName>
                </EmbeddedResource>
                <Compile Include="Properties\AssemblyInfo.cs" />
-       </ItemGroup>
-       <ItemGroup>
-         <Compile Remove="src\Widgets\ColorPicker2.cs" />
+               <Compile Remove="src\Widgets\ColorPicker2.cs" />
        </ItemGroup>
 </Project>
index 9e62cfede3f0f938d646793ab752db3346dffeae..a05750a6e59ad275a56576322b5394b890ba262f 100644 (file)
@@ -1,13 +1,13 @@
 <Project>
        <PropertyGroup>
-               <RootDirectory>$(MSBuildThisFileDirectory)</RootDirectory>        
+               <SolutionDir>$(MSBuildThisFileDirectory)</SolutionDir>
                <OutputPath>$(SolutionDir)build\$(Configuration)\</OutputPath>
                <IntermediateOutputPath>$(SolutionDir)build\obj\$(Configuration)\</IntermediateOutputPath>
                <License>MIT</License>
                <Authors>Jean-Philippe Bruyère</Authors>           
                <LangVersion>7.2</LangVersion>
                
-               <CrowVersion>0.9.1</CrowVersion>
+               <CrowVersion>0.9.2</CrowVersion>
                <CrowPackageVersion>$(CrowVersion)-beta</CrowPackageVersion>
                <CrowStbSharp>true</CrowStbSharp>
        </PropertyGroup>
index 2e42052a665c90692acfa743dcab2018905bf4d3..755c4a0beca4e500278a2cdb7c9491c1df215be9 100644 (file)
@@ -2,7 +2,6 @@ using System;
 using System.Collections.Generic;
 using System.IO;
 using System.Linq;
-using System.Reflection;
 using Crow;
 using Glfw;
 
@@ -12,10 +11,6 @@ namespace tests
        {
                static void Main ()
                {
-#if NETCOREAPP3_1
-                       DllMapCore.Resolve.Enable (true);
-#endif
-
                        using (BasicTests app = new BasicTests ()) {
                                app.Run ();
                        }
@@ -49,7 +44,6 @@ namespace tests
                        testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/TemplatedControl", "*.crow")).ToArray ();
                        testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/TemplatedContainer", "*.crow")).ToArray ();
                        testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/TemplatedGroup", "*.crow")).ToArray ();
-                       testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Splitter", "*.crow")).ToArray ();
                        testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Wrapper", "*.crow")).ToArray ();
                        testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Divers", "*.crow")).ToArray ();
                        testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/DragAndDrop", "*.crow")).ToArray ();
index 6be26ced774e9ebcf110bfee02fce7df31f9bacc..bb793da357ccf6feeac4e15779a32dc98e2cb916 100644 (file)
@@ -13,9 +13,6 @@ namespace DebugLogAnalyzer
        {
                static void Main (string [] args)
                {
-#if NETCOREAPP3_1
-                       DllMapCore.Resolve.Enable (true);
-#endif
                        using (Program app = new Program ()) 
                                app.Run ();
                }
index fec3cb65f01b1f035cc4fb3d3a8554b94a0ec995..120aa913a08c29eb9d2fcc166fde000db6b2a2df 100644 (file)
@@ -1,9 +1,9 @@
 <Project>
        <PropertyGroup>
-               <TargetFrameworks>net472</TargetFrameworks>
+               <TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks>
                <OutputType>Exe</OutputType>
                
-               <RootDirectory>$(MSBuildThisFileDirectory)</RootDirectory>        
+               <SolutionDir>$(MSBuildThisFileDirectory)..\</SolutionDir>
                <OutputPath>$(SolutionDir)build\$(Configuration)\</OutputPath>
                <IntermediateOutputPath>$(SolutionDir)build\obj\$(Configuration)\</IntermediateOutputPath>
                
 
                <EnableDefaultNoneItems>false</EnableDefaultNoneItems>
                <SamplesDir>$(SolutionDir)Samples\</SamplesDir>
+               <AppConfig>$(SolutionDir)Crow\App.config</AppConfig>
        </PropertyGroup>
        
        <ItemGroup>
-         <PackageReference Include="DllMapCore" Version="0.1.0" Condition="'$(TargetFramework)'=='netcoreapp3.1'" />
                <ProjectReference Include="$(SolutionDir)Crow\Crow.csproj" />
        </ItemGroup>
        <ItemGroup>
index b19bb1c6ae1a1d73f7b536b59bde978228b05f0e..8186985ddf13ecc165b58618ac29e3202ae4f03f 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <Project Sdk="Microsoft.NET.Sdk">
        <ItemGroup>
                <EmbeddedResource Include="ui\**\*.*">
index 743419ee01f9ce021e46780c097fc997f70d3871..44ec3fb882dc7468852a8e94b546c17e66d9cbba 100644 (file)
@@ -5,9 +5,6 @@ namespace HelloWorld
 {
        class Program {
                static void Main (string[] args) {
-#if NETCOREAPP3_1
-                       DllMapCore.Resolve.Enable (true);
-#endif
                        using (Interface app = new Interface ()) {
                                app.Initialized += (sender, e) => (sender as Interface).Load ("#HelloWorld.helloworld.crow");
                                app.Run ();
index f3aba2b505221fbe51910c3911e3dc45e8fd5a24..d825431798aa8daaf70860bf9869073b7bc7d804 100644 (file)
@@ -16,9 +16,6 @@ namespace ShowCase
        {
                static void Main ()
                {
-#if NETCOREAPP3_1
-                       DllMapCore.Resolve.Enable (true);
-#endif
                        using (Showcase app = new Showcase ()) 
                                app.Run ();
                }
diff --git a/Samples/ShowCase/packages.config b/Samples/ShowCase/packages.config
deleted file mode 100644 (file)
index fba81eb..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
-  <package id="CVKL" version="0.1.2" targetFramework="net471" />
-  <package id="glTF2Loader" version="1.1.3-alpha" targetFramework="net471" />
-  <package id="Newtonsoft.Json" version="12.0.2" targetFramework="net471" />
-  <package id="System.Numerics.Vectors" version="4.6.0-preview4.19212.13" targetFramework="net471" />
-  <package id="System.Runtime.CompilerServices.Unsafe" version="4.6.0-preview4.19212.13" targetFramework="net471" />
-  <package id="Vulkan" version="0.1.2.6" targetFramework="net471" />
-</packages>
\ No newline at end of file
index 93aec9074374ad00ce7cd3b72b4a10f67595e65f..65345be7a61a0df6fef580afb03ee975c6dcaf7e 100644 (file)
@@ -1,4 +1,6 @@
-using System;
+using System.Net.NetworkInformation;
+using System.Runtime.InteropServices;
+using System;
 using System.Collections.Generic;
 using System.IO;
 using System.Linq;
@@ -10,6 +12,24 @@ using Crow;
 namespace Crow
 {
        public class SampleBase : Interface {   
+#if NETCOREAPP         
+               static IntPtr resolveUnmanaged (Assembly assembly, String libraryName) {
+                       
+                       switch (libraryName)
+                       {
+                               case "glfw3":
+                                       return  NativeLibrary.Load("glfw", assembly, null);
+                               case "rsvg-2.40":
+                                       return  NativeLibrary.Load("rsvg-2", assembly, null);
+                       }                       
+                       Console.WriteLine ($"[UNRESOLVE] {assembly} {libraryName}");                    
+                       return IntPtr.Zero;
+               }
+
+               static SampleBase () {
+                       System.Runtime.Loader.AssemblyLoadContext.Default.ResolvingUnmanagedDll+=resolveUnmanaged;
+               }
+#endif                 
                public Version CrowVersion => Assembly.GetAssembly (typeof (Widget)).GetName ().Version;
 
                #region Test values for Binding