This commit is contained in:
Thomas G 2022-07-13 16:51:41 +10:00
parent 124401f748
commit 284e3d071e
24 changed files with 156 additions and 12 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<_LastSelectedProfileId>C:\Users\Thomas\source\repos\ARCHBLOXLauncher1\Properties\PublishProfiles\x86.pubxml</_LastSelectedProfileId> <_LastSelectedProfileId>C:\Users\Thomas\source\repos\ARCHBLOXLauncher1\Properties\PublishProfiles\x64.pubxml</_LastSelectedProfileId>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Update="Form1.cs"> <Compile Update="Form1.cs">

View File

@ -19,6 +19,7 @@ namespace ARCHBLOXLauncher1
{ {
public partial class Form2 : Form public partial class Form2 : Form
{ {
public bool Uri_Installed = false;
public bool IsCompleted = false; public bool IsCompleted = false;
public bool DontEvenBother = false; public bool DontEvenBother = false;
private static WebClient wc = new WebClient(); private static WebClient wc = new WebClient();
@ -90,6 +91,7 @@ namespace ARCHBLOXLauncher1
{ {
if (IsCompleted == false) if (IsCompleted == false)
{ {
IsCompleted = true; IsCompleted = true;
byte[] raw = wc.DownloadData("https://archblox.com/client/version.txt"); byte[] raw = wc.DownloadData("https://archblox.com/client/version.txt");
string webData = Encoding.UTF8.GetString(raw); string webData = Encoding.UTF8.GetString(raw);
@ -99,8 +101,22 @@ namespace ARCHBLOXLauncher1
string filePath = Path.Combine(clientPath, Path.GetFileName(@"https://archblox.com/client/" + version_string + ".zip")); string filePath = Path.Combine(clientPath, Path.GetFileName(@"https://archblox.com/client/" + version_string + ".zip"));
ZipFile.ExtractToDirectory(filePath, clientPath); ZipFile.ExtractToDirectory(filePath, clientPath);
File.Delete(filePath); File.Delete(filePath);
label1.Text = "Install completed!"; label1.Text = "Installing URi...";
ARCHBLOXProtocol.ARCHBLOXURIProtocol.Register(); try
{
System.AppDomain.CurrentDomain.SetPrincipalPolicy(System.Security.Principal.PrincipalPolicy.WindowsPrincipal);
ARCHBLOXProtocol.ARCHBLOXURIProtocol.Register();
Uri_Installed = true;
}
catch { Uri_Installed = false; }
if (Uri_Installed == true)
{
label1.Text = "ARCHBLOX has been installed!";
} else
{
label1.Text = "ARCHBLOX has been installed without URI.";
}
} }
} }

View File

@ -4,6 +4,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
--> -->
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<History>True|2022-07-13T06:20:04.4747082Z;True|2022-07-13T00:37:48.5001758+10:00;True|2022-07-13T00:37:23.7218937+10:00;True|2022-07-13T00:35:56.1276705+10:00;True|2022-07-12T20:31:31.4891674+10:00;True|2022-07-12T07:42:57.8030421+10:00;True|2022-07-12T07:24:22.2110673+10:00;True|2022-07-12T07:12:22.1327523+10:00;True|2022-07-12T01:02:07.4142780+10:00;True|2022-07-12T01:01:55.1054218+10:00;True|2022-07-12T00:57:05.7704097+10:00;True|2022-07-11T19:45:06.3965836+10:00;True|2022-07-11T03:03:05.5235378+10:00;True|2022-07-11T01:29:52.2575986+10:00;True|2022-07-11T01:29:03.7081553+10:00;True|2022-07-11T01:07:30.8355486+10:00;True|2022-07-11T00:18:27.1107980+10:00;True|2022-07-10T21:59:11.0753271+10:00;True|2022-07-10T19:15:49.4105023+10:00;True|2022-07-10T19:13:41.3098116+10:00;True|2022-07-10T19:12:41.5715908+10:00;</History> <History>True|2022-07-13T06:47:01.0681916Z;True|2022-07-13T16:28:49.6060671+10:00;False|2022-07-13T16:28:36.6234772+10:00;True|2022-07-13T16:27:25.2155759+10:00;True|2022-07-13T16:20:04.4747082+10:00;True|2022-07-13T00:37:48.5001758+10:00;True|2022-07-13T00:37:23.7218937+10:00;True|2022-07-13T00:35:56.1276705+10:00;True|2022-07-12T20:31:31.4891674+10:00;True|2022-07-12T07:42:57.8030421+10:00;True|2022-07-12T07:24:22.2110673+10:00;True|2022-07-12T07:12:22.1327523+10:00;True|2022-07-12T01:02:07.4142780+10:00;True|2022-07-12T01:01:55.1054218+10:00;True|2022-07-12T00:57:05.7704097+10:00;True|2022-07-11T19:45:06.3965836+10:00;True|2022-07-11T03:03:05.5235378+10:00;True|2022-07-11T01:29:52.2575986+10:00;True|2022-07-11T01:29:03.7081553+10:00;True|2022-07-11T01:07:30.8355486+10:00;True|2022-07-11T00:18:27.1107980+10:00;True|2022-07-10T21:59:11.0753271+10:00;True|2022-07-10T19:15:49.4105023+10:00;True|2022-07-10T19:13:41.3098116+10:00;True|2022-07-10T19:12:41.5715908+10:00;</History>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@ -8,7 +8,7 @@
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace ARCHBLOXLauncher1.Properties { namespace ARCHBLOXLauncherGUI.Properties {
using System; using System;
@ -39,7 +39,7 @@ namespace ARCHBLOXLauncher1.Properties {
internal static global::System.Resources.ResourceManager ResourceManager { internal static global::System.Resources.ResourceManager ResourceManager {
get { get {
if (object.ReferenceEquals(resourceMan, null)) { if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ARCHBLOXLauncher1.Properties.Resources", typeof(Resources).Assembly); global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ARCHBLOXLauncherGUI.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp; resourceMan = temp;
} }
return resourceMan; return resourceMan;

View File

@ -9,7 +9,6 @@ namespace ARCHBLOXProtocol
{ {
public static string Arguments = ""; public static string Arguments = "";
}; };
[PrincipalPermission(SecurityAction.Demand, Role = @"BUILTIN\Administrators")]
internal static class ARCHBLOXURIProtocol internal static class ARCHBLOXURIProtocol
{ {
private const string _Protocol = "archblox"; private const string _Protocol = "archblox";
@ -71,6 +70,9 @@ namespace ARCHBLOXProtocol
internal static void Unregister() internal static void Unregister()
{ {
PrincipalPermission principalPerm = new PrincipalPermission(null, "Administrators");
principalPerm.Demand();
if (!_isWin8) if (!_isWin8)
{ {
Registry.ClassesRoot.DeleteSubKeyTree("archblox", false); Registry.ClassesRoot.DeleteSubKeyTree("archblox", false);

View File

@ -0,0 +1,75 @@
{
"format": 1,
"restore": {
"C:\\Users\\Thomas\\source\\repos\\ARCHBLOXLauncher1\\ARCHBLOXLauncherGUI.csproj": {}
},
"projects": {
"C:\\Users\\Thomas\\source\\repos\\ARCHBLOXLauncher1\\ARCHBLOXLauncherGUI.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Users\\Thomas\\source\\repos\\ARCHBLOXLauncher1\\ARCHBLOXLauncherGUI.csproj",
"projectName": "ARCHBLOXLauncherGUI",
"projectPath": "C:\\Users\\Thomas\\source\\repos\\ARCHBLOXLauncher1\\ARCHBLOXLauncherGUI.csproj",
"packagesPath": "C:\\Users\\Thomas\\.nuget\\packages\\",
"outputPath": "C:\\Users\\Thomas\\source\\repos\\ARCHBLOXLauncher1\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configFilePaths": [
"C:\\Users\\Thomas\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"netcoreapp3.1"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"netcoreapp3.1": {
"targetAlias": "netcoreapp3.1",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"netcoreapp3.1": {
"targetAlias": "netcoreapp3.1",
"dependencies": {
"DiscordRichPresence": {
"target": "Package",
"version": "[1.0.175, )"
}
},
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
},
"Microsoft.WindowsDesktop.App.WindowsForms": {
"privateAssets": "none"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.300\\RuntimeIdentifierGraph.json"
}
}
}
}
}

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\Thomas\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.2.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\Thomas\.nuget\packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />

View File

@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("ARCHBLOXLauncherGUI")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("ARCHBLOXLauncherGUI")]
[assembly: System.Reflection.AssemblyTitleAttribute("ARCHBLOXLauncherGUI")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Generated by the MSBuild WriteCodeFragment class.

View File

@ -0,0 +1 @@
6f9d16c093487edd1e5a5cc9891c502fd7bc9069

View File

@ -0,0 +1,9 @@
is_global = true
build_property.ApplicationManifest =
build_property.StartupObject =
build_property.ApplicationDefaultFont =
build_property.ApplicationHighDpiMode =
build_property.ApplicationUseCompatibleTextRendering =
build_property.ApplicationVisualStyles =
build_property.RootNamespace = ARCHBLOXLauncherGUI
build_property.ProjectDir = C:\Users\Thomas\source\repos\ARCHBLOXLauncher1\

View File

@ -302,9 +302,9 @@
"project": { "project": {
"version": "1.0.0", "version": "1.0.0",
"restore": { "restore": {
"projectUniqueName": "C:\\Users\\Thomas\\source\\repos\\ARCHBLOXLauncher1\\ARCHBLOXLauncher1.csproj", "projectUniqueName": "C:\\Users\\Thomas\\source\\repos\\ARCHBLOXLauncher1\\ARCHBLOXLauncherGUI.csproj",
"projectName": "ARCHBLOXLauncher1", "projectName": "ARCHBLOXLauncherGUI",
"projectPath": "C:\\Users\\Thomas\\source\\repos\\ARCHBLOXLauncher1\\ARCHBLOXLauncher1.csproj", "projectPath": "C:\\Users\\Thomas\\source\\repos\\ARCHBLOXLauncher1\\ARCHBLOXLauncherGUI.csproj",
"packagesPath": "C:\\Users\\Thomas\\.nuget\\packages\\", "packagesPath": "C:\\Users\\Thomas\\.nuget\\packages\\",
"outputPath": "C:\\Users\\Thomas\\source\\repos\\ARCHBLOXLauncher1\\obj\\", "outputPath": "C:\\Users\\Thomas\\source\\repos\\ARCHBLOXLauncher1\\obj\\",
"projectStyle": "PackageReference", "projectStyle": "PackageReference",

View File

@ -1,8 +1,8 @@
{ {
"version": 2, "version": 2,
"dgSpecHash": "O1Ougk3yJxkQvs7oFKP4pltYDmC6AJxUN35E+aySNJ5xke83iHDExIGYEN7JQhQohGrIrC2iBD/ywpywpk3b8w==", "dgSpecHash": "t0oyQbfMoANTqGaJsmMte/09bCaDmn6IYWhmYKJw0YjKNI4GvwZxFHaOWvJfBWK7tMEA10t4oUMUOVR9KO9E7Q==",
"success": true, "success": true,
"projectFilePath": "C:\\Users\\Thomas\\source\\repos\\ARCHBLOXLauncher1\\ARCHBLOXLauncher1.csproj", "projectFilePath": "C:\\Users\\Thomas\\source\\repos\\ARCHBLOXLauncher1\\ARCHBLOXLauncherGUI.csproj",
"expectedPackageFiles": [ "expectedPackageFiles": [
"C:\\Users\\Thomas\\.nuget\\packages\\discordrichpresence\\1.0.175\\discordrichpresence.1.0.175.nupkg.sha512", "C:\\Users\\Thomas\\.nuget\\packages\\discordrichpresence\\1.0.175\\discordrichpresence.1.0.175.nupkg.sha512",
"C:\\Users\\Thomas\\.nuget\\packages\\microsoft.netcore.platforms\\2.0.0\\microsoft.netcore.platforms.2.0.0.nupkg.sha512", "C:\\Users\\Thomas\\.nuget\\packages\\microsoft.netcore.platforms\\2.0.0\\microsoft.netcore.platforms.2.0.0.nupkg.sha512",