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 11, 2024
1 parent d0825a0 commit 78f51ae
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/gui/CemuUpdateWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,27 @@ void CemuUpdateWindow::OnClose(wxCloseEvent& event)
exit(0);
}
#elif BOOST_OS_MACOS

if (m_restartRequired)
{
const auto tmppath = fs::temp_directory_path() / L"cemu_update/Cemu.dmg";
if (fork() == 0 ) {
execlp("hdiutil", "hdiutil", "attach", tmppath.c_str(), NULL);
} else {
wait(NULL);
}
if (fork() == 0 ) {
execlp("cp", "cp", "-rf", "/Volumes/Cemu/Cemu.app", "/Users/macdeveloper/Desktop/new/", NULL);
} else {
wait(NULL);
}
if (fork() == 0 ) {
execlp("hdiutil", "hdiutil", "detach", "/Volumes/Cemu/", NULL);
} else {
wait(NULL);
}
execlp("open", "open", "-n", "/Users/macdeveloper/Desktop/new/Cemu.app", NULL);
exit(0);
}
#endif
}

Expand Down

0 comments on commit 78f51ae

Please sign in to comment.