WIP 2 on the Updater. Updater.exe won't boot now for some reason...

This commit is contained in:
MelonSpeedruns 2020-01-31 14:21:16 -05:00 committed by Ash
commit b756d61292
5 changed files with 15 additions and 8 deletions

View file

@ -72,6 +72,8 @@ namespace Ryujinx.Updater
versionNumber = metaFileData[0]; versionNumber = metaFileData[0];
downloadUrl = metaFileData[1]; downloadUrl = metaFileData[1];
MessageBox.Show(downloadUrl);
using (WebClient client = new WebClient()) using (WebClient client = new WebClient())
{ {
client.DownloadFile(downloadUrl, updateSaveLocation); client.DownloadFile(downloadUrl, updateSaveLocation);

View file

@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"> <Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup> <PropertyGroup>
<OutputType>WinExe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework> <TargetFramework>netcoreapp3.0</TargetFramework>
<UseWindowsForms>true</UseWindowsForms> <UseWindowsForms>true</UseWindowsForms>
<StartupObject>Ryujinx.Updater.Program</StartupObject> <StartupObject></StartupObject>
<AssemblyName>Updater</AssemblyName> <AssemblyName>Updater</AssemblyName>
<ApplicationIcon>Ryujinx.ico</ApplicationIcon> <ApplicationIcon>Ryujinx.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>

View file

@ -16,8 +16,6 @@ using System.Reflection;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Utf8Json;
using Utf8Json.Resolvers;
using GUI = Gtk.Builder.ObjectAttribute; using GUI = Gtk.Builder.ObjectAttribute;

View file

@ -80,12 +80,19 @@ namespace Ryujinx.Updater.Parser
{ {
try try
{ {
// Create Meta.json
List<String> metaFileContents = new List<string>();
metaFileContents.Add(_buildVer);
metaFileContents.Add(_buildArt);
File.WriteAllLines(Path.Combine(RyuDir, "Meta.json"), metaFileContents);
// Start Updater.exe // Start Updater.exe
string updaterPath = Path.Combine(RyuDir, "Updater.exe"); string updaterPath = Path.Combine(RyuDir, "Updater.exe");
Process.Start(new ProcessStartInfo(updaterPath) { UseShellExecute = true }); Process.Start(updaterPath);
Application.Quit();
} }
catch (Exception ex) catch (Exception ex)
{ {