From 715058b67f3ba5b250e1a783a1282207f21b9094 Mon Sep 17 00:00:00 2001 From: WonYoung Choi Date: Sat, 3 Sep 2016 17:36:00 +0900 Subject: [PATCH] Fix project files to support netstandard 1.6 Change-Id: I2dcf12483c7d99023f1233bf61ece51392c20ecc Signed-off-by: WonYoung Choi --- .gitignore | 217 +---------------- .../CoreFx.References.targets | 265 --------------------- .../Tizen.System.SystemSettings.Net45.csproj | 69 ++++++ .../Tizen.System.SystemSettings.Net45.project.json | 11 + .../Tizen.System.SystemSettings.csproj | 48 ++-- .../Tizen.System.SystemSettings.nuspec | 12 + .../Tizen.System.SystemSettings.project.json | 12 + packaging/csapi-system-settings.spec | 68 +++++- 8 files changed, 191 insertions(+), 511 deletions(-) delete mode 100644 Tizen.System.SystemSettings/CoreFx.References.targets create mode 100644 Tizen.System.SystemSettings/Tizen.System.SystemSettings.Net45.csproj create mode 100644 Tizen.System.SystemSettings/Tizen.System.SystemSettings.Net45.project.json create mode 100644 Tizen.System.SystemSettings/Tizen.System.SystemSettings.nuspec create mode 100644 Tizen.System.SystemSettings/Tizen.System.SystemSettings.project.json diff --git a/.gitignore b/.gitignore index b06e864..46619d5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,212 +1,7 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -# User-specific files -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -build/ -bld/ -[Bb]in/ -[Oo]bj/ - -# Visual Studio 2015 cache/options directory +bin/ +obj/ +*.exe +*.dll +*.csproj.user +*.lock.json .vs/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# DNX -project.lock.json -artifacts/ - -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opensdf -*.sdf -*.cachefile - -# Visual Studio profiler -*.psess -*.vsp -*.vspx - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding add-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# NCrunch -_NCrunch_* -.*crunch*.local.xml - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -## TODO: Comment the next line if you want to checkin your -## web deploy settings but do note that will include unencrypted -## passwords -#*.pubxml - -*.publishproj - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/packages/* -# except build/, which is used as an MSBuild target. -!**/packages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config - -# Windows Azure Build Output -csx/ -*.build.csdef - -# Windows Store app package directory -AppPackages/ - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ - -# Others -ClientBin/ -[Ss]tyle[Cc]op.* -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.pfx -*.publishsettings -node_modules/ -orleans.codegen.cs - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm - -# SQL Server files -*.mdf -*.ldf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings - -# Microsoft Fakes -FakesAssemblies/ - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# LightSwitch generated files -GeneratedArtifacts/ -_Pvt_Extensions/ -ModelManifest.xml diff --git a/Tizen.System.SystemSettings/CoreFx.References.targets b/Tizen.System.SystemSettings/CoreFx.References.targets deleted file mode 100644 index dab29ec..0000000 --- a/Tizen.System.SystemSettings/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.System.SystemSettings/Tizen.System.SystemSettings.Net45.csproj b/Tizen.System.SystemSettings/Tizen.System.SystemSettings.Net45.csproj new file mode 100644 index 0000000..1fd8fee --- /dev/null +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings.Net45.csproj @@ -0,0 +1,69 @@ + + + + Debug + AnyCPU + {9F66DBF9-243A-44C9-953B-28F01DD743DE} + Library + Properties + Tizen.System.SystemSettings + Tizen.System.SystemSettings + 512 + v4.5 + + + true + full + false + bin\Debug\Net45\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\Net45\ + TRACE + prompt + 4 + + + true + + + Tizen.System.SystemSettings.snk + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings.Net45.project.json b/Tizen.System.SystemSettings/Tizen.System.SystemSettings.Net45.project.json new file mode 100644 index 0000000..d9af4f0 --- /dev/null +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings.Net45.project.json @@ -0,0 +1,11 @@ +{ + "dependencies": { + "Tizen": "1.0.0" + }, + "frameworks": { + "net45": {} + }, + "runtimes": { + "win": {} + } +} diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings.csproj b/Tizen.System.SystemSettings/Tizen.System.SystemSettings.csproj index 35ca942..d1e7e4d 100644 --- a/Tizen.System.SystemSettings/Tizen.System.SystemSettings.csproj +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings.csproj @@ -1,6 +1,5 @@  - - + Debug AnyCPU @@ -9,9 +8,15 @@ Properties Tizen.System.SystemSettings Tizen.System.SystemSettings - v4.5 512 - + + + .NETStandard + v1.6 + .NETStandard,Version=v1.6 + false + true + $(NoWarn);1701;1702 true @@ -36,25 +41,6 @@ Tizen.System.SystemSettings.snk - - - - - - - - - - - - - - ..\..\tizen\Tizen\bin\Debug\Tizen.dll - - - ..\..\tizen\Tizen.Internals\bin\Debug\Tizen.Internals.dll - - @@ -64,9 +50,11 @@ + + - + + + + + <_TargetFrameworkDirectories>$(MSBuildThisFileDirectory) + <_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory) + true + \ No newline at end of file diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings.nuspec b/Tizen.System.SystemSettings/Tizen.System.SystemSettings.nuspec new file mode 100644 index 0000000..e95b7c7 --- /dev/null +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings.nuspec @@ -0,0 +1,12 @@ + + + + Tizen.System.SystemSettings + $version$ + Tizen Developers + System Settings API for Tizen.Net + + + + + diff --git a/Tizen.System.SystemSettings/Tizen.System.SystemSettings.project.json b/Tizen.System.SystemSettings/Tizen.System.SystemSettings.project.json new file mode 100644 index 0000000..beb9e15 --- /dev/null +++ b/Tizen.System.SystemSettings/Tizen.System.SystemSettings.project.json @@ -0,0 +1,12 @@ +{ + "dependencies": { + "NETStandard.Library": "1.6.0", + "Tizen": "1.0.0" + }, + "frameworks": { + "netstandard1.6": {} + }, + "runtimes": { + "win": {} + } +} diff --git a/packaging/csapi-system-settings.spec b/packaging/csapi-system-settings.spec index 4b3faf5..3ed167e 100644 --- a/packaging/csapi-system-settings.spec +++ b/packaging/csapi-system-settings.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 +BuildRequires: dotnet-build-tools + # C# API Requires -BuildRequires: csapi-tizen +BuildRequires: csapi-tizen-devel %description Tizen System Settings API for C# @@ -40,25 +42,69 @@ cp %{SOURCE1} . %define Assemblies Tizen.System.SystemSettings %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 -- 2.7.4