git rm -fr src
git rm -fr pkg
git rm -fr build
+git rm -fr tools
git checkout $VERSION_VCS -- src
git checkout $VERSION_VCS -- pkg
git checkout $VERSION_VCS -- build
+git checkout $VERSION_VCS -- tools
git checkout $VERSION_VCS -- build.sh
git commit -m "Release $VERSION_STRING"
# Properties
OUTDIR=$SCRIPT_DIR/Artifacts
-
-
+NUGET_CMD="mono $SCRIPT_DIR/tools/NuGet.exe"
usage() {
echo "Usage: $0 [options] [args]"
echo " -b, --build [module] Build a module"
echo " -f, --full Build all modules in src/ directory. The module should be added in pkg/Tizen.NET.Private.sln"
echo " -d, --dummy Build dummy modules"
+ echo " -p, --pack Make nuget packages"
echo " -c, --clean Clean all artifacts"
}
cmd_full_build() {
dotnet build $SCRIPT_DIR/pkg/Tizen.NET.Private.sln --configuration=Release --output=$OUTDIR/bin
- nuget pack $SCRIPT_DIR/pkg/Tizen.NET.Private.nuspec -Symbols -NoPackageAnalysis -BasePath $OUTDIR -OutputDirectory $OUTDIR
- nuget pack $SCRIPT_DIR/pkg/Tizen.NET.nuspec -Symbols -NoPackageAnalysis -BasePath $OUTDIR -OutputDirectory $OUTDIR
+}
+
+cmd_pack() {
+ VERSION_FILE=$OUTDIR/Version.txt
+ if [ -f $VERSION_FILE ]; then
+ NUGET_VERSION_PREFIX=$(cat $VERSION_FILE | grep Prefix | cut -d: -f2 | sed 's/\r$//')
+ NUGET_VERSION_SUFFIX=$(cat $VERSION_FILE | grep Suffix | cut -d: -f2 | sed 's/\r$//')
+ NUGET_VERSION_OPT="-Version $NUGET_VERSION_PREFIX-$NUGET_VERSION_SUFFIX"
+ fi
+ $NUGET_CMD pack $SCRIPT_DIR/pkg/Tizen.NET.Private.nuspec -Symbols -NoPackageAnalysis $NUGET_VERSION_OPT -BasePath $OUTDIR -OutputDirectory $OUTDIR
+ $NUGET_CMD pack $SCRIPT_DIR/pkg/Tizen.NET.nuspec -Symbols -NoPackageAnalysis $NUGET_VERSION_OPT -BasePath $OUTDIR -OutputDirectory $OUTDIR
}
cmd_dummy_build() {
dotnet build $SCRIPT_DIR/pkg/Tizen.NET.Dummy.csproj --configuration=Release
}
-OPTS=`getopt -o hcbfd --long help,clean,build,full,dummy -n 'build' -- "$@"`
+OPTS=`getopt -o hcbfpd --long help,clean,build,full,pack,dummy -n 'build' -- "$@"`
if [ $? != 0 ] ; then echo "Failed parsing options." >&2 ; usage; exit 1 ; fi
eval set -- "$OPTS"
FLAG_BUILD=false
FLAG_CLEAN=false
FLAG_DUMMY=false
+FLAG_PACK=false
while true; do
case "$1" in
-b|--build) FLAG_BUILD=true; shift ;;
-f|--full) FLAG_FULL=true; shift ;;
-d|--dummy) FLAG_DUMMY=true; shift ;;
+ -p|--pack) FLAG_PACK=true; shift ;;
-c|--clean) FLAG_CLEAN=true; shift ;;
--) shift; break ;;
*) break ;;
esac
done
-if $FLAG_HELP; then usage; exit 1; fi
-if $FLAG_CLEAN; then cmd_clean; exit 1; fi
-if $FLAG_FULL; then cmd_full_build; exit 1; fi
-if $FLAG_BUILD; then cmd_build $@; exit 1; fi
-if $FLAG_DUMMY; then cmd_dummy_build; exit 1; fi
+if $FLAG_HELP; then usage; exit 0; fi
+if $FLAG_CLEAN; then cmd_clean; exit 0; fi
+if $FLAG_FULL; then cmd_full_build; exit 0; fi
+if $FLAG_BUILD; then cmd_build $@; exit 0; fi
+if $FLAG_PACK; then cmd_pack $@; exit 0; fi
+if $FLAG_DUMMY; then cmd_dummy_build; exit 0; fi
-usage;
\ No newline at end of file
+usage;
%define DOTNET_ASSEMBLY_RES_PATH %{DOTNET_ASSEMBLY_PATH}/res
%define DOTNET_NUGET_SOURCE /nuget
+# If tizenfx_use_prebuilt is 1, use prebuilt binaries instead of building source at gbs build.
+# Default value is 1, if want to build source at gbs build, set tizenfx_use_prebuilt to 0.
+%define _tizenfx_use_prebuilt %{?tizenfx_use_prebuilt:%{tizenfx_use_prebuilt}}%{!?tizenfx_use_prebuilt:1}
+%define _tizenfx_bin_path Artifacts
+
Name: csapi-tizenfx
Summary: Assemblies of Tizen .NET
Version: 4.0.0.97
Source0: %{name}-%{version}.tar.gz
Source1: %{name}.manifest
+BuildRequires: dotnet-build-tools
+
BuildArch: noarch
AutoReqProv: no
cp %{SOURCE1} .
%build
-./scripts/filelist.sh common > common.filelist
-./scripts/filelist.sh mobile > mobile.filelist
-./scripts/filelist.sh mobile-emul > mobile-emul.filelist
-./scripts/filelist.sh tv > tv.filelist
-./scripts/filelist.sh ivi > ivi.filelist
-./scripts/filelist.sh wearable > wearable.filelist
+
+GetFileList() {
+ PROFILE=$1
+ cat pkg/PlatformFileList.txt | grep -E "#$PROFILE[[:space:]]|#$PROFILE$" | cut -d# -f1 | sed "s#^#%{DOTNET_ASSEMBLY_PATH}/#"
+}
+
+GetFileList common > common.filelist
+GetFileList mobile > mobile.filelist
+GetFileList mobile-emul > mobile-emul.filelist
+GetFileList tv > tv.filelist
+GetFileList ivi > ivi.filelist
+GetFileList wearable > wearable.filelist
+
+%if ! %{_tizenfx_use_prebuilt}
+ rm -fr %{_tizenfx_bin_path}/bin
+ rm -f %{_tizenfx_bin_path}/*.nupkg
+ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
+ ./build.sh --full
+ ./build.sh --pack
+%endif
%install
mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_PATH}
mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
mkdir -p %{buildroot}%{DOTNET_NUGET_SOURCE}
-install -p -m 644 binaries/frameworks/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
-install -p -m 644 binaries/frameworks/*.pdb %{buildroot}%{DOTNET_ASSEMBLY_PATH}
-install -p -m 644 binaries/frameworks/res/* %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
-install -p -m 644 binaries/frameworks_dummy/*.dll %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
-install -p -m 644 binaries/*.nupkg %{buildroot}%{DOTNET_NUGET_SOURCE}
+install -p -m 644 %{_tizenfx_bin_path}/bin/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
+install -p -m 644 %{_tizenfx_bin_path}/bin/*.pdb %{buildroot}%{DOTNET_ASSEMBLY_PATH}
+install -p -m 644 %{_tizenfx_bin_path}/bin/res/* %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
+install -p -m 644 %{_tizenfx_bin_path}/bin_dummy/*.dll %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
+install -p -m 644 %{_tizenfx_bin_path}/*.nupkg %{buildroot}%{DOTNET_NUGET_SOURCE}
%files nuget
%{DOTNET_NUGET_SOURCE}/*.nupkg
%define DOTNET_ASSEMBLY_RES_PATH %{DOTNET_ASSEMBLY_PATH}/res
%define DOTNET_NUGET_SOURCE /nuget
+# If tizenfx_use_prebuilt is 1, use prebuilt binaries instead of building source at gbs build.
+# Default value is 1, if want to build source at gbs build, set tizenfx_use_prebuilt to 0.
+%define _tizenfx_use_prebuilt %{?tizenfx_use_prebuilt:%{tizenfx_use_prebuilt}}%{!?tizenfx_use_prebuilt:1}
+%define _tizenfx_bin_path Artifacts
+
Name: csapi-tizenfx
Summary: Assemblies of Tizen .NET
Version: %rpm_version%
Source0: %{name}-%{version}.tar.gz
Source1: %{name}.manifest
+BuildRequires: dotnet-build-tools
+
BuildArch: noarch
AutoReqProv: no
cp %{SOURCE1} .
%build
-./scripts/filelist.sh common > common.filelist
-./scripts/filelist.sh mobile > mobile.filelist
-./scripts/filelist.sh mobile-emul > mobile-emul.filelist
-./scripts/filelist.sh tv > tv.filelist
-./scripts/filelist.sh ivi > ivi.filelist
-./scripts/filelist.sh wearable > wearable.filelist
+
+GetFileList() {
+ PROFILE=$1
+ cat pkg/PlatformFileList.txt | grep -E "#$PROFILE[[:space:]]|#$PROFILE$" | cut -d# -f1 | sed "s#^#%{DOTNET_ASSEMBLY_PATH}/#"
+}
+
+GetFileList common > common.filelist
+GetFileList mobile > mobile.filelist
+GetFileList mobile-emul > mobile-emul.filelist
+GetFileList tv > tv.filelist
+GetFileList ivi > ivi.filelist
+GetFileList wearable > wearable.filelist
+
+%if ! %{_tizenfx_use_prebuilt}
+ rm -fr %{_tizenfx_bin_path}/bin
+ rm -f %{_tizenfx_bin_path}/*.nupkg
+ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
+ ./build.sh --full
+ ./build.sh --pack
+%endif
%install
mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_PATH}
mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
mkdir -p %{buildroot}%{DOTNET_NUGET_SOURCE}
-install -p -m 644 binaries/frameworks/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
-install -p -m 644 binaries/frameworks/*.pdb %{buildroot}%{DOTNET_ASSEMBLY_PATH}
-install -p -m 644 binaries/frameworks/res/* %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
-install -p -m 644 binaries/frameworks_dummy/*.dll %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
-install -p -m 644 binaries/*.nupkg %{buildroot}%{DOTNET_NUGET_SOURCE}
+install -p -m 644 %{_tizenfx_bin_path}/bin/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
+install -p -m 644 %{_tizenfx_bin_path}/bin/*.pdb %{buildroot}%{DOTNET_ASSEMBLY_PATH}
+install -p -m 644 %{_tizenfx_bin_path}/bin/res/* %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
+install -p -m 644 %{_tizenfx_bin_path}/bin_dummy/*.dll %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
+install -p -m 644 %{_tizenfx_bin_path}/*.nupkg %{buildroot}%{DOTNET_NUGET_SOURCE}
%files nuget
%{DOTNET_NUGET_SOURCE}/*.nupkg
Tizen.Multimedia.StreamRecorder.dll #common #mobile #mobile-emul #tv #ivi
Tizen.Multimedia.Util.dll #common #mobile #mobile-emul #tv #ivi
Tizen.Multimedia.Vision.dll #common #mobile #mobile-emul #tv #ivi
-Tizen.Network.Bluetooth.dll #common #mobile #tv #ivi
+Tizen.Network.Bluetooth.dll #common #mobile #tv #ivi #wearable
Tizen.Network.Connection.dll #common #mobile #mobile-emul #tv #ivi #wearable
Tizen.Network.IoTConnectivity.dll #common #mobile #mobile-emul #tv #ivi #wearable
Tizen.Network.Mtp.dll
-Tizen.Network.Nfc.dll #mobile #mobile-emul #ivi
+Tizen.Network.Nfc.dll #mobile #mobile-emul #ivi #wearable
Tizen.Network.Nsd.dll #common #mobile #mobile-emul #wearable
-Tizen.Network.Smartcard.dll #mobile #mobile-emul #ivi
+Tizen.Network.Smartcard.dll #mobile #mobile-emul #ivi #wearable
Tizen.Network.WiFi.dll #common #mobile #mobile-emul #tv #ivi #wearable
Tizen.Network.WiFiDirect.dll #mobile #tv #ivi
Tizen.NUI.dll #common #mobile #mobile-emul #tv
<!-- Properties for directories -->
<PropertyGroup>
- <ToolsDir>$(MSBuildThisFileDirectory)..\tools\</ToolsDir>
+ <ToolsDir>$(MSBuildThisFileDirectory)..\tools\GenAPI\</ToolsDir>
<GenAPISourceDir>$(MSBuildThisFileDirectory)\..\Artifacts\bin\</GenAPISourceDir>
<GenAPILibDir>$(MSBuildThisFileDirectory)obj\_ref_lib\</GenAPILibDir>
<GenAPITargetDir>$(MSBuildThisFileDirectory)obj\_ref_api\</GenAPITargetDir>
+++ /dev/null
-#!/bin/bash
-
-SCRIPT_FILE=$(readlink -f $0)
-SCRIPT_DIR=$(dirname $SCRIPT_FILE)
-
-LISTFILE=$(readlink -f $SCRIPT_DIR/../filelist.txt)
-
-PATH_PREFIX="/usr/share/dotnet.tizen/framework"
-
-if [ ! -f $LISTFILE ]; then
- echo "No filelist.txt"
- exit 1
-fi
-
-PROFILE=$1; shift
-if [ -z "$PROFILE" ]; then
- echo "No profile specified."
- exit 1
-fi
-
-LIST=$(cat $LISTFILE | grep -E "#$PROFILE[[:space:]]|#$PROFILE$" | cut -d# -f1)
-
-for f in $LIST; do
- echo "$PATH_PREFIX/$f"
-done
}
/// <summary>
+ /// Gets the current known default pointer coordinates.
+ /// This function returns the current known canvas unit coordinates of the mouse pointer.
+ /// </summary>
+ public Point Pointer
+ {
+ get
+ {
+ int mx, my;
+ Interop.Evas.evas_pointer_canvas_xy_get(_handle, out mx, out my);
+ return new Point { X = mx, Y = my };
+ }
+ }
+
+ /// <summary>
/// Gets or sets the image cache.
/// This function returns the image cache size of canvas in bytes.
/// </summary>
[DllImport(Libraries.Evas)]
internal static extern void evas_image_cache_set(IntPtr obj, int size);
+ [DllImport(Libraries.Evas)]
+ internal static extern void evas_pointer_canvas_xy_get(IntPtr obj, out int mx, out int my);
+
[DllImport(Libraries.Evas, EntryPoint = "evas_load_error_str")]
internal static extern IntPtr _evas_load_error_str(LoadError error);
evas_object_color_set(obj, r * a / 255, g * a / 255, b * a / 255, a);
}
}
-}
+}
\ No newline at end of file
--- /dev/null
+{
+ "runtimeOptions": {
+ "tfm": "netcoreapp2.0",
+ "framework": {
+ "name": "Microsoft.NETCore.App",
+ "version": "2.0.0"
+ }
+ }
+}
--- /dev/null
+#!/bin/bash
+
+SCRIPT_FILE=$(readlink -f $0)
+SCRIPT_DIR=$(dirname $SCRIPT_FILE)
+ROOT_DIR=$(readlink -f $SCRIPT_DIR/..)
+
+MODULE_NAME=$1; shift
+
+if [ -z "$MODULE_NAME" ]; then
+ echo "No module name specified."
+ exit 1
+fi
+
+if [ -d "$ROOT_DIR/src/$MODULE_NAME" ]; then
+ echo "The module '$MODULE_NAME' already exists."
+fi
+
+mkdir -p $ROOT_DIR/src/$MODULE_NAME
+cp -f $SCRIPT_DIR/module.csproj.template $ROOT_DIR/src/$MODULE_NAME/$MODULE_NAME.csproj
+cd $ROOT_DIR/src/$MODULE_NAME
+dotnet new sln
+dotnet sln add $MODULE_NAME.csproj
+
+echo "New module [$ROOT_DIR/src/$MODULE_NAME] has been created."
\ No newline at end of file
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">
+ <Import Project="../../build/common.props" />
+
+ <PropertyGroup>
+ <TargetFramework>netstandard1.6</TargetFramework>
+ </PropertyGroup>
+
+
+
+ <Import Project="../../build/common.targets" />
+</Project>