Skip to content

Commit ca2c2d4

Browse files
committed
AME2
1 parent e2d7e32 commit ca2c2d4

File tree

12 files changed

+183
-203
lines changed

12 files changed

+183
-203
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
uses: "marvinpinto/action-automatic-releases@latest"
3535
with:
3636
repo_token: "${{ secrets.GITHUB_TOKEN }}"
37-
automatic_release_tag: "latest"
37+
automatic_release_tag: "ame-latest"
3838
prerelease: true
3939
title: "plugin_PSMoveService Build Artifact"
4040
files: |

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,3 +347,5 @@ healthchecksdb
347347

348348
# Backup folder for Package Reference Convert tool in Visual Studio 2017
349349
MigrationBackup/
350+
351+
.idea/

external/manifest.json

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
{
2-
"version": "1.0.0.1",
3-
"display_name": "PSMove Service",
4-
"download_": "plugin_PSMoveService.zip",
5-
"changelog": "What the f'ck is a kilometer?!",
6-
"guid": "K2VRTEAM-AME2-APII-DVCE-DVCEPSMOVEEX"
7-
}
2+
"name": "PSMove Service",
3+
"description": "Ame2 plugin for the PSMove Service.",
4+
"guid": "K2VRTEAM-AME2-APII-DVCE-DVCEPSMOVEEX",
5+
"type": "device",
6+
"author": "K2VR Team",
7+
"artifacts": [
8+
{
9+
"version": "2.0.0.0",
10+
"contract": "2.0.0.0",
11+
"platform": "windows",
12+
"name": "PSMove Service",
13+
"download": "plugin_PSMoveService.zip",
14+
"changelog": "Initial release of the PSMove Service plugin."
15+
}
16+
]
17+
}

plugin_PSMoveService/CoreSetup.cs

Lines changed: 37 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
using System;
22
using System.Collections.Generic;
3-
using Amethyst.Plugins.Contract;
4-
using Microsoft.UI.Xaml.Controls;
3+
using Amethyst.Contract;
54
using System.IO;
65
using System.Threading;
76
using System.Threading.Tasks;
8-
using RestSharp;
97
using System.IO.Compression;
108
using Windows.Storage;
119
using System.Runtime.InteropServices;
1210
using System.Runtime.InteropServices.ComTypes;
1311
using System.Text;
1412
using System.Diagnostics;
1513
using System.Reflection;
16-
using Microsoft.UI.Xaml.Markup;
17-
using Microsoft.UI.Xaml.Media;
14+
using Amethyst.Contract;
15+
using Windows.Storage;
16+
using Avalonia.Controls;
17+
using Avalonia.Media;
1818

1919
namespace plugin_PSMoveService;
2020

