Updating build system to xbuild
authormanish.r <manish.r@samsung.com>
Mon, 4 Jul 2016 10:51:36 +0000 (16:21 +0530)
committermanish.r <manish.r@samsung.com>
Mon, 4 Jul 2016 10:54:57 +0000 (16:24 +0530)
Change-Id: Iad69ef8f56f76014d2f1a488345b758251defd14
Signed-off-by: manish.r <manish.r@samsung.com>
15 files changed:
Tizen.Messaging.Push/Interop/Interop.Glib.cs [moved from Tizen.Messaging/Interop/Interop.Glib.cs with 100% similarity]
Tizen.Messaging.Push/Interop/Interop.Libc.cs [moved from Tizen.Messaging/Interop/Interop.Libc.cs with 100% similarity]
Tizen.Messaging.Push/Interop/Interop.Libraries.cs [moved from Tizen.Messaging/Interop/Interop.Libraries.cs with 100% similarity]
Tizen.Messaging.Push/Interop/Interop.Push.cs [moved from Tizen.Messaging/Interop/Interop.Push.cs with 100% similarity]
Tizen.Messaging.Push/Properties/AssemblyInfo.cs [moved from Tizen.Messaging/Properties/AssemblyInfo.cs with 97% similarity]
Tizen.Messaging.Push/Tizen.Messaging.Push.csproj [new file with mode: 0755]
Tizen.Messaging.Push/Tizen.Messaging.Push.snk [moved from Tizen.Messaging/Tizen.Messaging.Push.snk with 100% similarity]
Tizen.Messaging.Push/Tizen.Messaging.Push/Push.cs [moved from Tizen.Messaging/Push/Push.cs with 100% similarity]
Tizen.Messaging.Push/Tizen.Messaging.Push/PushConnectionStateEventArgs.cs [moved from Tizen.Messaging/Push/PushConnectionStateEventArgs.cs with 100% similarity]
Tizen.Messaging.Push/Tizen.Messaging.Push/PushExceptionFactory.cs [moved from Tizen.Messaging/Push/PushExceptionFactory.cs with 100% similarity]
Tizen.Messaging.Push/Tizen.Messaging.Push/PushImpl.cs [moved from Tizen.Messaging/Push/PushImpl.cs with 98% similarity]
Tizen.Messaging.Push/Tizen.Messaging.Push/PushMessageEventArgs.cs [moved from Tizen.Messaging/Push/PushMessageEventArgs.cs with 100% similarity]
Tizen.Messaging.Push/Tizen.Messaging.Push/ServerResponse.cs [moved from Tizen.Messaging/Push/ServerResponse.cs with 100% similarity]
Tizen.Messaging.Push/Tizen.Messaging.csproj~ [moved from Tizen.Messaging/Tizen.Messaging.csproj with 87% similarity]
packaging/csapi-push.spec

