Skip to content

Commit

Permalink
Fix building App with non-Tizen references
Browse files Browse the repository at this point in the history
  • Loading branch information
JoonghyunCho committed Sep 12, 2024
1 parent 4a1a6cf commit 2dab1d0
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion workload/build/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
example: -preview.3.100+sha12345
-->
<PropertyGroup>
<TizenWorkloadVersion>8.0.151</TizenWorkloadVersion>
<TizenWorkloadVersion>8.0.155</TizenWorkloadVersion>
</PropertyGroup>

<!--
Expand Down
6 changes: 3 additions & 3 deletions workload/scripts/workload-install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ $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" = "8.0.140";
"$ManifestBaseName-6.0.300" = "8.0.133";
"$ManifestBaseName-6.0.400" = "8.0.154";
"$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";
Expand All @@ -54,7 +54,7 @@ $LatestVersionMap = @{
"$ManifestBaseName-8.0.100" = "8.0.144";
"$ManifestBaseName-8.0.200" = "8.0.145";
"$ManifestBaseName-8.0.300" = "8.0.149";
"$ManifestBaseName-8.0.400" = "8.0.151";
"$ManifestBaseName-8.0.400" = "8.0.155";
}

function New-TemporaryDirectory {
Expand Down
6 changes: 3 additions & 3 deletions workload/scripts/workload-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ 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=8.0.140"
"$MANIFEST_BASE_NAME-6.0.300=8.0.133"
"$MANIFEST_BASE_NAME-6.0.400=8.0.154"
"$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"
Expand All @@ -39,7 +39,7 @@ LatestVersionMap=(
"$MANIFEST_BASE_NAME-8.0.100=8.0.144"
"$MANIFEST_BASE_NAME-8.0.200=8.0.145"
"$MANIFEST_BASE_NAME-8.0.300=8.0.149"
"$MANIFEST_BASE_NAME-8.0.400=8.0.151"
"$MANIFEST_BASE_NAME-8.0.400=8.0.155"
)

while [ $# -ne 0 ]; do
Expand Down
22 changes: 12 additions & 10 deletions workload/src/Samsung.Tizen.Build.Tasks/GetTizenProject.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Collections.Generic;
using System.Linq;


using Microsoft.Build.Evaluation;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
Expand Down Expand Up @@ -32,12 +32,12 @@ public ITaskItem[] ProjectFiles
[Output]
public ITaskItem[] TizenProjectFiles
{
set
set
{
if (value != null)
{
tizenProjectFiles = value.ToList();
}
if (value != null)
{
tizenProjectFiles = value.ToList();
}
}
get { return tizenProjectFiles?.ToArray(); }
}
Expand All @@ -48,8 +48,7 @@ public override bool Execute()
var properties = new Dictionary<string, string>
{
{ "Configuration", "$(Configuration)" },
{ "Platform", "$(Platform)" },
{ "TargetFramework", "$(TargetFramework)" }
{ "Platform", "$(Platform)" }
};

Log.LogMessage(MessageImportance.High, "Configuration : {0}", Configuration);
Expand All @@ -64,8 +63,11 @@ public override bool Execute()
// we don't get a redundant-project-load error.
var collection = new ProjectCollection(properties);
var project = collection.LoadProject(pItem.ItemSpec);
ProjectProperty pp = project.Properties.Where(p => p.Name == "TizenProject" && p.EvaluatedValue == "true").FirstOrDefault();
if (pp != null)

var targetFrameworkValue = project.GetPropertyValue("TargetFramework");
var targetFrameworksValue = project.GetPropertyValue("TargetFrameworks");

if (targetFrameworkValue.Contains("-tizen") || targetFrameworksValue.Contains("-tizen"))
{
tizenList.Add(pItem);
}
Expand Down
1 change: 0 additions & 1 deletion workload/src/Samsung.Tizen.Sdk/Sdk/AutoImport.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ https://github.com/dotnet/designs/blob/4703666296f5e59964961464c25807c727282cae/
<TizenManifestFile Condition="'$(TizenManifestFile)' == ''">tizen-manifest.xml</TizenManifestFile>
<TizenResourcePrefix Condition="'$(TizenResourcePrefix)' == ''">res</TizenResourcePrefix>
<TizenSharedPrefix Condition="'$(TizenSharedPrefix)' == ''">shared</TizenSharedPrefix>
<TizenProject>true</TizenProject>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 2dab1d0

Please sign in to comment.