Skip to content

Commit

Permalink
Remove ZenovaBackend
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePixelGamer committed Apr 24, 2022
1 parent 13e53db commit 12de498
Show file tree
Hide file tree
Showing 16 changed files with 49 additions and 346 deletions.
2 changes: 0 additions & 2 deletions ZenovaBackend/.gitignore

This file was deleted.

26 changes: 0 additions & 26 deletions ZenovaBackend/TokenBrokerInternal.idl

This file was deleted.

137 changes: 0 additions & 137 deletions ZenovaBackend/ZenovaBackend.vcxproj

This file was deleted.

33 changes: 0 additions & 33 deletions ZenovaBackend/ZenovaBackend.vcxproj.filters

This file was deleted.

43 changes: 0 additions & 43 deletions ZenovaBackend/main.cpp

This file was deleted.

4 changes: 0 additions & 4 deletions ZenovaBackend/packages.config

This file was deleted.

19 changes: 0 additions & 19 deletions ZenovaLauncher.sln
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@ MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZenovaLauncher", "ZenovaLauncher\ZenovaLauncher.csproj", "{32C4B338-788C-48D1-A8F0-FE480D3AE5E5}"
ProjectSection(ProjectDependencies) = postProject
{167B4E2C-FEC6-4789-9558-E0B7C79D55C1} = {167B4E2C-FEC6-4789-9558-E0B7C79D55C1}
{B7336BA7-1E83-43D8-BD0E-3D44C6E3D4E7} = {B7336BA7-1E83-43D8-BD0E-3D44C6E3D4E7}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZenovaBackend", "ZenovaBackend\ZenovaBackend.vcxproj", "{B7336BA7-1E83-43D8-BD0E-3D44C6E3D4E7}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZenovaLoader", "ZenovaLoader\ZenovaLoader.vcxproj", "{167B4E2C-FEC6-4789-9558-E0B7C79D55C1}"
EndProject
Global
Expand Down Expand Up @@ -47,22 +44,6 @@ Global
{32C4B338-788C-48D1-A8F0-FE480D3AE5E5}.Release|x64.Build.0 = Release|Any CPU
{32C4B338-788C-48D1-A8F0-FE480D3AE5E5}.Release|x86.ActiveCfg = Release|Any CPU
{32C4B338-788C-48D1-A8F0-FE480D3AE5E5}.Release|x86.Build.0 = Release|Any CPU
{B7336BA7-1E83-43D8-BD0E-3D44C6E3D4E7}.Debug|Any CPU.ActiveCfg = Debug|Win32
{B7336BA7-1E83-43D8-BD0E-3D44C6E3D4E7}.Debug|Any CPU.Build.0 = Debug|Win32
{B7336BA7-1E83-43D8-BD0E-3D44C6E3D4E7}.Debug|ARM.ActiveCfg = Debug|Win32
{B7336BA7-1E83-43D8-BD0E-3D44C6E3D4E7}.Debug|ARM64.ActiveCfg = Debug|Win32
{B7336BA7-1E83-43D8-BD0E-3D44C6E3D4E7}.Debug|x64.ActiveCfg = Debug|x64
{B7336BA7-1E83-43D8-BD0E-3D44C6E3D4E7}.Debug|x64.Build.0 = Debug|x64
{B7336BA7-1E83-43D8-BD0E-3D44C6E3D4E7}.Debug|x86.ActiveCfg = Debug|Win32
{B7336BA7-1E83-43D8-BD0E-3D44C6E3D4E7}.Debug|x86.Build.0 = Debug|Win32
{B7336BA7-1E83-43D8-BD0E-3D44C6E3D4E7}.Release|Any CPU.ActiveCfg = Release|Win32
{B7336BA7-1E83-43D8-BD0E-3D44C6E3D4E7}.Release|Any CPU.Build.0 = Release|Win32
{B7336BA7-1E83-43D8-BD0E-3D44C6E3D4E7}.Release|ARM.ActiveCfg = Release|Win32
{B7336BA7-1E83-43D8-BD0E-3D44C6E3D4E7}.Release|ARM64.ActiveCfg = Release|Win32
{B7336BA7-1E83-43D8-BD0E-3D44C6E3D4E7}.Release|x64.ActiveCfg = Release|x64
{B7336BA7-1E83-43D8-BD0E-3D44C6E3D4E7}.Release|x64.Build.0 = Release|x64
{B7336BA7-1E83-43D8-BD0E-3D44C6E3D4E7}.Release|x86.ActiveCfg = Release|Win32
{B7336BA7-1E83-43D8-BD0E-3D44C6E3D4E7}.Release|x86.Build.0 = Release|Win32
{167B4E2C-FEC6-4789-9558-E0B7C79D55C1}.Debug|Any CPU.ActiveCfg = Debug|Win32
{167B4E2C-FEC6-4789-9558-E0B7C79D55C1}.Debug|ARM.ActiveCfg = Debug|Win32
{167B4E2C-FEC6-4789-9558-E0B7C79D55C1}.Debug|ARM64.ActiveCfg = Debug|Win32
Expand Down
1 change: 1 addition & 0 deletions ZenovaLauncher/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public void AppStart(object sender, StartupEventArgs e)
VersionDownloader.standard = new VersionDownloader();
Trace.WriteLine("VersionDownloader.standard " + sw.ElapsedMilliseconds + " ms");
VersionDownloader.user = new VersionDownloader();
await VersionDownloader.user.EnableUserAuthorization();
Trace.WriteLine("VersionDownloader.user " + sw.ElapsedMilliseconds + " ms");
VersionManager.instance = new VersionManager(VersionsDirectory);
Trace.WriteLine("VersionManager.instance " + sw.ElapsedMilliseconds + " ms");
Expand Down
2 changes: 1 addition & 1 deletion ZenovaLauncher/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public MainWindow()

