mirror of https://github.com/BOINC/boinc.git
Launch the graphics application via a shell by using the UNIX system() api
svn path=/trunk/boinc/; revision=13491
This commit is contained in:
parent
d72c982f7f
commit
37dd3aeec8
|
@ -8164,7 +8164,7 @@ Rom 28 Aug 2007
|
|||
screensaver_win.cpp
|
||||
|
||||
Charlie 28 Aug 2007
|
||||
- Mac V2 GFX: Create same shmem file name as for Windows, instead of
|
||||
- Mac V6 GFX: Create same shmem file name as for Windows, instead of
|
||||
"gfx_mmap_file".
|
||||
Fix a compiler warning.
|
||||
- Mac: Move Mac screensaver files to common clientscr/ directory.
|
||||
|
@ -8194,7 +8194,12 @@ Charlie 28 Aug 2007
|
|||
project.pbxproj
|
||||
|
||||
Charlie 28 Aug 2007
|
||||
- Mac V2 GFX: Fix link error when building example app.
|
||||
- Mac V6 GFX: Fix link error when building example app.
|
||||
- Mac MGR: Launch the graphics application via a shell by using
|
||||
the UNIX system() api. This works around "RegisterProcess
|
||||
failed (error = -50)" when using fork() and execv().
|
||||
|
||||
api/
|
||||
graphics2_unix.C
|
||||
clientgui/
|
||||
ViewWork.cpp
|
||||
|
|
|
@ -233,6 +233,14 @@ void CViewWork::OnWorkShowGraphics( wxCommandEvent& WXUNUSED(event) ) {
|
|||
if (wxYES == iAnswer) {
|
||||
RESULT* result = pDoc->result(m_pListPane->GetFirstSelected());
|
||||
if (!result->graphics_exec_path.empty()) {
|
||||
#ifdef __WXMAC__
|
||||
// Launching the graphics application using fork() and execv()
|
||||
// results in it getting "RegisterProcess failed (error = -50)"
|
||||
// so we launch it via a shell using the system() api.
|
||||
char cmd[1024];
|
||||
sprintf(cmd, "cd \"%s\"; \"%s\" --graphics &", result->slot_path.c_str(), result->graphics_exec_path.c_str());
|
||||
system(cmd);
|
||||
#else
|
||||
// V6 Graphics
|
||||
char* argv[2];
|
||||
argv[0] = "--graphics";
|
||||
|
@ -250,6 +258,7 @@ void CViewWork::OnWorkShowGraphics( wxCommandEvent& WXUNUSED(event) ) {
|
|||
0,
|
||||
id
|
||||
);
|
||||
#endif
|
||||
} else {
|
||||
// V5 and Older
|
||||
std::string strDefaultWindowStation = std::string((const char*)wxGetApp().m_strDefaultWindowStation.mb_str());
|
||||
|
|
Loading…
Reference in New Issue