Change managed build to use Nuget package.
authorpius.lee <pius.lee@samsung.com>
Fri, 21 Oct 2016 08:22:09 +0000 (17:22 +0900)
committerpius.lee <pius.lee@samsung.com>
Fri, 21 Oct 2016 08:22:09 +0000 (17:22 +0900)
Change-Id: Ib93ee9123cb406ac3e50aea5eeb51ddbed683d29

Tizen.Runtime/Tizen.CoreFX.Ref.Targets [deleted file]
Tizen.Runtime/Tizen.Runtime.Coreclr.csproj
Tizen.Runtime/Tizen.Runtime.Coreclr.project.json [new file with mode: 0644]
Tizen.Runtime/Tizen.Runtime.Mono.project.json [new file with mode: 0644]
packaging/dotnet-launcher.spec

diff --git a/Tizen.Runtime/Tizen.CoreFX.Ref.Targets b/Tizen.Runtime/Tizen.CoreFX.Ref.Targets
deleted file mode 100644 (file)
index 065f966..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-       
-       <PropertyGroup>
-               <CoreFXRefPath Condition=" '$(CoreFXRefPath)' == '' ">/opt/usr/share/tizen.net/ref</CoreFXRefPath>
-               <TizenDeviceAPIPath Condition=" '$(TizenDeviceAPIPath)' == '' ">/opt/usr/share/dotnet.tizen/framework</TizenDeviceAPIPath>
-       </PropertyGroup>
-
-       <PropertyGroup>
-               <NoCompilerStandardLib Condition=" '$(NoCompilerStandardLib)' == '' ">true</NoCompilerStandardLib>
-               <NoStdLib Condition=" '$(NoStdLib)' == '' ">true</NoStdLib>
-               <AdditionalLibPaths>$(CoreFXRefPath);$(TizenDeviceAPIPath)</AdditionalLibPaths>
-               <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
-               <!-- Temporary suppress the warning... -->
-               <NoWarn>1701, 1702</NoWarn>
-       </PropertyGroup>
-
-       <PropertyGroup>
-               <CscToolPath>$(ExternalCscDir)</CscToolPath>
-               <CscToolExe>$(ExternalCscExe)</CscToolExe>
-       </PropertyGroup>
-
-       <ItemGroup>
-               <CoreFXRefDir Include="$(CoreFXRefPath)" Condition="Exists('$(CoreFXRefPath)')"/>
-               <CoreFXRefAssemblies Include="@(CoreFXRefDir->'%(FullPath)/*.dll')" Exclude="@(CoreFXRefDir->'%(FullPath)/mscorlib.dll')"/>
-
-               <TizenDeviceAPIDir Include="$(TizenDeviceAPIPath)" Condition="Exists('$(TizenDeviceAPIPath)')"/>
-               <TizenDeviceAPIAssemblies Include="@(TizenDeviceAPIDir->'%(FullPath)/*.dll')"/>
-       </ItemGroup>
-
-       <ItemGroup>
-               <ReferencePath Include="@(CoreFXRefAssemblies->'%(Filename).dll')"/>
-               <ReferencePath Include="@(TizenDeviceAPIAssemblies->'%(Filename).dll')"/>
-       </ItemGroup>
-
-       <Target Name="LogVariables" AfterTargets="Build">
-               <Message Text="[CoreFX Reference Environment!]"/>
-               <Message Text="CscItem = %(ExternalCscPathItem.FullPath)"/>
-               <Message Text="CscPath = %(ExternalCscDirectory.FullPath)"/>
-               <Message Text="CscExe = %(ExternalCscExe.Identity)"/>
-               <Message Text="CoreFX dir = $(CoreFXRefPath)"/>
-               <Message Text="CoreFX dir Check Ok" Condition="Exists('$(CoreFXRefPath)')"/>
-               <Message Text="Tizen Device API dir = $(TizenDeviceAPIPath)"/>
-               <Message Text="Tizen Device API Check Ok" Condition="Exists('$(TizenDeviceAPIPath)')"/>
-               <Message Text="CoreFXRefDir = @(CoreFXRefDir)"/>
-               <Message Text="TizenDeviceAPIDir = @(TizenDeviceAPIDir)"/>
-               <Message Text="CoreFXRefDir.Identity = %(CoreFXRefDir.Identity)"/>
-               <Message Text="TizenDeviceAPIDir.Identity = %(TizenDeviceAPIDir.Identity)"/>
-               <Message Text="CoreFXRefAssemblies = %(CoreFXRefAssemblies.Identity)"/>
-               <Message Text="TizenDeviceAPIAssemblies = %(TizenDeviceAPIAssemblies.Identity)"/>
-       </Target>
-</Project>
index 32864ed..6bf5754 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project InitialTargets="CheckConfig" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="14.0" InitialTargets="CheckConfig" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
        
        <PropertyGroup>
                <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -8,6 +8,15 @@
                <AssemblyName>Tizen.Runtime.Coreclr</AssemblyName>
        </PropertyGroup>
 