similarity index 97%
rename from Tizen.Messaging/Properties/AssemblyInfo.cs
rename to Tizen.Messaging.Push/Properties/AssemblyInfo.cs
index 5e5fe4d..00669a4 100755 (executable)
@@ -1,36 +1,36 @@
-using System.Reflection;\r
-using System.Runtime.CompilerServices;\r
-using System.Runtime.InteropServices;\r
-\r
-// General Information about an assembly is controlled through the following \r
-// set of attributes. Change these attribute values to modify the information\r
-// associated with an assembly.\r
-[assembly: AssemblyTitle("Tizen.Messaging")]\r
-[assembly: AssemblyDescription("")]\r
-[assembly: AssemblyConfiguration("")]\r
-[assembly: AssemblyCompany("")]\r
-[assembly: AssemblyProduct("Tizen.Messaging")]\r
-[assembly: AssemblyCopyright("Copyright ©  2016")]\r
-[assembly: AssemblyTrademark("")]\r
-[assembly: AssemblyCulture("")]\r
-\r
-// Setting ComVisible to false makes the types in this assembly not visible \r
-// to COM components.  If you need to access a type in this assembly from \r
-// COM, set the ComVisible attribute to true on that type.\r
-[assembly: ComVisible(false)]\r
-\r
-// The following GUID is for the ID of the typelib if this project is exposed to COM\r
-[assembly: Guid("4f3ffd8c-4a03-4bc1-83d4-358b0eb6717c")]\r
-\r
-// Version information for an assembly consists of the following four values:\r
-//\r
-//      Major Version\r
-//      Minor Version \r
-//      Build Number\r
-//      Revision\r
-//\r
-// You can specify all the values or you can default the Build and Revision Numbers \r
-// by using the '*' as shown below:\r
-// [assembly: AssemblyVersion("1.0.*")]\r
-[assembly: AssemblyVersion("1.0.0.0")]\r
-[assembly: AssemblyFileVersion("1.0.0.0")]\r
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Tizen.Messaging")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Tizen.Messaging")]
+[assembly: AssemblyCopyright("Copyright ©  2016")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("4f3ffd8c-4a03-4bc1-83d4-358b0eb6717c")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Tizen.Messaging.Push/Tizen.Messaging.Push.csproj b/Tizen.Messaging.Push/Tizen.Messaging.Push.csproj
new file mode 100755 (executable)
index 0000000..49e94fd
--- /dev/null
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{2EC5CFA1-06D5-4E84-81EC-D3A57B24B6BD}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Tizen.Messaging</RootNamespace>
+    <AssemblyName>Tizen.Messaging.Push</AssemblyName>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <TargetFrameworkProfile />
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>Tizen.Messaging.Push.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Interop\Interop.Glib.cs" />
+    <Compile Include="Interop\Interop.Libc.cs" />
+    <Compile Include="Interop\Interop.Libraries.cs" />
+    <Compile Include="Interop\Interop.Push.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Tizen.Messaging.Push\Push.cs" />
+    <Compile Include="Tizen.Messaging.Push\PushConnectionStateEventArgs.cs" />
+    <Compile Include="Tizen.Messaging.Push\PushExceptionFactory.cs" />
+    <Compile Include="Tizen.Messaging.Push\PushImpl.cs" />
+    <Compile Include="Tizen.Messaging.Push\PushMessageEventArgs.cs" />
+    <Compile Include="Tizen.Messaging.Push\ServerResponse.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Tizen.Messaging.Push.snk" />
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Include="Tizen">
+      <PkgConfig>csapi-tizen</PkgConfig>
+      <HintPath>..\..\tizen\Tizen\bin\Debug\Tizen.dll</HintPath>
+    </Reference>
+    <Reference Include="Tizen.Internals">
+      <PkgConfig>csapi-tizen</PkgConfig>
+      <HintPath>..\..\tizen\Tizen.Internals\bin\Debug\Tizen.Internals.dll</HintPath>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\tizen\Tizen.Internals\Tizen.Internals.csproj">
+      <Project>{B9AA1CB2-F72D-4A30-A33B-A20C850A38A0}</Project>
+      <Name>Tizen.Internals</Name>
+      <Private>True</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\tizen\Tizen\Tizen.csproj">
+      <Project>{7659CA59-410D-41A1-9841-586E88BC78C9}</Project>
+      <Name>Tizen</Name>
+      <Private>True</Private>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
similarity index 98%
rename from Tizen.Messaging/Push/PushImpl.cs
rename to Tizen.Messaging.Push/Tizen.Messaging.Push/PushImpl.cs
index 5fb313b..ed2f9f9 100755 (executable)
@@ -53,7 +53,7 @@ namespace Tizen.Messaging.Push
                 }
                else
                {
-                       ob.AppData = "";
+                   ob.AppData = "";
                }
                 string message;
                 result = Interop.Push.GetNotificationMessage(notification, out message);
@@ -63,7 +63,7 @@ namespace Tizen.Messaging.Push
                 }
                else
                {
-                       ob.Message = "";
+                   ob.Message = "";
                }
                 string sender;
                 result = Interop.Push.GetNotificationSender(notification, out sender);
@@ -73,7 +73,7 @@ namespace Tizen.Messaging.Push
                 }
                else
                {
-                       ob.Sender = "";
+                   ob.Sender = "";
                }
                 string sessioninfo;
                 result = Interop.Push.GetNotificationSessionInfo(notification, out sessioninfo);
@@ -83,7 +83,7 @@ namespace Tizen.Messaging.Push
                 }
                else
                {
-                       ob.SessionInfo = "";
+                   ob.SessionInfo = "";
                }
                 string requestid;
                 result = Interop.Push.GetNotificationRequestId(notification, out requestid);
@@ -93,7 +93,7 @@ namespace Tizen.Messaging.Push
                 }
                else
                {
-                       ob.RequestId = "";
+                   ob.RequestId = "";
                }
                 int time;
                 result = Interop.Push.GetNotificationTime(notification, out time);
