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 30f31ee commit 6c228c1
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 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.153</TizenWorkloadVersion>
<TizenWorkloadVersion>8.0.154</TizenWorkloadVersion>
</PropertyGroup>

<!--
Expand Down
2 changes: 1 addition & 1 deletion workload/scripts/workload-install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ $LatestVersionMap = [ordered]@{
"$ManifestBaseName-6.0.100" = "7.0.101";
"$ManifestBaseName-6.0.200" = "7.0.100-preview.13.6";
"$ManifestBaseName-6.0.300" = "8.0.133";
"$ManifestBaseName-6.0.400" = "8.0.153";
"$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 Down
2 changes: 1 addition & 1 deletion workload/scripts/workload-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ 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=8.0.133"
"$MANIFEST_BASE_NAME-6.0.400=8.0.153"
"$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 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 6c228c1

Please sign in to comment.