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
|
screensaver_win.cpp
|
||||||
|
|
||||||
Charlie 28 Aug 2007
|
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".
|
"gfx_mmap_file".
|
||||||
Fix a compiler warning.
|
Fix a compiler warning.
|
||||||
- Mac: Move Mac screensaver files to common clientscr/ directory.
|
- Mac: Move Mac screensaver files to common clientscr/ directory.
|
||||||
|
@ -8194,7 +8194,12 @@ Charlie 28 Aug 2007
|
||||||
project.pbxproj
|
project.pbxproj
|
||||||
|
|
||||||
Charlie 28 Aug 2007
|
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/
|
api/
|
||||||
graphics2_unix.C
|
graphics2_unix.C
|
||||||
|
clientgui/
|
||||||
|
ViewWork.cpp
|
||||||
|
|
|
@ -233,6 +233,14 @@ void CViewWork::OnWorkShowGraphics( wxCommandEvent& WXUNUSED(event) ) {
|
||||||
if (wxYES == iAnswer) {
|
if (wxYES == iAnswer) {
|
||||||
RESULT* result = pDoc->result(m_pListPane->GetFirstSelected());
|
RESULT* result = pDoc->result(m_pListPane->GetFirstSelected());
|
||||||
if (!result->graphics_exec_path.empty()) {
|
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
|
// V6 Graphics
|
||||||
char* argv[2];
|
char* argv[2];
|
||||||
argv[0] = "--graphics";
|
argv[0] = "--graphics";
|
||||||
|
@ -250,6 +258,7 @@ void CViewWork::OnWorkShowGraphics( wxCommandEvent& WXUNUSED(event) ) {
|
||||||
0,
|
0,
|
||||||
id
|
id
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
// V5 and Older
|
// V5 and Older
|
||||||
std::string strDefaultWindowStation = std::string((const char*)wxGetApp().m_strDefaultWindowStation.mb_str());
|
std::string strDefaultWindowStation = std::string((const char*)wxGetApp().m_strDefaultWindowStation.mb_str());
|
||||||
|
|
Loading…
Reference in New Issue