From e575a7a3d533d06d8c1bbcdef6ca544d6c033e69 Mon Sep 17 00:00:00 2001 From: Nayla Hanegan Date: Fri, 23 Jun 2023 15:25:44 -0400 Subject: [PATCH] improve auto updater now just needs 1 exe --- Data/Updater/UpdateSilent.bat | 3 +++ Data/Updater/Updater.ini | 4 ++-- Source/Core/DolphinQt/Main.cpp | 5 +++++ Source/Core/DolphinQt/MainWindow.cpp | 2 ++ 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 Data/Updater/UpdateSilent.bat diff --git a/Data/Updater/UpdateSilent.bat b/Data/Updater/UpdateSilent.bat new file mode 100644 index 0000000000..a81ef7dd2d --- /dev/null +++ b/Data/Updater/UpdateSilent.bat @@ -0,0 +1,3 @@ +@echo off +"Updater.exe" /S + diff --git a/Data/Updater/Updater.ini b/Data/Updater/Updater.ini index c01375806b..4c719d1acd 100644 --- a/Data/Updater/Updater.ini +++ b/Data/Updater/Updater.ini @@ -1,10 +1,10 @@ [General] AppName=Dolphin MPN -AppVersion=1 +AppVersion=6 GUID= MainExe=Dolphin-MPN.exe ReadMethod=2 -UpdateURL=http://cdn.marioparty.online/update-dolphin.txt +UpdateURL=https://pastebin.com/raw/41eE6A01 AllUsers=0 Admin=0 x64=0 diff --git a/Source/Core/DolphinQt/Main.cpp b/Source/Core/DolphinQt/Main.cpp index dd6afd46d3..46ba9f4736 100644 --- a/Source/Core/DolphinQt/Main.cpp +++ b/Source/Core/DolphinQt/Main.cpp @@ -153,6 +153,11 @@ int main(int argc, char* argv[]) QCoreApplication::setOrganizationDomain(QStringLiteral("dolphin-emu.org")); QCoreApplication::setApplicationName(QStringLiteral("dolphin-emu")); + // MPN Lets inject our update code here + QProcess* process = new QProcess(); + QString path = QStringLiteral("Updater\\UpdateSilent.bat"); + process->start(path); + // QApplication will parse arguments and remove any it recognizes as targeting Qt QApplication app(argc, argv); diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp index 16feb9a1c5..63b4a87f18 100644 --- a/Source/Core/DolphinQt/MainWindow.cpp +++ b/Source/Core/DolphinQt/MainWindow.cpp @@ -142,6 +142,8 @@ #undef None #endif +#include + #if defined(__unix__) || defined(__unix) || defined(__APPLE__) void MainWindow::OnSignal() {