From b625933bf8a5db0888609c48b1da8dddc0b07939 Mon Sep 17 00:00:00 2001 From: "manish.r" Date: Mon, 4 Jul 2016 16:21:36 +0530 Subject: [PATCH] Updating build system to xbuild Change-Id: Iad69ef8f56f76014d2f1a488345b758251defd14 Signed-off-by: manish.r --- packaging/csapi-push.spec | 33 ++----- .../Tizen.Messaging.Push}/Interop/Interop.Glib.cs | 0 .../Tizen.Messaging.Push}/Interop/Interop.Libc.cs | 0 .../Interop/Interop.Libraries.cs | 0 .../Tizen.Messaging.Push}/Interop/Interop.Push.cs | 0 .../Properties/AssemblyInfo.cs | 72 ++++++++-------- .../Tizen.Messaging.Push.csproj | 96 +++++++++++++++++++++ .../Tizen.Messaging.Push}/Tizen.Messaging.Push.snk | Bin .../Tizen.Messaging.Push}/Push.cs | 0 .../PushConnectionStateEventArgs.cs | 0 .../Tizen.Messaging.Push}/PushExceptionFactory.cs | 0 .../Tizen.Messaging.Push}/PushImpl.cs | 10 +-- .../Tizen.Messaging.Push}/PushMessageEventArgs.cs | 0 .../Tizen.Messaging.Push}/ServerResponse.cs | 0 .../Tizen.Messaging.Push/Tizen.Messaging.csproj~ | 20 +++-- 15 files changed, 155 insertions(+), 76 deletions(-) rename {Tizen.Messaging => src/Tizen.Messaging.Push}/Interop/Interop.Glib.cs (100%) rename {Tizen.Messaging => src/Tizen.Messaging.Push}/Interop/Interop.Libc.cs (100%) rename {Tizen.Messaging => src/Tizen.Messaging.Push}/Interop/Interop.Libraries.cs (100%) rename {Tizen.Messaging => src/Tizen.Messaging.Push}/Interop/Interop.Push.cs (100%) rename {Tizen.Messaging => src/Tizen.Messaging.Push}/Properties/AssemblyInfo.cs (97%) create mode 100755 src/Tizen.Messaging.Push/Tizen.Messaging.Push.csproj rename {Tizen.Messaging => src/Tizen.Messaging.Push}/Tizen.Messaging.Push.snk (100%) rename {Tizen.Messaging/Push => src/Tizen.Messaging.Push/Tizen.Messaging.Push}/Push.cs (100%) rename {Tizen.Messaging/Push => src/Tizen.Messaging.Push/Tizen.Messaging.Push}/PushConnectionStateEventArgs.cs (100%) rename {Tizen.Messaging/Push => src/Tizen.Messaging.Push/Tizen.Messaging.Push}/PushExceptionFactory.cs (100%) rename {Tizen.Messaging/Push => src/Tizen.Messaging.Push/Tizen.Messaging.Push}/PushImpl.cs (98%) rename {Tizen.Messaging/Push => src/Tizen.Messaging.Push/Tizen.Messaging.Push}/PushMessageEventArgs.cs (100%) rename {Tizen.Messaging/Push => src/Tizen.Messaging.Push/Tizen.Messaging.Push}/ServerResponse.cs (100%) rename Tizen.Messaging/Tizen.Messaging.csproj => src/Tizen.Messaging.Push/Tizen.Messaging.csproj~ (87%) diff --git a/packaging/csapi-push.spec b/packaging/csapi-push.spec index 79476a3..e01ac0f 100755 --- a/packaging/csapi-push.spec +++ b/packaging/csapi-push.spec @@ -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 diff --git a/Tizen.Messaging/Interop/Interop.Glib.cs b/src/Tizen.Messaging.Push/Interop/Interop.Glib.cs similarity index 100% rename from Tizen.Messaging/Interop/Interop.Glib.cs rename to src/Tizen.Messaging.Push/Interop/Interop.Glib.cs diff --git a/Tizen.Messaging/Interop/Interop.Libc.cs b/src/Tizen.Messaging.Push/Interop/Interop.Libc.cs similarity index 100% rename from Tizen.Messaging/Interop/Interop.Libc.cs rename to src/Tizen.Messaging.Push/Interop/Interop.Libc.cs diff --git a/Tizen.Messaging/Interop/Interop.Libraries.cs b/src/Tizen.Messaging.Push/Interop/Interop.Libraries.cs similarity index 100% rename from Tizen.Messaging/Interop/Interop.Libraries.cs rename to src/Tizen.Messaging.Push/Interop/Interop.Libraries.cs diff --git a/Tizen.Messaging/Interop/Interop.Push.cs b/src/Tizen.Messaging.Push/Interop/Interop.Push.cs similarity index 100% rename from Tizen.Messaging/Interop/Interop.Push.cs rename to src/Tizen.Messaging.Push/Interop/Interop.Push.cs diff --git a/Tizen.Messaging/Properties/AssemblyInfo.cs b/src/Tizen.Messaging.Push/Properties/AssemblyInfo.cs similarity index 97% rename from Tizen.Messaging/Properties/AssemblyInfo.cs rename to src/Tizen.Messaging.Push/Properties/AssemblyInfo.cs index 5e5fe4d..00669a4 100755 --- a/Tizen.Messaging/Properties/AssemblyInfo.cs +++ b/src/Tizen.Messaging.Push/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -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")] +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/src/Tizen.Messaging.Push/Tizen.Messaging.Push.csproj b/src/Tizen.Messaging.Push/Tizen.Messaging.Push.csproj new file mode 100755 index 0000000..49e94fd --- /dev/null +++ b/src/Tizen.Messaging.Push/Tizen.Messaging.Push.csproj @@ -0,0 +1,96 @@ + + + + + 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 + + + + + diff --git a/Tizen.Messaging/Tizen.Messaging.Push.snk b/src/Tizen.Messaging.Push/Tizen.Messaging.Push.snk similarity index 100% rename from Tizen.Messaging/Tizen.Messaging.Push.snk rename to src/Tizen.Messaging.Push/Tizen.Messaging.Push.snk diff --git a/Tizen.Messaging/Push/Push.cs b/src/Tizen.Messaging.Push/Tizen.Messaging.Push/Push.cs similarity index 100% rename from Tizen.Messaging/Push/Push.cs rename to src/Tizen.Messaging.Push/Tizen.Messaging.Push/Push.cs diff --git a/Tizen.Messaging/Push/PushConnectionStateEventArgs.cs b/src/Tizen.Messaging.Push/Tizen.Messaging.Push/PushConnectionStateEventArgs.cs similarity index 100% rename from Tizen.Messaging/Push/PushConnectionStateEventArgs.cs rename to src/Tizen.Messaging.Push/Tizen.Messaging.Push/PushConnectionStateEventArgs.cs diff --git a/Tizen.Messaging/Push/PushExceptionFactory.cs b/src/Tizen.Messaging.Push/Tizen.Messaging.Push/PushExceptionFactory.cs similarity index 100% rename from Tizen.Messaging/Push/PushExceptionFactory.cs rename to src/Tizen.Messaging.Push/Tizen.Messaging.Push/PushExceptionFactory.cs diff --git a/Tizen.Messaging/Push/PushImpl.cs b/src/Tizen.Messaging.Push/Tizen.Messaging.Push/PushImpl.cs similarity index 98% rename from Tizen.Messaging/Push/PushImpl.cs rename to src/Tizen.Messaging.Push/Tizen.Messaging.Push/PushImpl.cs index 5fb313b..ed2f9f9 100755 --- a/Tizen.Messaging/Push/PushImpl.cs +++ b/src/Tizen.Messaging.Push/Tizen.Messaging.Push/PushImpl.cs @@ -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); diff --git a/Tizen.Messaging/Push/PushMessageEventArgs.cs b/src/Tizen.Messaging.Push/Tizen.Messaging.Push/PushMessageEventArgs.cs similarity index 100% rename from Tizen.Messaging/Push/PushMessageEventArgs.cs rename to src/Tizen.Messaging.Push/Tizen.Messaging.Push/PushMessageEventArgs.cs diff --git a/Tizen.Messaging/Push/ServerResponse.cs b/src/Tizen.Messaging.Push/Tizen.Messaging.Push/ServerResponse.cs similarity index 100% rename from Tizen.Messaging/Push/ServerResponse.cs rename to src/Tizen.Messaging.Push/Tizen.Messaging.Push/ServerResponse.cs diff --git a/Tizen.Messaging/Tizen.Messaging.csproj b/src/Tizen.Messaging.Push/Tizen.Messaging.csproj~ similarity index 87% rename from Tizen.Messaging/Tizen.Messaging.csproj rename to src/Tizen.Messaging.Push/Tizen.Messaging.csproj~ index d903562..54acd85 100755 --- a/Tizen.Messaging/Tizen.Messaging.csproj +++ b/src/Tizen.Messaging.Push/Tizen.Messaging.csproj~ @@ -8,7 +8,7 @@ Library Properties Tizen.Messaging - Tizen.Messaging + Tizen.Messaging.Push v4.5 512 @@ -46,12 +46,6 @@ - - ..\..\pushtest\lib\Tizen.dll - - - ..\..\pushtest\lib\Tizen.Internals.dll - @@ -71,6 +65,16 @@ + + + {b9aa1cb2-f72d-4a30-a33b-a20c850a38a0} + Tizen.Internals + + + {7659ca59-410d-41a1-9841-586e88bc78c9} + Tizen + + - \ No newline at end of file + -- 2.7.4