Add support for non portable mode (#356)

This commit is contained in:
SSimco 2022-10-11 23:03:26 -07:00 committed by GitHub
parent 2b9edced81
commit d6ba61cf64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 233 additions and 163 deletions

View file

@ -10,6 +10,7 @@
#include <wx/gauge.h>
#include <wx/button.h>
#include <wx/msgdlg.h>
#include <wx/stdpaths.h>
#include <curl/curl.h>
#include <zip.h>
@ -470,7 +471,8 @@ void CemuUpdateWindow::WorkerThread()
break;
// apply update
std::wstring target_directory = ActiveSettings::GetPath().generic_wstring();
fs::path exePath = fs::path(wxStandardPaths::Get().GetExecutablePath().ToStdString());
std::wstring target_directory = exePath.parent_path().generic_wstring();
if (target_directory[target_directory.size() - 1] == '/')
target_directory = target_directory.substr(0, target_directory.size() - 1); // remove trailing /