diff --git a/checkin_notes b/checkin_notes index 81f4c5af1a..c9f40e37f0 100755 --- a/checkin_notes +++ b/checkin_notes @@ -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 diff --git a/clientgui/ViewWork.cpp b/clientgui/ViewWork.cpp index 19f6a1f519..618dc8e576 100644 --- a/clientgui/ViewWork.cpp +++ b/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());