# 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;
--- /dev/null
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
--- /dev/null
+# !! IMPORTANT !!
+# This packaging spec file is for developer testing only.
+# For Tizen release, the spec file in the tizen branch should be used.
+
+%define DOTNET_ASSEMBLY_PATH /usr/share/dotnet.tizen/framework
+%define DOTNET_ASSEMBLY_DUMMY_PATH %{DOTNET_ASSEMBLY_PATH}/ref
+%define DOTNET_ASSEMBLY_RES_PATH %{DOTNET_ASSEMBLY_PATH}/res
+%define DOTNET_NUGET_SOURCE /nuget
+
+%define _tizenfx_bin_path Artifacts
+
+Name: csapi-tizenfx
+Summary: Assemblies of Tizen .NET
+Version: 99.99.99
+Release: 1
+Group: Development/Libraries
+License: Apache-2.0
+URL: https://www.tizen.org
+Source0: %{name}-%{version}.tar.gz
+Source1: %{name}.manifest
+
+BuildRequires: dotnet-build-tools
+
+BuildArch: noarch
+AutoReqProv: no
+
+%description
+%{summary}
+
+%package nuget
+Summary: NuGet package for %{name}
+Group: Development/Libraries
+AutoReqProv: no
+
+%description nuget
+NuGet package for %{name}
+
+%package dummy
+Summary: Dummy assemblies of Tizen .NET
+Group: Development/Libraries
+AutoReqProv: no
+
+%description dummy
+Dummy assemblies of Tizen .NET
+
+%package full
+Summary: All Tizen .NET assemblies
+Group: Development/Libraries
+AutoReqProv: no
+
+%description full
+All Tizen .NET assemblies
+
+%package debug
+Summary: All .pdb files of Tizen .NET
+Group: Development/Libraries
+AutoReqProv: no
+
+%description debug
+All .pdb files of Tizen .NET
+
+%package common
+Summary: Tizen .NET assemblies for Common profile
+Group: Development/Libraries
+Requires: csapi-tizenfx-dummy
+AutoReqProv: no
+
+%description common
+Tizen .NET assemblies for Common profile
+
+%package mobile
+Summary: Tizen .NET assemblies for Mobile profile
+Group: Development/Libraries
+Requires: csapi-tizenfx-dummy
+AutoReqProv: no
+
+%description mobile
+Tizen .NET assemblies for Mobile profile
+
+%package mobile-emul
+Summary: Tizen .NET assemblies for Emulator of Mobile profile
+Group: Development/Libraries
+Requires: csapi-tizenfx-dummy
+AutoReqProv: no
+
+%description mobile-emul
+Tizen .NET assemblies for Emulator of Mobile profile
+
+%package tv
+Summary: Tizen .NET assemblies for TV profile
+Group: Development/Libraries
+Requires: csapi-tizenfx-dummy
+AutoReqProv: no
+
+%description tv
+Tizen .NET assemblies for TV profile
+
+%package ivi
+Summary: Tizen .NET assemblies for IVI profile
+Group: Development/Libraries
+Requires: csapi-tizenfx-dummy
+AutoReqProv: no
+
+%description ivi
+Tizen .NET assemblies for IVI profile
+
+%package wearable
+Summary: Tizen .NET assemblies for Wearable profile
+Group: Development/Libraries
+Requires: csapi-tizenfx-dummy
+AutoReqProv: no
+
+%description wearable
+Tizen .NET assemblies for Wearable profile
+
+%prep
+%setup -q
+cp %{SOURCE1} .
+
+%build
+
+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
+
+rm -fr %{_tizenfx_bin_path}/bin
+rm -f %{_tizenfx_bin_path}/*.nupkg
+export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
+./build.sh --full
+./build.sh --dummy
+./build.sh --pack
+
+%install
+mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_PATH}
+mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
+mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
+mkdir -p %{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
+
+%files dummy
+%attr(644,root,root) %{DOTNET_ASSEMBLY_DUMMY_PATH}/*.dll
+
+%files full
+%manifest %{name}.manifest
+%license LICENSE
+%attr(644,root,root) %{DOTNET_ASSEMBLY_PATH}/*.dll
+%attr(644,root,root) %{DOTNET_ASSEMBLY_RES_PATH}/*
+
+%files debug
+%attr(644,root,root) %{DOTNET_ASSEMBLY_PATH}/*.pdb
+
+%files common -f common.filelist
+%manifest %{name}.manifest
+%license LICENSE
+
+%files mobile -f mobile.filelist
+%manifest %{name}.manifest
+%license LICENSE
+
+%files mobile-emul -f mobile-emul.filelist
+%manifest %{name}.manifest
+%license LICENSE
+
+%files tv -f tv.filelist
+%manifest %{name}.manifest
+%license LICENSE
+
+%files ivi -f ivi.filelist
+%manifest %{name}.manifest
+%license LICENSE
+
+%files wearable -f wearable.filelist
+%manifest %{name}.manifest
+%license LICENSE
--- /dev/null
+ElmSharp.dll #common #mobile #mobile-emul #tv #ivi #wearable
+ElmSharp.Wearable.dll #wearable
+res/maps_marker_pin_48.png #mobile #mobile-emul #tv
+res/maps_marker_pin_72.png #mobile #mobile-emul #tv
+res/maps_marker_sticker_48.png #mobile #mobile-emul #tv
+res/maps_marker_sticker_72.png #mobile #mobile-emul #tv
+Tizen.Account.AccountManager.dll #mobile #mobile-emul #ivi
+Tizen.Account.FidoClient.dll #mobile #mobile-emul
+Tizen.Account.OAuth2.dll #mobile #mobile-emul #ivi
+Tizen.Applications.Alarm.dll #common #mobile #mobile-emul #tv #ivi #wearable
+Tizen.Applications.AttachPanel.dll
+Tizen.Applications.Badge.dll #mobile #mobile-emul #ivi
+Tizen.Applications.Common.dll #common #mobile #mobile-emul #tv #ivi #wearable
+Tizen.Applications.DataControl.dll #common #mobile #mobile-emul #tv #ivi #wearable
+Tizen.Applications.MessagePort.dll #common #mobile #mobile-emul #tv #ivi #wearable
+Tizen.Applications.Notification.dll #common #mobile #mobile-emul #tv #ivi #wearable
+Tizen.Applications.NotificationEventListener.dll #common #mobile #mobile-emul #tv #ivi #wearable
+Tizen.Applications.PackageManager.dll #common #mobile #mobile-emul #tv #ivi #wearable
+Tizen.Applications.Preference.dll #common #mobile #mobile-emul #tv #ivi #wearable
+Tizen.Applications.RemoteView.dll #mobile #mobile-emul #tv
+Tizen.Applications.Service.dll #common #mobile #mobile-emul #tv #ivi #wearable
+Tizen.Applications.ToastMessage.dll #common #mobile #mobile-emul #tv #ivi #wearable
+Tizen.Applications.UI.dll #common #mobile #mobile-emul #tv #ivi #wearable
+Tizen.Applications.WatchApplication.dll #wearable
+Tizen.Applications.WidgetApplication.dll #mobile #mobile-emul #tv #ivi
+Tizen.Applications.WidgetControl.dll #mobile #mobile-emul #tv #ivi
+Tizen.Content.Download.dll #common #mobile #mobile-emul #tv #ivi #wearable
+Tizen.Content.MediaContent.dll #common #mobile #mobile-emul #tv #ivi #wearable
+Tizen.Content.MimeType.dll #common #mobile #mobile-emul #tv #ivi #wearable
+Tizen.Context.dll #mobile #mobile-emul
+Tizen.Convergence.dll #common #mobile #mobile-emul #ivi #wearable
+Tizen.dll #common #mobile #mobile-emul #tv #ivi #wearable
+Tizen.Location.dll #mobile #mobile-emul #tv #ivi #wearable
+Tizen.Location.Geofence.dll #mobile #mobile-emul
+Tizen.Log.dll #common #mobile #mobile-emul #tv #ivi #wearable
+Tizen.Maps.dll #mobile #mobile-emul #tv
+Tizen.Messaging.dll #mobile #mobile-emul
+Tizen.Messaging.Push.dll #mobile #mobile-emul #tv #ivi
+Tizen.Multimedia.AudioIO.dll #common #mobile #mobile-emul #tv #ivi
+Tizen.Multimedia.Camera.dll #common #mobile #mobile-emul #tv #ivi
+Tizen.Multimedia.dll #common #mobile #mobile-emul #tv #ivi
+Tizen.Multimedia.MediaCodec.dll #common #mobile #mobile-emul #tv #ivi
+Tizen.Multimedia.MediaPlayer.dll #common #mobile #mobile-emul #tv #ivi
+Tizen.Multimedia.Metadata.dll #common #mobile #mobile-emul #tv #ivi
+Tizen.Multimedia.Radio.dll #common #mobile #mobile-emul #tv #ivi
+Tizen.Multimedia.Recorder.dll #common #mobile #mobile-emul #tv #ivi
+Tizen.Multimedia.Remoting.dll #common #mobile #mobile-emul #tv #ivi
+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 #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 #wearable
+Tizen.Network.Nsd.dll #common #mobile #mobile-emul #wearable
+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
+Tizen.PhonenumberUtils.dll #mobile #mobile-emul
+Tizen.Pims.Calendar.dll #common #mobile #mobile-emul
+Tizen.Pims.Contacts.dll #mobile #mobile-emul
+Tizen.Security.dll #mobile #mobile-emul #tv #ivi #wearable
+Tizen.Security.SecureRepository.dll #mobile #mobile-emul #tv #ivi #wearable
+Tizen.Security.TEEC.dll #mobile #mobile-emul #tv #ivi #wearable
+Tizen.Sensor.dll #common #mobile #mobile-emul #tv #ivi #wearable
+Tizen.System.dll #common #mobile #mobile-emul #tv #ivi #wearable
+Tizen.System.Feedback.dll #common #mobile #mobile-emul #tv #ivi #wearable
+Tizen.System.Information.dll #common #mobile #mobile-emul #tv #ivi #wearable
+Tizen.System.MediaKey.dll #common #mobile #mobile-emul #ivi #wearable
+Tizen.System.PlatformConfig.dll
+Tizen.System.Storage.dll #common #mobile #mobile-emul #tv #ivi #wearable
+Tizen.System.SystemSettings.dll #common #mobile #mobile-emul #tv #ivi #wearable
+Tizen.Tapi.dll
+Tizen.Telephony.dll #mobile #mobile-emul #ivi
+Tizen.Tracer.dll #common #mobile #mobile-emul #tv #ivi #wearable
+Tizen.Uix.InputMethod.dll #common #mobile #mobile-emul #ivi
+Tizen.Uix.InputMethodManager.dll #common #mobile #mobile-emul #tv #ivi
+Tizen.Uix.Stt.dll #mobile #mobile-emul #tv
+Tizen.Uix.SttEngine.dll #mobile #mobile-emul
+Tizen.Uix.Tts.dll #mobile #mobile-emul #tv
+Tizen.Uix.TtsEngine.dll #mobile #mobile-emul
+Tizen.Uix.VoiceControl.dll #mobile #mobile-emul #tv #ivi
+Tizen.WebView.dll #common #mobile #mobile-emul #tv #ivi #wearable
<!-- 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
-{
- "runtimeOptions": {
- "tfm": "netcoreapp2.0",
- "framework": {
- "name": "Microsoft.NETCore.App",
- "version": "2.0.0"
- }
- }
-}
--- /dev/null
+{
+ "runtimeOptions": {
+ "tfm": "netcoreapp2.0",
+ "framework": {
+ "name": "Microsoft.NETCore.App",
+ "version": "2.0.0"
+ }
+ }
+}