Skip to content

Commit

Permalink
Sync code from main
Browse files Browse the repository at this point in the history
  • Loading branch information
JoonghyunCho committed Mar 6, 2024
1 parent e2f5acc commit d2b5582
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 15 deletions.
8 changes: 4 additions & 4 deletions workload/Config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ MINOR = $(word 2,$(VERSIONS))
MICRO = $(word 3,$(VERSIONS))
BAND := $(shell echo "${MICRO}" | cut -c1)00

PRERELEASE_DOTNET = $(word 4,$(VERSIONS))
PRERELEASE_DOTNET_VERSION = $(word 5,$(VERSIONS))
PRERELEASE = $(word 4,$(VERSIONS))
PRERELEASE_VERSION = $(word 5,$(VERSIONS))

# DOTNET_DESTDIR
ifeq ($(DESTDIR),)
Expand All @@ -34,9 +34,9 @@ ifeq ($(MAJOR),6)
else
ifneq ($(IS_PRERELEASE),)
ifneq ($(IS_RTM),)
DOTNET_VERSION_BAND := $(MAJOR).$(MINOR).$(MICRO)-$(PRERELEASE_DOTNET)
DOTNET_VERSION_BAND := $(MAJOR).$(MINOR).$(MICRO)-$(PRERELEASE)
else
DOTNET_VERSION_BAND := $(MAJOR).$(MINOR).$(MICRO)-$(PRERELEASE_DOTNET).$(PRERELEASE_DOTNET_VERSION)
DOTNET_VERSION_BAND := $(MAJOR).$(MINOR).$(MICRO)-$(PRERELEASE).$(PRERELEASE_VERSION)
endif
else
DOTNET_VERSION_BAND := $(MAJOR).$(MINOR).$(MICRO)
Expand Down
3 changes: 1 addition & 2 deletions workload/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Workload for Tizen .NET

