Skip to content

Commit 599ff61

Browse files
committed
Updated for the new contract, core setup data
1 parent a205779 commit 599ff61

File tree

4 files changed

+28
-8
lines changed

4 files changed

+28
-8
lines changed

DeviceHandler/DeviceHandler.vcxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.230524.4\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.230524.4\build\native\Microsoft.Windows.CppWinRT.props')" />
3+
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.230706.1\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.230706.1\build\native\Microsoft.Windows.CppWinRT.props')" />
44
<PropertyGroup Label="Globals">
55
<CppWinRTOptimized>true</CppWinRTOptimized>
66
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
@@ -151,13 +151,13 @@
151151
</ItemGroup>
152152
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
153153
<ImportGroup Label="ExtensionTargets">
154-
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.230524.4\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.230524.4\build\native\Microsoft.Windows.CppWinRT.targets')" />
154+
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.230706.1\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.230706.1\build\native\Microsoft.Windows.CppWinRT.targets')" />
155155
</ImportGroup>
156156
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
157157
<PropertyGroup>
158158
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
159159
</PropertyGroup>
160-
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.230524.4\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.230524.4\build\native\Microsoft.Windows.CppWinRT.props'))" />
161-
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.230524.4\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.230524.4\build\native\Microsoft.Windows.CppWinRT.targets'))" />
160+
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.230706.1\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.230706.1\build\native\Microsoft.Windows.CppWinRT.props'))" />
161+
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.230706.1\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.230706.1\build\native\Microsoft.Windows.CppWinRT.targets'))" />
162162
</Target>
163163
</Project>

DeviceHandler/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Microsoft.Windows.CppWinRT" version="2.0.230524.4" targetFramework="native" />
3+
<package id="Microsoft.Windows.CppWinRT" version="2.0.230706.1" targetFramework="native" />
44
</packages>

plugin_owoTrackVR/owoTrackVR.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
using Microsoft.UI.Text;
1313
using Microsoft.UI.Xaml;
1414
using Microsoft.UI.Xaml.Controls;
15+
using Microsoft.UI.Xaml.Markup;
16+
using Microsoft.UI.Xaml.Media;
1517
using DQuaternion = DeviceHandler.Quaternion;
1618
using DVector = DeviceHandler.Vector;
1719
using Quaternion = System.Numerics.Quaternion;
@@ -27,6 +29,8 @@ namespace plugin_OwoTrack;
2729
[ExportMetadata("Publisher", "K2VR Team")]
2830
[ExportMetadata("Version", "1.0.0.1")]
2931
[ExportMetadata("Website", "https://github.com/KinectToVR/plugin_owoTrackVR")]
32+
[ExportMetadata("DependencyLink", "https://docs.k2vr.tech/{0}/owo/about/")]
33+
[ExportMetadata("CoreSetupData", typeof(SetupData))]
3034
public class OwoTrack : ITrackingDevice
3135
{
3236
// Update settings UI
@@ -543,4 +547,16 @@ public static Quaternion ToNet(this DQuaternion quaternion)
543547
{
544548
return new Quaternion(quaternion.X, quaternion.Y, quaternion.Z, quaternion.W);
545549
}
550+
}
551+
552+
internal class SetupData : ICoreSetupData
553+
{
554+
public object PluginIcon => new PathIcon
555+
{
556+
Data = (Geometry)XamlBindingHelper.ConvertValue(typeof(Geometry),
557+
"M34.86,0A34.76,34.76,0,1,0,69.51,34.9,34.74,34.74,0,0,0,34.86,0ZM14.33,18.66A25.12,25.12,0,0,1,29.22,9.31c1.81-.39,3.68-.53,5-.7a28.81,28.81,0,0,1,11,2.27,1.45,1.45,0,0,1,1,1.45q.3,4.06.75,8.11c.09.79-.21.82-.79.69-.36-.08-.72-.16-1.08-.26-2-.59-1.88-.22-1.82-2.46,0-1.38-.42-1.79-1.73-1.64s-2.87.17-4.3.34c-.28,0-.59.43-.76.72a1.43,1.43,0,0,0,0,.8c.12,1.07-.07,1.62-1.41,1.84a31.91,31.91,0,0,0-16.08,7.77c-.56.48-.86.48-1.18-.2-1.22-2.62-2.5-5.21-3.67-7.85A1.86,1.86,0,0,1,14.33,18.66ZM24.91,58.73l-.09-.14h-.05v0c-2.26-.16-3.92-1.62-5.56-2.89A25.59,25.59,0,0,1,8.92,38.08a27.88,27.88,0,0,1,.87-10.71c.39.68.71,1.18,1,1.71q7,14.51,14,29a1.27,1.27,0,0,1,.05.44h0l0,0,.09,0S24.91,58.7,24.91,58.73Zm21.17-.43a29.5,29.5,0,0,1-8.72,2.43c-.18,0-.66-.57-.65-.86,0-1.86.16-3.72.28-5.58s.28-3.82.43-5.73c.1-1.25.22-2.5.34-4a4.44,4.44,0,0,1,.75.64c2.65,3.87,5.27,7.76,8,11.6C47,57.61,47,57.89,46.08,58.3Zm2.79-9.88C45.58,43.62,42.25,38.85,39,34c-.8-1.2-1.55-1.74-3-1.06a13.43,13.43,0,0,1-2.29.67c-2.05.56-2.14.68-2.27,2.76Q31,44.77,30.45,53.13a5.59,5.59,0,0,1-.29.83l-4.82-10c-1.32-2.75-2.58-5.52-4-8.23a1.65,1.65,0,0,1,.45-2.32,27.53,27.53,0,0,1,14-7.25c.83-.16,1.23.05,1.14.95,0,.32,0,.64,0,1,0,1.08.12,1.69,1.54,1.34a18.06,18.06,0,0,1,4.29-.32c.94,0,1.06-.46,1-1.2-.18-1.24.42-1.31,1.42-1,2.29.66,2.45.86,2.67,4.06.25,3.62.48,7.23.77,10.84.18,2.2.46,4.4.69,6.59Zm7.59.79-.4-.09Q54.69,33,53.31,16.94c2.24,1,5.91,7.4,6.84,11.78A26.07,26.07,0,0,1,56.46,49.21Z")
558+
};
559+
560+
public string GroupName => string.Empty;
561+
public Type PluginType => typeof(ITrackingDevice);
546562
}

plugin_owoTrackVR/plugin_owoTrackVR.csproj

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
</PropertyGroup>
1919

2020
<ItemGroup>
21-
<PackageReference Include="Amethyst.Plugins.Contract" Version="0.2.12" />
22-
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.2" />
21+
<PackageReference Include="Amethyst.Plugins.Contract" Version="0.2.21" />
22+
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.3" />
2323
<PackageReference Include="System.ComponentModel.Composition" Version="7.0.0" />
2424
<PackageReference Include="System.ComponentModel.Composition.Registration" Version="7.0.0" />
25-
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.3.230502000" />
25+
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.3.230602002" />
2626
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.25247-preview" />
2727
</ItemGroup>
2828

@@ -39,4 +39,8 @@
3939
<ItemGroup>
4040
<ProjectReference Include="..\DeviceHandler\DeviceHandler.vcxproj" />
4141
</ItemGroup>
42+
43+
<ItemGroup>
44+
<Folder Include="Assets\Resources\" />
45+
</ItemGroup>
4246
</Project>

0 commit comments

Comments
 (0)