Skip to content

Commit

Permalink
Switch to more ComputerUtils stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
ComputerElite committed Jul 1, 2021
1 parent 9d3bc3e commit cc0821f
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 242 deletions.
181 changes: 0 additions & 181 deletions ADB.cs

This file was deleted.

1 change: 1 addition & 0 deletions Config.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.IO;
using System.Text.Json;
using ComputerUtils.GraphQL;
using Oculus.API;

namespace RIFT_Downgrader
Expand Down
1 change: 1 addition & 0 deletions GraphQL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Net;
using Oculus.API;
using RIFT_Downgrader;
using ComputerUtils.Logging;

namespace ComputerUtils.GraphQL
{
Expand Down
47 changes: 0 additions & 47 deletions Logger.cs

This file was deleted.

19 changes: 7 additions & 12 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
using System.IO.Compression;
using System.Threading;
using System.Security.Cryptography;
using ADB;
using ComputerUtils.ADB;
using ComputerUtils.Logging;

namespace RIFT_Downgrader
{
Expand Down Expand Up @@ -62,7 +63,7 @@ public static void HandleExtenption(Exception e, string source)

public class Updater
{
public static string version = "1.2.0";
public static string version = "1.2.1";
public bool CheckUpdate()
{
Console.ForegroundColor = ConsoleColor.White;
Expand Down Expand Up @@ -447,17 +448,17 @@ public void LaunchApp(bool openDir = false)
return;
}
ADBInteractor interactor = new ADBInteractor();
Console.WriteLine("Installing apk to Quest if connected:");
Console.WriteLine("Installing apk to Quest if connected (this can take a minute):");
Logger.Log("Installing apk");
if(!interactor.adb("install -r \"" + apk + "\""))
if(!interactor.adb("install -d \"" + apk + "\""))
{
Logger.Log("Install failed", LoggingType.Warning);
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("Install failed. See above for more info");
return;
}
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("APK Installed. You should now be able to install it from your Quest");
Console.WriteLine("APK Installed. You should now be able to launch it from your Quest");
return;
}
Logger.Log("Launching selected version");
Expand Down Expand Up @@ -986,7 +987,7 @@ public string QuestionString(string question)

public void CreateDirectoryIfNotExisting(string path)
{
if (Directory.Exists(path)) Directory.CreateDirectory(path);
if (!Directory.Exists(path)) Directory.CreateDirectory(path);
}

public void RecreateDirectoryIfExisting(string path)
Expand All @@ -996,12 +997,6 @@ public void RecreateDirectoryIfExisting(string path)
}
}

public enum Headset
{
RIFT = 0,
MONTEREY = 1 //aka quest
}

public class GitHubTag
{
public string name { get; set; } = "";
Expand Down
8 changes: 6 additions & 2 deletions RIFT Downgrader.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,9 @@
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="ADB.cs" />
<Compile Include="API.cs" />
<Compile Include="Config.cs" />
<Compile Include="GraphQL.cs" />
<Compile Include="Logger.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Update.cs" />
Expand All @@ -77,5 +75,11 @@
<None Include="app.manifest" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\ComputerUtils\ComputerUtils\ComputerUtils.csproj">
<Project>{f4a6aa3f-d1b6-42b4-9183-ca3f2d75c7df}</Project>
<Name>ComputerUtils</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

0 comments on commit cc0821f

Please sign in to comment.