similarity index 87%
rename from Tizen.Messaging/Tizen.Messaging.csproj
rename to Tizen.Messaging.Push/Tizen.Messaging.csproj~
index d903562..54acd85 100755 (executable)
@@ -8,7 +8,7 @@
     <OutputType>Library</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>Tizen.Messaging</RootNamespace>
-    <AssemblyName>Tizen.Messaging</AssemblyName>
+    <AssemblyName>Tizen.Messaging.Push</AssemblyName>
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <TargetFrameworkProfile />
     <Reference Include="Microsoft.CSharp" />
     <Reference Include="System.Data" />
     <Reference Include="System.Xml" />
-    <Reference Include="Tizen">
-      <HintPath>..\..\pushtest\lib\Tizen.dll</HintPath>
-    </Reference>
-    <Reference Include="Tizen.Internals">
-      <HintPath>..\..\pushtest\lib\Tizen.Internals.dll</HintPath>
-    </Reference>
   </ItemGroup>
   <ItemGroup>
     <Compile Include="Interop\Interop.Glib.cs" />
   <ItemGroup>
     <None Include="Tizen.Messaging.Push.snk" />
   </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\tizen\Tizen.Internals\Tizen.Internals.csproj">
+      <Project>{b9aa1cb2-f72d-4a30-a33b-a20c850a38a0}</Project>
+      <Name>Tizen.Internals</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\tizen\Tizen\Tizen.csproj">
+      <Project>{7659ca59-410d-41a1-9841-586e88bc78c9}</Project>
+      <Name>Tizen</Name>
+    </ProjectReference>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
@@ -79,4 +83,4 @@
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>
index 79476a3..e01ac0f 100755 (executable)
@@ -1,5 +1,4 @@
-%define dllpath %{_libdir}/mono/tizen
-%define dllname Tizen.Messaging.Push.dll
+%define BUILDCONF Debug
 
 Name:       csapi-push
 Summary:    Tizen Push API for C#
@@ -12,15 +11,8 @@ Source0:    %{name}-%{version}.tar.gz
 Source1:    %{name}.manifest
 Source2:    %{name}.pc.in
 
-# TODO: replace mono-compiler, mono-devel to mcs, mono-shlib-cop
 BuildRequires: mono-compiler
 BuildRequires: mono-devel
-# TODO: replace mono-core to gacutil.
-#       mono-core should provide the symbol 'gacutil'
-Requires(post): mono-core
-Requires(postun): mono-core
-
-# P/Invoke Dependencies
 BuildRequires: pkgconfig(glib-2.0)
 BuildRequires: pkgconfig(csapi-tizen)
 BuildRequires: libpush
@@ -44,35 +36,22 @@ cp %{SOURCE1} .
 
 %build
 # build dll
-mcs -target:library -out:%{dllname} -keyfile:Tizen.Messaging/Tizen.Messaging.Push.snk -pkg:'csapi-tizen'\
-  Tizen.Messaging/Properties/AssemblyInfo.cs \
-  Tizen.Messaging/Interop/*.cs \
-  Tizen.Messaging/Push/*.cs
-
-# check p/invoke
-if [ -x %{dllname} ]; then
-  RET=`mono-shlib-cop %{dllname}`; \
-  CNT=`echo $RET | grep -E "^error:" | wc -l`; \
-  if [ $CNT -gt 0 ]; then exit 1; fi
-fi
+xbuild Tizen.Messaging.Push/Tizen.Messaging.Push.csproj /p:Configuration=%{BUILDCONF}
 
 %install
-# copy dll
-mkdir -p %{buildroot}%{dllpath}
-install -p -m 644 %{dllname} %{buildroot}%{dllpath}
+gacutil -i Tizen.Messaging.Push/bin/%{BUILDCONF}/Tizen.Messaging.Push.dll -root "%{buildroot}%{_libdir}" -package tizen
 
 # generate pkgconfig
+%define pc_libs %{_libdir}/mono/tizen/Tizen.Messaging.Push.dll
 mkdir -p %{buildroot}%{_libdir}/pkgconfig
 sed -e "s#@version@#%{version}#g" \
     -e "s#@dllpath@#%{dllpath}#g" \
     -e "s#@dllname@#%{dllname}#g" \
     %{SOURCE2} > %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
 
-%post
-gacutil -i %{dllpath}/%{dllname}
-
 %files
-%{dllpath}/%{dllname}
+%manifest %{name}.manifest
+%{_libdir}/mono/
 
 %files devel
 %{_libdir}/pkgconfig/%{name}.pc