private async void AccountChanged(object sender, SelectionChangedEventArgs e)
{
await VersionDownloader.user.EnableUserAuthorization();
// Kept here to not break anything
}

private void NavView_ItemInvoked(object sender, HamburgerMenuItemInvokedEventArgs e)
Expand Down
23 changes: 17 additions & 6 deletions ZenovaLauncher/Profiles/AccountManager.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
using System;
using Microsoft.Win32;
using System;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Threading.Tasks;
using System.Linq;
using System.Threading.Tasks;
using Windows.Security.Authentication.Web.Core;
using Windows.Security.Credentials;

namespace ZenovaLauncher
{
Expand All @@ -14,10 +17,18 @@ public class AccountManager : ObservableCollection<MSAccount>

public async Task AddAccounts()
{
Trace.WriteLine("AddAccounts");
var accounts = await ZenovaBackend.GetMSAccounts();
foreach (Tuple<string, string> account in accounts)
Add(new MSAccount(account.Item1, account.Item2));
Trace.WriteLine("AddAccounts");
WebAccountProvider provider = await WebAuthenticationCoreManager.FindAccountProviderAsync("https://login.microsoft.com", "consumers");
RegistryKey accountIdsReg = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\IdentityCRL\\UserTileData");
if (accountIdsReg != null)
{
string[] accountsIds = Array.FindAll(accountIdsReg.GetValueNames(), s => !s.EndsWith("_ETAG"));
foreach (var accountsId in accountsIds)
{
var account = await WebAuthenticationCoreManager.FindAccountAsync(provider, accountsId);
Add(new MSAccount(account.UserName, account.Id));
}
}
SelectedAccount = this.First();
Trace.WriteLine("AddAccounts finished");
}
Expand Down
2 changes: 0 additions & 2 deletions ZenovaLauncher/SetupZenovaLauncher.iss
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{
[Files]
Source: "ZenovaAPI.dll"; DestDir: "{code:GetDataDir}"; Flags: ignoreversion
Source: "bin\Release\ZenovaLauncher.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\Release\ZenovaBackend.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\Release\ZenovaLoader"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\Release\ControlzEx.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\Release\MahApps.Metro.dll"; DestDir: "{app}"; Flags: ignoreversion
Expand All @@ -56,7 +55,6 @@ Source: "bin\Release\Newtonsoft.Json.dll"; DestDir: "{app}"; Flags: ignoreversio
Source: "bin\Release\Octokit.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\Release\System.ValueTuple.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\Release\System.Windows.Interactivity.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\Release\Windows.Internal.Security.Authentication.Web.winmd"; DestDir: "{app}"; Flags: ignoreversion
Source: "dev\*"; DestDir: "{code:GetDataDir}\dev"; Flags: ignoreversion recursesubdirs

[Dirs]
Expand Down
6 changes: 3 additions & 3 deletions ZenovaLauncher/Utils/WUProtocol.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ public class WUProtocol
private static XNamespace wuws = "http://schemas.microsoft.com/msus/2014/10/WindowsUpdateAuthorization";
private static XNamespace wuclient = "http://www.microsoft.com/SoftwareDistribution/Server/ClientWebService";

public string MSAUserToken { get; set; }
public string[] MSAUserToken { get; set; }

private XElement BuildWUTickets()
{
XElement tickets = new XElement(wuws + "WindowsUpdateTicketsToken",
new XAttribute(secutil + "id", "ClientMSA"),
new XAttribute(XNamespace.Xmlns + "wsu", secutil),
new XAttribute(XNamespace.Xmlns + "wuws", wuws));
if (MSAUserToken != null)
foreach (string token in MSAUserToken)
{
tickets.Add(new XElement("TicketType",
new XAttribute("Name", "MSA"),
new XAttribute("Version", "1.0"),
new XAttribute("Policy", "MBI_SSL"),
new XElement("User", MSAUserToken)));
new XElement("User", token)));
}
tickets.Add(new XElement("TicketType", "",
new XAttribute("Name", "AAD"),
Expand Down
Loading

0 comments on commit 12de498

Please sign in to comment.