Skip to content

Commit

Permalink
Update CemuUpdateWindow.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
qurious-pixel authored Apr 20, 2024
1 parent 613cf8e commit c77c3df
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/gui/CemuUpdateWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -503,18 +503,15 @@ void CemuUpdateWindow::WorkerThread()
fs::rename(exec, target_exe);
m_restartFile = exec;
#elif BOOST_OS_LINUX
if (std::getenv("APPIMAGE"))
{
std::string target_directory = exePath.parent_path().generic_string();
const auto exec = exePath;
const auto target_exe = fs::path(exePath).replace_extension("AppImage.backup");
const char* appimage_path = std::getenv("APPIMAGE");
const auto target_exe = fs::path(appimage_path).replace_extension("AppImage.backup");
const char* filePath = update_file.c_str();
mode_t permissions = S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH;
fs::rename(exec, target_exe);
m_restartFile = exec;
fs::rename(appimage_path, target_exe);
m_restartFile = appimage_path;
chmod(filePath, permissions);
wxCopyFile (wxT("/tmp/cemu_update/Cemu.AppImage"), wxT("/home/ubuntu/Downloads/Cemu.AppImage"));
}
wxString wxAppPath = wxString::FromUTF8(appimage_path);
wxCopyFile (wxT("/tmp/cemu_update/Cemu.AppImage"), wxT(wxAppPath));
#elif BOOST_OS_MACOS

#endif
Expand Down

0 comments on commit c77c3df

Please sign in to comment.