This is a build of Tizen workload for an early preview of Tizen in .NET 6.
Please refer [.NET 6.0.0 Mobile Samples](https://github.com/dotnet/net6-mobile-samples#net-600-mobile-samples) for installing .NET 6 preview SDK and other workloads of different plattforms.
This is a build of Tizen workload for an early preview of Tizen in .NET 9.

## Using IDEs
Refer [here](https://github.com/dotnet/net6-mobile-samples#using-ides) to see the supporting status of an each IDE and how to manually enable workload.
18 changes: 14 additions & 4 deletions workload/scripts/workload-install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ $ManifestBaseName = "Samsung.NET.Sdk.Tizen.Manifest"
$LatestVersionMap = @{
"$ManifestBaseName-6.0.100" = "7.0.101";
"$ManifestBaseName-6.0.200" = "7.0.100-preview.13.6";
"$ManifestBaseName-6.0.300" = "7.0.304";
"$ManifestBaseName-6.0.400" = "7.0.119";
"$ManifestBaseName-6.0.300" = "8.0.133";
"$ManifestBaseName-6.0.400" = "8.0.140";
"$ManifestBaseName-7.0.100-preview.6" = "7.0.100-preview.6.14";
"$ManifestBaseName-7.0.100-preview.7" = "7.0.100-preview.7.20";
"$ManifestBaseName-7.0.100-rc.1" = "7.0.100-rc.1.22";
"$ManifestBaseName-7.0.100-rc.2" = "7.0.100-rc.2.24";
"$ManifestBaseName-7.0.100" = "7.0.103";
"$ManifestBaseName-7.0.200" = "7.0.105";
"$ManifestBaseName-7.0.300" = "7.0.120";
"$ManifestBaseName-7.0.400" = "7.0.123";
"$ManifestBaseName-7.0.400" = "8.0.141";
"$ManifestBaseName-8.0.100-alpha.1" = "7.0.104";
"$ManifestBaseName-8.0.100-preview.2" = "7.0.106";
"$ManifestBaseName-8.0.100-preview.3" = "7.0.107";
Expand All @@ -51,7 +51,8 @@ $LatestVersionMap = @{
"$ManifestBaseName-8.0.100-rc.1" = "7.0.124";
"$ManifestBaseName-8.0.100-rc.2" = "7.0.125";
"$ManifestBaseName-8.0.100-rtm" = "7.0.127";
"$ManifestBaseName-8.0.100" = "8.0.130";
"$ManifestBaseName-8.0.100" = "8.0.144";
"$ManifestBaseName-8.0.200" = "8.0.145";
"$ManifestBaseName-9.0.100-alpha.1" = "8.0.134";
"$ManifestBaseName-9.0.100-preview.1" = "8.0.135";
"$ManifestBaseName-9.0.100-preview.2" = "8.0.137";
Expand Down Expand Up @@ -105,7 +106,13 @@ function Get-LatestVersion([string]$Id) {
function Get-Package([string]$Id, [string]$Version, [string]$Destination, [string]$FileExt = "nupkg") {
$OutFileName = "$Id.$Version.$FileExt"
$OutFilePath = Join-Path -Path $Destination -ChildPath $OutFileName

if ($Id -match ".net[0-9]+$") {
$Id = $Id -replace (".net[0-9]+", "")
}

Invoke-WebRequest -Uri "https://www.nuget.org/api/v2/package/$Id/$Version" -OutFile $OutFilePath

return $OutFilePath
}

Expand All @@ -121,6 +128,9 @@ function Install-Pack([string]$Id, [string]$Version, [string]$Kind) {
}
{($_ -eq "sdk") -or ($_ -eq "framework")} {
Expand-Archive -Path $TempZipFile -DestinationPath $TempUnzipDir
if ( ($kind -eq "sdk") -and ($Id -match ".net[0-9]+$")) {
$Id = $Id -replace (".net[0-9]+", "")
}
$TargetDirectory = $(Join-Path -Path $DotnetInstallDir -ChildPath "packs\$Id\$Version")
New-Item -Path $TargetDirectory -ItemType "directory" -Force | Out-Null
Copy-Item -Path "$TempUnzipDir/*" -Destination $TargetDirectory -Recurse -Force
Expand Down
12 changes: 8 additions & 4 deletions workload/scripts/workload-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ UPDATE_ALL_WORKLOADS="false"
LatestVersionMap=(
"$MANIFEST_BASE_NAME-6.0.100=7.0.101"
"$MANIFEST_BASE_NAME-6.0.200=7.0.100-preview.13.6"
"$MANIFEST_BASE_NAME-6.0.300=7.0.304"
"$MANIFEST_BASE_NAME-6.0.400=7.0.119"
"$MANIFEST_BASE_NAME-6.0.300=8.0.133"
"$MANIFEST_BASE_NAME-6.0.400=8.0.140"
"$MANIFEST_BASE_NAME-7.0.100-preview.6=7.0.100-preview.6.14"
"$MANIFEST_BASE_NAME-7.0.100-preview.7=7.0.100-preview.7.20"
"$MANIFEST_BASE_NAME-7.0.100-rc.1=7.0.100-rc.1.22"
"$MANIFEST_BASE_NAME-7.0.100-rc.2=7.0.100-rc.2.24"
"$MANIFEST_BASE_NAME-7.0.100=7.0.103"
"$MANIFEST_BASE_NAME-7.0.200=7.0.105"
"$MANIFEST_BASE_NAME-7.0.300=7.0.120"
"$MANIFEST_BASE_NAME-7.0.400=7.0.123"
"$MANIFEST_BASE_NAME-7.0.400=7.0.141"
"$MANIFEST_BASE_NAME-8.0.100-alpha.1=7.0.104"
"$MANIFEST_BASE_NAME-8.0.100-preview.2=7.0.106"
"$MANIFEST_BASE_NAME-8.0.100-preview.3=7.0.107"
Expand All @@ -36,7 +36,8 @@ LatestVersionMap=(
"$MANIFEST_BASE_NAME-8.0.100-rc.1=7.0.124"
"$MANIFEST_BASE_NAME-8.0.100-rc.2=7.0.125"
"$MANIFEST_BASE_NAME-8.0.100-rtm=7.0.127"
"$MANIFEST_BASE_NAME-8.0.100=8.0.130"
"$MANIFEST_BASE_NAME-8.0.100=8.0.144"
"$MANIFEST_BASE_NAME-8.0.200=8.0.145"
"$MANIFEST_BASE_NAME-9.0.100-alpha.1=8.0.134"
"$MANIFEST_BASE_NAME-9.0.100-preview.1=8.0.135"
"$MANIFEST_BASE_NAME-9.0.100-preview.2=8.0.137"
Expand Down Expand Up @@ -158,6 +159,9 @@ function install_tizenworkload() {
if [[ "$DOTNET_VERSION" == *"-preview"* || $DOTNET_VERSION == *"-rc"* || $DOTNET_VERSION == *"-alpha"* ]] && [[ ${#array[@]} -ge 4 ]]; then
DOTNET_TARGET_VERSION_BAND="$DOTNET_VERSION_BAND${array[2]:3}.${array[3]}"
MANIFEST_NAME="$MANIFEST_BASE_NAME-$DOTNET_TARGET_VERSION_BAND"
elif [[ "$DOTNET_VERSION" == *"-rtm"* ]] && [[ ${#array[@]} -ge 3 ]]; then
DOTNET_TARGET_VERSION_BAND="$DOTNET_VERSION_BAND${array[2]:3}"
MANIFEST_NAME="$MANIFEST_BASE_NAME-$DOTNET_TARGET_VERSION_BAND"
else
DOTNET_TARGET_VERSION_BAND=$DOTNET_VERSION_BAND
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,13 @@ Copyright (c) Samsung All rights reserved.
-->
<Target Name="TizenComputeTpkAssemblyFiles" DependsOnTargets="ComputeFilesToPublish" Condition="'$(WebProject)' != 'true'">
<PropertyGroup>
<TizenTpkAssemblyDirName Condition=" '$(TizenTpkAssemblyDirName)' == '' ">bin</TizenTpkAssemblyDirName>
<PublishDepsFile>$(OutDir)$(ProjectDepsFileName)</PublishDepsFile>
</PropertyGroup>
<ItemGroup>
<!-- Copy all the assemblies -->
<TizenTpkAssemblyFiles Include="@(ResolvedFileToPublish)" KeepMetadata="$(TpkKeepMeta)" Condition="'%(RelativePath)' != '$(ProjectDepsFileName)'">
<TizenTpkSubDir>bin\</TizenTpkSubDir>
<TizenTpkSubDir>$(TizenTpkAssemblyDirName)\</TizenTpkSubDir>
<TizenTpkFileName>%(RelativePath)</TizenTpkFileName>
</TizenTpkAssemblyFiles>
<!-- Copy Current Projects deps.json to tpk root folder -->
Expand Down

0 comments on commit d2b5582

Please sign in to comment.