From 04d7c9ddceab04a456217c30f5c8f45082788a5d Mon Sep 17 00:00:00 2001 From: WonYoung Choi Date: Sat, 3 Sep 2016 16:48:24 +0900 Subject: [PATCH] Fix project files to support netstandard 1.6 Change-Id: I3020496f26b89d0759fcbb392cb7abdf2f9edb5e Signed-off-by: WonYoung Choi --- .gitignore | 7 + packaging/csapi-push.spec | 70 +++++- src/Tizen.Messaging.Push/CoreFx.References.targets | 265 --------------------- .../Tizen.Messaging.Push.Net45.csproj | 76 ++++++ .../Tizen.Messaging.Push.Net45.project.json | 11 + .../Tizen.Messaging.Push.csproj | 170 ++++++------- .../Tizen.Messaging.Push.nuspec | 12 + .../Tizen.Messaging.Push.project.json | 12 + 8 files changed, 255 insertions(+), 368 deletions(-) create mode 100755 .gitignore delete mode 100644 src/Tizen.Messaging.Push/CoreFx.References.targets create mode 100644 src/Tizen.Messaging.Push/Tizen.Messaging.Push.Net45.csproj create mode 100644 src/Tizen.Messaging.Push/Tizen.Messaging.Push.Net45.project.json mode change 100755 => 100644 src/Tizen.Messaging.Push/Tizen.Messaging.Push.csproj create mode 100644 src/Tizen.Messaging.Push/Tizen.Messaging.Push.nuspec create mode 100644 src/Tizen.Messaging.Push/Tizen.Messaging.Push.project.json diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..46619d5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +bin/ +obj/ +*.exe +*.dll +*.csproj.user +*.lock.json +.vs/ diff --git a/packaging/csapi-push.spec b/packaging/csapi-push.spec index 1fa0d2c..4916983 100755 --- a/packaging/csapi-push.spec +++ b/packaging/csapi-push.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,8 +27,10 @@ AutoReqProv: no BuildRequires: corefx-managed-32b-ref %endif -# C# API Requires -BuildRequires: csapi-tizen +BuildRequires: dotnet-build-tools + +# C# API Requries +BuildRequires: csapi-tizen-devel %description Tizen Push API for C# @@ -40,25 +42,69 @@ cp %{SOURCE1} . %define Assemblies Tizen.Messaging.Push %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.Messaging.Push/CoreFx.References.targets b/src/Tizen.Messaging.Push/CoreFx.References.targets deleted file mode 100644 index dab29ec..0000000 --- a/src/Tizen.Messaging.Push/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.Messaging.Push/Tizen.Messaging.Push.Net45.csproj b/src/Tizen.Messaging.Push/Tizen.Messaging.Push.Net45.csproj new file mode 100644 index 0000000..6f7b07e --- /dev/null +++ b/src/Tizen.Messaging.Push/Tizen.Messaging.Push.Net45.csproj @@ -0,0 +1,76 @@ + + + + Debug + AnyCPU + {E87B20AE-B752-4E64-9517-4827AC42A33A} + Library + Properties + Tizen.Messaging + Tizen.Messaging.Push + 512 + v4.5 + + + true + full + false + bin\Debug\Net45\ + DEBUG;TRACE + prompt + 4 + false + + + pdbonly + true + bin\Release\Net45\ + TRACE + prompt + 4 + false + + + true + + + Tizen.Messaging.Push.snk + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Tizen.Messaging.Push/Tizen.Messaging.Push.Net45.project.json b/src/Tizen.Messaging.Push/Tizen.Messaging.Push.Net45.project.json new file mode 100644 index 0000000..d9af4f0 --- /dev/null +++ b/src/Tizen.Messaging.Push/Tizen.Messaging.Push.Net45.project.json @@ -0,0 +1,11 @@ +{ + "dependencies": { + "Tizen": "1.0.0" + }, + "frameworks": { + "net45": {} + }, + "runtimes": { + "win": {} + } +} diff --git a/src/Tizen.Messaging.Push/Tizen.Messaging.Push.csproj b/src/Tizen.Messaging.Push/Tizen.Messaging.Push.csproj old mode 100755 new mode 100644 index 4d2aa6c..fe1ed47 --- a/src/Tizen.Messaging.Push/Tizen.Messaging.Push.csproj +++ b/src/Tizen.Messaging.Push/Tizen.Messaging.Push.csproj @@ -1,97 +1,85 @@ - - - - - Debug - AnyCPU - {2EC5CFA1-06D5-4E84-81EC-D3A57B24B6BD} - Library - Properties - Tizen.Messaging - Tizen.Messaging.Push - v4.5 - 512 - - - - true - full - true - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - - - true - - - Tizen.Messaging.Push.snk - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - csapi-tizen - ..\..\tizen\Tizen\bin\Debug\Tizen.dll - - - csapi-tizen - ..\..\tizen\Tizen.Internals\bin\Debug\Tizen.Internals.dll - - - - - {B9AA1CB2-F72D-4A30-A33B-A20C850A38A0} - Tizen.Internals - True - - - {7659CA59-410D-41A1-9841-586E88BC78C9} - Tizen - True - - - + + + + Debug + AnyCPU + {2EC5CFA1-06D5-4E84-81EC-D3A57B24B6BD} + Library + Properties + Tizen.Messaging + Tizen.Messaging.Push + 512 + + + .NETStandard + v1.6 + .NETStandard,Version=v1.6 + false + true + $(NoWarn);1701;1702 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + true + + + Tizen.Messaging.Push.snk + + + + + + + + + + + + + + + + + + + + + - + --> + + + + <_TargetFrameworkDirectories>$(MSBuildThisFileDirectory) + <_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory) + true + + \ No newline at end of file diff --git a/src/Tizen.Messaging.Push/Tizen.Messaging.Push.nuspec b/src/Tizen.Messaging.Push/Tizen.Messaging.Push.nuspec new file mode 100644 index 0000000..7e69627 --- /dev/null +++ b/src/Tizen.Messaging.Push/Tizen.Messaging.Push.nuspec @@ -0,0 +1,12 @@ + + + + Tizen.Messaging.Push + $version$ + Tizen Developers + Push API for Tizen.Net + + + + + diff --git a/src/Tizen.Messaging.Push/Tizen.Messaging.Push.project.json b/src/Tizen.Messaging.Push/Tizen.Messaging.Push.project.json new file mode 100644 index 0000000..beb9e15 --- /dev/null +++ b/src/Tizen.Messaging.Push/Tizen.Messaging.Push.project.json @@ -0,0 +1,12 @@ +{ + "dependencies": { + "NETStandard.Library": "1.6.0", + "Tizen": "1.0.0" + }, + "frameworks": { + "netstandard1.6": {} + }, + "runtimes": { + "win": {} + } +} -- 2.7.4