+  <PropertyGroup>
+    <TargetFrameworkIdentifier>.NETStandard</TargetFrameworkIdentifier>
+    <TargetFrameworkVersion>v1.5</TargetFrameworkVersion>
+    <NuGetTargetMoniker>.NETStandard,Version=v1.5</NuGetTargetMoniker>
+    <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
+    <NoStdLib>true</NoStdLib>
+    <NoWarn>$(NoWarn);1701;1702</NoWarn>
+  </PropertyGroup>
+
        <PropertyGroup Condition=" '$(Configuration)' == 'Debug'">
                <DebugSymbols>true</DebugSymbols>
                <DebugType>full</DebugType>
                <Message Text="MSBuildProjectDirectory = $(MSBuildProjectDirectory)"/>
        </Target>
 
-       <Import Project="$(MSBuildProjectDirectory)/Tizen.CoreFX.Ref.Targets" />
+  <ItemGroup>
+    <None Include="Tizen.Runtime.Coreclr.project.json" />
+  </ItemGroup>
+
        <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 
+  <PropertyGroup>
+    <!-- https://github.com/dotnet/corefxlab/tree/master/samples/NetCoreSample and
+       https://docs.microsoft.com/en-us/dotnet/articles/core/tutorials/target-dotnetcore-with-msbuild
+    -->
+    <!-- We don't use any of MSBuild's resolution logic for resolving the framework, so just set these two
+       properties to any folder that exists to skip the GetReferenceAssemblyPaths task (not target) and
+       to prevent it from outputting a warning (MSB3644).
+    -->
+    <_TargetFrameworkDirectories>$(MSBuildThisFileDirectory)</_TargetFrameworkDirectories>
+    <_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory)</_FullFrameworkReferenceAssemblyPaths>
+    <AutoUnifyAssemblyReferences>true</AutoUnifyAssemblyReferences>
+  </PropertyGroup>
+
        <Target Name="BeforeCompile">
                <ItemGroup>
                        <AssemblyAttributes Include="DefaultConfigAttribute" Condition=" $(PreloadPath) != '' ">
diff --git a/Tizen.Runtime/Tizen.Runtime.Coreclr.project.json b/Tizen.Runtime/Tizen.Runtime.Coreclr.project.json
new file mode 100644 (file)
index 0000000..01fa069
--- /dev/null
@@ -0,0 +1,10 @@
+{
+       "dependencies": {
+               "NETStandard.Library": "1.6.0",
+               "System.Runtime.Loader": "4.0.0"
+       },  
+       "frameworks": {
+               "netstandard1.5": {}
+       }
+}
+
diff --git a/Tizen.Runtime/Tizen.Runtime.Mono.project.json b/Tizen.Runtime/Tizen.Runtime.Mono.project.json
new file mode 100644 (file)
index 0000000..710ecfa
--- /dev/null
@@ -0,0 +1,11 @@
+{
+       "dependencies": {
+       },  
+       "frameworks": {
+               "net45": {}
+       },  
+       "runtimes": {
+               "win": {}
+       }
+}
+
index 2891a2b..2c228c0 100644 (file)
@@ -16,10 +16,10 @@ BuildRequires: pkgconfig(dlog)
 BuildRequires: pkgconfig(ecore)
 BuildRequires: pkgconfig(launchpad)
 BuildRequires: aul-devel
-BuildRequires: corefx-managed-32b-ref
 BuildRequires: mono-compiler
 BuildRequires: mono-devel 
-BuildRequires: csapi-tizen 
+BuildRequires: csapi-tizen-nuget 
+BuildRequires: dotnet-build-tools
 Requires: aul
 
 Requires(post): /sbin/ldconfig
@@ -63,16 +63,18 @@ cmake \
 
 make %{?jobs:-j%jobs} VERBOSE=1
 
+nuget restore Tizen.Runtime/Tizen.Runtime.Coreclr.project.json
+
 xbuild \
        /p:Configuration=%{_buildmode} \
        /p:PreloadPath=%{_preload_dir} \
-       /p:TizenDeviceAPIPath=%{_device_api_dir} \
        Tizen.Runtime/Tizen.Runtime.Coreclr.csproj
 
+nuget restore Tizen.Runtime/Tizen.Runtime.Mono.project.json
+
 xbuild \
        /p:Configuration=%{_buildmode} \
        /p:PreloadPath=%{_preload_dir} \
-       /p:TizenDeviceAPIPath=%{_device_api_dir} \
        Tizen.Runtime/Tizen.Runtime.Mono.csproj
 
 %install