2121
internal class SetupData : ICoreSetupData
2222
{
2323
public object PluginIcon => new PathIcon
2424
{
25-
Data = (Geometry)XamlBindingHelper.ConvertValue(typeof(Geometry),
25+
Data = Geometry.Parse(
2626
"M55.38,5.07c.07-1.44-.75-1.95-1.94-1.95-7.67,0-15.33,0-23,0H30a1.36,1.36,0,0,0-1.43,1.4q0,2.43,0,4.86a1.38,1.38,0,0,0,1.54,1.45h6.7c-.59,2.69-.13,4.62,1.6,6a2,2,0,0,1,.88,2,1.61,1.61,0,0,0,0,.38c.09.53-.17.64-.66.63-1.54,0-3.09,0-4.64,0-.55,0-.8.11-.75.72a19.78,19.78,0,0,1,0,2.31c0,.5.12.66.64.65,2.09,0,4.18,0,6.27,0,3.3,0,6.6,0,9.91,0,.53,0,.8-.08.76-.7a19.78,19.78,0,0,1,0-2.31c0-.5-.14-.68-.66-.67-1.26,0-2.53,0-3.79,0-1.71,0-1.7,0-1.71-1.67a1.12,1.12,0,0,1,.52-1,5,5,0,0,0,2.17-3.75,22.62,22.62,0,0,0-.09-2.57h6.51a1.43,1.43,0,0,0,1.62-1.61C55.37,7.85,55.3,6.46,55.38,5.07ZM42,15.79a3,3,0,1,1,2.93-3A3.08,3.08,0,0,1,42,15.79ZM19.53,1.14C17.3,1,15.92,2.51,15.64,5.43a3.11,3.11,0,0,1-.25-.2c-.71-.65-.7-.64-1.31.1-.86,1-1.69,2.07-2.59,3.06a83.16,83.16,0,0,1-9.78,9.08,3.61,3.61,0,0,0-1.4,3.76,3.71,3.71,0,0,0,2.82,3c1.59.43,3.09-.25,4.26-1.8A78.23,78.23,0,0,1,18.82,10c.76-.65.76-.65.07-1.37,0,0,0-.12-.05-.19C21.35,8.38,23,7,23,4.8A3.66,3.66,0,0,0,19.53,1.14Zm-8.76,13.3a1,1,0,1,1,1.06-1A1,1,0,0,1,10.77,14.44Zm2.68-2.67a1.23,1.23,0,0,1-.87-.47,1.19,1.19,0,0,1,.06-1.06,9.6,9.6,0,0,1,1.6-1.65,1.15,1.15,0,0,1,1-.08c.28.11.44.49.55.63C15.79,9.94,14.06,11.82,13.45,11.77Z")
2727
};
2828

@@ -32,33 +32,36 @@ internal class SetupData : ICoreSetupData
3232

3333
internal class CoreInstaller : IDependencyInstaller
3434
{
35-
public IDependencyInstaller.ILocalizationHost Host { get; set; }
35+
public IDependencyInstaller.ILocalizationHost Host { get; set; }
3636

37-
public List<IFix> ListFixes() => new();
37+
public List<IFix> Fixes => [];
3838

39-
public List<IDependency> ListDependencies()
39+
public List<IDependency> Dependencies
4040
{
41-
return new List<IDependency>
41+
get
4242
{
43-
new EyeDrivers
44-
{
45-
Host = Host,
46-
Name = Host?.RequestLocalizedString("/Plugins/Kinect360/Dependencies/Eye/Name") ??
47-
"PSEye Drivers"
48-
},
49-
new PsmService
43+
return new List<IDependency>
5044
{
51-
Host = Host,
52-
Name = Host?.RequestLocalizedString("/Plugins/Kinect360/Dependencies/PSMS/Name") ??
53-
"PSMoveService"
54-
},
55-
new VdManager
56-
{
57-
Host = Host,
58-
Name = Host?.RequestLocalizedString("/Plugins/Kinect360/Dependencies/VDM/Name") ??
59-
"Virtual Device Manager"
60-
}
61-
};
45+
new EyeDrivers
46+
{
47+
Host = Host,
48+
Name = Host?.RequestLocalizedString("/Plugins/Kinect360/Dependencies/Eye/Name") ??
49+
"PSEye Drivers"
50+
},
51+
new PsmService
52+
{
53+
Host = Host,
54+
Name = Host?.RequestLocalizedString("/Plugins/Kinect360/Dependencies/PSMS/Name") ??
55+
"PSMoveService"
56+
},
57+
new VdManager
58+
{
59+
Host = Host,
60+
Name = Host?.RequestLocalizedString("/Plugins/Kinect360/Dependencies/VDM/Name") ??
61+
"Virtual Device Manager"
62+
}
63+
};
64+
}
6265
}
6366
}
6467

@@ -345,27 +348,27 @@ internal class ShellLink
345348
[Guid("000214F9-0000-0000-C000-000000000046")]
346349
internal interface IShellLink
347350
{
348-
void GetPath([Out] [MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszFile, int cchMaxPath, out IntPtr pfd,
351+
void GetPath([Out][MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszFile, int cchMaxPath, out IntPtr pfd,
349352
int fFlags);
350353

351354
void GetIDList(out IntPtr ppidl);
352355
void SetIDList(IntPtr pidl);
353-
void GetDescription([Out] [MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszName, int cchMaxName);
356+
void GetDescription([Out][MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszName, int cchMaxName);
354357
void SetDescription([MarshalAs(UnmanagedType.LPWStr)] string pszName);
355-
void GetWorkingDirectory([Out] [MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszDir, int cchMaxPath);
358+
void GetWorkingDirectory([Out][MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszDir, int cchMaxPath);
356359
void SetWorkingDirectory([MarshalAs(UnmanagedType.LPWStr)] string pszDir);
357-
void GetArguments([Out] [MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszArgs, int cchMaxPath);
360+
void GetArguments([Out][MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszArgs, int cchMaxPath);
358361
void SetArguments([MarshalAs(UnmanagedType.LPWStr)] string pszArgs);
359362
void GetHotkey(out short pwHotkey);
360363
void SetHotkey(short wHotkey);
361364
void GetShowCmd(out int piShowCmd);
362365
void SetShowCmd(int iShowCmd);
363366

364-
void GetIconLocation([Out] [MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszIconPath, int cchIconPath,
367+
void GetIconLocation([Out][MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszIconPath, int cchIconPath,
365368
out int piIcon);
366369

367370
void SetIconLocation([MarshalAs(UnmanagedType.LPWStr)] string pszIconPath, int iIcon);
368371
void SetRelativePath([MarshalAs(UnmanagedType.LPWStr)] string pszPathRel, int dwReserved);
369372
void Resolve(IntPtr hwnd, int fFlags);
370373
void SetPath([MarshalAs(UnmanagedType.LPWStr)] string pszFile);
371-
}
374+
}

0 commit comments

Comments
 (0)