From: WonYoung Choi Date: Fri, 2 Sep 2016 05:13:51 +0000 (+0900) Subject: Support netstandard 1.6 X-Git-Tag: submit/trunk/20170823.075128~77^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=976471c2bdcacd38402dbf21b44e993646a137db;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git Support netstandard 1.6 Change-Id: Ic6bcce86c094a474928622a1ebf3760c61883e85 --- diff --git a/.gitignore b/.gitignore index 17dd954..46619d5 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ obj/ *.exe *.dll *.csproj.user +*.lock.json .vs/ diff --git a/Tizen.Internals/CoreFx.References.targets b/Tizen.Internals/CoreFx.References.targets deleted file mode 100644 index dab29ec..0000000 --- a/Tizen.Internals/CoreFx.References.targets +++ /dev/null @@ -1,265 +0,0 @@ - - - - - False - $(CoreFxPath)/Microsoft.Win32.Primitives.dll - - - False - $(CoreFxPath)/System.AppContext.dll - - - False - $(CoreFxPath)/System.Collections.Concurrent.dll - - - False - $(CoreFxPath)/System.Collections.dll - - - False - $(CoreFxPath)/System.ComponentModel.Annotations.dll - - - False - $(CoreFxPath)/System.ComponentModel.dll - - - False - $(CoreFxPath)/System.Console.dll - - - False - $(CoreFxPath)/System.Diagnostics.Debug.dll - - - False - $(CoreFxPath)/System.Diagnostics.Process.dll - - - False - $(CoreFxPath)/System.Diagnostics.Tools.dll - - - False - $(CoreFxPath)/System.Diagnostics.TraceSource.dll - - - False - $(CoreFxPath)/System.Diagnostics.Tracing.dll - - - False - $(CoreFxPath)/System.Dynamic.Runtime.dll - - - False - $(CoreFxPath)/System.Globalization.Calendars.dll - - - False - $(CoreFxPath)/System.Globalization.dll - - - False - $(CoreFxPath)/System.Globalization.Extensions.dll - - - False - $(CoreFxPath)/System.IO.Compression.dll - - - False - $(CoreFxPath)/System.IO.Compression.ZipFile.dll - - - False - $(CoreFxPath)/System.IO.dll - - - False - $(CoreFxPath)/System.IO.FileSystem.dll - - - False - $(CoreFxPath)/System.IO.FileSystem.Primitives.dll - - - False - $(CoreFxPath)/System.IO.FileSystem.Watcher.dll - - - False - $(CoreFxPath)/System.IO.MemoryMappedFiles.dll - - - False - $(CoreFxPath)/System.IO.UnmanagedMemoryStream.dll - - - False - $(CoreFxPath)/System.Linq.dll - - - False - $(CoreFxPath)/System.Linq.Expressions.dll - - - False - $(CoreFxPath)/System.Linq.Parallel.dll - - - False - $(CoreFxPath)/System.Linq.Queryable.dll - - - False - $(CoreFxPath)/System.Net.Http.dll - - - False - $(CoreFxPath)/System.Net.NameResolution.dll - - - False - $(CoreFxPath)/System.Net.Primitives.dll - - - False - $(CoreFxPath)/System.Net.Requests.dll - - - False - $(CoreFxPath)/System.Net.Security.dll - - - False - $(CoreFxPath)/System.Net.Sockets.dll - - - False - $(CoreFxPath)/System.Net.WebHeaderCollection.dll - - - False - $(CoreFxPath)/System.Numerics.Vectors.dll - - - False - $(CoreFxPath)/System.ObjectModel.dll - - - False - $(CoreFxPath)/System.Reflection.DispatchProxy.dll - - - False - $(CoreFxPath)/System.Reflection.dll - - - False - $(CoreFxPath)/System.Reflection.Extensions.dll - - - False - $(CoreFxPath)/System.Reflection.Primitives.dll - - - False - $(CoreFxPath)/System.Reflection.TypeExtensions.dll - - - False - $(CoreFxPath)/System.Resources.ResourceManager.dll - - - False - $(CoreFxPath)/System.Runtime.dll - - - False - $(CoreFxPath)/System.Runtime.Extensions.dll - - - False - $(CoreFxPath)/System.Runtime.Handles.dll - - - False - $(CoreFxPath)/System.Runtime.InteropServices.dll - - - False - $(CoreFxPath)/System.Runtime.InteropServices.RuntimeInformation.dll - - - False - $(CoreFxPath)/System.Runtime.Loader.dll - - - False - $(CoreFxPath)/System.Runtime.Numerics.dll - - - False - $(CoreFxPath)/System.Security.Cryptography.Algorithms.dll - - - False - $(CoreFxPath)/System.Security.Cryptography.Encoding.dll - - - False - $(CoreFxPath)/System.Security.Cryptography.Primitives.dll - - - False - $(CoreFxPath)/System.Security.Cryptography.X509Certificates.dll - - - False - $(CoreFxPath)/System.Text.Encoding.dll - - - False - $(CoreFxPath)/System.Text.Encoding.Extensions.dll - - - False - $(CoreFxPath)/System.Text.RegularExpressions.dll - - - False - $(CoreFxPath)/System.Threading.dll - - - False - $(CoreFxPath)/System.Threading.Tasks.dll - - - False - $(CoreFxPath)/System.Threading.Tasks.Parallel.dll - - - False - $(CoreFxPath)/System.Threading.Thread.dll - - - False - $(CoreFxPath)/System.Threading.ThreadPool.dll - - - False - $(CoreFxPath)/System.Threading.Timer.dll - - - False - $(CoreFxPath)/System.Xml.ReaderWriter.dll - - - False - $(CoreFxPath)/System.Xml.XDocument.dll - - - \ No newline at end of file diff --git a/Tizen.Internals/CustomDictionary.xml b/Tizen.Internals/CustomDictionary.xml deleted file mode 100755 index ca9eb94..0000000 --- a/Tizen.Internals/CustomDictionary.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - Tizen - - - diff --git a/Tizen.Internals/Interop/Interop.CommonError.cs b/Tizen.Internals/Interop/Interop.CommonError.cs deleted file mode 100755 index 7554e85..0000000 --- a/Tizen.Internals/Interop/Interop.CommonError.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2016 by Samsung Electronics, Inc., -// -// This software is the confidential and proprietary information -// of Samsung Electronics, Inc. ("Confidential Information"). You -// shall not disclose such Confidential Information and shall use -// it only in accordance with the terms of the license agreement -// you entered into with Samsung. - -using System; -using System.Runtime.InteropServices; - -// Because Tizen.Internals assembly defines friends assembly attribute, -// Include the Interop class to the Tizen.Internals namespace to avoid conflicts with Interop classes in other assembly. -namespace Tizen.Internals -{ - internal static partial class Interop - { - internal static partial class Libraries - { - public const string Base = "libcapi-base-common.so.0"; - } - - internal static partial class CommonError - { - [DllImport(Libraries.Base, EntryPoint = "get_last_result")] - internal static extern int GetLastResult(); - - [DllImport(Libraries.Base, EntryPoint = "get_error_message")] - internal static extern IntPtr GetErrorMessage(int errorCode); - } - } -} diff --git a/Tizen.Internals/Properties/AssemblyInfo.cs b/Tizen.Internals/Properties/AssemblyInfo.cs deleted file mode 100644 index 438bd79..0000000 --- a/Tizen.Internals/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("Tizen.Internals")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Samsung Electronics")] -[assembly: AssemblyProduct("Tizen.Internals")] -[assembly: AssemblyCopyright("Copyright (c) 2015 Samsung Electronics Co., Ltd")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -[assembly: ComVisible(false)] - -[assembly: Guid("b9aa1cb2-f72d-4a30-a33b-a20c850a38a0")] - -[assembly: - InternalsVisibleTo("Tizen.Applications, PublicKey=" + - "00240000048000009400000006020000002400005253413100040000010001001b03324ad629ad" + - "45d9a2cad9b530a5cdb5c9ac4392b427c8fb2dc3a5d389f031956c1a8f506c9db2acfc6197afe3" + - "978205eaccd7bb9630f40c445bb459b6363d4478a21c529b9889b767523ebbbf2f6c620e0c4f19" + - "1417fa94c132fcb889263ce072580a6681c6bcedc285b369f41a69d66e266a9526779dee1cbcb8" + - "f0b790bd"), - - InternalsVisibleTo("Tizen.Network, PublicKey=" + - "002400000480000094000000060200000024000052534131000400000100010031252807b5ef81" + - "fea7d37b8b8a345df35db5c6820577b598057738cdeee8eafa2efd5dbd8393215d61090091e05e" + - "8475cbc2d9b7bdb7442cff8079942de9c2dbc5e621ce54b63a2a11d9a4ae961117b0a1ac55cf10" + - "4e66c3f64edc2aed09eae9af46e70803f1cafbb3f132ea39b0f97e8679374b54d5a7529797e48a" + - "093e54ae") -] - -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Tizen.Internals/Tizen.Internals.snk b/Tizen.Internals/Tizen.Internals.snk deleted file mode 100755 index 0fcdde4..0000000 Binary files a/Tizen.Internals/Tizen.Internals.snk and /dev/null differ diff --git a/packaging/csapi-tizen.spec b/packaging/csapi-tizen.spec index ab45199..58eeb84 100644 --- a/packaging/csapi-tizen.spec +++ b/packaging/csapi-tizen.spec @@ -1,4 +1,4 @@ -%{!?dotnet_assembly_path: %define dotnet_assembly_path %{_datadir}/assembly} +%{!?dotnet_assembly_path: %define dotnet_assembly_path /opt/usr/share/dotnet.tizen/framework} %{!?dotnet_core_path: %define dotnet_core_path %{_datadir}/tizen.net/ref} %if 0%{?tizen_build_devel_mode} @@ -27,6 +27,8 @@ AutoReqProv: no BuildRequires: corefx-managed-32b-ref %endif +BuildRequires: dotnet-build-tools + %description Tizen API for C# @@ -34,28 +36,72 @@ Tizen API for C# %setup -q cp %{SOURCE1} . -%define Assemblies Tizen Tizen.Internals +%define Assemblies Tizen %build +# Build for Net45 for ASM in %{Assemblies}; do -xbuild $ASM/$ASM.csproj \ +if [ -e $ASM/$ASM.Net45.csproj ]; then + xbuild $ASM/$ASM.Net45.csproj \ + /p:Configuration=%{BUILDCONF} \ + /p:DotnetAssemblyPath=%{dotnet_assembly_path}/devel/net45 \ + /p:OutputPath=bin/net45 +fi + +# Build for Dotnet %if 0%{?_with_corefx} - /p:NoStdLib=True \ - /p:TargetFrameworkVersion=v5.0 \ - /p:AddAdditionalExplicitAssemblyReferences=False \ - /p:CoreFxPath=%{dotnet_core_path} \ +if [ -e $ASM/$ASM.csproj ]; then + xbuild $ASM/$ASM.csproj \ + /p:Configuration=%{BUILDCONF} \ + /p:DotnetAssemblyPath=%{dotnet_assembly_path}/devel/netstandard1.6 \ + /p:CoreFxPath=%{dotnet_core_path} \ + /p:OutputPath=bin/netstandard1.6 +fi %endif - /p:Configuration=%{BUILDCONF} \ - /p:ReferencePath=%{dotnet_assembly_path} + +# Make NuGet package +dotnet-gbs pack $ASM/$ASM.nuspec --PackageVersion=%{version} --PackageFiles=$ASM/bin + done %install -mkdir -p %{buildroot}%{dotnet_assembly_path} +mkdir -p %{buildroot}%{dotnet_assembly_path}/devel for ASM in %{Assemblies}; do -install -p -m 644 $ASM/bin/%{BUILDCONF}/$ASM.dll %{buildroot}%{dotnet_assembly_path} + cp -fr $ASM/bin/* %{buildroot}%{dotnet_assembly_path}/devel +%if 0%{?_with_corefx} + install -p -m 644 $ASM/bin/netstandard1.6/$ASM.dll %{buildroot}%{dotnet_assembly_path} +%else + install -p -m 644 $ASM/bin/net45/$ASM.dll %{buildroot}%{dotnet_assembly_path} +%endif done +mkdir -p %{buildroot}/nuget +install -p -m 644 *.nupkg %{buildroot}/nuget + %files %manifest %{name}.manifest %license LICENSE %attr(644,root,root) %{dotnet_assembly_path}/*.dll + +%package devel +Summary: Development package for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +AutoReqProv: no + +%description devel +Development package for %{name} + +%files devel +%{dotnet_assembly_path}/devel/* + +%package nuget +Summary: NuGet package for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description nuget +NuGet package for %{name} + +%files nuget +/nuget/*.nupkg diff --git a/src/Tizen/CoreFx.References.targets b/src/Tizen/CoreFx.References.targets deleted file mode 100644 index dab29ec..0000000 --- a/src/Tizen/CoreFx.References.targets +++ /dev/null @@ -1,265 +0,0 @@ - - - - - False - $(CoreFxPath)/Microsoft.Win32.Primitives.dll - - - False - $(CoreFxPath)/System.AppContext.dll - - - False - $(CoreFxPath)/System.Collections.Concurrent.dll - - - False - $(CoreFxPath)/System.Collections.dll - - - False - $(CoreFxPath)/System.ComponentModel.Annotations.dll - - - False - $(CoreFxPath)/System.ComponentModel.dll - - - False - $(CoreFxPath)/System.Console.dll - - - False - $(CoreFxPath)/System.Diagnostics.Debug.dll - - - False - $(CoreFxPath)/System.Diagnostics.Process.dll - - - False - $(CoreFxPath)/System.Diagnostics.Tools.dll - - - False - $(CoreFxPath)/System.Diagnostics.TraceSource.dll - - - False - $(CoreFxPath)/System.Diagnostics.Tracing.dll - - - False - $(CoreFxPath)/System.Dynamic.Runtime.dll - - - False - $(CoreFxPath)/System.Globalization.Calendars.dll - - - False - $(CoreFxPath)/System.Globalization.dll - - - False - $(CoreFxPath)/System.Globalization.Extensions.dll - - - False - $(CoreFxPath)/System.IO.Compression.dll - - - False - $(CoreFxPath)/System.IO.Compression.ZipFile.dll - - - False - $(CoreFxPath)/System.IO.dll - - - False - $(CoreFxPath)/System.IO.FileSystem.dll - - - False - $(CoreFxPath)/System.IO.FileSystem.Primitives.dll - - - False - $(CoreFxPath)/System.IO.FileSystem.Watcher.dll - - - False - $(CoreFxPath)/System.IO.MemoryMappedFiles.dll - - - False - $(CoreFxPath)/System.IO.UnmanagedMemoryStream.dll - - - False - $(CoreFxPath)/System.Linq.dll - - - False - $(CoreFxPath)/System.Linq.Expressions.dll - - - False - $(CoreFxPath)/System.Linq.Parallel.dll - - - False - $(CoreFxPath)/System.Linq.Queryable.dll - - - False - $(CoreFxPath)/System.Net.Http.dll - - - False - $(CoreFxPath)/System.Net.NameResolution.dll - - - False - $(CoreFxPath)/System.Net.Primitives.dll - - - False - $(CoreFxPath)/System.Net.Requests.dll - - - False - $(CoreFxPath)/System.Net.Security.dll - - - False - $(CoreFxPath)/System.Net.Sockets.dll - - - False - $(CoreFxPath)/System.Net.WebHeaderCollection.dll - - - False - $(CoreFxPath)/System.Numerics.Vectors.dll - - - False - $(CoreFxPath)/System.ObjectModel.dll - - - False - $(CoreFxPath)/System.Reflection.DispatchProxy.dll - - - False - $(CoreFxPath)/System.Reflection.dll - - - False - $(CoreFxPath)/System.Reflection.Extensions.dll - - - False - $(CoreFxPath)/System.Reflection.Primitives.dll - - - False - $(CoreFxPath)/System.Reflection.TypeExtensions.dll - - - False - $(CoreFxPath)/System.Resources.ResourceManager.dll - - - False - $(CoreFxPath)/System.Runtime.dll - - - False - $(CoreFxPath)/System.Runtime.Extensions.dll - - - False - $(CoreFxPath)/System.Runtime.Handles.dll - - - False - $(CoreFxPath)/System.Runtime.InteropServices.dll - - - False - $(CoreFxPath)/System.Runtime.InteropServices.RuntimeInformation.dll - - - False - $(CoreFxPath)/System.Runtime.Loader.dll - - - False - $(CoreFxPath)/System.Runtime.Numerics.dll - - - False - $(CoreFxPath)/System.Security.Cryptography.Algorithms.dll - - - False - $(CoreFxPath)/System.Security.Cryptography.Encoding.dll - - - False - $(CoreFxPath)/System.Security.Cryptography.Primitives.dll - - - False - $(CoreFxPath)/System.Security.Cryptography.X509Certificates.dll - - - False - $(CoreFxPath)/System.Text.Encoding.dll - - - False - $(CoreFxPath)/System.Text.Encoding.Extensions.dll - - - False - $(CoreFxPath)/System.Text.RegularExpressions.dll - - - False - $(CoreFxPath)/System.Threading.dll - - - False - $(CoreFxPath)/System.Threading.Tasks.dll - - - False - $(CoreFxPath)/System.Threading.Tasks.Parallel.dll - - - False - $(CoreFxPath)/System.Threading.Thread.dll - - - False - $(CoreFxPath)/System.Threading.ThreadPool.dll - - - False - $(CoreFxPath)/System.Threading.Timer.dll - - - False - $(CoreFxPath)/System.Xml.ReaderWriter.dll - - - False - $(CoreFxPath)/System.Xml.XDocument.dll - - - \ No newline at end of file diff --git a/src/Tizen/CustomDictionary.xml b/src/Tizen/CustomDictionary.xml deleted file mode 100755 index ca9eb94..0000000 --- a/src/Tizen/CustomDictionary.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - Tizen - - - diff --git a/src/Tizen/GlobalSuppressions.cs b/src/Tizen/GlobalSuppressions.cs deleted file mode 100755 index 3695bf5..0000000 Binary files a/src/Tizen/GlobalSuppressions.cs and /dev/null differ diff --git a/src/Tizen/Interop/Interop.CommonError.cs b/src/Tizen/Interop/Interop.CommonError.cs new file mode 100644 index 0000000..32b1dcd --- /dev/null +++ b/src/Tizen/Interop/Interop.CommonError.cs @@ -0,0 +1,27 @@ +// Copyright 2016 by Samsung Electronics, Inc., +// +// This software is the confidential and proprietary information +// of Samsung Electronics, Inc. ("Confidential Information"). You +// shall not disclose such Confidential Information and shall use +// it only in accordance with the terms of the license agreement +// you entered into with Samsung. + +using System; +using System.Runtime.InteropServices; + +internal static partial class Interop +{ + internal static partial class Libraries + { + public const string Base = "libcapi-base-common.so.0"; + } + + internal static partial class CommonError + { + [DllImport(Libraries.Base, EntryPoint = "get_last_result")] + internal static extern int GetLastResult(); + + [DllImport(Libraries.Base, EntryPoint = "get_error_message")] + internal static extern IntPtr GetErrorMessage(int errorCode); + } +} diff --git a/Tizen.Internals/Tizen.Internals.Errors/ErrorCode.cs b/src/Tizen/Tizen.Internals.Errors/ErrorCode.cs old mode 100755 new mode 100644 similarity index 100% rename from Tizen.Internals/Tizen.Internals.Errors/ErrorCode.cs rename to src/Tizen/Tizen.Internals.Errors/ErrorCode.cs diff --git a/Tizen.Internals/Tizen.Internals.Errors/ErrorFacts.cs b/src/Tizen/Tizen.Internals.Errors/ErrorFacts.cs old mode 100755 new mode 100644 similarity index 100% rename from Tizen.Internals/Tizen.Internals.Errors/ErrorFacts.cs rename to src/Tizen/Tizen.Internals.Errors/ErrorFacts.cs diff --git a/Tizen.Internals/Tizen.Internals.csproj b/src/Tizen/Tizen.Net45.csproj old mode 100755 new mode 100644 similarity index 65% rename from Tizen.Internals/Tizen.Internals.csproj rename to src/Tizen/Tizen.Net45.csproj index 3ea9d57..3bc5989 --- a/Tizen.Internals/Tizen.Internals.csproj +++ b/src/Tizen/Tizen.Net45.csproj @@ -1,33 +1,29 @@  - Debug AnyCPU - {B9AA1CB2-F72D-4A30-A33B-A20C850A38A0} + {3A809808-3797-40DE-A1C0-5E9ED922F7D6} Library Properties - Tizen.Internals - Tizen.Internals - v4.5 + Tizen + Tizen 512 - + v4.5 true full true - bin\Debug\ + bin\Debug\Net45\ DEBUG;TRACE prompt 4 - bin\Debug\Tizen.Internals.XML - ExtendedDesignGuidelineRules.ruleset pdbonly true - bin\Release\ + bin\Release\Net45\ TRACE prompt 4 @@ -36,24 +32,31 @@ true - Tizen.Internals.snk + Tizen.snk - - - + + + + + + + + + - - + + + + + - - - - + + + + + + <_TargetFrameworkDirectories>$(MSBuildThisFileDirectory) + <_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory) + true + \ No newline at end of file diff --git a/src/Tizen/Tizen.nuspec b/src/Tizen/Tizen.nuspec new file mode 100644 index 0000000..5fc7476 --- /dev/null +++ b/src/Tizen/Tizen.nuspec @@ -0,0 +1,9 @@ + + + + Tizen + $version$ + Tizen Developers + Common modules of the Device API for Tizen.Net + + diff --git a/src/Tizen/Tizen.project.json b/src/Tizen/Tizen.project.json new file mode 100644 index 0000000..872bd5c --- /dev/null +++ b/src/Tizen/Tizen.project.json @@ -0,0 +1,11 @@ +{ + "dependencies": { + "NETStandard.Library": "1.6.0" + }, + "frameworks": { + "netstandard1.6": {} + }, + "runtimes": { + "win": {} + } +}