Skip to content

Commit

Permalink
Add application icon, update gif in readme
Browse files Browse the repository at this point in the history
Some small cleanup
  • Loading branch information
Ybalrid committed May 9, 2021
1 parent 58f3bb0 commit 44e9afe
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,21 @@
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down Expand Up @@ -57,6 +72,9 @@
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>OpenXR_LogoBug_48px_Nov17.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
Expand Down Expand Up @@ -125,5 +143,20 @@
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Resource Include="OpenXR_LogoBug_48px_Nov17.ico" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("OpenXR-Runtime-Manager")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyDescription("Application to visualize and change the system's current OpenXR runtime")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OpenXR-Runtime-Manager")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyCopyright("Copyright © 2021 Arthur Brainville (Ybalrid)")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down Expand Up @@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("0.1.2.0")]
[assembly: AssemblyFileVersion("0.1.2.0")]
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 9 additions & 10 deletions OpenXR-Runtime-Manager/OpenXR-Runtime-Manager/RuntimeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace OpenXR_Runtime_Manager
class RuntimeManager
{
//TODO make a database of paths to manifest for known OpenXR runtimes that are compatible with MS Windows
string[] WellKnwonOpenXRRuntimeManifestPaths = new string[]
string[] WellKnwonOpenXRRuntimeManifestPaths =
{
"%ProgramFiles(x86)%\\Steam\\steamapps\\common\\SteamVR\\steamxr_win64.json",
"%ProgramFiles%\\Oculus\\Support\\oculus-runtime\\oculus_openxr_32.json",
Expand All @@ -23,8 +23,8 @@ class RuntimeManager
private Runtime _activeRuntime = null;

public bool HasActiveRuntime => _activeRuntime != null;

public Runtime ActiveRuntime => _activeRuntime;

public List<string> AvailableRuntimeNames
{
get
Expand Down Expand Up @@ -85,9 +85,7 @@ private void Handle32bit(Runtime runtime)

private bool GetActiveRuntimeFromRegistry()
{
const int OpenXRVersion = 1;
string KhronosOpenXRPath = $@"SOFTWARE\Khronos\OpenXR\{OpenXRVersion}";
RegistryKey OpenXRV1Key = Registry.LocalMachine.OpenSubKey(KhronosOpenXRPath);
RegistryKey OpenXRV1Key = Registry.LocalMachine.OpenSubKey(GetKhronosOpenXRVersionRegistryKeyPath());
var activeRuntimeManifestPath = (string)OpenXRV1Key?.GetValue("ActiveRuntime");

if (string.IsNullOrEmpty(activeRuntimeManifestPath)) return false;
Expand Down Expand Up @@ -128,11 +126,7 @@ public bool SetRuntimeAsSystem(string name)
{
if (_availableRuntimes.TryGetValue(name, out var runtime))
{

//TODO refactor this
const int OpenXRVersion = 1;
string KhronosOpenXRPath = $@"SOFTWARE\Khronos\OpenXR\{OpenXRVersion}";
RegistryKey OpenXRV1Key = Registry.LocalMachine.CreateSubKey(KhronosOpenXRPath, true);
RegistryKey OpenXRV1Key = Registry.LocalMachine.CreateSubKey(GetKhronosOpenXRVersionRegistryKeyPath(), true);

try
{
Expand All @@ -149,6 +143,11 @@ public bool SetRuntimeAsSystem(string name)
return false;
}

private static string GetKhronosOpenXRVersionRegistryKeyPath(int OpenXRVersion = 1)
{
return $@"SOFTWARE\Khronos\OpenXR\{OpenXRVersion}";
}

public RuntimeManager()
{
GetActiveRuntimeFromRegistry();
Expand Down
Binary file modified ui.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 44e9afe

Please sign in to comment.